Jeff-Zilence / TransGeo2022

Official repository for TransGeo: Transformer Is All You Need for Cross-view Image Geo-localization
MIT License
116 stars 22 forks source link

FileNotFoundError: [Errno 2] No such file or directory: './result_vigor/attention/train/1415.png' #7

Closed BoopSainy closed 2 years ago

BoopSainy commented 2 years ago

Hi,

Really thanks for your open-source code and VIGOR dataset!

I meet a strange issue when I try to learn your code. I run the "run_VIGOR.sh" file and adjusted the epoch to 10 for both stage. When the stage-1 completed and automatically skipped to stage-2. There is an error:

FileNotFoundError: [Errno 2] No such file or directory: './result_vigor/attention/train/1415.png'

Then I check the /attention/train folder and found there is only 50608 png attention images without the 1415.png Do you once meet similar issue when running the code?

Jeff-Zilence commented 2 years ago

Thank you for your interest. After the stage-1 is finished, it will run the function named as scan to generate the attention map for all the aerial-view images. Can you check the log of scan and see how many batches are there? It seems that some images are not scaned which is weird. Did you make any other changes?

BoopSainy commented 2 years ago

Hi,

Thanks for your reply! The log of scan is lost, let me restart the training from the last epoch and see the batches number.

I only adjusted the epoch from 50 to 10, and adjusted the "localhost" in dist_url.

BoopSainy commented 2 years ago

An update, the number of attention maps in "./result_vigor/attention/train/" is 46284 not 50608

BoopSainy commented 2 years ago

Could I know what is the meaning of

"self.delta_unit = [0.0003280724526376747, 0.00043301140280175833]"

in the VIGOR class?

Really thanks for your help!

Jeff-Zilence commented 2 years ago

I see. The problem is the sampling. I just updated the code and you can pull and try again.

Jeff-Zilence commented 2 years ago

The delta unit is the GPS offset of half an image. But it not used in this codebase, you can ignore it.

Could I know what is the meaning of

"self.delta_unit = [0.0003280724526376747, 0.00043301140280175833]"

in the VIGOR class?

Really thanks for your help!

BoopSainy commented 2 years ago

Sure. I will try it now. Really thanks for your help and answering.

BoopSainy commented 2 years ago

There is still the same issue when running the latest code. The error is:

FileNotFoundError: [Errno 2] No such file or directory: './result_vigor/attention/train/12539.png' (1415.png last time)

There are 46199 attention maps in "./result_vigor/attention/train" now.

The batches of scan are 5001 and 5664, respectively.

Jeff-Zilence commented 2 years ago

I made a mistake in my last commit. Hopefully, the new version will work. :)

There is still the same issue when running the latest code. The error is:

FileNotFoundError: [Errno 2] No such file or directory: './result_vigor/attention/train/12539.png' (1415.png last time)

There are 46199 attention maps in "./result_vigor/attention/train" now.

The batches of scan are 5001 and 5664, respectively.

BoopSainy commented 2 years ago

Really thanks for your help at such a late night!

I will try it now and continue to deeply understand transgeo codebase.

Have a good night! :)

BoopSainy commented 2 years ago

Hi Siji,

I am still going through your code. But I find the changing number of attention maps in "attention/train" file might be caused by line 339, 340 in "train.py".

If we use "train_dataset" but not "train_scan_dataset" in "train_scan_loader", not all positive panoramas will be loaded and the indexes of attention maps here depends on the number of positive panoramas.

I will test and confirm it.

Songyang

Jeff-Zilence commented 2 years ago

Thank you so much for testing it ! I think replacing train_dataset with train_scan_dataset should work. I'll update the code when it is confirmed.

BoopSainy commented 2 years ago

Hi Sijie,

I've tested it and it works now. Just need to change "train_dataset" to "train_scan_dataset" of "train_scan_loader" in train.py

Have a good night!

Jeff-Zilence commented 2 years ago

Thank you so much for testing it. I have updated the code and it should be good now.

Jeff-Zilence commented 2 years ago

I'll close the issue if there is no other question.

BoopSainy commented 2 years ago

I'll close the issue if there is no other question.

Sure! Thanks for your sharing!

ZhiyiHe1997 commented 1 year ago

hello, thanks for your sharing project. I meet the same question with BoopSainy when I try to train model on VIGOR. I changed the code as you modified last month, but it still unable to work. Can you tell me what should I do to fix it? Thanks again!

FileNotFoundError: [Errno 2] No such file or directory: './result_vigor/attention/train/35112.png'