Fix Replicate README badge rendering and apply Codex review fixes#40
Conversation
Badge rendering: the pepy.tech downloads badge is an SVG with no fixed width, so Replicate/HF render it full-width and stack the whole badge row vertically. Swap it for the fixed-width shields.io equivalent (img.shields.io/pepy/dt/ultralytics, same total-downloads data) in the 6 YOLO26 task READMEs so badges render inline. Codex review fixes: - yolov8s-worldv2: drop the false "leave empty to auto-detect" claim; parse class_names on bare commas with trimming; skip set_classes when empty. - yoloe11s: parse class_names on bare commas with trimming (empty still falls back to the prompt-free model, as before). - yolo26/cls and yolo26/sem: label conf/iou "(unused for this task)" — kept for a uniform predict() signature and the shared CI smoke-test command. - README: add a YOLO26 task download.py example. Skipped two Codex items by design: the semantic return_json text is already correct (to_json() returns per-class pixel coverage), and github_url intentionally points to ultralytics/ultralytics. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
👋 Hello @glenn-jocher, thank you for submitting a
For more guidance, please refer to our Contributing Guide. Don’t hesitate to leave a comment if you have any questions. Thank you for contributing to Ultralytics! 🚀🙂 |
UltralyticsAssistant
left a comment
There was a problem hiding this comment.
🔍 PR Review
Made with ❤️ by Ultralytics Actions
Nice cleanup overall: the badge fixes and clearer unused-parameter descriptions look good, and the class-name parsing improvement is a solid robustness win. One edge case remains in yoloe11s/predict.py, where whitespace/comma-only class_names can now collapse to an empty list and still be passed into set_classes().
💬 Posted 1 inline comment
| else: | ||
| self.model = YOLOE("yoloe-11s-seg.pt") | ||
| class_list = class_names.split(", ") | ||
| class_list = [c.strip() for c in class_names.split(",") if c.strip()] |
There was a problem hiding this comment.
💡 MEDIUM: This normalization can now produce an empty class_list for inputs like " " or ",". Unlike yolov8s-worldv2, this path still calls set_classes() with an empty list, which can leave the model in an invalid state or raise at runtime. Please guard the empty-list case here as well, ideally by falling back to the prompt-free weights or skipping set_classes() when no valid class names remain.
… notebook badges The pepy and Gradient/Kaggle/Binder badge SVGs have no fixed width, so Replicate renders them full-width and stacks the rows. Make the downloads badge shields.io blue and remove the notebook-launch row (repo-tutorial links, not model-relevant, and markdown can't size them). Remaining badge row is all fixed-width shields. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Merged! 🎉 Thanks for the thoughtful improvements here, @glenn-jocher. As Leonardo da Vinci said, “Simplicity is the ultimate sophistication.” This PR reflects that well by making the YOLO26 Replicate experience clearer, more consistent, and more robust—from README cleanup and task-page standardization to safer class parsing and clearer prediction inputs. These quality-of-life updates may be small individually, but together they make the repo easier to navigate, easier to maintain, and smoother for users. Really appreciate the attention to detail here. |
Badge rendering (your report: badges stacked vertically on Replicate)
The pepy.tech downloads badge is an SVG with no fixed width, so Replicate/HF render it full-width and stack the badge row. Swapped it for the fixed-width
img.shields.io/pepy/dt/ultralytics(same data) in the 6 YOLO26 task READMEs → badges render inline. (Same fix already applied to the HF model cards, plus removed the brokenwidth=2%social-icon rows there.)Codex review fixes (independent pass on the Replicate content)
class_nameson bare commas + trim; skipset_classeswhen empty.conf/iou"(unused for this task)" — kept for the uniform signature + CI smoke test.download.pyexample.Skipped (by design): sem
return_jsontext is already correct (semanticto_json()returns per-class pixel coverage);github_urlintentionally points toultralytics/ultralytics.🤖 Generated with Claude Code
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
🛠️ This PR mainly improves YOLO26 Replicate docs and prediction input handling, making the repo clearer, more consistent, and more user-friendly.
📊 Key Changes
README.mdto show the YOLO26 task directory pattern, with an example foryolo26/seg/download.py.detect,seg,sem,cls,pose,obb):yolo26/cls/predict.pyandyolo26/sem/predict.pythatconfandiouinputs are currently unused for those tasks.yoloe11s/predict.pyandyolov8s-worldv2/predict.py:person,bus,signas well asperson, bus, signyolov8s-worldv2/predict.pyso class filtering is only applied when valid class names are provided.yolov8s-worldv2input description to clearly say the field is for classes to detect.🎯 Purpose & Impact