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

Path resolution in the dataloader #11115

Closed
1 task done
jerome-white opened this issue Mar 4, 2023 · 2 comments
Closed
1 task done

Path resolution in the dataloader #11115

jerome-white opened this issue Mar 4, 2023 · 2 comments
Labels
question Further information is requested Stale Stale and schedule for closing soon

Comments

@jerome-white
Copy link

jerome-white commented Mar 4, 2023

Search before asking

Question

How important is this line?

p = str(Path(p).resolve())

Because my images are symlinks, it's making result writing difficult to manage. I've removed the line in my clone of the repository, and things seem to work. I'm hoping to get some assurance that there won't be unintended consequences.

Background

During detection, the file names I pass to the CLI are symlinks (that is, the paths inside of --source test.txt). This line is resolving those names to their real locations. I work with symlinks because my images live across my filesystem, at varying depths, and with no guarantees of unique basename's. Symlinks allow me expose that structure in a way that the codebase likes, and alleviates the need for making redundant copies of my dataset.

However, because they are symlinks this line is resolving them back to their actual names. This is an issue when I detect --save-txt, which writes results to TXT files corresponding image basename's.

Additional

Loosely related to #10254

@jerome-white jerome-white added the question Further information is requested label Mar 4, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Apr 5, 2023

👋 Hello, this issue has been automatically marked as stale because it has not had recent activity. Please note it will be closed if no further activity occurs.

Access additional YOLOv5 🚀 resources:

Access additional Ultralytics ⚡ resources:

Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!

Thank you for your contributions to YOLOv5 🚀 and Vision AI ⭐!

@github-actions github-actions bot added the Stale Stale and schedule for closing soon label Apr 5, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 15, 2023
@glenn-jocher
Copy link
Member

@jerome-white thanks for reaching out! The line you referred to resolves image paths to their real locations, and while your workaround might work, it could result in unintended consequences. You might encounter issues with output file writing and file path resolution if the line is removed. For custom data loaders, consider modifying it to suit your specific needs. I hope this helps resolve your issue. If you have further queries, feel free to ask.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested Stale Stale and schedule for closing soon
Projects
None yet
Development

No branches or pull requests

2 participants