Skip to content
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

added setup instructions, data downloader, conda environment yml #8

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion Readme.MD
Original file line number Diff line number Diff line change
@@ -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
```
7 changes: 7 additions & 0 deletions conda_environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: domain_adaptation
channels:
- defaults
dependencies:
- pytorch=1.4.0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

может добавить torchvision?

- pytest
- gdown
15 changes: 15 additions & 0 deletions download_dataset.py
Original file line number Diff line number Diff line change
@@ -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)
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pytorch==1.4.0
pytest
gdown