Open g-i-o-r-g-i-o opened 1 month ago
It depends upon the use case. You can definitely increase the region by increasing the offset value.
On Mon, Oct 28, 2024 at 7:59 PM Giorgio @.***> wrote:
Hi, thanks a lot for this very useful code.
I think that there is a small problem in the detection of objects that cross a line:
this condition
` y = 308 offset = 7
''' condition for red line ''' if y < (cy + offset) and y > (cy - offset): ''' this if condition is putting the id and the circle on the object when the center of the object touched the red line.'''
`
simply checks if an object is inside the Zone defined by y +- offset; this is true when:
` cy > y - offset
cy < y + offset ` this means that we just verify if the object falls in that Zone
But it could happen that an object is not registered in such a narrow zone, and that it isn't counted. So you should make the zone bigger, or simply check for relative position to the line.
Please let me know if you agree, thanks.
— Reply to this email directly, view it on GitHub https://github.com/AarohiSingla/Track-and-Count-Using-yolov9/issues/3, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOJ7RWV56P257PEEAUFDIKTZ5Y2C3AVCNFSM6AAAAABQXQVLTOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGYYTQNJVGYZTMNQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
I agree. You can definitely increase the region by increasing the offset value.
Sorry, another question, the tracker.py doesn't seem to be bytetrack? Is it simply a centroid detection? Thanks
https://www.youtube.com/watch?v=sqwSJsFdZeA&t=50s
https://github.com/AarohiSingla/Track-and-Count-Using-yolov9/blob/main/solution.ipynb
Hi, thanks a lot for this very useful code.
I think that there is a small problem in the detection of objects that cross a line:
this condition
simply checks if an object is inside the Zone defined by y +- offset; this is true when:
this means that we just verify if the object falls in that Zone
But it could happen that an object is not registered in such a narrow zone, and that it isn't counted. So you should make the zone bigger, or simply check for relative position to the line.
Please let me know if you agree, thanks.
Another question, what is the tracker.py? I haven't yet looked at it, it seems to be simply a centroid tracking algorithm? Where is bytetrack implemented?