david8862 / keras-YOLOv3-model-set

end-to-end YOLOv4/v3/v2 object detection pipeline, implemented on tf.keras with different technologies
MIT License
639 stars 220 forks source link

Predict error #80

Open arthurfortes opened 4 years ago

arthurfortes commented 4 years ago

Hi there! I'm having problems at the time of prediction, encountering the following error:

Image detection mode Ignoring remaining command line arguments: ./path2your_video, Input image filename:dog.jpg Traceback (most recent call last): File "yolo.py", line 438, in <module> detect_img(yolo) File "yolo.py", line 336, in detect_img r_image = yolo.detect_image(image) File "yolo.py", line 114, in detect_image out_boxes, out_classes, out_scores = self.predict(image_data, image_shape) File "yolo.py", line 131, in predict out_boxes, out_classes, out_scores = yolo3_postprocess_np(self.yolo_model.predict(image_data), image_shape, self.anchors, len(self.class_names), self.model_image_size, max_boxes=100) File "/home/arthurfortes/anaconda3/envs/yolo/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training.py", line 908, in predict use_multiprocessing=use_multiprocessing) File "/home/arthurfortes/anaconda3/envs/yolo/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_arrays.py", line 723, in predict callbacks=callbacks) File "/home/arthurfortes/anaconda3/envs/yolo/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_arrays.py", line 394, in model_iteration batch_outs = f(ins_batch) File "/home/arthurfortes/anaconda3/envs/yolo/lib/python3.7/site-packages/tensorflow_core/python/keras/backend.py", line 3476, in __call__ run_metadata=self.run_metadata) File "/home/arthurfortes/anaconda3/envs/yolo/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 1472, in __call__ run_metadata_ptr)

tensorflow.python.framework.errors_impl.NotFoundError: 2 root error(s) found.
  (0) Not found: No algorithm worked!
     [[{{node predict_conv_1/Conv2D}}]]
     [[predict_conv_3/BiasAdd/_3597]]
  (1) Not found: No algorithm worked!
     [[{{node predict_conv_1/Conv2D}}]]
0 successful operations.
0 derived errors ignored.

I'm using the follow command:

python yolo.py --model_type=yolo3_mobilenetv2_lite_spp --weights_path=logs/000/ep013-loss12.798-val_loss15.062.h5 --anchors_path=configs/digit_anchors.txt --image

Can someone help me?

david8862 commented 4 years ago

@arthurfortes seems you missed model-dump before running the demo predict

Mrbatman-YJ commented 4 years ago

(base) E:\YOLOV3\K-yolo3>python yolo_video.py --image Using TensorFlow backend. 2020-07-16 19:06:38.335806: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll Traceback (most recent call last): File "yolo_video.py", line 3, in from yolo import YOLO, detect_video File "E:\YOLOV3\K-yolo3\yolo.py", line 16, in from yolo3.model import yolo_eval, yolo_body, tiny_yolo_body File "E:\YOLOV3\K-yolo3\yolo3\model.py", line 14, in from yolo3.utils import compose File "E:\YOLOV3\K-yolo3\yolo3\utils.py", line 4 from future import division ^ SyntaxError: from future imports must occur at the beginning of the file

help me?