diff --git a/deepdataspace/io/importer.py b/deepdataspace/io/importer.py index fe74555..b3f01c8 100644 --- a/deepdataspace/io/importer.py +++ b/deepdataspace/io/importer.py @@ -215,6 +215,7 @@ def run_import(self): self.add_user_data(image) for anno in anno_list: image.batch_add_annotation(**anno) + image.finish_batch_add_annotation() logger.debug(f"time cost of import one image: {int(time.time() * 1000) - beg}ms") logger.debug(f"imported image, id={image.id}, url={image.url}") self.dataset.finish_batch_add_image() diff --git a/deepdataspace/model/image.py b/deepdataspace/model/image.py index 0f85da7..d742636 100644 --- a/deepdataspace/model/image.py +++ b/deepdataspace/model/image.py @@ -456,6 +456,7 @@ def batch_add_annotation(self, conf=conf, is_group=is_group, confirm_type=confirm_type) self.objects.append(anno_obj) + def finish_batch_add_annotation(self): self.dataset.batch_save_image(self)