Created
September 25, 2019 19:30
-
-
Save Jargon4072/9f604866f7d512466a7bd2d87061714e to your computer and use it in GitHub Desktop.
Yolov3_medium_4
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
def main(): | |
# load our input image and grab its spatial dimensions | |
image = cv2.imread("./test1.jpg") | |
labelsPath="yolo_v3/coco.names" | |
cfgpath="yolo_v3/yolov3.cfg" | |
wpath="yolo_v3/yolov3.weights" | |
Lables=get_labels(labelsPath) | |
CFG=get_config(cfgpath) | |
Weights=get_weights(wpath) | |
nets=load_model(CFG,Weights) | |
Colors=get_colors(Lables) | |
res=get_predection(image,nets,Lables,Colors) | |
# image=cv2.cvtColor(image,cv2.COLOR_BGR2RGB) | |
# show the output image | |
cv2.imshow("Image", res) | |
cv2.waitKey() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment