Skip to content

Add Florence-2 notebook #39

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

Merged
merged 8 commits into from
Mar 17, 2025
Merged

Add Florence-2 notebook #39

merged 8 commits into from
Mar 17, 2025

Conversation

RizwanMunawar
Copy link
Member

@RizwanMunawar RizwanMunawar commented Mar 16, 2025

Florence-2 architecture

Florence 2 Architecture

Features

Feature Image
Object detection using Florence-2
Dense region captioning using Florence-2
Region proposal using Florence-2
Captions to phrase grounding using Florence-2
Open vocabulary detection using Florence-2
OCR using Florence-2

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

This PR enhances the Ultralytics Notebooks repository by adding support for Microsoft's Florence-2 model, enabling advanced vision and vision-language tasks like object detection, segmentation, image captioning, and OCR.

📊 Key Changes

  • New Notebook: Introduced a detailed notebook for using Florence-2 with Ultralytics tools.
  • Florence-2 Integration: Added support for tasks like object detection, image captioning, dense region captioning, phrase grounding, and open vocabulary detection.
  • Documentation Update: Updated the README to include Florence-2 and its capabilities, along with links to relevant research papers and resources.
  • Inference Functionality: Implemented a flexible inference function to handle various Florence-2 tasks with customizable prompts.

🎯 Purpose & Impact

  • Broader Capabilities: Florence-2 integration expands the range of tasks Ultralytics Notebooks can handle, including advanced vision-language tasks.
  • Ease of Use: The new notebook provides a step-by-step guide for users to leverage Florence-2 for diverse applications like OCR, segmentation, and object detection.
  • Enhanced Learning: Updated documentation and examples make it easier for users to explore and experiment with cutting-edge vision models.
  • Real-World Applications: Supports use cases in industries like retail, healthcare, and navigation by enabling detailed image analysis and text-based visual tasks. 🚀

Add Florence-2 notebook

Signed-off-by: Muhammad Rizwan Munawar <[email protected]>
@UltralyticsAssistant UltralyticsAssistant added detect Object Detection issues, PR's enhancement New feature or request segment Instance Segmentation issues, PR's labels Mar 16, 2025
@UltralyticsAssistant
Copy link
Member

👋 Hello @RizwanMunawar, thank you for submitting this ultralytics/notebooks 🚀 PR! This is an automated response to help you ensure that your contribution is aligned with the project standards. An Ultralytics engineer will review your PR shortly. Meanwhile, please review the following checklist to ensure a smooth integration:

  • Define a Purpose: Clearly describe the intent and scope of your contribution in the PR description. If relevant, link to any associated issues. Ensure your commit messages are informative and adhere to the repository's conventions.
  • Synchronize with Source: Verify that your branch is up-to-date with the main branch of the ultralytics/notebooks repository. If your branch is outdated, please sync it by clicking 'Update branch' or running git pull and git merge main locally.
  • Ensure CI Checks Pass: Make sure all Continuous Integration (CI) checks are successful. If any checks fail, address the issues promptly.
  • Update Documentation: If applicable, update the relevant documentation to reflect your changes accurately.
  • Add Tests: If your PR includes new functionalities, ensure that it includes corresponding tests, and confirm that all tests pass successfully.
  • Sign the CLA: If this is your first contribution to Ultralytics, sign the Contributor License Agreement (CLA) by commenting "I have read the CLA Document and I sign the CLA" on this PR.
  • Minimize Changes: Keep changes concise and limited to the purpose of the PR. As Bruce Lee once said, "It is not daily increase but daily decrease, hack away the unessential."

For further guidance, you can refer to the Contributing Guide. If you have any questions or need assistance, feel free to leave a comment here. Thank you for contributing to Ultralytics! 💡🚀

Copy link
Member

@ambitious-octopus ambitious-octopus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RizwanMunawar Please review as per my slack messages!

@RizwanMunawar
Copy link
Member Author

@ambitious-octopus all changes done, can you please review it? Thanks

Copy link
Member

@ambitious-octopus ambitious-octopus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RizwanMunawar good to go!

@ambitious-octopus ambitious-octopus merged commit 833d6c8 into main Mar 17, 2025
2 checks passed
@ambitious-octopus ambitious-octopus deleted the RizwanMunawar-patch-2 branch March 17, 2025 18:08
@UltralyticsAssistant
Copy link
Member

🎉 Huge thanks to @RizwanMunawar and @ambitious-octopus for this incredible contribution! Your work integrating Microsoft's Florence-2 into Ultralytics Notebooks is a game-changer for vision and vision-language tasks. 🙌

As Leonardo da Vinci once said, "Simplicity is the ultimate sophistication." Your thoughtful addition of a detailed notebook, flexible inference functionality, and updated documentation makes cutting-edge technology accessible and impactful for users worldwide. 🌍

This PR not only expands the horizons of Ultralytics tools but also empowers industries to solve real-world challenges with ease. We deeply appreciate your dedication and talent—keep shining! 💡🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
detect Object Detection issues, PR's enhancement New feature or request segment Instance Segmentation issues, PR's
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants