Skip to content

Instantly share code, notes, and snippets.

View vvmatorin's full-sized avatar

Vladislav Matorin vvmatorin

View GitHub Profile
@YashasSamaga
YashasSamaga / yolov4.py
Last active February 18, 2024 04:03
YOLOv4 on OpenCV DNN
import cv2
import time
CONFIDENCE_THRESHOLD = 0.2
NMS_THRESHOLD = 0.4
COLORS = [(0, 255, 255), (255, 255, 0), (0, 255, 0), (255, 0, 0)]
class_names = []
with open("classes.txt", "r") as f:
class_names = [cname.strip() for cname in f.readlines()]