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

the inference loop seems not to return the accuracy #38

Open
VarshithaChennamsetti opened this issue Nov 13, 2022 · 1 comment
Open

Comments

@VarshithaChennamsetti
Copy link
Contributor

Currently, we are loading the dataset in the inference function with 'data_loader = SLSTRDataLoader(args, file_paths, single_image=True, crop_size=CROP_SIZE); dataset = data_loader.to_dataset()' which seems to not be including the ground truth i.e msk when checking the function '_preprocess_images' in data_loader.py. This would mean calculating the accuracy is not possible without this ground truth and so we need to change a lot of changes to the cloud_inference to get accuracy?

@juripapay
Copy link
Collaborator

Regarding the inference accuracy, you are right it is missing. My idea is the following, the output of the inference is an image called "mask".

Line 129 in slstr_cloud.py file : mask = reconstruct_from_patches(args, mask_patches, nx, ny, patch_size=PATCH_SIZE - CROP_SIZE)

This mask we need to compare pixel by pixel with the ground truth which is the Bayesian mask, see line 67 "msk = handle['bayes'][:]" in file data_loader.py.
The accuracy will be the number of hits (identical pixels in the generated image and the Bayesian mask) divided by the total number of pixels.

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