M3DV / FracNet

[eBioMedicine] Deep-learning-assisted detection and segmentation of rib fractures from CT scans: Development and validation of FracNet
https://m3dv.github.io/FracNet/
Apache License 2.0
51 stars 25 forks source link

Possible bug in _predict_single_image #5

Closed junayednaushad closed 3 years ago

junayednaushad commented 3 years ago

Hi, I think there might be a bug in predict.py specifically the _predict_single_image function because I have followed the instructions on the README but all of my predictions are just 0s. On line 72 pred is set to 0, then on line 82 cur_pred_patch is set to pred so cur_pred_patch is just 0 and therefore the condition on line 91 never becomes true.

kaimingkuang commented 3 years ago

Hi, I think there might be a bug in predict.py specifically the _predict_single_image function because I have followed the instructions on the README but all of my predictions are just 0s. On line 72 pred is set to 0, then on line 82 cur_pred_patch is set to pred so cur_pred_patch is just 0 and therefore the condition on line 91 never becomes true.

Thanks for spotting this bug. It should be output[i] at the else part of np.where. New commits have been pushed and it should be fixed now.