hobbitsyfeet / PeopleTracker

PeopleTracker is an OpenCV Object Tracker that is used to collect data about something in a video. Here, it is used on people but has many other applications as well.
MIT License
3 stars 0 forks source link

Region is disappearing #16

Open Mir09 opened 3 years ago

Mir09 commented 3 years ago

When adding a new tracker, the first region I set disappeared / was deleted. This has only happened with one video, but it happened three times in a row (i.e., finished the video, realized that region was missing, restarted, did the video again, got to the end and realized it disappeared again!). I double checked that it wasn't just on screen (but still recording) and confirmed that no region information was recorded. On the third attempt at this video I noted that the region disappeared when I set the first tracker for a person.

Hope that makes sense!

Mir09 commented 3 years ago

Happened again on a later video, but I caught it right away and re-added the region. Only seemed to happen once, when I added a tracker bounding box. This time not the first tracker, a later one.

Mir09 commented 3 years ago

Happened again this morning after the update. I noticed it right away, so I'm going to try and describe the circumstance.

Hope that helps!

hobbitsyfeet commented 3 years ago

Got it. I was able to reproduce the issue. What's happening in the region name is at one point identical to the tracker name.

For example: Region Name: Art Person Name: Arthur

Because at one point Arthur == Art, the region check removes the region since the region check is marked off and calls delete radius.

Lines 1302-1304:

elif tracker.is_region() is False:
      # If tracker region is no longer selected, delete moving radius
       regions.del_moving_radius(tracker.get_name())

To avoid this, make sure the names are different while you write them or use the Name button to set the tracker name. This will prevent the problem while I make a solution.

Thanks!