javiribera / locating-objects-without-bboxes

PyTorch code for "Locating objects without bounding boxes" - Loss function and trained models
Other
249 stars 51 forks source link

Improving information presented in functions #25

Open RSKothari opened 4 years ago

RSKothari commented 4 years ago

Hi,

Great work. Might be including in future papers of mine. Found one issue: https://github.com/javiribera/locating-objects-without-bboxes/blob/master/object-locator/losses.py

Might help if you explicitly mentioned that in the case for 1 GT point, be sure to provide it as list of a [1, 2] tensors. This shape is consistent with your code and would lead to failure if people provided GT points as [2, ] or [2, 1].

Further, I suggest removed "device" dependency during function definition and instead consider something like this self.all_img_locations = self.all_img_locations.to(prob_map.device)

Would help future users who train on cluster.

javiribera commented 4 years ago

Yes, both suggestions would make it more convenient for the novice user. Would you do a pull request? That'd be greatly appreciated.