deming7h777 / Domain_adaptation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multi-Source Domain Adaptation

Usage:

First, we need to get the dataset first.

Dataset

Use the following command we build for downloading dataset.

bash ./get_dataset.sh

The shell script will automatically download the dataset and store it as name data.

Using Pretrained Models

Train the Model

Simply type the following command.

python train_improved_DANN.py

There are four different case for training, if you want to switch other training case, you can alter the following lines in the code:

source1 = 'quickdraw'
source2 = 'infograph'
source3 = 'real'
target = 'sketch'

Prediction

To predict the target image, type the following command that will produce pred.csv file

python test.py

Evaluation

To evaluate the accuracy, type the following command thae will check the accuracy based on the previous output pred.csv

python check_accuracy.py

Packages

Below is a list of packages we used to implement this project:

CUDA: 10.1
python: 3.6.9 torch: 1.4.0
numpy: 1.18.2
pandas: 0.25.1 PIL: 6.1.0 torchvision: 0.4.0 cv2, matplotlib
The Python Standard Library tqdm

About


Languages

Language:Python 100.0%