-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Combine Segmentation and Detection model (Yolov7 & Yolov8) #12643
Comments
👋 Hello @FazanAfzal, thank you for your interest in Ultralytics YOLOv8 🚀! We recommend a visit to the Docs for new users where you can find many Python and CLI usage examples and where many of the most common questions may already be answered. If this is a 🐛 Bug Report, please provide a minimum reproducible example to help us debug it. If this is a custom training ❓ Question, please provide as much information as possible, including dataset image examples and training logs, and verify you are following our Tips for Best Training Results. Join the vibrant Ultralytics Discord 🎧 community for real-time conversations and collaborations. This platform offers a perfect space to inquire, showcase your work, and connect with fellow Ultralytics users. InstallPip install the pip install ultralytics EnvironmentsYOLOv8 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
StatusIf this badge is green, all Ultralytics CI tests are currently passing. CI tests verify correct operation of all YOLOv8 Modes and Tasks on macOS, Windows, and Ubuntu every 24 hours and on every commit. |
@FazanAfzal hello! Combining a YOLOv7 segmentation model with a YOLOv8 detection model directly within the same framework is not supported out-of-the-box. Each version of YOLO (v7 and v8) operates independently with its own architectural design and functionalities. However, you can integrate the outputs of both models in your application logic. Simply run each model separately on your input data, then merge or analyze their outputs according to your requirements. Here is a very basic Python example to illustrate how you might approach this: from ultralytics import YOLO
# Load your trained models
model_v7 = YOLO('path/to/yolov7_segmentation_model.pt')
model_v8 = YOLO('path/to/yolov8_detection_model.pt')
# Process the same image with both models
img = 'path/to/image.jpg'
segmentation_results = model_v7(img)
detection_results = model_v8(img)
# Now, you can combine the results from segmentation_results and detection_results as needed Remember, the actual integration and usage might depend on what exactly you need from these combined results. This approach allows using the specific strengths of both models while maintaining flexibility in processing and outcome. |
Search before asking
Question
I have trained multiple models. One model is a segmentation model, which is YOLOv7. The other is a detection model, which is YOLOv8. I want to combine these two models. Is it possible? Does YOLOv8 have any features related to this?
Additional
No response
The text was updated successfully, but these errors were encountered: