diff --git a/Readme.MD b/Readme.MD index 304360c..5edaeb1 100644 --- a/Readme.MD +++ b/Readme.MD @@ -1 +1,24 @@ -Readme +# Install requirements: +## For conda: +``` +conda env create -f conda_environment.yml +``` +Activate conda env: +``` +conda activate domain_adaptation +``` + +## For pip: +``` +pip install -r +``` + +# Download office-31 dataset: +``` +python download_dataset.py +``` + +# Run tests: +``` +python -m pytest tests +``` diff --git a/conda_environment.yml b/conda_environment.yml new file mode 100644 index 0000000..5469d68 --- /dev/null +++ b/conda_environment.yml @@ -0,0 +1,7 @@ +name: domain_adaptation +channels: + - defaults +dependencies: + - pytorch=1.4.0 + - pytest + - gdown diff --git a/download_dataset.py b/download_dataset.py new file mode 100644 index 0000000..49fb534 --- /dev/null +++ b/download_dataset.py @@ -0,0 +1,15 @@ +# if downloader doesn't work, you can download office-31 dataset from +# https://people.eecs.berkeley.edu/~jhoffman/domainadapt/ +# https://drive.google.com/file/d/0B4IapRTv9pJ1WGZVd1VDMmhwdlE/view +import gdown + +if __name__ == "__main__": + # TAKE ID FROM SHAREABLE LINK + URL = "https://drive.google.com/uc?id=0B4IapRTv9pJ1WGZVd1VDMmhwdlE" + # DESTINATION FILE ON YOUR DISK + DESTINATION = "data/office-31/domain_adaptation_images.tar.gz" + MD5_HASH = '1b536d114869a5a8aa4580b89e9758fb' + gdown.cached_download(URL, + DESTINATION, + md5=MD5_HASH, + postprocess=gdown.extractall) diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..99aef35 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +pytorch==1.4.0 +pytest +gdown