Skip to content
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

Non-existent bounding box appears in annotation after exporting a project #8932

Open
2 tasks done
Anton-Cherepkov opened this issue Jan 13, 2025 · 5 comments
Open
2 tasks done
Labels
question Further information is requested

Comments

@Anton-Cherepkov
Copy link

Anton-Cherepkov commented Jan 13, 2025

Actions before raising this issue

  • I searched the existing issues and did not find anything similar.
  • I read/searched the docs

Steps to Reproduce

  1. Export the whole project's annotation into CVAT For Images
  2. Here is the annotation for some specific image:
<image id="250" name="cvat/fp-fn-intervals/fco/batch1/fco_401-s_2024_06_29_10_45_36_250000.jpg" subset="Train" task_id="220" width="1920" height="1080">
    <box label="catering" source="manual" occluded="1" xtl="15.93" ytl="255.81" xbr="122.22" ybr="313.60" z_order="0">
    </box>
    <box label="fueling" source="manual" occluded="0" xtl="726.10" ytl="396.30" xbr="899.97" ybr="516.94" z_order="0">
    </box>
    <box label="fueling" source="manual" occluded="0" xtl="1573.00" ytl="373.94" xbr="1683.12" ybr="525.03" z_order="0">
    </box>
  </image>

As you can see this annotation contains 3 bounding boxes.
3. Export the annotation only for one job (the job which contains this image cvat/fp-fn-intervals/fco/batch1/fco_401-s_2024_06_29_10_45_36_250000.jpg)
4. Now the annotation contains only 2 bounding, which is actually correct (and also in the web ui there are 2 bounding boxes, not 3):

<image id="250" name="cvat/fp-fn-intervals/fco/batch1/fco_401-s_2024_06_29_10_45_36_250000.jpg" width="1920" height="1080">
    <box label="catering" source="manual" occluded="1" xtl="15.93" ytl="255.81" xbr="122.22" ybr="313.60" z_order="0">
    </box>
    <box label="fueling" source="manual" occluded="0" xtl="726.10" ytl="396.30" xbr="899.97" ybr="516.94" z_order="0">
    </box>
  </image>

Expected Behavior

The annotation for image cvat/fp-fn-intervals/fco/batch1/fco_401-s_2024_06_29_10_45_36_250000.jpg contains only 2 bounding boxes (just like in cvat web ui).

Possible Solution

No response

Context

Weird fact:

  • The extra bounding box <box label="fueling" source="manual" occluded="0" xtl="1573.00" ytl="373.94" xbr="1683.12" ybr="525.03" z_order="0"> is present in many images in the annotation for some reason (and is not present in the web ui).

Environment

Server version: 2.22.0

Core version: 15.2.1

Canvas version: 2.20.10

UI version: 1.66.4

@Anton-Cherepkov Anton-Cherepkov added the bug Something isn't working label Jan 13, 2025
@zhiltsov-max
Copy link
Contributor

zhiltsov-max commented Jan 13, 2025

Hi, I have 2 possible causes to check:

  1. If the annotation is present on many images, it might be a track. Please check if there is a track started on some of the previous images. You might need to enable "always show tracks" in settings. Just start checking from the first frame having this repeated annotation.
    image

  2. Project export merges annotations per subset name from all the tasks in project subsets. If you have more than 1 task in the project, and there are images with the same filenames in different tasks of the same subset, the annotations will be merged.

@Anton-Cherepkov
Copy link
Author

Anton-Cherepkov commented Jan 13, 2025

@zhiltsov-max
Hello, thanks for a quick and detailed reply.

I think you are right with the reason # 1.

I made an investigation and found that this happens because of non-finished tracks that were started at the last frame of some job (and then this bbox is copied to every frame until the end of the task).

Could you please tell me what is the correct way to finish the track?

@zhiltsov-max
Copy link
Contributor

To mark an end of a visible part of a track, switch it to be outside:
image

@Anton-Cherepkov
Copy link
Author

Let's consider the following situation:

  • Frame X is the last frame in job N
  • Object still can be seen at frame X

If I set outside property for the track at frame X, then the bounding box will disappear at this frame.
However the object still can be seen at frame X, so I do not want to set outside property.
On the other hand, if I don't set outside property at frame X, then track will be extrapolated and added to the frames from the subsequent jobs during export (jobs N+1, N+2, ...).

What should I do in this situation ?

@zhiltsov-max
Copy link
Contributor

Typically, this is resolved by using job overlap. If there is frame overlap, CVAT will try match the corresponding annotation in the next job. If you have no job overlap configured in the task (it can only be done at task creation), please check if using just a shape instead of a track works for you.

@zhiltsov-max zhiltsov-max added question Further information is requested and removed bug Something isn't working labels Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants