Coder Social home page Coder Social logo

VitTracker crush about opencv_zoo HOT 12 CLOSED

saghavart avatar saghavart commented on August 30, 2024
VitTracker crush

from opencv_zoo.

Comments (12)

fengyuentau avatar fengyuentau commented on August 30, 2024

from opencv_zoo.

saghavart avatar saghavart commented on August 30, 2024

Thank you for quick response. It's (640,480). I've also tried with (1280,720)

from opencv_zoo.

saghavart avatar saghavart commented on August 30, 2024

To reproduce , you can set number of pixels to 0 manually like this

frame[:,:,:] = 122
frame[:-padd, :-padd, :] = 0

from opencv_zoo.

fengyuentau avatar fengyuentau commented on August 30, 2024

Could you share the minimal reproducer?

from opencv_zoo.

saghavart avatar saghavart commented on August 30, 2024

Sure. Just insert following 3 lines in line 108 of demo.py file

padd = 70
frame[:,:,:]=122
frame[:-padd, :-padd, :] = 0

and run demo.py file

from opencv_zoo.

fengyuentau avatar fengyuentau commented on August 30, 2024

I tried with these three lines on my m1 macbook. Things are it did not crash but went very slow with your three lines of code. Also tried commented out frame[:,:,:]=122, it went smooth again. I guess some internal computation has problem with a massive area of pixel value 122. So the problem isn't with black pixels.

from opencv_zoo.

saghavart avatar saghavart commented on August 30, 2024

Maybe this can help to reproduce. Remove those three lines, start camera, select an object and then close the camera with your hand or something black for 2-3 seconds. In my cases it writes target lost and then crushes

from opencv_zoo.

fengyuentau avatar fengyuentau commented on August 30, 2024

Okay, it can be reproduced on my side. Let me look into the issue tomorrow.

from opencv_zoo.

fengyuentau avatar fengyuentau commented on August 30, 2024

Okay, the problem is confirmed. Problem is when the target is lost, the bounding box gets larger and larger (the wrong bounding box pattern is recorded regardless of score) and the size of roi grows until out-of-memory error. See crop_image and update:

https://github.com/opencv/opencv/blob/a03b81316782ae30038b288fd3568993fa1e3538/modules/video/src/tracking/tracker_vit.cpp#L75-L93

https://github.com/opencv/opencv/blob/a03b81316782ae30038b288fd3568993fa1e3538/modules/video/src/tracking/tracker_vit.cpp#L199-L203

from opencv_zoo.

fengyuentau avatar fengyuentau commented on August 30, 2024

I will submit a PR to fix this problem.

from opencv_zoo.

fengyuentau avatar fengyuentau commented on August 30, 2024

@saghavart I submitted a PR to fix the problem hopefully. Feel free to review and test it opencv/opencv#25760.

from opencv_zoo.

fengyuentau avatar fengyuentau commented on August 30, 2024

Hello @saghavart , my patch to fix the problem has been merged. Feel free to have a try on your side. Closing this issue for now.

from opencv_zoo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.