Skip to content
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

how to test run the model #5

Open
im-tanyasuri opened this issue Sep 19, 2022 · 4 comments
Open

how to test run the model #5

im-tanyasuri opened this issue Sep 19, 2022 · 4 comments

Comments

@im-tanyasuri
Copy link

Hey, I have placed the required files like netcdf files, coco files as well as the checkpoint, but the visualize_predictions.py saves no output, can you please help with the right command to test the model.
Thanks

@paren8esis
Copy link
Collaborator

Hello. Can you please provide the command you are using?

@im-tanyasuri
Copy link
Author

Hello,
Thanks for replying. Following is the command, I have been using:

python visualize_predictions.py --img_size 61 61 --model 'convlstm' --root_path_coco '/content/drive/MyDrive/cropClass/coco_files' --netcdf_path '/content/drive/MyDrive/cropClass/S4A' --load_checkpoint '/content/drive/MyDrive/cropClass/epoch=17-step=60749.ckpt' --prefix_coco 'exp1_patches5000_strat'

@im-tanyasuri
Copy link
Author

I want output result with semantic segmentation masks .

@paren8esis
Copy link
Collaborator

We improved the script a little bit and fixed a bug on the netcdf path argument. Please be careful to provide all the necessary arguments for the specific model you are using. For example, our models were trained on 4-band input only, so you must also provide the argument --bands B02 B03 B04 B08.

Also, if you haven't precomputed the medians (by running the export_medians_multi.py script), the visualization may take a VERY LONG time to finish, since the medians for the corresponding netcdf are computed on the fly. If you did precompute the medians, though, you must provide the arguments --saved_medians and --prefix <medians_prefix> so the script will know where to find them.

Finally, a useful argument is --mask_parcels, which visualizes the predictions of the model for the parcel pixels only and discards the rest.

Please check if the script works for you now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants