Skip to content

Commit

Permalink
Merge pull request #15 from Lplenka/master
Browse files Browse the repository at this point in the history
Bugfixes in coco_assitant.py and coco_stats.py
  • Loading branch information
ashnair1 authored May 6, 2020
2 parents 5efd466 + 5036c53 commit c6ffa1b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion coco_assistant/coco_assistant.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def visualise(self):

if dir_choice.lower() not in [item.lower() for item in self.imgfolders]:
raise AssertionError("Choice not in images folder")
ind = self.imgfolders.index(dir_choice.lower())
ind = self.imgfolders.index(dir_choice)
ann = self.annfiles[ind]
img_dir = os.path.join(self.img_dir, dir_choice)
cocovis.visualise_all(ann, img_dir)
Expand Down
6 changes: 3 additions & 3 deletions coco_assistant/coco_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ def get_object_size_split(ann, areaRng):
left_out = len(ann.getAnnIds(areaRng=[0**2, (areaRng[0]**2)])) + len(ann.getAnnIds(areaRng=[areaRng[3]**2, (1e5**2)]))

logging.debug("Number of small objects in set = %s", small)
logging.debug("Number of medium objects in set = %s".medium)
logging.debug("Number of large objects in set = %s".large)
logging.debug("Number of medium objects in set = %s", medium)
logging.debug("Number of large objects in set = %s", large)
if left_out != 0:
logging.debug("Number of objects ignored in set = %s", left_out)

logging.debug("Number of objects = %s".len(obj_areas))
logging.debug("Number of objects = %s", len(obj_areas))

if len(obj_areas) != small + medium + large + left_out:
raise AssertionError("Sum of objects in different area ranges != Total number of objects")
Expand Down

0 comments on commit c6ffa1b

Please sign in to comment.