Skip to content

DOCS: Add missing docstrings to YOLO utility functions Body: #847

@Rudra-Tiwari-codes

Description

@Rudra-Tiwari-codes

What's wrong with the existing documentation

Description

The backend/app/utils/YOLO.py file contains several utility functions for object detection that lack proper documentation. Adding docstrings will improve code readability, maintainability, and help new contributors understand the codebase.

Functions Missing Docstrings

Function Purpose
YOLO_util_nms Non-Maximum Suppression
YOLO_util_multiclass_nms Per-class NMS
YOLO_util_compute_iou IoU calculation
YOLO_util_xywh2xyxy Bounding box format conversion
YOLO_util_draw_detections Detection visualization
YOLO_util_draw_box Bounding box drawing
YOLO_util_draw_text Text label drawing
YOLO_util_draw_masks Overlay mask drawing

Proposed Solution

Add Google-style docstrings with:

  • Function description
  • Args documentation with types
  • Returns documentation

Benefits

  • Improves code documentation and readability
  • Helps new contributors understand the YOLO utilities
  • Follows Python best practices for documentation
  • Aids IDE autocompletion and type checking

Labels

  • documentation
  • backend
  • good-first-issue

Add ScreenShots

No response

Record

  • I agree to follow this project's Code of Conduct
  • I want to work on this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions