Cut out houses from target data
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
You will need python3 and pip3 installed on your machine. You can install it from the official website https://www.python.org/.
To install pytorch with CUDA support, conda is recommended. An installation guide is available in the conda docs: https://docs.conda.io/projects/conda/en/latest/user-guide/install/
A step by step series of examples that tell you how to get the project up and running.
Clone the git repository
git clone https://github.com/intelligenerator/inundatio.git
cd inundatio
Then create your conda virtual environment
conda create --name torch
conda activate torch
Next, installed the required packages. This may vary based on your system hardware and requirements. Read more about pytorch installation: https://pytorch.org/get-started/locally/
conda install pytorch torchvision cudatoolkit=10.2 -c pytorch
To exit the virtual environment run
conda deactivate
Happy coding!
Assuming, you have cloned this repo into the dnet_dataset/
subfolder, you can import
it from your project root:
from Inundatio import get_houses
targets_dir = 'train/targets'
targets_list = sorted(glob.glob(targets_dir + '/*_post_disaster_target.png'))
target_image = Image.open(targets_list[0])
target_image = np.array(target_image)
coordinates_list = get_houses(target_image)
see test.py
Please read CONTRIBUTING.md and CODE_OF_CONDUCT.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
- Boldizsar Zopcsak - BoldizsarZopcsak
- Henry Meyer - Rapirkomet
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details.
- DEVELOPING CUSTOM PYTORCH DATALOADERS
- Contributor Covenant - Code of Conduct