Reformat Markdown code blocks (#12795)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
2af71d15a6
commit
fceea033ad
128 changed files with 1067 additions and 1018 deletions
|
|
@ -135,14 +135,15 @@ Contributing a new dataset involves several steps to ensure that it aligns well
|
|||
|
||||
```python
|
||||
from pathlib import Path
|
||||
|
||||
from ultralytics.data.utils import compress_one_image
|
||||
from ultralytics.utils.downloads import zip_directory
|
||||
|
||||
# Define dataset directory
|
||||
path = Path('path/to/dataset')
|
||||
path = Path("path/to/dataset")
|
||||
|
||||
# Optimize images in dataset (optional)
|
||||
for f in path.rglob('*.jpg'):
|
||||
for f in path.rglob("*.jpg"):
|
||||
compress_one_image(f)
|
||||
|
||||
# Zip dataset into 'path/to/dataset.zip'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue