Skip to content

Update predict.py to return File#18

Closed
glenn-jocher wants to merge 8 commits into
mainfrom
glenn-jocher-patch-1
Closed

Update predict.py to return File#18
glenn-jocher wants to merge 8 commits into
mainfrom
glenn-jocher-patch-1

Conversation

@glenn-jocher
Copy link
Copy Markdown
Member

@glenn-jocher glenn-jocher commented Aug 5, 2025

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Improves output handling in YOLO11n predictions by switching from Path to File objects for returned images. 📁✨

📊 Key Changes

  • Replaces the use of Path with File from the Cog library for output images.
  • Updates return types and output handling to use File instead of Path in the prediction function.

🎯 Purpose & Impact

  • Ensures better compatibility with Cog's expected output format, making it easier to handle and download prediction results.
  • Provides a smoother experience for users accessing annotated images, especially in deployment or API scenarios.
  • No changes to detection accuracy or model performance—this is an improvement to output handling and integration.

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
@UltralyticsAssistant UltralyticsAssistant added the enhancement New feature or request label Aug 5, 2025
@UltralyticsAssistant
Copy link
Copy Markdown
Member

👋 Hello @glenn-jocher, thank you for submitting an ultralytics/replicate 🚀 PR! This is an automated response to help streamline the review process—an Ultralytics engineer will also review and assist soon.

Please review the following checklist to ensure everything is ready for integration:

  • Define a Purpose: Clearly explain the purpose of your fix or feature in your PR description, and link to any relevant issues. Ensure your commit messages are clear, concise, and follow project conventions.
  • Synchronize with Source: Confirm your PR is up to date with the ultralytics/replicate main branch. If needed, use the 'Update branch' button or run git pull and git merge main locally.
  • Ensure CI Checks Pass: Make sure all Ultralytics Continuous Integration (CI) checks pass. If any fail, please address them.
  • Update Documentation: Update documentation for any new or modified features.
  • Add Tests: If applicable, include or update tests to cover your changes, and ensure all tests pass.
  • Sign the CLA: If this is your first Ultralytics PR, sign our Contributor License Agreement (CLA) by commenting "I have read the CLA Document and I sign the CLA."
  • Minimize Changes: Limit your changes to the minimum necessary for your bug fix or feature addition. "It is not daily increase but daily decrease, hack away the unessential. The closer to the source, the less wastage there is." — Bruce Lee

For more details, please see our Contributing Guide. If you have any questions, feel free to leave a comment. Thank you for helping improve Ultralytics! 🚀✨

UltralyticsAssistant and others added 7 commits August 5, 2025 10:52
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
@glenn-jocher glenn-jocher deleted the glenn-jocher-patch-1 branch August 5, 2025 11:55
@glenn-jocher
Copy link
Copy Markdown
Member Author

Closed in favor of #19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants