marcoslucianops / DeepStream-Yolo

NVIDIA DeepStream SDK 7.0 / 6.4 / 6.3 / 6.2 / 6.1.1 / 6.1 / 6.0.1 / 6.0 / 5.1 implementation for YOLO models
MIT License
1.45k stars 356 forks source link

fix: handle integer labels in creating labels.txt in export_yoloV8 #493

Open alibdz opened 10 months ago

alibdz commented 10 months ago

The previous code in utils/export_yoloV8.py assumed label values are always strings, causing issues when the model has integer labels (like: 0, 1, 2, ...). This commit adds a check to handle both string and integer labels properly. If the label is an integer, it is converted to a string before writing to the 'labels.txt' file.