Last active
October 23, 2018 01:58
-
-
Save f-rumblefish/b9888324cf53ecc9826ff45c8cf37884 to your computer and use it in GitHub Desktop.
Object Detection via YOLO
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config = 'yolov2.cfg' | |
model = 'yolov2.weights' | |
Net_YOLO = cv.dnn.readNetFromDarknet(config, model) | |
Net_YOLO.setInput(cv.dnn.blobFromImage(img, 1.0/255.0, (416, 416), swapRB = True, crop = False)) | |
Net_YOLO_pred = Net_YOLO.forward() | |
print(">>> YOLOv2 prediction shape = ", Net_YOLO_pred.shape) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment