You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mkdir bin cd bin wget https://www.dropbox.com/s/qhdbu7w3bi0tmyt/yolo.weights wget https://www.dropbox.com/s/5xmhad7j7tqnt1m/tiny-yolo.weights wget https://www.dropbox.com/s/1aug9zoiksc7x9i/tiny-yolo-voc.weights cd .. mkdir ckpt cd ckpt wget https://www.dropbox.com/s/pct28zznt6gtih1/ckpt.tar.gz tar -xzf ckpt.tar.gz rm ckpt.tar.gz
fromyolomodelimportyolo_model# create yolo instance yolo=yolo_model.yolo() # preload weightsyolo.load(model='tiny-yolo',threshold=0.22,gpu=0.2) ## now you can choose either load 'tiny-yolo', 'tiny-yolo-voc' or 'yolo' model, and you can also pass in threshold # run demo if you have a camerayolo.demo('camera') # use key [ESC] to exit demo# predict a imageresult=yolo.predict('dog.jpg')
process images in batch or single image in memory return list of json
importcv2img_path='sample_img'imgs=os.listdir(img_path) cv_imgs= [cv2.imread(os.path.join(img_path,f),cv2.IMREAD_COLOR) forfinimgs] yolo=yolo_model.yolo(); yolo.load(model='tiny-yolo',threshold=0.22,gpu=0.2) ## now you can choose either load 'tiny-yolo' or 'yolo' model, and you can also pass in threshold##### predict single memory imageyolo.predict_imgcv(cv_imgs[0]) ##### predict images in batchesinputs=cv_imgsoutputs=yolo.predict_imgcv_list(inputs,threshold=0.3) ## now user can pass in threshold, if not, defaults to 0.35print(outputs)
About
Translate darknet to tensorflow. Load trained weights, retrain/fine-tune using tensorflow, export constant graph def to mobile devices