TypeError: must be real number, not NoneType
Annotations /root/autodl-tmp/datasets/coco/annotations/instancesonly_filtered_train.json: 4%|███▏ | 714/18732 [00:02<01:09, 257.80it/s]
Traceback (most recent call last):
File "general_json2yolo.py", line 396, in
👋 Hello @stu0440, thank you for submitting a ultralytics/JSON2YOLO 🚀 issue!
To help us address your concern efficiently, please provide the following information:
- For bug reports:
- A clear and concise description of the bug 🐛
- A minimum reproducible example (MRE) that demonstrates the issue
- Your environment details (OS, Python version, package versions)
- Expected behavior vs. actual behavior
- Any error messages or logs related to the issue – you've already included some of this, thank you!
Make sure to check if your issue has already been reported in existing issues to avoid duplicates.
🏷️ If you need to add more information, please comment on this issue. An Ultralytics engineer will assist you soon.
Thank you for contributing to the improvement of our project!
I meet the same problem. I guess this is because the type of the dataset to be converted is inconsistent with COCO's native type. I solved this problem by adding the argument "cls91to88 = False" to the function "convert_coco"
@huizhenlai thank you for sharing your solution. If the issue persists, please ensure you're using the latest version of the package. If you have further questions, feel free to ask.