NASA-IMPACT / hls-foundation-os

This repository contains examples of fine-tuning Harmonized Landsat and Sentinel-2 (HLS) Prithvi foundation model.
Apache License 2.0
304 stars 79 forks source link

inference the finetuned #51

Closed mahrokh3409 closed 8 months ago

mahrokh3409 commented 9 months ago

Dear @hanxLi,

Happy New Year.

I finetuned the multi_temporal_crop_classification based on the instructions in GitHub, and the resulting model is "best_mIoU_epoch_80.pth".

I wanted to run the inference using the provided example in the Github as below:

python model_inference.py -config /home/abd037/IBM_HLS/hls-foundation-os/configs/multi_temporal_crop_classification.py -ckpt /home/abd037/IBM_HLS/Mah_crop/best_mIoU_epoch_80.pth -input /home/abd037/Downloads/images -output /home/abd037/Downloads/Mah -input_type tif -bands 0 1 2 3 4 5

The inference ran successfully, but the resulting tiff image is black.

May I know if the config file should be the one I used for fine-tuning? I used the same config file in the above command. I would appreciate it if you could help me with this issue.

Kind Regards, Mah

mahrokh3409 commented 8 months ago

Dear @HamedAlemo, I finetuned the multi_temporal_crop_classification based on the instructions in GitHub, and the resulting model is "best_mIoU_epoch_80.pth".

I wanted to run the inference using the provided example in the Github as below:

python model_inference.py -config /home/abd037/IBM_HLS/hls-foundation-os/configs/multi_temporal_crop_classification.py -ckpt /home/abd037/IBM_HLS/Mah_crop/best_mIoU_epoch_80.pth -input /home/abd037/Downloads/images -output /home/abd037/Downloads/Mah -input_type tif -bands 0 1 2 3 4 5

The inference ran successfully, but the resulting tiff image is black.

May I know if the config file should be the one I used for fine-tuning? I used the same config file in the above command. would appreciate it if you could help me with this issue.

Kind Regards, Mah

mahrokh3409 commented 8 months ago

hi @hanxLi, Just wanted to let you know that issue has fixed.

Kind Rgards, Mah