-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error running Inference.py script #23
Comments
My environment is below. Downgrading python version may solve your problem. |
@YsYusaito Thanks for replying. When I tried with TensorFlow 1.15.0 version, I got some error and hence, I tried to upgrade it to 2.5.0. After upgrading tensorflow version, I overcame the error but now there is no object detection happening on my input image. Can you please let me know if you made any changes in the inference.py or utils.py script? If not then, I will try to have a similar environment configuration as yours and will try to execute the script. Would you mind to share your inference.py and utily.py script? Thank you very much for your help. :) |
Hi @YsYusaito, I created a new virttual environment as per your environment versions. But when I execute the inference.py script, I am getting the following error. Please find my installed versions within my conda virtual environment on windows 10. (yolov3-tflite2) C:\pycoral_venv\Scripts\coral\pycoral1>pip list absl-py 0.13.0 |
I could over come the issue by following google-coral/tflite#37 (comment) When I input images of other classes, I do not get any predicitons at all. The objects are not at all detected. :/ Do I have to modify something in utils.py script? But thank you again for sharing your environment configurations. :) |
I'm glad to hear that! This problem is due to anchor file. Please correct corresponding part of inference.py as follows.
I'm going to publish a modified version of inference.py and utils.py on github when I'm free. |
@YsYusaito Thanks for your input. But even after I modified the code as per your above mentioned snippet, the detection still remains unchanged. Is there anything necessary to modify in utily.py script? Is it possible for you to upload the script to google drive and share the link, please. |
@YsYusaito Can you also please tell me how did you generate anchor file? As I am new to this domain, I created a .txt file from looking at the anchors in the cfg file. But when I googled about it, I found that we can generate the file directly by using "darknet.exe detector calc_anchors data/obj.data -num_of_clusters 9 -width 416 -height 416" I generated anchor files using the above command. With new anchor files, the bounding boxes appears to be very big and hence I cannot see the classes as well as the score values. |
@YsYusaito I got the objects detected, but the score value of the detected object is depleted compared to the original darknet model. In terms of inference, I would like to measure the inference time for a single image. I got the follwing output. Net forward-pass time: 1664.445161819458 ms. I would like to measure the inference time after the image is loaded into the model and hence, just the time taken for it to process and do the detection. I calculated using the import time function and found it to be strange. I got an inference time as shown below. Inference after loading image: 1677.1337985992432 ms I think the above inference time (infernce on Coral USB) is suspicious to me as the inference time was around 380ms when the same model was run on PC without Coral USB. So afcourse, the inference time should be lesser than 380ms. Can you shed some inputs, please? |
I am working on windows platform and have installed TF = 1.15.0 along with python version 3.7.11.
I am getting the below error when running inference .py script. Please guide me solve the issue. Thanks in advance.
The text was updated successfully, but these errors were encountered: