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

Commit

Permalink
MobileViTv3 first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
codeAC29 committed Sep 28, 2022
0 parents commit 5e3f490
Show file tree
Hide file tree
Showing 34 changed files with 5,113 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
*.pyc
__pycache__
.DS_STORE
.idea
results*
*.png
*.jpg
.idea
*.pt
*.pth

results*
vision_datasets/
exp_results/
exp_results*
results_*
coco_eval_results/

*.so
model_zoo
model_zoo/*

cvnets.egg-info
cvnets.egg-info/*
71 changes: 71 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
MICRON TECHNOLOGY, INC. SOFTWARE LICENSE AGREEMENT

PLEASE READ THIS LICENSE AGREEMENT ("AGREEMENT") FROM MICRON TECHNOLOGY, INC.
("MTI") CAREFULLY: BY INSTALLING, USING, OR MODIFYING THE MTI SOFTWARE AND ANY
RELATED PRINTED MATERIALS ("SOFTWARE"), YOU ARE ACCEPTING AND AGREEING TO THE
TERMS OF THIS AGREEMENT. IF YOU DO NOT AGREE WITH THE TERMS OF THIS AGREEMENT, DO
NOT INSTALL, USE, OR MODIFY THE SOFTWARE.

LICENSE:

In consideration of your agreement to abide by the terms of this Agreement,
and subject to these terms, MTI hereby grants to you a personal, non-exclusive
license, under MTI’s copyrights in the Software, to install, use, and copy for
personal use the Software solely for non-commercial uses and purposes subject to
the terms of this Agreement. You must maintain all copyright notices on all
copies of the Software. You agree not to use the Software for any commercial
purpose or for any public display (commercial or noncommercial). MTI may make
changes to the Software at any time without notice to you. In addition, MTI is
under no obligation whatsoever to update, maintain, or provide new versions or
other support for the Software. This license shall automatically terminate if you
violate any of the terms of this license and may be terminated by MTI at any
time and for any reason without notice. Upon termination of this license, you
must destroy any Software in your possession whether in electronic or printed
format. In any unmodified version of this Software, you must retain this notice
and the following text and disclaimers. Neither the name, trademarks, service
marks or logos of MTI may be used to endorse or promote products derived from the
Software without specific prior written permission from MTI. Except as expressly
stated in this notice, no other rights or licenses, express or implied, are
granted by MTI herein, including but not limited to any patent rights that may be
infringed by your derivative works or by other works in which the Software may be
incorporated.

OWNERSHIP OF MATERIALS:

You acknowledge and agree that the Software and any derivative works thereof
are proprietary property of MTI (and/or its affiliated companies) and protected
by United States copyright law and international treaty provisions. The Software
may also be the subject of pending patent applications or granted patents. MTI
does not grant any express or implied rights hereunder to any patents, copyrights,
or trademarks for any commercial uses or purposes. You further acknowledge and
agree that all right, title, and interest in and to the Software, including
associated proprietary rights, are and shall remain with MTI (and/or its
affiliated companies). This Agreement does not convey to you an interest in or to
the Software, but only a limited right to install and use the Software in
accordance with the terms of this Agreement. The Software is licensed to you and
not sold.

DISCLAIMER OF WARRANTY:

THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MTI, ON BEHALF OF
ITSELF AND ITS AFFILIATED COMPANIES, EXPRESSLY DISCLAIMS ALL WARRANTIES EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO, NONINFRINGEMENT OF THIRD-PARTY RIGHTS,
AND ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
PURPOSE. MTI DOES NOT WARRANT THAT THE SOFTWARE WILL MEET YOUR REQUIREMENTS, OR
THAT THE OPERATION OF THE SOFTWARE WILL BE UNINTERRUPTED OR ERROR-FREE.
FURTHERMORE, MTI DOES NOT MAKE ANY REPRESENTATIONS REGARDING THE USE OR THE
RESULTS OF THE USE OF THE SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY,
RELIABILITY, OR OTHERWISE. THE ENTIRE RISK ARISING OUT OF USE OR PERFORMANCE OF
THE SOFTWARE REMAINS WITH YOU. IN NO EVENT SHALL MTI OR ITS AFFILIATED COMPANIES
BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, INCIDENTAL, OR SPECIAL DAMAGES
(INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF PROFITS, BUSINESS
INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT OF YOUR USE OF OR INABILITY TO
USE THE SOFTWARE, EVEN IF MTI HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
Because some jurisdictions prohibit the exclusion or limitation of liability for
consequential or incidental damages, the above limitation may not apply to you.
This Agreement constitutes the entire agreement between MTI and you regarding the
subject matter hereof and supersedes all previous oral or written communications
between the parties. This Agreement shall be governed by the laws of the State of
Delaware without regard to its conflict of laws rules. By proceeding with the
installation of the Software, you agree to the terms of this Agreement. You must
agree to the terms in order to use the Software.
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
common:
run_label: "run_1"
log_freq: 500
auto_resume: true
mixed_precision: true
dataset:
root_train: "Datasets/ILSVRC2012-raw/train"
root_val: "Datasets/ILSVRC2012-raw/val"
name: "imagenet"
category: "classification"
train_batch_size0: 32
val_batch_size0: 32
eval_batch_size0: 1
workers: 6
persistent_workers: false
pin_memory: true
image_augmentation:
random_resized_crop:
enable: true
interpolation: "bilinear"
random_horizontal_flip:
enable: true
sampler:
name: "variable_batch_sampler"
vbs:
crop_size_width: 256
crop_size_height: 256
max_n_scales: 5
min_crop_size_width: 160
max_crop_size_width: 320
min_crop_size_height: 160
max_crop_size_height: 320
check_scale: 32
loss:
category: "classification"
classification:
name: "label_smoothing"
label_smoothing_factor: 0.1
optim:
name: "adamw"
weight_decay: 0.01
no_decay_bn_filter_bias: false
adamw:
beta1: 0.9
beta2: 0.999
scheduler:
name: "cosine"
is_iteration_based: false
max_epochs: 300
warmup_iterations: 3000
warmup_init_lr: 0.0002
cosine:
max_lr: 0.002
min_lr: 0.0002
model:
classification:
name: "mobilevit_v3"
classifier_dropout: 0.1
mit:
mode: "small_v3" #"small_v3_fast"
ffn_dropout: 0.0
attn_dropout: 0.0
dropout: 0.1
number_heads: 4
no_fuse_local_global_features: false
conv_kernel_size: 3
activation:
name: "swish"
normalization:
name: "batch_norm_2d"
momentum: 0.1
activation:
name: "swish"
layer:
global_pool: "mean"
conv_init: "kaiming_normal"
linear_init: "trunc_normal"
linear_init_std_dev: 0.02
ema:
enable: true
momentum: 0.0005
ddp:
enable: true
dist_url: "tcp://XX.XXX.XXX.XXX:XXXX" # ip address of server with rank 0
rank: 0 # rank value unique for each server
world_size: 6
dist_port: 30786
stats:
name: [ "loss", "top1", "top5" ]
checkpoint_metric: "top1"
checkpoint_metric_max: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
common:
run_label: "run_1"
log_freq: 500
auto_resume: true
mixed_precision: true
dataset:
root_train: "Datasets/ILSVRC2012-raw/train"
root_val: "Datasets/ILSVRC2012-raw/val"
name: "imagenet"
category: "classification"
train_batch_size0: 32
val_batch_size0: 32
eval_batch_size0: 1
workers: 6
persistent_workers: false
pin_memory: true
image_augmentation:
random_resized_crop:
enable: true
interpolation: "bilinear"
random_horizontal_flip:
enable: true
sampler:
name: "variable_batch_sampler"
vbs:
crop_size_width: 256
crop_size_height: 256
max_n_scales: 5
min_crop_size_width: 160
max_crop_size_width: 320
min_crop_size_height: 160
max_crop_size_height: 320
check_scale: 32
loss:
category: "classification"
classification:
name: "label_smoothing"
label_smoothing_factor: 0.1
optim:
name: "adamw"
weight_decay: 0.01
no_decay_bn_filter_bias: false
adamw:
beta1: 0.9
beta2: 0.999
scheduler:
name: "cosine"
is_iteration_based: false
max_epochs: 300
warmup_iterations: 3000
warmup_init_lr: 0.0002
cosine:
max_lr: 0.002
min_lr: 0.0002
model:
classification:
name: "mobilevit_v3"
classifier_dropout: 0.1
mit:
mode: "small_v3"
ffn_dropout: 0.0
attn_dropout: 0.0
dropout: 0.1
number_heads: 4
no_fuse_local_global_features: false
conv_kernel_size: 3
activation:
name: "swish"
normalization:
name: "batch_norm_2d"
momentum: 0.1
activation:
name: "swish"
layer:
global_pool: "mean"
conv_init: "kaiming_normal"
linear_init: "trunc_normal"
linear_init_std_dev: 0.02
ema:
enable: true
momentum: 0.0005
ddp:
enable: true
rank: 0
world_size: -1
dist_port: 30786
stats:
name: [ "loss", "top1", "top5" ]
checkpoint_metric: "top1"
checkpoint_metric_max: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
common:
run_label: "run_1"
log_freq: 500
auto_resume: true
mixed_precision: true
dataset:
root_train: "/media/Datasets/ILSVRC2012-raw/train"
root_val: "/media/Datasets/ILSVRC2012-raw/val"
name: "imagenet"
category: "classification"
train_batch_size0: 32
val_batch_size0: 32
eval_batch_size0: 1
workers: 6
persistent_workers: false
pin_memory: true
image_augmentation:
random_resized_crop:
enable: true
interpolation: "bilinear"
random_horizontal_flip:
enable: true
sampler:
name: "variable_batch_sampler"
vbs:
crop_size_width: 256
crop_size_height: 256
max_n_scales: 5
min_crop_size_width: 160
max_crop_size_width: 320
min_crop_size_height: 160
max_crop_size_height: 320
check_scale: 32
loss:
category: "classification"
classification:
name: "label_smoothing"
label_smoothing_factor: 0.1
optim:
name: "adamw"
weight_decay: 1.e-2
no_decay_bn_filter_bias: false
adamw:
beta1: 0.9
beta2: 0.999
scheduler:
name: "cosine"
is_iteration_based: false
max_epochs: 300
warmup_iterations: 3000
warmup_init_lr: 0.0002
cosine:
max_lr: 0.002
min_lr: 0.0002
model:
classification:
name: "mobilevit_v3"
classifier_dropout: 0.1
mit:
mode: "x_small_v3"
ffn_dropout: 0.0
attn_dropout: 0.0
dropout: 0.1
number_heads: 4
no_fuse_local_global_features: false
conv_kernel_size: 3
activation:
name: "swish"
normalization:
name: "batch_norm_2d"
momentum: 0.1
activation:
name: "swish"
layer:
global_pool: "mean"
conv_init: "kaiming_normal"
linear_init: "trunc_normal"
linear_init_std_dev: 0.02
ema:
enable: true
momentum: 0.0005
ddp:
enable: true
dist_url: "tcp://XX.XXX.XXX.XXX:XXXX" # ip address of server with rank 0
rank: 0 # rank value unique for each server
world_size: 6
dist_port: 30786
stats:
name: [ "loss", "top1", "top5" ]
checkpoint_metric: "top1"
checkpoint_metric_max: true
Loading

0 comments on commit 5e3f490

Please sign in to comment.