-
Notifications
You must be signed in to change notification settings - Fork 166
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
Very Low FPS #9
Comments
I also have this issue where I am trying to implement the webcam_demo.py with tkinter. I am having a error where: Code is: import time def start_video(): def stop_video(): def start_process(): def stop_process(): def show_frame():
def process_frame(img):
load our serialized model from diskprint("Loading model...") window = tk.Tk() |
@sushant1727 Regarding your first post, you should use the GPU version to obtain good frame rates. Can get 10+ FPS if you use a good CUDA enabled GPU. However I am not sure how you can setup GPU with VMWare. @sushant1727 Regarding your second post, I will go through it in detail and get back to you. |
Thanks @madhawav I will run it with GPU enabled and report back the performance. To add more for the second post: The error pydarknet.Image' has no attribute 'fromarray. I am using Image.fromarray(which is defined in PIL(pillow)) function and I guess it is interferring with Image function in pyarknet. That's my guess. I've this code in pastebin for better view. https://pastebin.com/2R36DWux |
Hi, In line 32 you have
but the function process_frame has no "return" keyword. Therefore, the above code makes the value of Can you add the return statement to process_frame function and let me know whether it corrects the issue? |
Thanks for pointing out the mistake. I added return(img), I still get the error. 'Loading weights from weights/yolov3.weights...Done!' Note:- I think in the imports Image is getting imported twice, that might be causing the problem. I tried using this imports Now, I am getting this error. |
Hi, The second error is related with numpy and ImageTk. For example, this is what PIL.ImageTk.py mentions for init() of PhotoImage. class PhotoImage(object):
"""
.....
:param image: Either a PIL image, or a mode string. If a mode string is
used, a size must also be given. So basically, you will have to convert the numpy array to a PIL Image and then pass it to ImageTk.PhotoImage(). |
Thanks @madhawav , you were a great help and I am able to run it as expected. Appreciate your effort. |
@sushant1727 Will close this issue since the problem is solved. |
When running webcam_demo.py and video_demo.py I am getting very low fps.
The output stream freezes and runs in like 10 seconds of interval.
Webcam output is frozen.
Any possible fix?
Note: I followed the guide and installed the CPU version. Running Ubuntu 16.04 VMWare 8 GB ram
The text was updated successfully, but these errors were encountered: