-
Notifications
You must be signed in to change notification settings - Fork 350
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
LEVIR-CD Dataset and Datamodule #1770
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.
I think the docs also need to be updated with the new addition datasets.
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.
Otherwise LGTM
79af14b
to
76a392c
Compare
@@ -85,6 +85,16 @@ LandCover.ai | |||
|
|||
.. autoclass:: LandCoverAIDataModule | |||
|
|||
LEVIR-CD |
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.
I'd prob just have a single header with 2 versions
@@ -267,6 +267,12 @@ LandCover.ai | |||
|
|||
.. autoclass:: LandCoverAI | |||
|
|||
LEVIR-CD |
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.
Same here
@@ -18,6 +18,7 @@ Dataset,Task,Source,License,# Samples,# Classes,Size (px),Resolution (m),Bands | |||
`IDTReeS`_,"OD,C",Aerial,"CC-BY-4.0",591,33,200x200,0.1--1,RGB | |||
`Inria Aerial Image Labeling`_,S,Aerial,-,360,2,"5,000x5,000",0.3,RGB | |||
`LandCover.ai`_,S,Aerial,"CC-BY-NC-SA-4.0","10,674",5,512x512,0.25--0.5,RGB | |||
`LEVIR-CD`_,CD,Google Earth,-,637,2,"1,024x1,024",0.5,RGB | |||
`LEVIR-CD+`_,CD,Google Earth,-,985,2,"1,024x1,024",0.5,RGB |
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.
Could prob just combine
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 file will eventually be removed once we have a trainer for CD
1. no change | ||
2. change |
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.
Does our __getitem__
remap from 0, 255 to 0, 1? Should it? We should label the classes with the returned value, not the stored value.
The `LEVIR-CD+ <https://github.com/S2Looking/Dataset>`__ | ||
dataset is a dataset for building change detection. |
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.
We should change all:
The foo dataset is a dataset for bar
to:
Foo is a bar dataset
It just reads better.
|
||
* https://arxiv.org/abs/2107.09244 | ||
|
||
.. versionchanged:: 0.6 |
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.
Not true
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.
Why would this not be true? We already had a LEVIRCDPlus class and this PR changed it. There are no breaking changes to it.
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.
Ah, I read this as versionadded the first time. Still, we should say what changed. Or did the API not change?
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.
I can add that in another PR. I just made a base class so I could override a couple methods for loading the files since they have different directory setups. The LEVIRCDPlus itself hasn't changed though other than inheriting from the new base class
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.
In that case I would remove versionchanged, there are no significant API differences that users need to be aware of.
filename=self.filename, | ||
md5=self.md5 if self.checksum else None, | ||
) | ||
|
||
def plot( |
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.
Example plot for both versions?
self.val_aug = AugmentationSequential( | ||
K.Normalize(mean=self.mean, std=self.std), | ||
data_keys=["image1", "image2", "mask"], | ||
) | ||
self.test_aug = AugmentationSequential( | ||
K.Normalize(mean=self.mean, std=self.std), | ||
data_keys=["image1", "image2", "mask"], |
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.
If you set self.aug
you don't need to duplicate this
This PR adds the LEVIR-CD dataset and datamodule.
This dataset is just the prior version of LEVIR-CD+ with fewer images. It also has a slightly different directory structure.
Also refactored the datasets to inherit from a general base LEVIRCD class