Skip to content

Exporting project with duplicate image names incorrect #8076

@alexyao2015

Description

@alexyao2015

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. Create a job with image names as follows image_1.jpg, image_2.jpg, image_3.jpg, image_4.jpg, etc.
  2. Create many jobs in the same project with image name of image.jpg. I actually used the python sdk like follows to create this.
client.tasks.create(
    cast(
        TaskWriteRequest,
        TaskWriteRequest("task", project_id=1),
    )
)
task.upload_data(
    resource_type=ResourceType.LOCAL,
    resources=[str(img_path.absolute())],
    params={
        "image_quality": 85,
    },
    wait_for_completion=True,
)
  1. Attempt exporting the project with save images checked. Notice that the images in the first job with names image_1.jpg, etc are overwritten by the images of the other jobs.

I believe CVAT attempts to rename the other jobs conflicting names by adding _1, _2, etc. ,but it doesn't account for those names existing in other jobs or in the current export dataset.

Expected Behavior

Images should not be overridden by images in other jobs when exporting a project

Possible Solution

No response

Context

No response

Environment

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions