-
Notifications
You must be signed in to change notification settings - Fork 139
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
How to manage single class datasets #48
Comments
I think I have solved the problem. Using a sample dataset on Roboflow, I noticed how a “background” class, called "Workers", is created by default, like in the following snippet:
My
By adjusting the JSON files, the training starts normally. This should probably be specified in the README of the project, to avoid problems with ‘legacy’ datasets not exported directly from Roboflow. Bye! 🚀 |
@SkalskiP do we want to natively support this format? alternatively we could build some internal check? otherwise we should update the docs to show that this is happening |
IMHO it is not necessary to handle it as a special case. I have tried to train several networks with single-class COCO datasets and always found the same anomalies. |
Hi @picjul Thanks for your interest in RF-DETR and for diving deep and helping to understand the source of the problem. I'm concerned because the one-class fine-tuning error is one of the most frequently reported so far and I think we need to try to solve it somehow. The question is how could we automatically verify this? @picjul, is it a correct assumption that class IDs always start from 1 and we always discard the class with ID 0? If so, the fix seems simple. |
The original annotations of the COCO dataset begin with index 1, so this is probably the correct approach. I don't recall finding any contraindications to starting with 0. I think there were some sources (forgotten them, Sorry 😅) that mentioned class 0 as the background class. It would be better to handle the problem in terms of indexes. Based on what is the size of the array defined that gives indexes out of bound? Maybe using a single class with id = 0 can do the job? 🤔 [Writing from mobile phone, pardon errors and typos] |
For people that need a quick fix, just add class - 1 , line 82 in ConvertCoco:
Then it will train, but evaluation during training does not work nicely; to solve that issue:
|
Hi!
I am trying to perform a fine-tuning of the network on a single-class dataset.
This is the log:
And this is the exception thrown:
How should this type of dataset be handled?
System : Colab on CPU (On CUDA I think there's the same issue
CUDA error: device-side assert triggered
)Steps: the ones listed in
how-to-finetune-rf-detr-on-detection-dataset.ipynb
Thank you!
The text was updated successfully, but these errors were encountered: