Skip to content

Conversation

@prasannals
Copy link
Collaborator

No description provided.

@prasannals prasannals requested review from Copilot, nb950 and sahilx13 July 2, 2025 01:48
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances bounding box handling by ensuring face detection boxes are square and confined within image boundaries, and adds guidance for dependency versioning in migration docs.

  • Extended scale() to accept image dimensions and clamp box coordinates within image bounds.
  • Updated predict_age_and_gender to pass image width/height to scale().
  • Added a note in flaskml_migration_steps.md on specifying dependency versions in the root pyproject.toml.

Reviewed Changes

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

File Description
src/age_and_gender_detection/age_and_gender_detection/model.py Modified scale() signature to include optional image_width/image_height, added clamping logic, and updated its call site in predict_age_and_gender.
flaskml_migration_steps.md Inserted a note on proper dependency version placement between plugin and root pyproject.toml.
Comments suppressed due to low confidence (2)

src/age_and_gender_detection/age_and_gender_detection/model.py:13

  • Consider adding a docstring to explain the new optional parameters image_width and image_height, and clarify how the bounding box is clamped within image bounds.
def scale(box, image_width=None, image_height=None):

flaskml_migration_steps.md:27

  • [nitpick] Format this note consistently with the surrounding numbered list (e.g., indent it as a sub-point or use a Markdown blockquote > Note:) to maintain readability and list structure.
NOTE: Specify the version of the dependencies in the root level pyproject.toml. The individual plugin's pyproject.toml must not contain the version numbers.

@sahilx13 sahilx13 merged commit ad2363f into UMass-Rescue:main Jul 2, 2025
2 checks passed
@nb950 nb950 mentioned this pull request Jul 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants