-
Notifications
You must be signed in to change notification settings - Fork 243
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
object ids in tracked_objects skipped a number? #309
Comments
This is the video you can use for testing: Please refer to issue #307 for code. The only changes I have made are:
Thanks |
@aguscas Could you please advise on this? |
Hello @utility-aagrawal , sorry for my late response, I've been busy lately. To save me some time, could you also provide the functions that you use to detect the faces? ( |
Sure @aguscas! Here are those functions: from retinaface import RetinaFace as rf -- Face detection using retinaface model for a frame
def retinaface_to_bbox_centroid(detection_as_xywh: np.ndarray) -> np.ndarray: -- Converts retinaface (left, top, width, height) prediction corner coordinates [[left_top_x, left_top_y], [right_bottom_x, right_bottom_y]] -- Converts detections to the format norfair expects i.e. Detection objects
Let me know if you have any further questions. Thanks! |
Alright, I made a test using the same parameters you said for all variables, but couldn't reproduce the problem you were mentioning about skipping ids. I'm still not sure what might cause you that. Here is the video created with your code. By the way, these models run so slow that I shouldn't even call it 'running', it's more like crawling towards the output. Hope you find other models that run faster. Also on another note, parameters seem to need a lot of tuning, lots of ID switches there. |
I should have mentioned it before. It doesn't happen for every video. I have seen it happening when you have more faces (5+) in the video. I'll try to find an example video and share with you. |
Here's one video you can try. You'll notice that object ids 26 and 29 are skipped: London.Walk.from.Oxford.Street.to.Carnaby.Street_30secs.mp4 |
Are you sure you haven't made any other changes to the code here apart from the values of |
Closing this issue. I just added a postprocessing step to assign contiguous object IDs. Thanks! |
Hi,
I am using norfair to track faces. I noticed that sometimes tracked_objects were skipping a number for object ids. For example, I have 3 faces and object ids are 1, 3, 4 instead of 1,2,3. What could be the reason? Might I be doing something wrong? Let me know if you need anything additional. Thanks!
The text was updated successfully, but these errors were encountered: