-
-
Notifications
You must be signed in to change notification settings - Fork 6.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
use yolov8-rtdetr.yaml show error #5272
Comments
👋 Hello @baoyuchen, thank you for your interest in YOLOv8 🚀! We recommend a visit to the YOLOv8 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. |
@baoyuchen hello, and thank you for bringing this issue to our attention. It looks like there's a KeyError and NotImplementedError produced when trying to create a YOLO model with the YOLOv8-rtDETR.yaml configuration file. These errors may suggest that the When using the YOLO constructor to create a new model, and specifically in the context of the RT-DETR task, remember to provide additional necessary parameters and information in the correct format within the yaml file. Please ensure all fields in the yaml file are properly filled out and the task you intend to perform is correctly specified. Remember to keep your Ultralytics YOLOv8 repository updated, as we constantly strive to improve user experience by fixing bugs and adding new features. Should the issue persist, please continue to share as much detail about the bug as possible, including Python version, operating system, and any additional stack trace or error messages, to help us find out what's going wrong. Hope this helps. Let me know if you have any other questions. |
👋 Hello there! We wanted to give you a friendly reminder that this issue has not had any recent activity and may be closed soon, but don't worry - you can always reopen it if needed. If you still have any questions or concerns, please feel free to let us know how we can help. For additional resources and information, please see the links below:
Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed! Thank you for your contributions to YOLO 🚀 and Vision AI ⭐ |
请问 NotImplementedError: WARNING 'YOLO' model does not support '_new' mode for 'None' task yet. 的问题得到解决了吗,我在使用yolov8-rtdetr.yaml训练时也出现了同样的问题,如果有解决办法希望您能够分享,非常感谢! |
@nzbanana
@nzbanana |
I guess this issue arises because the network cannot determine the type of "task". The main debugging should be done in the ‘’‘guess_model_task’‘’ function in tasks.py. I modified the line ‘’‘if m == ('classify', 'classifier', 'cls', 'fc')’‘’ to ‘’‘if m in ('classify', 'classifier', 'cls', 'fc')’‘’. |
@songyue1207 Thanks for sharing your insight! 🌟 It indeed looks like the task guessing logic might have been the culprit. Adjusting the condition as you suggested should make it more robust by properly evaluating if For clarity, here's the modified line in context: # tasks.py - guess_model_task function
if m in ('classify', 'classifier', 'cls', 'fc'):
... This tweak ensures the function accurately identifies the task based on the model's characteristics. If anyone else encounters similar issues, this might be a good starting point for debugging. Thanks again for pointing this out! 👍 |
Is there any solution to train rtdetr |
@ratom hello! To train the RT-DETR model using the Ultralytics framework, ensure you're using the correct model initialization and training commands. Here’s a quick guide:
Ensure your dataset and configuration files are correctly set up. If you encounter any specific errors during this process, please provide the error messages and details about your setup for more targeted assistance. Happy training! 🚀 |
Hello, may I ask: |
In case someone is till trying to figure out this problem, I'd like to make some supplements. If you still want to use YOLO to train, you should define task 👇(python): |
from ultralytics import RTDETR #===yaml===# [from, repeats, module, args]
When I was using this yaml, an error occurred in the third module DWConv while printing network structure information,looking forward to your guidance |
It seems like there's an issue with the |
Search before asking
Question
Traceback (most recent call last):
File "E:\fourworkplace\ultralytics-main\ultralytics\engine\model.py", line 428, in _smart_load
return self.task_map[self.task][key]
KeyError: None
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "E:\fourworkplace\ultralytics-main\demo1.py", line 3, in
model = YOLO("E:/fourworkplace/ultralytics-main/ultralytics/cfg/models/v8/yolov8-rtdetr.yaml") # build a new model from scratch
File "E:\fourworkplace\ultralytics-main\ultralytics\engine\model.py", line 97, in init
self._new(model, task)
File "E:\fourworkplace\ultralytics-main\ultralytics\engine\model.py", line 133, in _new
self.model = (model or self._smart_load('model'))(cfg_dict, verbose=verbose and RANK == -1) # build model
File "E:\fourworkplace\ultralytics-main\ultralytics\engine\model.py", line 433, in _smart_load
raise NotImplementedError(
NotImplementedError: WARNING 'YOLO' model does not support '_new' mode for 'None' task yet.
the code as follow
from ultralytics import YOLO
Load a model
model = YOLO("E:/fourworkplace/ultralytics-main/ultralytics/cfg/models/v8/yolov8-rtdetr.yaml") # build a new model from scratch
model.info()
Additional
q
The text was updated successfully, but these errors were encountered: