Commit 9ac9cc73 authored by Lamping, Christian's avatar Lamping, Christian
Browse files

Update utils.py

parent c25da9c7
......@@ -288,12 +288,14 @@ class Dataset(object):
scores = []
for annotation in annotations:
class_id = annotation['category_id']+1
if class_id ==1: # if annotation is hen, then the score is considered, otherwise it is -1
class_id = annotation['category_id']+1
if class_id ==1: # if annotation is hen, then the score is considered, otherwise it is -1
attributes = [element for element in annotation['extra']['attributes'] if element.isdigit()]#
if len(attributes) > 0:
score = attributes[0]
else: score = -1
if len(attributes) > 0:
score = attributes[0]
else: score = -1
else:
score = -1
mask = Image.new('1', (image_info['width'], image_info['height']))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment