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

Cannot import annotations for image path with dot #6319

Closed
2 tasks done
yf-yang opened this issue Jun 15, 2023 · 2 comments · Fixed by #6350
Closed
2 tasks done

Cannot import annotations for image path with dot #6319

yf-yang opened this issue Jun 15, 2023 · 2 comments · Fixed by #6350

Comments

@yf-yang
Copy link

yf-yang commented Jun 15, 2023

My actions before raising this issue

Trying to upload annotations for IMAGE task in Pascal VOC format, following this doc. When the image's name is normal (example.jpg), it works as expected. When the image contains additional dot (example.rgb.jpg), annotations could not be uploaded successfully.

Steps to Reproduce (for bugs)

  1. Suppose I have an image in the task, called prefix/100114004_186_44624.rgb.jpg
  2. create a file 100114004_186_44624.rgb.xml
  3. inside the xml file, specify the filename tag as
<annotation>
<filename>prefix/100114004_186_44624.rgb.jpg</filename>
</annotation>
  1. make a zip file, upload it
  2. CVAT complains Request failed with status code 400. "Could not match item id: '100114004_186_44624.rgb' with any task frame\n"
  3. Changing file name to 100114004_186_44624.xml does not help
  4. For images with only one dot (the one before jpg suffix), everything works

Expected Behaviour

For images with additional dot, I can upload annotations

Current Behaviour

Described above.

Possible Solution

Maybe check how you match annotation file with images?

@bsekachev
Copy link
Member

@zhiltsov-max Can you look into the issue?

@yf-yang
Copy link
Author

yf-yang commented Jun 19, 2023

Guys, did you find anything? 👀

zhiltsov-max added a commit that referenced this issue Jun 29, 2023
…#6350)

<!-- Raise an issue to propose your change
(https://github.com/opencv/cvat/issues).
It helps to avoid duplication of efforts from multiple independent
contributors.
Discuss your ideas with maintainers to be sure that changes will be
approved and merged.
Read the [Contribution
guide](https://opencv.github.io/cvat/docs/contributing/). -->

<!-- Provide a general summary of your changes in the Title above -->

### Motivation and context
<!-- Why is this change required? What problem does it solve? If it
fixes an open
issue, please link to the issue here. Describe your changes in detail,
add
screenshots. -->

Fixes #6319

- Fixed invalid dataset root search, leading to invalid file matching
- Restored detailed dataset import error messages
- Added tests

### How has this been tested?
<!-- Please describe in detail how you tested your changes.
Include details of your testing environment, and the tests you ran to
see how your change affects other areas of the code, etc. -->

### Checklist
<!-- Go over all the following points, and put an `x` in all the boxes
that apply.
If an item isn't applicable for some reason, then ~~explicitly
strikethrough~~ the whole
line. If you don't do that, GitHub will show incorrect progress for the
pull request.
If you're unsure about any of these, don't hesitate to ask. We're here
to help! -->
- [x] I submit my changes into the `develop` branch
- [ ] I have added a description of my changes into the
[CHANGELOG](https://github.com/opencv/cvat/blob/develop/CHANGELOG.md)
file
- [ ] I have updated the documentation accordingly
- [ ] I have added tests to cover my changes
- [ ] I have linked related issues (see [GitHub docs](

https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword))
- [ ] I have increased versions of npm packages if it is necessary

([cvat-canvas](https://github.com/opencv/cvat/tree/develop/cvat-canvas#versioning),

[cvat-core](https://github.com/opencv/cvat/tree/develop/cvat-core#versioning),

[cvat-data](https://github.com/opencv/cvat/tree/develop/cvat-data#versioning)
and

[cvat-ui](https://github.com/opencv/cvat/tree/develop/cvat-ui#versioning))

### License

- [x] I submit _my code changes_ under the same [MIT License](
https://github.com/opencv/cvat/blob/develop/LICENSE) that covers the
project.
  Feel free to contact the maintainers if that's a concern.
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 a pull request may close this issue.

2 participants