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

Converged but too wide #21

Closed jungscott closed 4 years ago

jungscott commented 4 years ago

The code ran for 1800 epochs. The loss didn't get lower anymore. The object locations in training look too wide. I used the following command with the parameters. Could you guide me to improve the accuracy of the object locations?

python -m object-locator.train --train-dir "data/mall_small_dataset" --batch-size 10 --lr 1e-6 --val-dir "data/mall_small_validate" --optim adam --val-freq 10 --save "data/mall_small_dataset-model.ckpt" --visdom-env mall_500_v2_dataset_training --visdom-server http://localhost --visdom-port 8097 --imgsize 256x320 --resume "data/mall_small_dataset-model.ckpt"

Screenshot from 2020-01-31 15-11-31

Thank you

javiribera commented 4 years ago

It seems you have reached a plateau of the loss surface. You can see that the losses are still going down, but quite slowly. The term that expresses the "wideness" of the output probability map is Term1, so I would focus on that one.

I would investigate different batch sizes, input resolutions and learning rates. I am not going to help tune hyperparameters for specific datasets (since you cropped the images, and selected only 500 images, this may need different hyperparameters). In fact you are using a learning rate 2-3 orders of magnitude lower than the one I used in the paper. Also make sure you got rid of all the groundtruth points in the gt.csv file that you removed (that fall outside the cropped area).

I do not consider this an issue about the paper or the code in this repository, so I'm closing this issue. Feel free to open new issues if you find any bug in the code, conceptual problems/suggestions in the idea, or if you cannot reproduce the results in the paper.

Thanks,