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

Sort frames during project dumping #6927

Merged
merged 3 commits into from
Oct 5, 2023
Merged

Sort frames during project dumping #6927

merged 3 commits into from
Oct 5, 2023

Conversation

sizov-kirill
Copy link
Contributor

Motivation and context

When we export a task or project in CVAT format our code uses the group_by_frame function. For tasks and for projects behaviour of this function is different since for tasks we perform sorting frames but for projects we don't. As a result, we can have a situation when our annotation file for the project will have a list of images in unsorted form. So this PR adds sorting frames during project export as well.

How has this been tested?

Checklist

  • I submit my changes into the develop branch
  • I have added a description of my changes into the CHANGELOG file
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • I have linked related issues (see GitHub docs)
  • I have increased versions of npm packages if it is necessary
    (cvat-canvas,
    cvat-core,
    cvat-data and
    cvat-ui)

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.

@codecov
Copy link

codecov bot commented Sep 29, 2023

Codecov Report

Merging #6927 (c9a7843) into develop (3b15362) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop    #6927      +/-   ##
===========================================
- Coverage    82.61%   82.59%   -0.02%     
===========================================
  Files          360      360              
  Lines        38868    38868              
  Branches      3544     3544              
===========================================
- Hits         32110    32104       -6     
- Misses        6758     6764       +6     
Components Coverage Δ
cvat-ui 77.63% <ø> (-0.04%) ⬇️
cvat-server 87.13% <100.00%> (ø)

@zhiltsov-max
Copy link
Contributor

Hi, do you know if we can add a test reproducing the problem? From what I see, the problem is related to how the frame data is returned from DB, and it can be unreliable.

@sizov-kirill
Copy link
Contributor Author

Hi, do you know if we can add a test reproducing the problem? From what I see, the problem is related to how the frame data is returned from DB, and it can be unreliable.

This problem is hard to reproduce due to the reason that you mentioned, so I don't know how it can be tested.

@nmanovic nmanovic merged commit ae1dc1b into develop Oct 5, 2023
32 checks passed
@nmanovic nmanovic deleted the sk/fix-project-dumper branch October 5, 2023 12:42
mikhail-treskin pushed a commit to retailnext/cvat that referenced this pull request Oct 25, 2023
When we export a task or project in CVAT format [our code
uses](https://github.com/opencv/cvat/blob/d497bb6a90dd3c9625c3c8e8f73278019e21983d/cvat/apps/dataset_manager/formats/cvat.py#L717)
the `group_by_frame` function. For tasks and for projects behaviour of
this function is different since for tasks [we perform sorting
frames](https://github.com/opencv/cvat/blob/d497bb6a90dd3c9625c3c8e8f73278019e21983d/cvat/apps/dataset_manager/bindings.py#L420-L421)
but for projects [we
don't](https://github.com/opencv/cvat/blob/d497bb6a90dd3c9625c3c8e8f73278019e21983d/cvat/apps/dataset_manager/bindings.py#L1152-L1154).
As a result, we can have a situation when our annotation file for the
project will have a list of images in unsorted form. So this PR adds
sorting frames during project export as well.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants