我正试图按照以下文档:https://github.com/acesso-io/techcore-cvat/blob/develop/cvat/apps/dataset_manager/formats/README.md为CVAT编写一个自定义导入程序。
但我发现了错误:
Error: Request failed with status code 500. "TypeError: __new__() missing 1 required positional argument: 'source'\n".我的代码应该是一个微不足道的导入程序,只是为了测试自定义实现是否有效:
from .registry import dm_env, exporter, importer
@exporter(name='Annotation Support', ext='ZIP', version='1.0')
def _export(dst_file, instance_data, save_images=False):
pass
@importer(name='Annotation Support', ext='ZIP', version='1.0')
def _import(src_file, instance_data, load_data_callback=None):
shape = instance_data.LabeledShape(
type="rectangle",
points=[0, 0, 100, 100],
occluded=False,
attributes=[],
label="car",
outside=False,
frame=1,
)
instance_data.add_shape(shape)发布于 2022-08-23 07:23:10
好吧,所以我想出来了。很明显,医生们还没有完全更新。我不得不把一些乱七八糟的source="something"作为函数参数,这很好。
https://stackoverflow.com/questions/73454421
复制相似问题