first commit

main
chengke-codes 2 years ago
commit 0cfc6dc542

3
.gitattributes vendored

@ -0,0 +1,3 @@
*.mp4 filter=lfs diff=lfs merge=lfs -text
*.pt filter=lfs diff=lfs merge=lfs -text
*.weights filter=lfs diff=lfs merge=lfs -text

3
.gitignore vendored

@ -0,0 +1,3 @@
.DS_Store
Thumbs.db

@ -0,0 +1,34 @@
# YCB objects demo weights for Yolov4 & Yolov5
## Yolov4
1. Compile darknet.
2. Copy `yolov4/ycb` and `test1.mp4`to the folder of darknet.
![image-20210227202736516](https://i.loli.net/2021/02/28/eWtJM3p9sjAf27C.png)
3. Go to the folder of darknet, run `./darknet detector demo ycb/obj.data ycb/yolo-test.cfg ycb/weights/yolo-obj_7000.weights -thresh 0.5 -ext_output test1.mp4` .
4. For a headless server, you will meet an error (something looks like Gtk-WARNING cannot open display) if you execute line 3. Just try `./darknet detector demo ycb/obj.data ycb/yolo-test.cfg ycb/weights/yolo-obj_7000.weights -thresh 0.5 test1.mp4 -dont_show -ext_output -out_filename res.avi`
## Yolov5
1. Install yolov5 (assume you yolov5 project is located at `<yolov5_root>`)
2. Execute `mkdir -p <yolov5_root>/runs/train `
3. Copy `yolov5/exp2` to `<yolov5_root>/runs/train`
![image-20210227202532270](https://i.loli.net/2021/02/28/ioXfnA5jVdR2F8h.png)
4. Copy `test1.mp4` to `<yolov5_root>`
4. Run `python detect.py --source test1.mp4 --weights runs/train/exp2/weights/best.pt --conf-thres 0.25 --view-img`
## Test Videos
The videos `test1.mp4` and `test2.mp4` are collected from internet, **I dont own the rights to them**.

BIN
test1.mp4 (Stored with Git LFS)

Binary file not shown.

BIN
test2.mp4 (Stored with Git LFS)

Binary file not shown.

@ -0,0 +1,5 @@
classes = 21
train = ycb/train.txt
valid = ycb/test.txt
names = ycb/obj.names
backup = ycb/backup/

@ -0,0 +1,21 @@
002_master_chef_can
003_cracker_box
004_sugar_box
005_tomato_soup_can
006_mustard_bottle
007_tuna_fish_can
008_pudding_box
009_gelatin_box
010_potted_meat_can
011_banana
019_pitcher_base
021_bleach_cleanser
024_bowl
025_mug
035_power_drill
036_wood_block
037_scissors
040_large_marker
051_large_clamp
052_extra_large_clamp
061_foam_brick

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,27 @@
lr0: 0.01
lrf: 0.2
momentum: 0.937
weight_decay: 0.0005
warmup_epochs: 3.0
warmup_momentum: 0.8
warmup_bias_lr: 0.1
box: 0.05
cls: 0.5
cls_pw: 1.0
obj: 1.0
obj_pw: 1.0
iou_t: 0.2
anchor_t: 4.0
fl_gamma: 0.0
hsv_h: 0.015
hsv_s: 0.7
hsv_v: 0.4
degrees: 0.0
translate: 0.1
scale: 0.5
shear: 0.0
perspective: 0.0
flipud: 0.0
fliplr: 0.5
mosaic: 1.0
mixup: 0.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 552 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 KiB

@ -0,0 +1,33 @@
weights: yolov5m.pt
cfg: ''
data: ycb/dataset.yaml
hyp: data/hyp.scratch.yaml
epochs: 300
batch_size: 32
img_size:
- 640
- 640
rect: false
resume: false
nosave: false
notest: false
noautoanchor: false
evolve: false
bucket: ''
cache_images: false
image_weights: false
device: ''
multi_scale: false
single_cls: false
adam: false
sync_bn: false
local_rank: -1
log_imgs: 16
workers: 8
project: runs/train
name: exp
exist_ok: false
total_batch_size: 32
world_size: 1
global_rank: -1
save_dir: runs/train/exp2

@ -0,0 +1,62 @@
0/299 13.9G 0.03528 0.03787 0.02883 0.102 134 640 0.3061 0.3211 0.2722 0.1961 0.0473 0.1027 0.05056
1/299 13.9G 0.02398 0.02717 0.006741 0.05789 148 640 0.3071 0.2974 0.2652 0.1965 0.04861 0.1071 0.05276
2/299 13.9G 0.02157 0.02633 0.005818 0.05371 147 640 0.2936 0.2364 0.2119 0.1551 0.06259 0.1203 0.05542
3/299 13.9G 0.01971 0.02526 0.005099 0.05006 137 640 0.2828 0.1926 0.181 0.13 0.07275 0.1188 0.06165
4/299 13.9G 0.01808 0.02358 0.004397 0.04606 129 640 0.2773 0.1769 0.1771 0.1288 0.07533 0.1218 0.06344
5/299 13.9G 0.01732 0.02273 0.004097 0.04415 125 640 0.2996 0.1743 0.1792 0.1315 0.07628 0.1225 0.06415
6/299 13.9G 0.01688 0.0222 0.003899 0.04298 153 640 0.3147 0.1623 0.171 0.1239 0.08036 0.1215 0.06577
7/299 13.9G 0.0166 0.0219 0.003824 0.04233 170 640 0.3103 0.1606 0.1734 0.1258 0.08092 0.1208 0.06552
8/299 13.9G 0.01639 0.0216 0.003753 0.04174 114 640 0.315 0.1576 0.1709 0.1243 0.0819 0.1199 0.06597
9/299 13.9G 0.01622 0.02144 0.003713 0.04138 146 640 0.3081 0.1586 0.1709 0.1244 0.08257 0.1187 0.06605
10/299 13.9G 0.01602 0.02126 0.003615 0.0409 139 640 0.3144 0.1588 0.1732 0.1259 0.08334 0.1172 0.06554
11/299 13.9G 0.01595 0.02113 0.003612 0.04069 138 640 0.3223 0.1544 0.1718 0.1258 0.08413 0.117 0.06595
12/299 13.9G 0.01587 0.02107 0.003584 0.04053 122 640 0.3316 0.1505 0.1716 0.1263 0.0844 0.1164 0.06596
13/299 13.9G 0.01577 0.02095 0.003575 0.0403 131 640 0.3394 0.1488 0.1701 0.126 0.08529 0.1163 0.06615
14/299 13.9G 0.01571 0.02086 0.003539 0.04012 124 640 0.3449 0.1476 0.1696 0.1268 0.08585 0.1152 0.06656
15/299 13.9G 0.0156 0.02076 0.003511 0.03987 123 640 0.3559 0.147 0.1713 0.1285 0.08565 0.1151 0.06663
16/299 13.9G 0.01553 0.02066 0.003482 0.03967 135 640 0.3641 0.1452 0.1722 0.1289 0.08608 0.1148 0.06637
17/299 13.9G 0.01547 0.0206 0.00346 0.03953 123 640 0.3675 0.1448 0.173 0.1299 0.08637 0.1136 0.0662
18/299 13.9G 0.01543 0.02059 0.003468 0.03948 160 640 0.3729 0.1444 0.172 0.1297 0.08639 0.1136 0.06575
19/299 13.9G 0.01537 0.02049 0.003432 0.03929 145 640 0.3739 0.1453 0.1717 0.1292 0.08642 0.1141 0.0656
20/299 13.9G 0.01527 0.02036 0.003424 0.03905 134 640 0.3699 0.1438 0.1718 0.129 0.08643 0.1138 0.06587
21/299 13.9G 0.01521 0.02033 0.00337 0.03891 150 640 0.3789 0.1405 0.171 0.1284 0.08678 0.1137 0.06596
22/299 13.9G 0.01518 0.02023 0.00337 0.03878 116 640 0.3966 0.1395 0.1732 0.1305 0.08688 0.1141 0.06601
23/299 13.9G 0.01522 0.02036 0.003413 0.03899 145 640 0.3909 0.1365 0.1709 0.1286 0.08745 0.1139 0.06625
24/299 13.9G 0.0151 0.0202 0.003362 0.03866 161 640 0.3898 0.135 0.1689 0.1269 0.088 0.1139 0.06606
25/299 13.9G 0.0151 0.02012 0.003366 0.03858 123 640 0.3857 0.1358 0.1694 0.1269 0.08783 0.113 0.06583
26/299 13.9G 0.01505 0.02013 0.00335 0.03853 204 640 0.3834 0.1367 0.1683 0.1261 0.08823 0.1124 0.06616
27/299 13.9G 0.01501 0.02003 0.003333 0.03837 138 640 0.387 0.137 0.1686 0.1256 0.08843 0.112 0.06586
28/299 13.9G 0.01496 0.02005 0.003319 0.03833 127 640 0.3848 0.1377 0.1668 0.1248 0.08862 0.1113 0.06593
29/299 13.9G 0.01493 0.01999 0.003302 0.03823 142 640 0.3859 0.1373 0.168 0.1252 0.08859 0.1107 0.06564
30/299 13.9G 0.01492 0.01999 0.003321 0.03823 132 640 0.3925 0.1388 0.1689 0.1259 0.08869 0.1104 0.06582
31/299 13.9G 0.01492 0.02002 0.003315 0.03825 146 640 0.3862 0.1418 0.1691 0.1266 0.08843 0.1102 0.0659
32/299 13.9G 0.0149 0.01992 0.00329 0.03811 140 640 0.3839 0.1429 0.1693 0.128 0.08801 0.1099 0.06569
33/299 13.9G 0.01482 0.01986 0.003263 0.03795 114 640 0.3857 0.1411 0.1672 0.1267 0.08838 0.1102 0.06628
34/299 13.9G 0.01478 0.01985 0.003276 0.03791 153 640 0.3791 0.143 0.1674 0.127 0.08801 0.1099 0.06613
35/299 13.9G 0.0148 0.01981 0.003253 0.03786 145 640 0.3754 0.142 0.1673 0.1262 0.08772 0.1101 0.06629
36/299 13.9G 0.01473 0.01979 0.003246 0.03776 133 640 0.3631 0.139 0.1647 0.123 0.08833 0.1093 0.06597
37/299 13.9G 0.0147 0.01974 0.003244 0.03769 130 640 0.3684 0.1399 0.164 0.1225 0.08863 0.1086 0.06679
38/299 13.9G 0.0147 0.01975 0.003232 0.03768 149 640 0.3702 0.1384 0.1631 0.121 0.08922 0.1084 0.06718
39/299 13.9G 0.0147 0.0197 0.003235 0.03764 138 640 0.3755 0.1376 0.1632 0.1212 0.08915 0.1083 0.06715
40/299 13.9G 0.01466 0.01973 0.003253 0.03764 159 640 0.3747 0.1391 0.1644 0.122 0.08868 0.108 0.06733
41/299 13.9G 0.01461 0.01964 0.003204 0.03745 145 640 0.3761 0.1392 0.1642 0.1223 0.08882 0.1081 0.06759
42/299 13.9G 0.01462 0.01961 0.003171 0.0374 152 640 0.3764 0.1397 0.1657 0.1228 0.08843 0.1078 0.06782
43/299 13.9G 0.01456 0.01952 0.003174 0.03725 95 640 0.3598 0.1408 0.1666 0.1229 0.08804 0.1075 0.06832
44/299 13.9G 0.01461 0.01959 0.003222 0.03742 148 640 0.3588 0.1444 0.1657 0.1228 0.08793 0.1071 0.06883
45/299 13.9G 0.01458 0.01961 0.003188 0.03737 166 640 0.3695 0.1452 0.1655 0.1226 0.08795 0.1072 0.06929
46/299 13.9G 0.0145 0.01944 0.003154 0.03709 125 640 0.3704 0.1447 0.1648 0.1228 0.08828 0.107 0.06907
47/299 13.9G 0.01454 0.01953 0.003209 0.03728 145 640 0.3613 0.1438 0.1623 0.1208 0.08848 0.1064 0.06944
48/299 13.9G 0.01449 0.0195 0.003178 0.03717 145 640 0.358 0.1432 0.1627 0.121 0.08888 0.1055 0.07016
49/299 13.9G 0.01448 0.01953 0.003173 0.03719 108 640 0.3494 0.1413 0.1612 0.12 0.08921 0.1048 0.07058
50/299 13.9G 0.01442 0.01937 0.003146 0.03693 126 640 0.3508 0.1396 0.16 0.119 0.08958 0.1045 0.07038
51/299 13.9G 0.01444 0.01942 0.003159 0.03703 141 640 0.3622 0.1424 0.1611 0.1192 0.08954 0.1038 0.07006
52/299 13.9G 0.01442 0.01938 0.003129 0.03693 141 640 0.3583 0.1417 0.1609 0.1199 0.08972 0.104 0.07044
53/299 13.9G 0.01439 0.01939 0.003147 0.03693 144 640 0.3518 0.1432 0.1616 0.1212 0.08914 0.1044 0.07012
54/299 13.9G 0.01437 0.01932 0.003126 0.03682 135 640 0.3386 0.1448 0.1618 0.1217 0.0889 0.1046 0.07034
55/299 13.9G 0.01436 0.01934 0.003114 0.03681 149 640 0.3406 0.1451 0.1622 0.123 0.08903 0.1047 0.07041
56/299 13.9G 0.01433 0.01927 0.003116 0.03671 131 640 0.3398 0.1429 0.1617 0.1226 0.08919 0.1045 0.07113
57/299 13.9G 0.0143 0.01929 0.003098 0.03668 128 640 0.3397 0.141 0.1607 0.1221 0.08932 0.1054 0.0706
58/299 13.9G 0.01432 0.01934 0.003107 0.03676 140 640 0.3434 0.1392 0.1598 0.1208 0.08957 0.1056 0.07025
59/299 13.9G 0.01435 0.01935 0.003133 0.03683 159 640 0.3499 0.1394 0.1611 0.1207 0.08964 0.1054 0.07002
60/299 13.9G 0.01424 0.01921 0.003072 0.03652 126 640 0.3538 0.138 0.1601 0.1202 0.08991 0.1057 0.07037
61/299 13.9G 0.01424 0.0192 0.003081 0.03652 149 640 0.3491 0.1394 0.1593 0.1198 0.08968 0.105 0.07087

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 KiB

BIN
yolov5/exp2/weights/best.pt (Stored with Git LFS)

Binary file not shown.

BIN
yolov5/exp2/weights/last.pt (Stored with Git LFS)

Binary file not shown.
Loading…
Cancel
Save