Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fixes isbbox flag not working properly #276

Merged
merged 2 commits into from
Oct 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion backend/workers/tasks/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ def import_annotations(task_id, dataset_id, coco_json):
# is_crowd = annotation.get('iscrowed', False)
area = annotation.get('area', 0)
bbox = annotation.get('bbox', [0, 0, 0, 0])
isbbox = annotation.get('isbbox', False)

progress += 1
task.set_progress((progress/total_items)*100, socket=socket)
Expand Down Expand Up @@ -263,11 +264,12 @@ def import_annotations(task_id, dataset_id, coco_json):
if has_keypoints:
annotation_model.keypoints = keypoints

annotation_model.isbbox = isbbox
annotation_model.save()

image_categories.append(category_id)
else:
annotation_model.update(deleted=False)
annotation_model.update(deleted=False, isbbox=isbbox)
task.info(f"Annotation already exists (i:{image_id}, c:{category_id})")

for image_id in images_id:
Expand Down
1 change: 0 additions & 1 deletion client/src/components/annotator/tools/SelectTool.vue
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ export default {
this.moveObject = event.item;
paperObject = event.item;
}
console.log(paperObject, path);
this.isBbox = this.checkBbox(paperObject);
if (this.point != null) {
this.edit.canMove = this.point.contains(event.point);
Expand Down