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

Restricting the validation area to GB #78

Merged
merged 14 commits into from
Dec 9, 2024
Merged

Restricting the validation area to GB #78

merged 14 commits into from
Dec 9, 2024

Conversation

IFenton
Copy link
Collaborator

@IFenton IFenton commented Nov 14, 2024

No description provided.

@IFenton IFenton mentioned this pull request Nov 14, 2024
4 tasks
@IFenton
Copy link
Collaborator Author

IFenton commented Dec 4, 2024

I think this is now ready for review. In this PR:

  • Vaildation metrics are now only calculated for a narrow cutout of the UK
  • This works for both the full size images and the smaller cropped images
  • A box is added to the videos showing the outlines of this cutout area

Examples can be seen here: https://wandb.ai/manchester_prize/cropping?nw=nwuserifenton. This has four runs:

  • Nocrop. Large image without mask. Original data, main branch
  • Nocrop-cutout. Large image with mask. Original data, this branch
  • Crop. Small image without mask. Cropped data, main branch
  • Crop-cutout. Small image with mask. Cropped data, this branch

They seem to behave as I expect, though given they are only run on five batches I wouldn't place too much weight on the exact results.

@IFenton IFenton marked this pull request as ready for review December 4, 2024 14:41
@IFenton IFenton requested review from phinate and dfulu December 4, 2024 14:41
@dfulu
Copy link
Collaborator

dfulu commented Dec 5, 2024

Hi @IFenton, looks good. Before we merge can we check that we get the same validation scores for these runs?

  • Nocrop-cutout. Large image with mask. Original data, this branch
  • Crop-cutout. Small image with mask. Cropped data, this branch

If i understand right, they should have the same scores since they are evaluated on the same GB crop.

I think it should be possible to do that by setting the numpy random seed so that the shuffle is reproducible. And also setting number of workers to zero in the validate function so that multiprocessing doesn't cause different samples to be delivered. If that works I'd be happy :)

@IFenton
Copy link
Collaborator Author

IFenton commented Dec 6, 2024

Hi @IFenton, looks good. Before we merge can we check that we get the same validation scores for these runs?

* Nocrop-cutout. Large image with mask. Original data, this branch

* Crop-cutout. Small image with mask. Cropped data, this branch

If i understand right, they should have the same scores since they are evaluated on the same GB crop.

I think it should be possible to do that by setting the numpy random seed so that the shuffle is reproducible. And also setting number of workers to zero in the validate function so that multiprocessing doesn't cause different samples to be delivered. If that works I'd be happy :)

I ran that test, and the results of this are in the same WandB link. As you expected they do give identical results

@dfulu
Copy link
Collaborator

dfulu commented Dec 6, 2024

Great, looks good!

@IFenton IFenton merged commit b6f0c97 into main Dec 9, 2024
7 checks passed
@IFenton IFenton deleted the validation-cropping branch December 9, 2024 11:01
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

Successfully merging this pull request may close these issues.

2 participants