Skip to content
This repository was archived by the owner on Oct 21, 2023. It is now read-only.

Commit 5e3f490

Browse files
committed
MobileViTv3 first commit
0 parents  commit 5e3f490

34 files changed

+5113
-0
lines changed

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
*.pyc
2+
__pycache__
3+
.DS_STORE
4+
.idea
5+
results*
6+
*.png
7+
*.jpg
8+
.idea
9+
*.pt
10+
*.pth
11+
12+
results*
13+
vision_datasets/
14+
exp_results/
15+
exp_results*
16+
results_*
17+
coco_eval_results/
18+
19+
*.so
20+
model_zoo
21+
model_zoo/*
22+
23+
cvnets.egg-info
24+
cvnets.egg-info/*

LICENSE

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
MICRON TECHNOLOGY, INC. SOFTWARE LICENSE AGREEMENT
2+
3+
PLEASE READ THIS LICENSE AGREEMENT ("AGREEMENT") FROM MICRON TECHNOLOGY, INC.
4+
("MTI") CAREFULLY: BY INSTALLING, USING, OR MODIFYING THE MTI SOFTWARE AND ANY
5+
RELATED PRINTED MATERIALS ("SOFTWARE"), YOU ARE ACCEPTING AND AGREEING TO THE
6+
TERMS OF THIS AGREEMENT. IF YOU DO NOT AGREE WITH THE TERMS OF THIS AGREEMENT, DO
7+
NOT INSTALL, USE, OR MODIFY THE SOFTWARE.
8+
9+
LICENSE:
10+
11+
In consideration of your agreement to abide by the terms of this Agreement,
12+
and subject to these terms, MTI hereby grants to you a personal, non-exclusive
13+
license, under MTI’s copyrights in the Software, to install, use, and copy for
14+
personal use the Software solely for non-commercial uses and purposes subject to
15+
the terms of this Agreement. You must maintain all copyright notices on all
16+
copies of the Software. You agree not to use the Software for any commercial
17+
purpose or for any public display (commercial or noncommercial). MTI may make
18+
changes to the Software at any time without notice to you. In addition, MTI is
19+
under no obligation whatsoever to update, maintain, or provide new versions or
20+
other support for the Software. This license shall automatically terminate if you
21+
violate any of the terms of this license and may be terminated by MTI at any
22+
time and for any reason without notice. Upon termination of this license, you
23+
must destroy any Software in your possession whether in electronic or printed
24+
format. In any unmodified version of this Software, you must retain this notice
25+
and the following text and disclaimers. Neither the name, trademarks, service
26+
marks or logos of MTI may be used to endorse or promote products derived from the
27+
Software without specific prior written permission from MTI. Except as expressly
28+
stated in this notice, no other rights or licenses, express or implied, are
29+
granted by MTI herein, including but not limited to any patent rights that may be
30+
infringed by your derivative works or by other works in which the Software may be
31+
incorporated.
32+
33+
OWNERSHIP OF MATERIALS:
34+
35+
You acknowledge and agree that the Software and any derivative works thereof
36+
are proprietary property of MTI (and/or its affiliated companies) and protected
37+
by United States copyright law and international treaty provisions. The Software
38+
may also be the subject of pending patent applications or granted patents. MTI
39+
does not grant any express or implied rights hereunder to any patents, copyrights,
40+
or trademarks for any commercial uses or purposes. You further acknowledge and
41+
agree that all right, title, and interest in and to the Software, including
42+
associated proprietary rights, are and shall remain with MTI (and/or its
43+
affiliated companies). This Agreement does not convey to you an interest in or to
44+
the Software, but only a limited right to install and use the Software in
45+
accordance with the terms of this Agreement. The Software is licensed to you and
46+
not sold.
47+
48+
DISCLAIMER OF WARRANTY:
49+
50+
THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MTI, ON BEHALF OF
51+
ITSELF AND ITS AFFILIATED COMPANIES, EXPRESSLY DISCLAIMS ALL WARRANTIES EXPRESS
52+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO, NONINFRINGEMENT OF THIRD-PARTY RIGHTS,
53+
AND ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
54+
PURPOSE. MTI DOES NOT WARRANT THAT THE SOFTWARE WILL MEET YOUR REQUIREMENTS, OR
55+
THAT THE OPERATION OF THE SOFTWARE WILL BE UNINTERRUPTED OR ERROR-FREE.
56+
FURTHERMORE, MTI DOES NOT MAKE ANY REPRESENTATIONS REGARDING THE USE OR THE
57+
RESULTS OF THE USE OF THE SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY,
58+
RELIABILITY, OR OTHERWISE. THE ENTIRE RISK ARISING OUT OF USE OR PERFORMANCE OF
59+
THE SOFTWARE REMAINS WITH YOU. IN NO EVENT SHALL MTI OR ITS AFFILIATED COMPANIES
60+
BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, INCIDENTAL, OR SPECIAL DAMAGES
61+
(INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF PROFITS, BUSINESS
62+
INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT OF YOUR USE OF OR INABILITY TO
63+
USE THE SOFTWARE, EVEN IF MTI HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
64+
Because some jurisdictions prohibit the exclusion or limitation of liability for
65+
consequential or incidental damages, the above limitation may not apply to you.
66+
This Agreement constitutes the entire agreement between MTI and you regarding the
67+
subject matter hereof and supersedes all previous oral or written communications
68+
between the parties. This Agreement shall be governed by the laws of the State of
69+
Delaware without regard to its conflict of laws rules. By proceeding with the
70+
installation of the Software, you agree to the terms of this Agreement. You must
71+
agree to the terms in order to use the Software.
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
common:
2+
run_label: "run_1"
3+
log_freq: 500
4+
auto_resume: true
5+
mixed_precision: true
6+
dataset:
7+
root_train: "Datasets/ILSVRC2012-raw/train"
8+
root_val: "Datasets/ILSVRC2012-raw/val"
9+
name: "imagenet"
10+
category: "classification"
11+
train_batch_size0: 32
12+
val_batch_size0: 32
13+
eval_batch_size0: 1
14+
workers: 6
15+
persistent_workers: false
16+
pin_memory: true
17+
image_augmentation:
18+
random_resized_crop:
19+
enable: true
20+
interpolation: "bilinear"
21+
random_horizontal_flip:
22+
enable: true
23+
sampler:
24+
name: "variable_batch_sampler"
25+
vbs:
26+
crop_size_width: 256
27+
crop_size_height: 256
28+
max_n_scales: 5
29+
min_crop_size_width: 160
30+
max_crop_size_width: 320
31+
min_crop_size_height: 160
32+
max_crop_size_height: 320
33+
check_scale: 32
34+
loss:
35+
category: "classification"
36+
classification:
37+
name: "label_smoothing"
38+
label_smoothing_factor: 0.1
39+
optim:
40+
name: "adamw"
41+
weight_decay: 0.01
42+
no_decay_bn_filter_bias: false
43+
adamw:
44+
beta1: 0.9
45+
beta2: 0.999
46+
scheduler:
47+
name: "cosine"
48+
is_iteration_based: false
49+
max_epochs: 300
50+
warmup_iterations: 3000
51+
warmup_init_lr: 0.0002
52+
cosine:
53+
max_lr: 0.002
54+
min_lr: 0.0002
55+
model:
56+
classification:
57+
name: "mobilevit_v3"
58+
classifier_dropout: 0.1
59+
mit:
60+
mode: "small_v3" #"small_v3_fast"
61+
ffn_dropout: 0.0
62+
attn_dropout: 0.0
63+
dropout: 0.1
64+
number_heads: 4
65+
no_fuse_local_global_features: false
66+
conv_kernel_size: 3
67+
activation:
68+
name: "swish"
69+
normalization:
70+
name: "batch_norm_2d"
71+
momentum: 0.1
72+
activation:
73+
name: "swish"
74+
layer:
75+
global_pool: "mean"
76+
conv_init: "kaiming_normal"
77+
linear_init: "trunc_normal"
78+
linear_init_std_dev: 0.02
79+
ema:
80+
enable: true
81+
momentum: 0.0005
82+
ddp:
83+
enable: true
84+
dist_url: "tcp://XX.XXX.XXX.XXX:XXXX" # ip address of server with rank 0
85+
rank: 0 # rank value unique for each server
86+
world_size: 6
87+
dist_port: 30786
88+
stats:
89+
name: [ "loss", "top1", "top5" ]
90+
checkpoint_metric: "top1"
91+
checkpoint_metric_max: true
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
common:
2+
run_label: "run_1"
3+
log_freq: 500
4+
auto_resume: true
5+
mixed_precision: true
6+
dataset:
7+
root_train: "Datasets/ILSVRC2012-raw/train"
8+
root_val: "Datasets/ILSVRC2012-raw/val"
9+
name: "imagenet"
10+
category: "classification"
11+
train_batch_size0: 32
12+
val_batch_size0: 32
13+
eval_batch_size0: 1
14+
workers: 6
15+
persistent_workers: false
16+
pin_memory: true
17+
image_augmentation:
18+
random_resized_crop:
19+
enable: true
20+
interpolation: "bilinear"
21+
random_horizontal_flip:
22+
enable: true
23+
sampler:
24+
name: "variable_batch_sampler"
25+
vbs:
26+
crop_size_width: 256
27+
crop_size_height: 256
28+
max_n_scales: 5
29+
min_crop_size_width: 160
30+
max_crop_size_width: 320
31+
min_crop_size_height: 160
32+
max_crop_size_height: 320
33+
check_scale: 32
34+
loss:
35+
category: "classification"
36+
classification:
37+
name: "label_smoothing"
38+
label_smoothing_factor: 0.1
39+
optim:
40+
name: "adamw"
41+
weight_decay: 0.01
42+
no_decay_bn_filter_bias: false
43+
adamw:
44+
beta1: 0.9
45+
beta2: 0.999
46+
scheduler:
47+
name: "cosine"
48+
is_iteration_based: false
49+
max_epochs: 300
50+
warmup_iterations: 3000
51+
warmup_init_lr: 0.0002
52+
cosine:
53+
max_lr: 0.002
54+
min_lr: 0.0002
55+
model:
56+
classification:
57+
name: "mobilevit_v3"
58+
classifier_dropout: 0.1
59+
mit:
60+
mode: "small_v3"
61+
ffn_dropout: 0.0
62+
attn_dropout: 0.0
63+
dropout: 0.1
64+
number_heads: 4
65+
no_fuse_local_global_features: false
66+
conv_kernel_size: 3
67+
activation:
68+
name: "swish"
69+
normalization:
70+
name: "batch_norm_2d"
71+
momentum: 0.1
72+
activation:
73+
name: "swish"
74+
layer:
75+
global_pool: "mean"
76+
conv_init: "kaiming_normal"
77+
linear_init: "trunc_normal"
78+
linear_init_std_dev: 0.02
79+
ema:
80+
enable: true
81+
momentum: 0.0005
82+
ddp:
83+
enable: true
84+
rank: 0
85+
world_size: -1
86+
dist_port: 30786
87+
stats:
88+
name: [ "loss", "top1", "top5" ]
89+
checkpoint_metric: "top1"
90+
checkpoint_metric_max: true
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
common:
2+
run_label: "run_1"
3+
log_freq: 500
4+
auto_resume: true
5+
mixed_precision: true
6+
dataset:
7+
root_train: "/media/Datasets/ILSVRC2012-raw/train"
8+
root_val: "/media/Datasets/ILSVRC2012-raw/val"
9+
name: "imagenet"
10+
category: "classification"
11+
train_batch_size0: 32
12+
val_batch_size0: 32
13+
eval_batch_size0: 1
14+
workers: 6
15+
persistent_workers: false
16+
pin_memory: true
17+
image_augmentation:
18+
random_resized_crop:
19+
enable: true
20+
interpolation: "bilinear"
21+
random_horizontal_flip:
22+
enable: true
23+
sampler:
24+
name: "variable_batch_sampler"
25+
vbs:
26+
crop_size_width: 256
27+
crop_size_height: 256
28+
max_n_scales: 5
29+
min_crop_size_width: 160
30+
max_crop_size_width: 320
31+
min_crop_size_height: 160
32+
max_crop_size_height: 320
33+
check_scale: 32
34+
loss:
35+
category: "classification"
36+
classification:
37+
name: "label_smoothing"
38+
label_smoothing_factor: 0.1
39+
optim:
40+
name: "adamw"
41+
weight_decay: 1.e-2
42+
no_decay_bn_filter_bias: false
43+
adamw:
44+
beta1: 0.9
45+
beta2: 0.999
46+
scheduler:
47+
name: "cosine"
48+
is_iteration_based: false
49+
max_epochs: 300
50+
warmup_iterations: 3000
51+
warmup_init_lr: 0.0002
52+
cosine:
53+
max_lr: 0.002
54+
min_lr: 0.0002
55+
model:
56+
classification:
57+
name: "mobilevit_v3"
58+
classifier_dropout: 0.1
59+
mit:
60+
mode: "x_small_v3"
61+
ffn_dropout: 0.0
62+
attn_dropout: 0.0
63+
dropout: 0.1
64+
number_heads: 4
65+
no_fuse_local_global_features: false
66+
conv_kernel_size: 3
67+
activation:
68+
name: "swish"
69+
normalization:
70+
name: "batch_norm_2d"
71+
momentum: 0.1
72+
activation:
73+
name: "swish"
74+
layer:
75+
global_pool: "mean"
76+
conv_init: "kaiming_normal"
77+
linear_init: "trunc_normal"
78+
linear_init_std_dev: 0.02
79+
ema:
80+
enable: true
81+
momentum: 0.0005
82+
ddp:
83+
enable: true
84+
dist_url: "tcp://XX.XXX.XXX.XXX:XXXX" # ip address of server with rank 0
85+
rank: 0 # rank value unique for each server
86+
world_size: 6
87+
dist_port: 30786
88+
stats:
89+
name: [ "loss", "top1", "top5" ]
90+
checkpoint_metric: "top1"
91+
checkpoint_metric_max: true

0 commit comments

Comments
 (0)