I am trying to write a custom importer for CVAT as per these docs: https://github.com/acesso-io/techcore-cvat/blob/develop/cvat/apps/dataset_manager/formats/README.md.
But I am getting the error:
Error: Request failed with status code 500. "TypeError: __new__() missing 1 required positional argument: 'source'\n".
My code is supposed to be a trivial importer just to test that a custom implementation works:
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)