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