We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20faf69 commit 51255adCopy full SHA for 51255ad
main_yolov5.py
@@ -5,7 +5,7 @@
5
class yolov5():
6
def __init__(self, yolo_type, confThreshold=0.5, nmsThreshold=0.5, objThreshold=0.5):
7
with open('coco.names', 'rt') as f:
8
- self.classes = f.read().rstrip('\n').split('\n')
+ self.classes = f.read().rstrip('\n').split('\n') ###这个是在coco数据集上训练的模型做opencv部署的,如果你在自己的数据集上训练出的模型做opencv部署,那么需要修改self.classes
9
self.colors = [np.random.randint(0, 255, size=3).tolist() for _ in range(len(self.classes))]
10
num_classes = len(self.classes)
11
anchors = [[10, 13, 16, 30, 33, 23], [30, 61, 62, 45, 59, 119], [116, 90, 156, 198, 373, 326]]
0 commit comments