Skip to content

[Closed - duplicate] feat: add show_progress to from_yolo()#2352

Closed
yyq1043-cloud wants to merge 1 commit into
roboflow:developfrom
yyq1043-cloud:add-show-progress
Closed

[Closed - duplicate] feat: add show_progress to from_yolo()#2352
yyq1043-cloud wants to merge 1 commit into
roboflow:developfrom
yyq1043-cloud:add-show-progress

Conversation

@yyq1043-cloud

@yyq1043-cloud yyq1043-cloud commented Jun 24, 2026

Copy link
Copy Markdown

Closing as duplicate of #2275 which merged the same feature.

@yyq1043-cloud yyq1043-cloud requested a review from SkalskiP as a code owner June 24, 2026 03:25
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@Borda

Borda commented Jun 24, 2026

Copy link
Copy Markdown
Member

Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.

@yyq1043-cloud, pls sign ^^ otherwise we cannot move forward... 🦝

@Borda Borda marked this pull request as draft June 24, 2026 06:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an optional progress indicator to YOLO dataset loading to improve UX on large datasets (per #183), by threading a show_progress flag from DetectionDataset.from_yolo() down into the annotation-loading loop.

Changes:

  • Add show_progress: bool = False to load_yolo_annotations() and optionally wrap iteration with tqdm.
  • Add show_progress: bool = False to DetectionDataset.from_yolo() and pass through to the YOLO loader.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/supervision/dataset/formats/yolo.py Adds optional tqdm wrapping around the image iteration when loading annotations.
src/supervision/dataset/core.py Exposes show_progress on the public DetectionDataset.from_yolo() loader and passes it through.

Comment on lines +247 to +254
# Lazy import tqdm to avoid hard dependency
if show_progress:
from tqdm import tqdm
iterator = tqdm(image_paths, desc="Loading YOLO annotations")
else:
iterator = image_paths

for image_path in iterator:
Comment on lines 442 to 451
def from_yolo(
cls,
images_directory_path: str,
annotations_directory_path: str,
data_yaml_path: str,
force_masks: bool = False,
is_obb: bool = False,
show_progress: bool = False,
) -> DetectionDataset:
"""
Add optional show_progress parameter to load_yolo_annotations() and
DetectionDataset.from_yolo() methods. When enabled, displays a tqdm
progress bar during image annotation loading.

Closes roboflow#183
@yyq1043-cloud yyq1043-cloud changed the title feat: add show_progress parameter to from_yolo() loader [Closed - duplicate] feat: add show_progress to from_yolo() Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants