mirror of
https://github.com/LdDl/go-darknet.git
synced 2025-09-27 03:56:18 +08:00
test yolov7-tiny
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -5,6 +5,8 @@ cmd/examples/yolov3.cfg
|
||||
cmd/examples/yolov3.weights
|
||||
cmd/examples/yolov4.cfg
|
||||
cmd/examples/yolov4.weights
|
||||
cmd/examples/yolov7-tiny.cfg
|
||||
cmd/examples/yolov7-tiny.weights
|
||||
darknet.h
|
||||
*.so
|
||||
predictions.png
|
||||
|
27
README.md
27
README.md
@@ -77,6 +77,8 @@ Building and running program:
|
||||
```shell
|
||||
#for yolo v4
|
||||
./download_data.sh
|
||||
#for yolo v7 tiny
|
||||
./download_data_v7_tiny.sh
|
||||
#for yolo v3
|
||||
./download_data_v3.sh
|
||||
```
|
||||
@@ -107,7 +109,30 @@ Building and running program:
|
||||
|
||||
|
||||
* Build and run example program
|
||||
Yolo V4:
|
||||
|
||||
Yolo v7 tiny:
|
||||
```shell
|
||||
go build -o base_example/main base_example/main.go && ./base_example/main --configFile=yolov7-tiny.cfg --weightsFile=yolov7-tiny.weights --imageFile=sample.jpg
|
||||
```
|
||||
|
||||
Output should be something like this:
|
||||
```shell
|
||||
truck (7): 53.2890% | start point: (0,143) | end point: (89, 328)
|
||||
truck (7): 42.1364% | start point: (685,182) | end point: (800, 318)
|
||||
truck (7): 26.9703% | start point: (437,170) | end point: (560, 217)
|
||||
car (2): 87.7818% | start point: (509,189) | end point: (742, 329)
|
||||
car (2): 87.5633% | start point: (262,191) | end point: (423, 322)
|
||||
car (2): 85.4743% | start point: (427,198) | end point: (549, 309)
|
||||
car (2): 71.3772% | start point: (0,147) | end point: (87, 327)
|
||||
car (2): 62.5698% | start point: (98,151) | end point: (197, 286)
|
||||
car (2): 61.5811% | start point: (693,186) | end point: (799, 316)
|
||||
car (2): 49.6343% | start point: (386,206) | end point: (441, 286)
|
||||
car (2): 28.2012% | start point: (386,205) | end point: (440, 236)
|
||||
bicycle (1): 71.9609% | start point: (179,294) | end point: (249, 405)
|
||||
person (0): 85.4390% | start point: (146,130) | end point: (269, 351)
|
||||
|
||||
```
|
||||
Yolo v4:
|
||||
```shell
|
||||
go build -o base_example/main base_example/main.go && ./base_example/main --configFile=yolov4.cfg --weightsFile=yolov4.weights --imageFile=sample.jpg
|
||||
```
|
||||
|
5
cmd/examples/download_data_v7_tiny.sh
Executable file
5
cmd/examples/download_data_v7_tiny.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
wget --output-document=sample.jpg https://cdn-images-1.medium.com/max/800/1*EYFejGUjvjPcc4PZTwoufw.jpeg
|
||||
wget --output-document=coco.names https://raw.githubusercontent.com/AlexeyAB/darknet/master/data/coco.names
|
||||
wget --output-document=yolov7-tiny.cfg https://raw.githubusercontent.com/AlexeyAB/darknet/master/cfg/yolov7-tiny.cfg
|
||||
sed -i -e "\$anames = coco.names" yolov7-tiny.cfg
|
||||
wget --output-document=yolov7-tiny.weights https://github.com/AlexeyAB/darknet/releases/download/yolov4/yolov7-tiny.weights
|
Reference in New Issue
Block a user