-
Notifications
You must be signed in to change notification settings - Fork 22
/
demo.m
executable file
·33 lines (24 loc) · 871 Bytes
/
demo.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
% This is a demo code for
% When Unsupervised Domain Adaptation Meets Tensor Rrepresentations
% H. Lu, L. Zhang, Z. Cao, W. Wei, K. Xian, C. Shen, and A. van den Hengel
% IEEE International Conference on Computer Vision (ICCV), 2017
%
% Contact: Hao Lu (poppinace@hust.edu.cn, poppinace@foxmail.com)
clear; close all; clc
warning('off') %#ok<WNOFF>
addpath('liblinear-2.1/matlab');
addpath(genpath('./tensor_toolbox_2.6'));
addpath('FOptM-share-v0.1');
% set seed
rng('default')
% parameter initialization
opt = paramInit;
% generate annotations
annotations = genAnnotations(opt);
% train and test domain adaptation
[meanAcc, stdAcc] = trainTestDA(opt, annotations);
acc{1} = {meanAcc.na, stdAcc.na};
acc{2} = {meanAcc.ntsl, stdAcc.ntsl};
acc{3} = {meanAcc.taisl, stdAcc.taisl};
% print results
print_on_screen(acc, annotations)