Skip to content

Commit

Permalink
Merge pull request #28 from nianticlabs/mfirman/explicit-failure-in-c…
Browse files Browse the repository at this point in the history
…s-eval

If files are missing in CS eval, no more silent failures
  • Loading branch information
mdfirman authored Jul 26, 2021
2 parents 08eb065 + 58651a5 commit 893b7a9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions manydepth/datasets/cityscapes_evaldataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,7 @@ def get_color(self, city, frame_name, side, do_flip, is_sequence=False):
if side is not None:
raise ValueError("Cityscapes dataset doesn't know how to deal with sides yet")

try:
color = self.loader(self.get_image_path(city, frame_name, side, is_sequence))
except FileNotFoundError:
# fill with dummy
color = pil.fromarray(np.zeros((100, 100, 3)).astype(np.uint8))
color = self.loader(self.get_image_path(city, frame_name, side, is_sequence))

# crop down to cityscapes size
w, h = color.size
Expand Down

0 comments on commit 893b7a9

Please sign in to comment.