Skip to content

Commit

Permalink
Remove annotated check
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbroks authored Feb 25, 2020
1 parent 18b3279 commit 0ab2c84
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions backend/workers/tasks/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def export_annotations(task_id, dataset_id, categories):
db_categories = CategoryModel.objects(id__in=categories, deleted=False) \
.only(*CategoryModel.COCO_PROPERTIES)
db_images = ImageModel.objects(
deleted=False, annotated=True, dataset_id=dataset.id).only(
deleted=False, dataset_id=dataset.id).only(
*ImageModel.COCO_PROPERTIES)
db_annotations = AnnotationModel.objects(
deleted=False, category_id__in=categories)
Expand Down Expand Up @@ -80,6 +80,10 @@ def export_annotations(task_id, dataset_id, categories):
annotations = db_annotations.filter(image_id=image.get('id'))\
.only(*AnnotationModel.COCO_PROPERTIES)
annotations = fix_ids(annotations)

if len(annotations) == 0:
break

num_annotations = 0
for annotation in annotations:

Expand Down Expand Up @@ -303,4 +307,4 @@ def import_annotations(task_id, dataset_id, coco_json):
task.set_progress(100, socket=socket)


__all__ = ["export_annotations", "import_annotations"]
__all__ = ["export_annotations", "import_annotations"]

0 comments on commit 0ab2c84

Please sign in to comment.