-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Found 0 polygon with 7 band pretrained model #14
Comments
Hi! Did you finetune the model after your stacking process? If not, it can easily happen that you get no output. You could also take another way: Copy the weights for BGR NIR from the first conv layer of the pretrained model to a copy of the model with only 4 input channels. Apart from that you can check the intermediate network output using the |
What is the exact order of the bands in the 7 band model? I saw red=3, nir=4 in the training_bengalaru.py script, but there is a different order of the bands on the WV-3 website. Also, interestingly, when I predict my WV-3 input data, which has BGR NIR bands, directly with the 4-band model, I get better results than when I convert the place of the bands in this input data to RGB NIR and predict. Is there a reason why I get better results with the BGR NIR input since the 4-band model is trained with RGB NIR? |
There is a readme in each file that should explain these things. The WV3 model has the first (coastal) band removed and the NDVI attached at the end, so index 0 is blue, then green, and so on to NIR, as the original data, then the last band is the NDVI rescaled to 0..1. The model trained on aerial images has the band ordering RGBI-NDVI with the NDVI again rescaled to 0..1. I have no explanation why you receive better results with BGRI-NDVI when using the aerial model. |
Oh and for computing the NDVI I used the red edge channel, so the one right after red. That's what I'm referring to by NIR. So the command in your first post would have to use |
So, ndvi=(red_edge - red)/(red_edge + red) you used this formula for 7 band model right? |
Yes, as well as for the 4 band model. |
Hi, first of all thanks for comprehensive documented project. I have B,G,R,I bands on my WV3 data therefore I just stacked some same bands for building 7 band data to use 7 band pre trained model. My processed data looks like this;
B1 Blue
B2 Green
B3 yellow=(Red+ Green )/ 2
B4 Red
B5 NIR
B6 NIR
B7 NIR
But when I make prediction on this data via inference.py with this casual parameters; --red 3 --nir 6 --ndvi --min-dist 10 --sigma 2 -l 0.4 -b 0.05 -s 0.21 --div 2000 --rescale-ndvi --sigmoid -d cpu, I did not get an error but found 0 polygon. So it means my stacking process does not work or I missed some theoretical thing?
Thanks..
The text was updated successfully, but these errors were encountered: