princeton-vl / CornerNet-Lite

BSD 3-Clause "New" or "Revised" License
1.78k stars 431 forks source link

suggested error handling #132

Open blafasel42 opened 4 years ago

blafasel42 commented 4 years ago

hi, after there a some issues related to images not loading, i suggest to add some error handling after:

https://github.com/princeton-vl/CornerNet-Lite/blob/6a54505d830a9d6afe26e99f0864b5d06d0bbbaf/core/sample/cornernet_saccade.py#L162

I would add after image = cv2.imread(image_path):

        if image is None:
            raise Exception('Image could not be read', image_path)