Skip to content

send 224x224 detection crop alongside full frame#359

Open
MateoLostanlen wants to merge 2 commits intodevelopfrom
send_detection_crop
Open

send 224x224 detection crop alongside full frame#359
MateoLostanlen wants to merge 2 commits intodevelopfrom
send_detection_crop

Conversation

@MateoLostanlen
Copy link
Copy Markdown
Member

Summary

  • Engine now uploads a tight square crop around the detection bbox in addition to the full frame, so users can confirm/dismiss smoke much faster from the dashboard without panning the full image.
  • Crop is taken on the original (pre-resize) frame: 20% padding on the largest bbox dim, squared, clamped to image borders, then resized to 224×224 (JPEG q=95 if downscaling, q=100 with no chroma subsampling otherwise).
  • Forwarded to pyroclient.create_detection via a new crop= kwarg.

Depends on

Until that PR is merged and the lockfile is bumped, alert uploads will raise TypeError — do not merge in isolation.

Crops the original (pre-resize) frame around the detection bboxes, expands
the longest side by 20%, squares it, clamps inside image borders, then
resizes to 224x224 with JPEG q=95 when downscaling and q=100 (subsampling=0,
optimize=True) when the crop was already at or below 224.

The crop is forwarded to pyroclient.create_detection as a new `crop` kwarg —
requires the matching pyroclient + API change to accept the second media file.
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.

1 participant