-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathconfig.py
32 lines (28 loc) · 1.51 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# -*- coding:utf-8 -*-
kGpuId = 0
kNumClass = 80
kInputH = 640
kInputW = 640
kNmsThresh = 0.45
kConfThresh = 0.25
kMaxNumOutputBbox = 1000 # assume the box outputs no more than kMaxNumOutputBbox boxes that conf >= kNmsThresh;
kNumBoxElement = 7 # left, top, right, bottom, confidence, class, keep_flag(whether drop when NMS)
onnx_file = "./onnx_model/yolo11s.onnx"
trt_file = "./model.plan"
# for FP16 mode
use_fp16_mode = False
# for INT8 mode
use_int8_mode = False
n_calibration = 20
cache_file = "./int8.cache"
calibration_data_dir = "./calibrator" # 存放用于 int8 量化校准的图像
class_name_list = [
"person", "bicycle", "car", "motorcycle", "airplane", "bus", "train", "truck", "boat", "traffic light",
"fire hydrant", "stop sign", "parking meter", "bench", "bird", "cat", "dog", "horse", "sheep", "cow", "elephant",
"bear", "zebra", "giraffe", "backpack", "umbrella", "handbag", "tie", "suitcase", "frisbee", "skis", "snowboard",
"sports ball", "kite", "baseball bat", "baseball glove", "skateboard", "surfboard", "tennis racket", "bottle",
"wine glass", "cup", "fork", "knife", "spoon", "bowl", "banana", "apple", "sandwich", "orange", "broccoli",
"carrot", "hot dog", "pizza", "donut", "cake", "chair", "couch", "potted plant", "bed", "dining table", "toilet",
"tv", "laptop", "mouse", "remote", "keyboard", "cell phone", "microwave", "oven", "toaster", "sink", "refrigerator",
"book", "clock", "vase", "scissors", "teddy bear", "hair drier", "toothbrush"
]