-
Notifications
You must be signed in to change notification settings - Fork 388
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
Add Spacenet 1: Building Detection v1 #129
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
For the tests, can you replace the example images with fake images? See https://github.com/microsoft/torchgeo/tree/main/tests/data#raster-data for details on how to create them. We can't redistribute dataset files without worrying about licensing, and larger files mean slower downloads.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor suggestions. Also don't forget to run black, flake8, mypy, isort, and pydocstyle and fix any resulting errors so that the checks will pass.
704c291
to
f07741e
Compare
I've created the dataset using the specified instructions though I had to hack together a script to do so. Incidentally, I would like to discuss the test dataset generation process but I'll raise a separate issue for that. |
Currently the three remaining issues are those concerning:
I'm looking into Regarding issue 3 (which is also related to the creation of a Spacenet meta class ), this is dependent on how much we would like to control what data Other spacenet datasets also contain multiple imagery. For example, spacenet 2, 4 and 5 provide MS (Multispectral), PAN (Panchromatic), PS-MS (Pansharpened Multispectral) and PS-RGB (Pansharpened RGB , though this can be created from PS-MS). Spacenet 6 provides SAR and EO imagery. Spacenet 7 is a time series dataset. Some spacenet datasets are more similar than others but the quality of having more than one input image is pretty consistent. I'm not too familiar with Spacenet 6 and 7 but for the rest, people generally tend to use the PS-RGB when available since that's most compatible with pretrained backbones. So we can either provide a subset of the data i.e. the one image that is commonly used in all of the winning solutions or all of it. The former will make implementation easier (probably make a single spacenet file for all the datasets) but the latter is a more true representation of the full dataset. I'm open to either option. |
We discussed this in a meeting today and it seems like the easiest way to move forward would be to keep this as a VisionDataset with an integer |
* Create single spacenet.py for all spacenet datasets * Create single spacenet directory for all spacenet test data * Create single test_spacenet.py for testing all spacenet datasets
Sure, makes sense. I've made the necessary changes. |
Since Spacenet is currently implemented as a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really close now! Can we rename Spacenet
to SpaceNet
everywhere?
Just a heads up -- I tested this dataset and found that the "rgb" images come in three different shapes: {(3, 406, 438), (3, 406, 439), (3, 407, 439)} while the "8band" images are 1/4 the size. It looks like this is actually expected -- https://medium.com/the-downlinq/getting-started-with-spacenet-data-827fd2ec9f53 -- but it means that you can't immediately use it with a dataloader (and will instead need to do some resizing in a transform). Do we want to address that anywhere or let people figure it out? @adamjstewart is the only thing missing here the "Spacenet" --> "SpaceNet" find and replace? |
Since it's only a 1 pixel difference I think we should handle it ourselves. Yes, the only thing remaining is the rename. |
Thanks for the review. Rename complete. |
* Add Spacenet 1 * Add test data * Style fixes * Convert Spacenet1 to VisionDataset * Add option for selecting imagery * Consolidate spacenet * Create single spacenet.py for all spacenet datasets * Create single spacenet directory for all spacenet test data * Create single test_spacenet.py for testing all spacenet datasets * Add copyright * Reorder Spacenet in docs * Test both rgb & 8band * Rename Spacenet -> SpaceNet
* Add Spacenet 1 * Add test data * Style fixes * Convert Spacenet1 to VisionDataset * Add option for selecting imagery * Consolidate spacenet * Create single spacenet.py for all spacenet datasets * Create single spacenet directory for all spacenet test data * Create single test_spacenet.py for testing all spacenet datasets * Add copyright * Reorder Spacenet in docs * Test both rgb & 8band * Rename Spacenet -> SpaceNet
torchgeo.datasets.Spacenet1
from SpaceNet: A Remote Sensing Dataset and Challenge Series. Dataset homepage - here