Realtime-Screen-Object-Detection icon indicating copy to clipboard operation
Realtime-Screen-Object-Detection copied to clipboard

Hey Grebtsew!

Open sounart opened this issue 2 years ago • 5 comments

Thank you so much for this repo, this is exactly what I need for my project. The problem is that when I run it it gets stuck at the “got detection now create trackerbox” line 95. Are you able to boot it up on your end?

sounart avatar Aug 31 '23 20:08 sounart

Hello @Sounart!

Thanks for testing the implementation! The current implementation has not been touched in 3 years so there are probably a vast amount of problems due to changes in libaries used. I am currently working on a cleanup project where I reuvinate my old projects, such as this one. I will start looking at this today and let you know when I got it working again.

Project link: https://github.com/users/grebtsew/projects/2 Issue related to project: https://github.com/grebtsew/Realtime-Screen-Object-Detection/issues/5

Cheers, @grebtsew

grebtsew avatar Sep 02 '23 09:09 grebtsew

Hi again @Sounart,

Today I am glad to tell you that the implementation seems to be running OK atleast. There is still alot of cleanup and optimization to be done before I will create a release. I will leave this issue open until next release, so you can let me know if there are any problems.

Thanks for your patience and support!

Cheers, @grebtsew

grebtsew avatar Sep 07 '23 18:09 grebtsew

Appreciate it! From my mac, it will show one detection on the screen when I run main.py, but if I click anywhere, the screen overlay will disappear until I rerun the script. Any ideas? Also, the overlay box is misaligned. I updated all of the scripts I could find that refer to the screensize to my screen size which is 1792 x 1120. example: output_compressed.mov.zip

sounart avatar Sep 07 '23 19:09 sounart

Okey, I do unfortunately not have any mac devices in my possession, and can't create mac VM's due to license issues, therefore I can't debug this on a mac computer myself. However there are perhaps somethings we can try to debug this. The video you sent is great.

First thing i think of is the "Starting new HTTPS connection (1): www.google-analytics.com:443" log from your earlier run. After installing the pip packages run this command: yolo settings sync=false To turn off data sync to google analytics. I don't think it will solve any of your problems but it will make performance a little better.

Also try doing this:

  • Regarding missed detections: There is an outcommented row #cv2.imshow('test', np.array(img)) in utils/shared_variables.py try uncommenting it and the row below with waitKey and run again to see if the collected screens seems correct. It should typically be your entire screen, make sure it is not just a small part of your screen showing. Use waitKey(0) to look at one frame instead of a stream of frames.
  • Regarding boxed disappearing boxes on click: Does boxes appear again if you make sure that the python application is in focus? If that is the case, I'm guessing the "stayontop" option for pyqt5 library works a little differently between windows/ubuntu and mac. There might be some OS specific flags to raise to make it work better. If you wanna test some out, take a look at the row "self.setWindowFlag(Qt.WindowStaysOnTopHint)" in utils/screen_overlay_handler.py.
  • Regarding boxes got wrong size: If the screen capture seems correct, there is probably still something wrong with the scaling. I will test this with some extra monitors and see if I get similar issues.

Cheers, @grebtsew

grebtsew avatar Sep 08 '23 20:09 grebtsew

This is really really helpful and I greatly appreciate your work and going above and beyond to help out! I will give these a try as soon as I can this weekend and will let you know what I can figure out!On Sep 8, 2023, at 2:16 PM, Grebtsew @.***> wrote: Okey, I do unfortunately not have any mac devices in my possession, and can't create mac VM's due to license issues, therefore I can't debug this on a mac computer myself. However there are perhaps somethings we can try to debug this. The video you sent is great. First thing i think of is the "Starting new HTTPS connection (1): www.google-analytics.com:443" log from your earlier run. After installing the pip packages run this command: yolo settings sync=false To turn off data sync to google analytics. I don't think it will solve any of your problems but it will make performance a little better. Also try doing this:

Regarding missed detections: There is an outcommented row #cv2.imshow('test', np.array(img)) in utils/shared_variables.py try uncommenting it and the row below with waitKey and run again to see if the collected screens seems correct. It should typically be your entire screen, make sure it is not just a small part of your screen showing. Use waitKey(0) to look at one frame instead of a stream of frames. Regarding boxed disappearing boxes on click: Does boxes appear again if you make sure that the python application is in focus? If that is the case, I'm guessing the "stayontop" option for pyqt5 library works a little differently between windows/ubuntu and mac. There might be some OS specific flags to raise to make it work better. If you wanna test some out, take a look at the row "self.setWindowFlag(Qt.WindowStaysOnTopHint)" in utils/screen_overlay_handler.py. Regarding boxes got wrong size: If the screen capture seems correct, there is probably still something wrong with the scaling. I will test this with some extra monitors and see if I get similar issues.

Cheers, @grebtsew

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

sounart avatar Sep 08 '23 21:09 sounart