You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: yolov4/README.md
+20-24
Original file line number
Diff line number
Diff line change
@@ -2,39 +2,45 @@
2
2
3
3
The Pytorch implementation is from [ultralytics/yolov3](https://github.com/ultralytics/yolov3). It can load yolov4.cfg and yolov4.weights(from AlexeyAB/darknet).
4
4
5
-
Following tricks are used in this yolov4:
5
+
## Config
6
6
7
-
- Three yololayer are implemented in one plugin to improve speed, codes derived from [lewes6369/TensorRT-Yolov3](https://github.com/lewes6369/TensorRT-Yolov3)
8
-
- Mish activation, implemented in a plugin.
9
-
- Batchnorm layer, implemented by scale layer.
7
+
- Input shape `INPUT_H`, `INPUT_W` defined in yololayer.h
8
+
- Number of classes `CLASS_NUM` defined in yololayer.h
9
+
- FP16/FP32 can be selected by the macro `USE_FP16` in yolov4.cpp
10
+
- GPU id can be selected by the macro `DEVICE` in yolov4.cpp
11
+
- NMS thresh `NMS_THRESH` in yolov4.cpp
12
+
- bbox confidence threshold `BBOX_CONF_THRESH` in yolov4.cpp
13
+
-`BATCH_SIZE` in yolov4.cpp
10
14
11
-
## Excute:
15
+
## How to run
12
16
13
-
```
14
17
1. generate yolov4.wts from pytorch implementation with yolov4.cfg and yolov4.weights, or download .wts from model zoo
@@ -209,7 +197,6 @@ IScaleLayer* addBatchNorm2d(INetworkDefinition *network, std::map<std::string, W
209
197
}
210
198
211
199
ILayer* convBnMish(INetworkDefinition *network, std::map<std::string, Weights>& weightMap, ITensor& input, int outch, int ksize, int s, int p, int linx) {
ILayer* convBnLeaky(INetworkDefinition *network, std::map<std::string, Weights>& weightMap, ITensor& input, int outch, int ksize, int s, int p, int linx) {
0 commit comments