Skip to content

Commit

Permalink
remove check for 'difficult' attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
yasakova-anastasia committed Apr 12, 2021
1 parent 989f990 commit 53270dd
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions datumaro/plugins/voc_format/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,15 +241,14 @@ def save_subsets(self):
ET.SubElement(obj_elem, 'truncated').text = \
'%d' % truncated

if 'difficult' in attr:
difficult = _convert_attr('difficult', attr, int, 0)
ET.SubElement(obj_elem, 'difficult').text = \
'%d' % difficult

if 'occluded' in attr:
occluded = _convert_attr('occluded', attr, int, 0)
ET.SubElement(obj_elem, 'occluded').text = \
'%d' % occluded

difficult = _convert_attr('difficult', attr, int, 0)
ET.SubElement(obj_elem, 'difficult').text = \
'%d' % difficult

bbox = obj.get_bbox()
if bbox is not None:
Expand Down

0 comments on commit 53270dd

Please sign in to comment.