Spaces:
Running on Zero
Running on Zero
Download data_config.py from Vignesh38/Map-Detect: direct link, hf CLI and curl.
- Browser
- Download file 612 Bytes
-
https://huggingface.co/spaces/Vignesh38/Map-Detect/resolve/main/data_config.py
- Command line
-
hf download hf://spaces/Vignesh38/Map-Detect/data_config.py
-
curl -L -o data_config.py https://huggingface.co/spaces/Vignesh38/Map-Detect/resolve/main/data_config.py
612 Bytes
| class DataConfig: | |
| data_name = "" | |
| root_dir = "" | |
| label_transform = "norm" | |
| def get_data_config(self, data_name): | |
| self.data_name = data_name | |
| if data_name == 'LEVIR': | |
| self.root_dir = 'path to the root of LEVIR-CD dataset' | |
| elif data_name == 'quick_start': | |
| self.root_dir = './samples/' | |
| else: | |
| raise TypeError('%s has not defined' % data_name) | |
| return self | |
| if __name__ == '__main__': | |
| data = DataConfig().get_data_config(data_name='LEVIR') | |
| print(data.data_name) | |
| print(data.root_dir) | |
| print(data.label_transform) | |