Skip to content

Instantly share code, notes, and snippets.

View goktugyildirim's full-sized avatar

Göktuğ Yıldırım goktugyildirim

View GitHub Profile
@YashasSamaga
YashasSamaga / yolov4.py
Last active July 13, 2024 06:42
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()]