Closed Chaideo closed 4 years ago
Use following command - python flow --imgdir sample_img/ --model cfg/tiny-yolo.cfg --load bin/tiny-yolo.weights --gpu 1.0
This will run prediction on all the images contained in sample_img folder. All input images from folder sample_img/ are flowed through the net and predictions are put in sample_img/out/
@Chaideo yes, that should work please check similar predict function I am trying to contribute at https://github.com/bothe/darkflow (predict.py file, be particular to adding your configuration in config_options.py). The problem I am facing though is in the return_predict() function is not producing the same results as predict() function does.
Let me know if you have came across this issue and perhaps solved, I am trying from my side.
should i use this method for every image or is there anything else that can be apply?
import pprint as pp
original_img = cv2.imread("/content/drive/any-image.jpg") original_img = cv2.cvtColor(original_img, cv2.COLOR_BGR2RGB) results = tfnet2.return_predict(original_img) print(results)