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

Add TransformerLayer, TransformerBlock, C3TR modules #2333

Merged
merged 18 commits into from
Apr 1, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
Merge branch 'master' into Transformer
  • Loading branch information
dingyiwei committed Feb 11, 2021
commit 55a8f21d321d425dc7eae3b57dfd33719aabb32d
11 changes: 5 additions & 6 deletions data/scripts/get_coco.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
# Download/unzip labels
d='../' # unzip directory
url=https://github.com/ultralytics/yolov5/releases/download/v1.0/
f='coco2017labels.zip' # 68 MB
#echo 'Downloading' $url$f ' ...' && curl -L $url$f -o $f && unzip -q $f -d $d && rm $f # download, unzip, remove
echo 'Downloading' $url$f ' ...' && wget $url$f && unzip -q $f -d $d && rm $f
f='coco2017labels.zip' # 68 MB
echo 'Downloading' $url$f ' ...'
curl -L $url$f -o $f && unzip -q $f -d $d && rm $f & # download, unzip, remove in background

# Download/unzip images
d='../coco/images' # unzip directory
Expand All @@ -21,8 +21,7 @@ f1='train2017.zip' # 19G, 118k images
f2='val2017.zip' # 1G, 5k images
f3='test2017.zip' # 7G, 41k images (optional)
for f in $f1 $f2; do
#echo 'Downloading' $url$f '...' && curl -L $url$f -o $f # download, (unzip, remove in background)
#echo 'Downloading' $url$f '...' && wget $url$f
unzip -q $f -d $d # && rm $f &
echo 'Downloading' $url$f '...'
curl -L $url$f -o $f && unzip -q $f -d $d && rm $f & # download, unzip, remove in background
done
wait # finish background tasks
5 changes: 2 additions & 3 deletions data/scripts/get_voc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ f1=VOCtrainval_06-Nov-2007.zip # 446MB, 5012 images
f2=VOCtest_06-Nov-2007.zip # 438MB, 4953 images
f3=VOCtrainval_11-May-2012.zip # 1.95GB, 17126 images
for f in $f3 $f2 $f1; do
#echo 'Downloading' $url$f '...' && curl -L $url$f -o $f # download, (unzip, remove in background)
echo 'Downloading' $url$f '...' && wget $url$f
unzip -q $f -d $d && rm $f &
echo 'Downloading' $url$f '...'
curl -L $url$f -o $f && unzip -q $f -d $d && rm $f & # download, unzip, remove in background
done
wait # finish background tasks

Expand Down
3 changes: 2 additions & 1 deletion models/yolo.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,8 @@ def parse_model(d, ch): # model_dict, input_channels(3)
pass

n = max(round(n * gd), 1) if n > 1 else n # depth gain
if m in [Conv, Bottleneck, SPP, DWConv, MixConv2d, Focus, CrossConv, BottleneckCSP, C3, C3T, C3TR]:
if m in [Conv, GhostConv, Bottleneck, GhostBottleneck, SPP, DWConv, MixConv2d, Focus, CrossConv, BottleneckCSP,
C3, C3T, C3TR]:
c1, c2 = ch[f], args[0]

# Normal
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.