Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
Fix the AssertionError when calling masker in coco_eval.py (#213)
Browse files Browse the repository at this point in the history
* fix the same issue as #185

* add fix from the previous change
  • Loading branch information
henrywang1 authored and fmassa committed Nov 27, 2018
1 parent 75dee47 commit ef8a93b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ def prepare_for_coco_segmentation(predictions, dataset):
prediction = prediction.resize((image_width, image_height))
masks = prediction.get_field("mask")
# t = time.time()
masks = masker(masks, prediction)
# Masker is necessary only if masks haven't been already resized.
if list(masks.shape[-2:]) != [image_height, image_width]:
masks = masker(masks.expand(1, -1, -1, -1, -1), prediction)
masks = masks[0]
# logger.info('Time mask: {}'.format(time.time() - t))
# prediction = prediction.convert('xywh')

Expand Down

0 comments on commit ef8a93b

Please sign in to comment.