Open rodolfolotte opened 1 month ago
Hi! Thank you for your interest in this work.
My initial thought is that the models won't do well on a new image modality without any finetuning. I found that finetuning on even ~100 samples substantially improved the quality of outputs for new modalities.
1) You will want to download model weights from this table, and then update the experiments/sample_net_g.pth
path to the path pointing to the downloaded weights (ex. 'path/to/weights/on/your/machine/weights.pth').
2) I would recommend loading in some of the pretrained weights (using the same steps at 1.), formatting your data in the required format (see docs here), and making a config that specifies the correct paths to your data and the weights, and then running the training script.
The most important thing to getting this to work with your data out of the box is the formatting of the dataset. The existing dataset code expects something like: -root_dir --sentinel2 ----tile ------tci.png ------b08.png ------... --naip ----image_uuid ------tile --------rgb.png
where tile refers to its location in a 2^17 x 2^17 Web-Mercator grid.
Of course, you may make changes to the dataset file, to cater to your specific setup if you don't want to totally reformat your data structure.
Hope this helps!
First, I would like to thank you for sharing this amazing content, a well-documented and easy-to-approach solution.
I start to set my environment to apply the inference over CBERS-4A images. The idea is only to see if the S2NAIP pretrained would perform ok over CBERS-4A, without training. Then, I downloaded the
small_val_set
, andtest_set
and placed them in the project' root folder. Finally, I have tried to perform:with a few changes in
infer_example.yml
(i.e. thedata_dir
param).Question 1. The error seems to be with the absence of
experiments/sample_net_g.pth
andparam_key_g: params_ema
. I also have downloaded thesatlas_rrdbnet.pth
, and point to it. But it does not work either. Could you give me a hint how to proper set the params inpath
?Question 2. Considering I want to perform another training using the same approach, but using CBERS-4A and UAV samples. How should I transform the training dataset?
Thank you so much! Great work!