ultralytics 8.2.14 add task + OBB to hub.check_dataset() (#12573)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
cf24349efb
commit
fd748e3c7a
5 changed files with 36 additions and 24 deletions
|
|
@ -106,22 +106,26 @@ def get_export(model_id="", format="torchscript"):
|
|||
return r.json()
|
||||
|
||||
|
||||
def check_dataset(path="", task="detect"):
|
||||
def check_dataset(path: str, task: str) -> None:
|
||||
"""
|
||||
Function for error-checking HUB dataset Zip file before upload. It checks a dataset for errors before it is uploaded
|
||||
to the HUB. Usage examples are given below.
|
||||
|
||||
Args:
|
||||
path (str, optional): Path to data.zip (with data.yaml inside data.zip). Defaults to ''.
|
||||
task (str, optional): Dataset task. Options are 'detect', 'segment', 'pose', 'classify'. Defaults to 'detect'.
|
||||
path (str): Path to data.zip (with data.yaml inside data.zip).
|
||||
task (str): Dataset task. Options are 'detect', 'segment', 'pose', 'classify', 'obb'.
|
||||
|
||||
Example:
|
||||
Download *.zip files from https://github.com/ultralytics/hub/tree/main/example_datasets
|
||||
i.e. https://github.com/ultralytics/hub/raw/main/example_datasets/coco8.zip for coco8.zip.
|
||||
```python
|
||||
from ultralytics.hub import check_dataset
|
||||
|
||||
check_dataset('path/to/coco8.zip', task='detect') # detect dataset
|
||||
check_dataset('path/to/coco8-seg.zip', task='segment') # segment dataset
|
||||
check_dataset('path/to/coco8-pose.zip', task='pose') # pose dataset
|
||||
check_dataset('path/to/dota8.zip', task='obb') # OBB dataset
|
||||
check_dataset('path/to/imagenet10.zip', task='classify') # classification dataset
|
||||
```
|
||||
"""
|
||||
HUBDatasetStats(path=path, task=task).get_json()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue