We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 43f2d0c commit e192e9bCopy full SHA for e192e9b
backend/database/images.py
@@ -150,15 +150,16 @@ def copy_annotations(self, annotations):
150
:return: number of annotations
151
"""
152
annotations = annotations.filter(
153
- width=self.width, height=self.height, area__gt=0).exclude('events')
+ width=self.width, height=self.height).exclude('events')
154
155
for annotation in annotations:
156
- clone = annotation.clone()
+ if annotation.area > 0 or len(annotation.keypoints) > 0:
157
+ clone = annotation.clone()
158
- clone.dataset_id = self.dataset_id
159
- clone.image_id = self.id
+ clone.dataset_id = self.dataset_id
160
+ clone.image_id = self.id
161
- clone.save(copy=True)
162
+ clone.save(copy=True)
163
164
return annotations.count()
165
0 commit comments