0

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)
Harry Stuart
  • 1,781
  • 2
  • 24
  • 39

1 Answers1

0

Okay, so I figured it out. Apparently the docs aren't fully up-to-date. I had to include some gibberish source="something" as a function argument and it was fine

Harry Stuart
  • 1,781
  • 2
  • 24
  • 39