alexvbogdan / DeepCalib

DeepCalib: A Deep Learning Approach for Automatic Intrinsic Calibration of Wide Field-of-View Cameras
342 stars 62 forks source link

Couldn't reproduce results with PyTorch #25

Closed Celeste-cj closed 1 year ago

Celeste-cj commented 3 years ago

Hi, I'm trying to reproduce your method with PyTorch, and I made following changes:

  1. Change backbone from Inception-v3 to mobilenet-v2, and image preprocessing steps accordingly (image normalize to [-2, 2])
  2. Since I didn't have access to SUN360, I train on a similar dataset provided by DeepPTZ, which contains 10K panoramas
  3. Set initial learning rate=1e-5, and decay at epoch=40, totally will train 50 epochs Using these settings, I got a poor result: Focal acc about 0.2, Distort acc less than 0.15 . Could you please give me some advice in training?

Besides, I'm confused with some of your codes:

  1. You set initial lr=1e-3, and decay 0.1 every 2 epoch, this will make lr decay too quickly
  2. Your preprocessing step will normalize the raw image to around -128, I'm not sure if this is expected
LeonhardEulerr commented 2 years ago

Hi @Celeste-cj

Got the same problem with the original code. I get very low acc without changing anything. Im running the code on the newer versions of tensorflow and keras.

Did you manage to fix acc problem?

Celeste-cj commented 2 years ago

Hello @LeonhardEulerr Unfortunately, I didn't figure out the problem. I tried the provided checkpoint, and find it work well, so I decided to use their eval code and model, and give up training a new model.

If you have problem with the pre-trained model, maybe you could downgrade your tf & keras version.

LeonhardEulerr commented 2 years ago

Hello @Celeste-cj, thank you for the reponse.

I have managed to run the code on the newest version of tf & keras. Their weights are working with those versions as well. I just need to train it on another, but similar dataset. I'll try figuring it out for a couple more day.

Thanks again, cheers