isaaccorley / resize-is-all-you-need

The official repository for the paper "Revisiting pre-trained remote sensing model benchmarks: resizing and normalization matters"
Apache License 2.0
17 stars 0 forks source link

Feature extractor #2

Open luixbr opened 3 months ago

luixbr commented 3 months ago

Please, I would like to ask you to make available a feature extractor for RGB and MSI images with a size of 224 x 224 pixels and MoCo and ImageNet weights, using the three best configurations in the chart in Figure 2 of your paper (https://arxiv.org/pdf/2305.13456).

The idea is to read a directory of images and extract features, using these features as predictors to estimate crop yield as people usually do with vegetation indices.

isaaccorley commented 3 months ago

What images are you using? Sentinel-2?

isaaccorley commented 3 months ago

@luixbr Please refer to the new embed.py script and the README for more information. I have tested it with some EuroSAT Sentinel-2 imagery in geotiff format. You may need to modify it depending on the images you're using. Also modify the mean/std in the dataset to the statistics of your dataset for the best performance.

luixbr commented 3 months ago

What images are you using? Sentinel-2?

Isaac, I use images from UAV (MSI and RGB).

luixbr commented 3 months ago

@luixbr Please refer to the new embed.py script and the README for more information. I have tested it with some EuroSAT Sentinel-2 imagery in geotiff format. You may need to modify it depending on the images you're using. Also modify the mean/std in the dataset to the statistics of your dataset for the best performance.

Thank you, Isaac! I will try this. I plan to use your code to extract features from my images under Resnet50 pretrained MoCo (RGB), Resnet50 pretrained MoCo (all bands), and Resnet50 pretrained ImageNet (RGB) configurations.