javiribera / locating-objects-without-bboxes

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

Small issue when using plants dataset #5

Closed joaqo closed 4 years ago

joaqo commented 5 years ago

When using the plant dataset, object-locator/data.py should have the following changes to prevent KeyErrors:

dictionary['locations'] = eval(dictionary['locations']) to dictionary['locations'] = eval(dictionary['plant_locations'])

and

dictionary['count'] = torch.tensor([dictionary['count']], dtype=torch.get_default_dtype()) to dictionary['count'] = torch.tensor([dictionary['plant_count']], dtype=torch.get_default_dtype())

Didn't make a PR cause I thought you'd probably like to change it in some way that generalizes for all datasets that I am not aware of.

Cheers, thanks for the great repo!

javiribera commented 5 years ago

Thanks for the heads up! I will probably change the dataset to make it more general.

javiribera commented 4 years ago

I modified the keys in gt.csv in the plant datasets to "locations" and "count" instead of "plant_locations" and "plant_count". This way is more general and there is no need to modify the code. It shouldn't happen, but feel free to reopen this issue if you still experience this error.