-
-
Notifications
You must be signed in to change notification settings - Fork 16.3k
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
Update detect.py #629
Update detect.py #629
Conversation
Update print info for relative path and absolute otherwise the info below is misleading Results saved to /workspace//output_path
@hopesala hi, thanks for the PR. Are you seeking a more absolute path? What OS are you on? Perhaps something like this would be more concise: if save_txt or save_img:
print('Results saved to %s' % Path(out).absolute()) # os-agnostic
if platform == 'darwin' and not opt.update: # MacOS
os.system('open ' + save_path) |
Thanks for replying. |
print('Results saved to %s' % Path(out).absolute()) # os-agnostic |
@hopesala oh, but this line simply prints a path for the user to see on screen. The actual file each image is saved to is |
the command is something like |
Oh I see, you are talking about specifying a custom output folder. We should probably simply pass opt.output through an os agnostic absolute path checker like above then right after the argparser. |
@hopesala ok, I think I'll update the line to make it OS agnostic, this way it should display correctly in all 3 OS's. In regards to abs vs local, I did not find an easy fix that works across all 3 OS's. I think on MacOS you may always need to start a path with a period rather than a slash:
|
OK,got it, and thank you very much! |
* Update detect.py Update print info for relative path and absolute otherwise the info below is misleading Results saved to /workspace//output_path * Update detect.py Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
* Update detect.py Update print info for relative path and absolute otherwise the info below is misleading Results saved to /workspace//output_path * Update detect.py Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
* Update detect.py Update print info for relative path and absolute otherwise the info below is misleading Results saved to /workspace//output_path * Update detect.py Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
update print info for relative path and absolute
otherwise the info below is misleading
Results saved to /workspace//output_path1
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Improved file path display in detection results
📊 Key Changes
🎯 Purpose & Impact
Path
object from Python'spathlib
.