-
Notifications
You must be signed in to change notification settings - Fork 708
Add new framework Roboflow (RFDETR models) #1161
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
Conversation
|
Hey @nok thank you for this fantastic PR! Please add a test file under |
|
@nok i resolved the uv package conflicts, you can freely add the rfdetr tests 👍🏻 |
…dels and RFDETR models
|
Hello @fcakyon, thanks for resolving the conflicts. I really like |
|
@nok i will handle the rest 👍🏻 |
|
@fcakyon , FYI, I pushed a small change that adds local imports to the unit tests. |
|
Nice fix @nok 💯 |
| from sahi.predict import get_prediction, get_sliced_prediction | ||
| from sahi.utils.cv import read_image | ||
|
|
||
| pytestmark = pytest.mark.skipif(sys.version_info[:2] < (3, 12), reason="Requires Python 3.12 or higher") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related to the CI dependencies:
"inference>=0.50.3;python_version>='3.12'",
"rfdetr>=1.1.0;python_version>='3.12'",
https://github.com/obss/sahi/blob/main/pyproject.toml#L80-L81
This pull request adds support for the Roboflow detection framework which includes provided object detection models from the Roboflow Universe (package
inference) and local trained RFDETR models (packagerfdetr).This notebook is good as starting point: https://github.com/nok/sahi/blob/feature/rfdetr/demo/inference_for_roboflow.ipynb
Roboflow Model Integration:
RoboflowDetectionModelclass insahi/models/roboflow.py, which includes methods for model initialization, dependency checks, inference, and converting predictions into the required format.sahi/auto_model.pyto register the newRoboflowDetectionModelunder the key"roboflow"in the model registry.Documentation Updates:
README.mdto include installation instructions for the Roboflow detection framework, specifying the required packagesinference>=0.50.3andrfdetr>=1.1.0.Testing
Unfortunately I couldn't add unit tests, because I got several dependency conflicts:
It would be great to get some help or advice if unit tests are required strictly.
Darius 👋