Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MobileNets #53

Merged
merged 118 commits into from
Feb 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
8a39b4e
simple registry
voldemortX Nov 30, 2021
b936411
register and run function
voldemortX Dec 1, 2021
80cebfa
base runners & lane trainer
voldemortX Dec 1, 2021
fa9a995
merge
voldemortX Dec 6, 2021
6952280
lane tester
voldemortX Dec 6, 2021
8490425
seg trainer & tester
voldemortX Dec 7, 2021
cf922b1
register datasets
voldemortX Dec 7, 2021
3e71390
register losses
voldemortX Dec 7, 2021
e7625e7
lr_schedulers
voldemortX Dec 7, 2021
bfc61f2
lr_schedulers
voldemortX Dec 7, 2021
150a635
optimizers
voldemortX Dec 7, 2021
a5dec03
torch scheduler
voldemortX Dec 7, 2021
068f4e4
register transforms
voldemortX Dec 7, 2021
6d2fd54
register models
voldemortX Dec 8, 2021
eb28e9a
remove defs
voldemortX Dec 8, 2021
896dd62
ddp from args
voldemortX Dec 8, 2021
19aade7
first config
voldemortX Dec 8, 2021
e0baba7
refactor datasets
voldemortX Dec 8, 2021
2834b2c
lane starting
voldemortX Dec 8, 2021
4850609
parse args
voldemortX Dec 9, 2021
a71b36b
debug
voldemortX Dec 10, 2021
f2e344e
erfnet
voldemortX Dec 10, 2021
8c28fed
refactor configs
voldemortX Dec 11, 2021
426fb99
doc
voldemortX Dec 11, 2021
d1f6bce
optimize args
voldemortX Dec 13, 2021
748c4ff
first seg config
voldemortX Dec 14, 2021
e3a1a5a
losses wrappers
voldemortX Dec 14, 2021
a4b4a82
debug
voldemortX Dec 14, 2021
ab92304
city matched
voldemortX Dec 15, 2021
eafd99c
work dir
voldemortX Dec 15, 2021
771a540
save-dir for final results
voldemortX Dec 15, 2021
14f14ec
debug
voldemortX Dec 15, 2021
45a49ec
tensorboard log moved
voldemortX Dec 15, 2021
ed10cd7
lane configs
voldemortX Dec 18, 2021
2f742b9
doc change
voldemortX Dec 18, 2021
3522739
basic configs [unchecked]
voldemortX Dec 20, 2021
89d8240
shell
voldemortX Dec 20, 2021
b9b0ca3
debug lstr
voldemortX Dec 20, 2021
0f2be71
debug gtav/synthia
voldemortX Dec 21, 2021
1455b4a
val_batch_size
voldemortX Dec 21, 2021
215ce48
lstr debug
voldemortX Dec 21, 2021
d2ed21a
default val_bs back to align with seg
voldemortX Dec 22, 2021
c296e9d
seg complete
voldemortX Dec 22, 2021
d5fe313
vgg16 finished
cedricgsh Dec 22, 2021
b25d7be
Merge branch 'refactor-config' of github.com:voldemortX/pytorch-auto-…
cedricgsh Dec 22, 2021
06b79a7
vggs
voldemortX Dec 22, 2021
bbcda99
conversions
voldemortX Dec 23, 2021
c6dd12c
add resnet50
cedricgsh Dec 23, 2021
6d83d57
add resnet34
cedricgsh Dec 23, 2021
e1431ea
add resnet18
cedricgsh Dec 24, 2021
9de2813
add resnet101 tusimple
cedricgsh Dec 24, 2021
6919823
add rep-vgg a0
cedricgsh Dec 24, 2021
bae3dde
enet erfnet --cfg-options
voldemortX Dec 25, 2021
ed823a9
lstr resa101
voldemortX Dec 25, 2021
f651565
add resnet101 baseline scnn
cedricgsh Dec 26, 2021
0579a53
Merge branch 'refactor-config' of github.com:voldemortX/pytorch-auto-…
cedricgsh Dec 26, 2021
3df8b31
Merge branch 'refactor-config' into rc-repvgg
cedricgsh Dec 26, 2021
157802a
RepVGG-A tusimple
cedricgsh Dec 26, 2021
06d0bd5
tools
voldemortX Dec 26, 2021
2224312
Merge branch 'refactor-config' of github.com:voldemortX/pytorch-auto-…
voldemortX Dec 26, 2021
49c6533
fix cfg-options
voldemortX Dec 26, 2021
9c275cc
add repvgg culane
cedricgsh Dec 26, 2021
ca46af1
Merge branch 'refactor-config' into rc-repvgg
cedricgsh Dec 26, 2021
f801298
multi GPU tests
voldemortX Dec 26, 2021
2f7e433
Merge branch 'refactor-config' into rc-repvgg
cedricgsh Dec 26, 2021
38ae864
update the result of repvgg-a on culane
cedricgsh Dec 28, 2021
2d61c9d
add repvgg-a1 scnn
cedricgsh Dec 28, 2021
68ce9cc
add mobilenetv2
cedricgsh Dec 31, 2021
362efcc
InvertedResidualV3 block
cedricgsh Jan 2, 2022
bc46e84
arch error
cedricgsh Jan 2, 2022
a0845c7
align arch with DeepLab-LargeFOV (resnets)
voldemortX Jan 2, 2022
787f142
merge re-repvgg
cedricgsh Jan 2, 2022
858bc1c
bias=False
cedricgsh Jan 2, 2022
e6143c1
add option for reducer
cedricgsh Jan 2, 2022
9ce54f5
Merge branch 'rc-repvgg' into rc-mobilenetv2
cedricgsh Jan 2, 2022
3203336
debug
cedricgsh Jan 2, 2022
1ceb25c
update names
voldemortX Jan 2, 2022
3b8cb24
fix a1-culane config files
cedricgsh Jan 2, 2022
dceaab1
Merge branch 'rc-repvgg' into rc-mobilenetv2
cedricgsh Jan 2, 2022
7f1e928
mobilenetv2 scnn config
cedricgsh Jan 3, 2022
89c5e4c
Merge branch 'rc-mobilenetv2' of github.com:voldemortX/pytorch-auto-d…
cedricgsh Jan 3, 2022
9dd55d7
mobilenet v3 test
cedricgsh Jan 3, 2022
91e1ea4
align torchvision
cedricgsh Jan 3, 2022
367a947
v2
voldemortX Jan 4, 2022
877e4b6
refactor
voldemortX Jan 4, 2022
06c2008
lane dir
voldemortX Jan 4, 2022
c05c057
delete
voldemortX Jan 4, 2022
fd6aec1
Merge branch 'rc-mobilenetv2' into refactor-config
voldemortX Jan 4, 2022
739d732
bug fixes
voldemortX Jan 5, 2022
917a9eb
lane video
voldemortX Jan 5, 2022
2c57ad2
v3 fix dilation
voldemortX Jan 5, 2022
4292d3c
v3 fix padding
voldemortX Jan 5, 2022
b0dd688
update repvgg config
cedricgsh Jan 5, 2022
51e2972
seg vis
voldemortX Jan 7, 2022
ce785fc
Merge branch 'refactor-config' of github.com:voldemortX/pytorch-auto-…
voldemortX Jan 7, 2022
dba46bc
refactor common_models to a directory
voldemortX Jan 8, 2022
b4d0a37
move vgg encoder
voldemortX Jan 8, 2022
8e608e3
remove test_images
voldemortX Jan 8, 2022
00a4cf3
refactor doc & vis debug
voldemortX Jan 8, 2022
ec50854
cherry-pick from rc-swin
voldemortX Jan 9, 2022
360d56b
update lr
voldemortX Jan 9, 2022
303a68a
repvgg config clean up
cedricgsh Jan 9, 2022
95eab67
replace
voldemortX Jan 9, 2022
8b57613
sgd009
voldemortX Jan 9, 2022
86af387
merge deletion
voldemortX Jan 9, 2022
ebfc6ee
replace all
voldemortX Jan 9, 2022
21868f2
credits
voldemortX Jan 9, 2022
e15ba34
new video
voldemortX Jan 9, 2022
f548aa4
adavanced doc
voldemortX Jan 10, 2022
091b1a1
Merge branch 'refactor-config' of github.com:voldemortX/pytorch-auto-…
voldemortX Jan 10, 2022
668bba4
final mods
voldemortX Jan 10, 2022
0f997d7
Merge branch 'refactor-config' into wip-mobilenet
voldemortX Jan 10, 2022
ff036ec
merge master
voldemortX Jan 10, 2022
8c1260f
resa
voldemortX Jan 10, 2022
103ef2c
lr
voldemortX Jan 20, 2022
f6aeebe
updates
voldemortX Feb 2, 2022
783c307
update by master
voldemortX Feb 9, 2022
9a7e11c
docs & shells & swin bug fix
voldemortX Feb 9, 2022
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ Models from this repo are faster to train (**single card trainable**) and often
| semantic segmentation | ResNet-101 | [DeeplabV3](https://arxiv.org/abs/1706.05587) |
| semantic segmentation | - | [ENet](https://arxiv.org/abs/1606.02147) |
| semantic segmentation | - | [ERFNet](https://ieeexplore.ieee.org/abstract/document/8063438/) |
| lane detection | ENet, ERFNet, VGG16, ResNets (18, 34, 50, 101), RepVGGs (A0, A1, B0, B1g2, B2), Swin (Tiny) | Baseline |
| lane detection | ENet, ERFNet, VGG16, ResNets (18, 34, 50, 101), MobileNets (V2, V3-Large), RepVGGs (A0, A1, B0, B1g2, B2), Swin (Tiny) | Baseline |
| lane detection | ERFNet, VGG16, ResNets (18, 34, 50, 101), RepVGGs (A1) | [SCNN](https://arxiv.org/abs/1712.06080) |
| lane detection | ResNets (18, 34, 50, 101) | [RESA](https://arxiv.org/abs/2008.13719) |
| lane detection | ResNets (18, 34, 50, 101), MobileNets (V2, V3-Large) | [RESA](https://arxiv.org/abs/2008.13719) |
| lane detection | ERFNet, ENet | [SAD](https://arxiv.org/abs/1908.00821) ([*Postponed*](https://github.com/voldemortX/pytorch-auto-drive/wiki/Notes)) |
| lane detection | ERFNet | [PRNet](http://www.ecva.net/papers/eccv_2020/papers_ECCV/papers/123630698.pdf) (*In progress*) |
| lane detection | ResNets (18, 34, 50, 101), ResNet18-reduced | [LSTR](https://arxiv.org/abs/2011.04233) |
Expand Down
2 changes: 1 addition & 1 deletion configs/lane_detection/baseline/mobilenetv2_culane.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# Optimization pipeline
from configs.lane_detection.common.optims.segloss_5class import loss
from configs.lane_detection.common.optims.sgd02 import optimizer
from configs.lane_detection.common.optims.sgd009 import optimizer
from configs.lane_detection.common.optims.ep12_poly_warmup200 import lr_scheduler


Expand Down
2 changes: 1 addition & 1 deletion configs/lane_detection/baseline/mobilenetv2_tusimple.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# Optimization pipeline
from configs.lane_detection.common.optims.segloss_7class import loss
from configs.lane_detection.common.optims.sgd02 import optimizer
from configs.lane_detection.common.optims.sgd009 import optimizer
from configs.lane_detection.common.optims.ep50_poly_warmup200 import lr_scheduler


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# Optimization pipeline
from configs.lane_detection.common.optims.segloss_5class import loss
from configs.lane_detection.common.optims.sgd02 import optimizer
from configs.lane_detection.common.optims.sgd009 import optimizer
from configs.lane_detection.common.optims.ep12_poly_warmup200 import lr_scheduler


Expand Down
86 changes: 86 additions & 0 deletions configs/lane_detection/baseline/mobilenetv3-large_tusimple.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Data pipeline
from configs.lane_detection.common.datasets.tusimple_seg import dataset
from configs.lane_detection.common.datasets.train_level0_360 import train_augmentation
from configs.lane_detection.common.datasets.test_360 import test_augmentation

# Optimization pipeline
from configs.lane_detection.common.optims.segloss_7class import loss
from configs.lane_detection.common.optims.sgd009 import optimizer
from configs.lane_detection.common.optims.ep50_poly_warmup200 import lr_scheduler


train = dict(
exp_name='mobilenetv3-large_baseline_tusimple',
workers=10,
batch_size=20,
checkpoint=None,
# Device args
world_size=0,
dist_url='env://',
device='cuda',

val_num_steps=0, # Seg IoU validation (mostly useless)
save_dir='./checkpoints',

input_size=(360, 640),
original_size=(720, 1280),
num_classes=7,
num_epochs=50,
collate_fn=None, # 'dict_collate_fn' for LSTR
seg=True # Seg-based method or not
)

test = dict(
exp_name='mobilenetv3-large_baseline_tusimple',
workers=10,
batch_size=80,
checkpoint='./checkpoints/mobilenetv3-large_baseline_tusimple/model.pt',
# Device args
device='cuda',

save_dir='./checkpoints',

seg=True,
gap=10,
ppl=56,
thresh=0.3,
collate_fn=None, # 'dict_collate_fn' for LSTR
input_size=(360, 640),
original_size=(720, 1280),
max_lane=5,
dataset_name='tusimple'
)

model = dict(
name='DeepLabV1Lane',
backbone_cfg=dict(
# MobileNetV3-Large 1.0
# Manually download https://download.pytorch.org/models/mobilenet_v3_large-8738ca79.pth,
# bug in torch 1.6
name='MobileNetV3Encoder',
pretrained='mobilenet_v3_large-8738ca79.pth',
arch='large',
reduction_factor=1,

# OS-16 (DeepLab style)
strides=(1, 2, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1),
dilations=(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2),
out_indices=(16, )
),
classifier_cfg=dict(
name='DeepLabV1Head',
in_channels=128,
num_classes=7,
dilation=1
),
reducer_cfg=dict(
name='RESAReducer',
in_channels=960,
reduce=128
),
lane_classifier_cfg=dict(
name='SimpleLaneExist',
num_output=7 - 1,
flattened_size=1540,
)
)
4 changes: 2 additions & 2 deletions configs/lane_detection/baseline/swin-tiny_culane.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
dist_url='tcp://localhost:12345',
device='cuda',
val_num_steps=0, # Seg IoU validation (mostly useless)
save_dir='./checkpoints'
save_dir='./checkpoints',

input_size=(288, 800),
original_size=(590, 1640),
Expand All @@ -42,7 +42,7 @@
checkpoint='./checkpoints/swin-tiny_baseline_culane/model.pt',
# Device args
device='cuda',
save_dir='./checkpoints'
save_dir='./checkpoints',

seg=True,
gap=20,
Expand Down
7 changes: 7 additions & 0 deletions configs/lane_detection/common/optims/sgd009.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
optimizer = dict(
name='torch_optimizer',
torch_optim_class='SGD',
lr=0.09,
momentum=0.9,
weight_decay=1e-4
)
89 changes: 89 additions & 0 deletions configs/lane_detection/resa/mobilenetv2_culane.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Data pipeline
from configs.lane_detection.common.datasets.culane_seg import dataset
from configs.lane_detection.common.datasets.train_level0_288 import train_augmentation
from configs.lane_detection.common.datasets.test_288 import test_augmentation

# Optimization pipeline
from configs.lane_detection.common.optims.segloss_5class import loss
from configs.lane_detection.common.optims.sgd006 import optimizer
from configs.lane_detection.common.optims.ep12_poly_warmup500 import lr_scheduler


train = dict(
exp_name='mobilenetv2_resa_culane',
workers=10,
batch_size=20,
checkpoint=None,
# Device args
world_size=0,
dist_url='env://',
device='cuda',

val_num_steps=0, # Seg IoU validation (mostly useless)
save_dir='./checkpoints',

input_size=(288, 800),
original_size=(590, 1640),
num_classes=5,
num_epochs=12,
collate_fn=None, # 'dict_collate_fn' for LSTR
seg=True # Seg-based method or not
)

test = dict(
exp_name='mobilenetv2_resa_culane',
workers=10,
batch_size=80,
checkpoint='./checkpoints/mobilenetv2_resa_culane/model.pt',
# Device args
device='cuda',

save_dir='./checkpoints',

seg=True,
gap=20,
ppl=18,
thresh=0.3,
collate_fn=None, # 'dict_collate_fn' for LSTR
input_size=(288, 800),
original_size=(590, 1640),
max_lane=4,
dataset_name='culane'
)

model = dict(
name='RESA_Net',
backbone_cfg=dict(
name='MobileNetV2Encoder',
pretrained='https://download.pytorch.org/models/mobilenet_v2-b0353104.pth',
widen_factor=1,

# OS-16 (DeepLab style)
strides=(1, 2, 2, 2, 1, 1, 1),
dilations=(1, 1, 1, 1, 1, 2, 2),
out_indices=(6, )
),
reducer_cfg=dict(
name='RESAReducer',
in_channels=320,
reduce=128
),
spatial_conv_cfg=dict(
name='RESA',
num_channels=128,
iteration=4,
alpha=2.0
),
classifier_cfg=dict(
name='BUSD',
in_channels=128,
num_classes=5
),
lane_classifier_cfg=dict(
name='EDLaneExist',
num_output=5 - 1,
flattened_size=1125,
dropout=0.1,
pool='avg'
)
)
89 changes: 89 additions & 0 deletions configs/lane_detection/resa/mobilenetv2_tusimple.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Data pipeline
from configs.lane_detection.common.datasets.tusimple_seg import dataset
from configs.lane_detection.common.datasets.train_level0_360 import train_augmentation
from configs.lane_detection.common.datasets.test_360 import test_augmentation

# Optimization pipeline
from configs.lane_detection.common.optims.segloss_7class import loss
from configs.lane_detection.common.optims.sgd006 import optimizer
from configs.lane_detection.common.optims.ep50_poly_warmup200 import lr_scheduler


train = dict(
exp_name='mobilenetv2_resa_tusimple',
workers=10,
batch_size=20,
checkpoint=None,
# Device args
world_size=0,
dist_url='env://',
device='cuda',

val_num_steps=0, # Seg IoU validation (mostly useless)
save_dir='./checkpoints',

input_size=(360, 640),
original_size=(720, 1280),
num_classes=7,
num_epochs=50,
collate_fn=None, # 'dict_collate_fn' for LSTR
seg=True # Seg-based method or not
)

test = dict(
exp_name='mobilenetv2_resa_tusimple',
workers=10,
batch_size=80,
checkpoint='./checkpoints/mobilenetv2_resa_tusimple/model.pt',
# Device args
device='cuda',

save_dir='./checkpoints',

seg=True,
gap=10,
ppl=56,
thresh=0.3,
collate_fn=None, # 'dict_collate_fn' for LSTR
input_size=(360, 640),
original_size=(720, 1280),
max_lane=5,
dataset_name='tusimple'
)

model = dict(
name='RESA_Net',
backbone_cfg=dict(
name='MobileNetV2Encoder',
pretrained='https://download.pytorch.org/models/mobilenet_v2-b0353104.pth',
widen_factor=1,

# OS-16 (DeepLab style)
strides=(1, 2, 2, 2, 1, 1, 1),
dilations=(1, 1, 1, 1, 1, 2, 2),
out_indices=(6, )
),
reducer_cfg=dict(
name='RESAReducer',
in_channels=320,
reduce=128
),
spatial_conv_cfg=dict(
name='RESA',
num_channels=128,
iteration=4,
alpha=2.0
),
classifier_cfg=dict(
name='BUSD',
in_channels=128,
num_classes=7
),
lane_classifier_cfg=dict(
name='EDLaneExist',
num_output=7 - 1,
flattened_size=1100,
dropout=0.1,
pool='avg'
)
)
Loading