更新:这似乎是CVAT对其 API 请求的最大大小的限制。为了暂时规避这个问题,我们在FiftyOne的方法中添加了一个task_size
参数annotate()
,该参数会自动将注释运行分解为最多多个任务,task_size
以避免大数据或注释上传。
上一个答案:
现在管理此工作流程的最佳方法是将注释分解为多个任务,然后将它们上传到一个 CVAT 项目,以便能够很好地对它们进行分组和管理。
例如:
import fiftyone as fo
import fiftyone.zoo as foz
dataset = foz.load_zoo_dataset("quickstart").clone()
# The label schema is automatically inferred from the existing labels
# Alternatively, it can be specified with the `label_schema` kwarg
# when calling `annotate()`
label_field = "ground_truth"
# Upload batches of your dataset to different tasks
# all stored in the same project
project_name = "multiple_task_example"
anno_keys = []
for i in range(int(len(dataset)/50)):
anno_key = "example_%d" % i
view = dataset.skip(i*50).limit(50)
view.annotate(
anno_key,
label_field=label_field,
project_name=project_name,
)
anno_keys.append(anno_key)
# Annotate in CVAT...
# Load all annotations and cleanup tasks/project when complete
anno_keys = dataset.list_annotation_runs()
for anno_key in anno_keys:
dataset.load_annotations(anno_key, cleanup=True)
dataset.delete_annotation_run(anno_key)
上传到现有任务和project_name
参数将在下一个版本中可用。如果您想立即使用它,您可以从源代码安装 FiftyOne:https ://github.com/voxel51/fiftyone#installing-from-source
我们正在为像您这样的大型 CVAT 注释作业进行进一步的优化和稳定性改进。