-
Notifications
You must be signed in to change notification settings - Fork 51
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
Error: Object with ID -198880863 already exists in the frame #895
Comments
@diogomafra we will investigate the problem soon. |
@diogomafra just to potentially offer you a workaround, could you tell me why you need to create a custom ROI per object detected by YOLO? I mean, if you want to tweak boxes, you could use the |
TL;DR: We create the custom ROI because a model step cannot have multiple inputs. Our pipeline has a YOLO model with multiple labels, some of these labels must be passed to the OCR step. The ideal pipeline would look like the following:
I know we could have one OCR step per label, but we're not doing that for 3 reasons:
Do you have any other suggestions? By the way, this is important but not urgent right now, enjoy the holidays 😄 |
Ah, I see the use case. Definitely, the use case must be supported. Please keep tracking the issue. |
@diogomafra could you please check the fix? https://github.com/insight-platform/Savant/pull/897/files Clone the PR branch; run |
@bwsw your PR fixed one of the errors ( I tested it with both versions, your PR (develop) and 0.4.9.
|
EDIT: the problem is more complex than that. As I understand the object should have either
|
We will explore it a bit later. I have no required knowledge. We have samples working with attributes, do you follow them? |
@bwsw I noticed something interesting. The problem I'm seeing occurs because I'm removing the object from the frame, and the next time the same object appears in the loop the attribute I can work around this issue, but I don't think the # this list can have the same object twice in some cases
custom_roi_objs = [o for o in frame_meta.objects if obj.element_name == "custom_roi"]
# here we iterate over the list and remove from the frame_meta all the objects
# for duplicated objects, the second time we see them the `object_meta_impl` is None an the code fails
for obj in custom_roi_objs:
# do something
# remove object
frame_meta.remove_obj_meta(custom_roi_object) |
@bwsw can you please release the fix you already have? The second problem I can work around in my code. |
@diogomafra I cannot merge it because I do not understand the root cause. We need to wait developers get back from vacations and investigate your case under a more closer look to elaborate the qualified solution. So, for now, you can use a workaround but I do not want to publish it because we need a general fix after understanding the root cause and the use pattern. |
@diogomafra, we have pulled the issue into the development. Please wait a bit more :) |
@diogomafra The problem is the non-unique object uid, you duplicate objects and this leads to the issue you described. We changed the way the uid is generated. Could you please check the PR #912? |
Thank you for working on that @denisvmedyantsev . I'll test it tomorrow and get back to you ASAP. |
@denisvmedyantsev I just confirmed your PR fixes both errors I was seeing! |
We recently updated our system from Savant 0.2.11 to 0.4 and started seeing the errors below. These errors happen on a step that creates a custom ROI.
Additional details
Here's a branch where I'm reproducing the issue. It only happens when many objects are in the frame, so I had to force that scenario by creating multiple YOLO steps.
The pipeline in the example does the following:
While looking at the Savant's source code I noticed this PR, it changed a call to
video_frame.create_object
withvideo_frame.add_object
, which is the function that triggers the error.The text was updated successfully, but these errors were encountered: