Fix increment_path() with multiple-suffix filenames#5518
Merged
glenn-jocher merged 1 commit intomasterfrom Nov 5, 2021
Merged
Conversation
Fix for #5503 ``` python detect.py --visualize --source path/to/file.suffix1.jpg ```
increment_path() with periodsincrement_path() with multiple-suffix filename
increment_path() with multiple-suffix filenameincrement_path() with multiple-suffix filenames
1 task
This was referenced Nov 5, 2021
Contributor
|
@glenn-jocher It is same as before. Maybe this is the result you want. |
Member
Author
|
@SpongeBab yes it looks like we need an additional fix then with an is_dir() check to control the increment behavior better between files and dirs (it's treating your dirs as files currently). TODO: Better file vs dir incrementing in |
Member
Author
|
@SpongeBab #5523 is now merged and should improve incrementing behavior now to correctly handle files vs directories. Please git pull and see if this resolves your directory naming issue please. print(increment_path('runs'))
print(increment_path('export.py'))
print(increment_path('abc.def.dir'))
print(increment_path('abc.def.file'))
# Returns
# runs2
# export2.py
# abc.def.dir2
# abc.def2.file |
Merged
BjarneKuehl
pushed a commit
to fhkiel-mlaip/yolov5
that referenced
this pull request
Aug 26, 2022
Fix for ultralytics#5503 ``` python detect.py --visualize --source path/to/file.suffix1.jpg ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fix for #5503
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Enhancing path creation process in Ultralytics' YOLOv5 codebase.
📊 Key Changes
increment_pathfunction.🎯 Purpose & Impact