Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

overlay_image() function #1301

Open
2 tasks done
Bhavay-2001 opened this issue Jun 21, 2024 · 1 comment · May be fixed by #1312
Open
2 tasks done

overlay_image() function #1301

Bhavay-2001 opened this issue Jun 21, 2024 · 1 comment · May be fixed by #1312
Assignees
Labels
bug Something isn't working

Comments

@Bhavay-2001
Copy link
Contributor

Search before asking

  • I have searched the Supervision issues and found no similar bug report.

Bug

The overlay_image function used in the CropAnnotator class here has different arguments as compared to the parameters in the overlay_image function defined over here

Environment

No response

Minimal Reproducible Example

import supervision as sv
from inference import get_model
import cv2

model = get_model(model_id="yolov8n-seg-640")
image = cv2.imread('/content/highway.jpg')
results = model.infer(image)[0]
detections = sv.Detections.from_inference(results)

crop_annotator = sv.CropAnnotator()
annotated_frame = crop_annotator.annotate(
    scene=image.copy(),
    detections=detections
)
cv2.imshow(annotated_frame)

Additional

No response

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!
@LinasKo
Copy link
Collaborator

LinasKo commented Jun 26, 2024

Confirming the bug: https://colab.research.google.com/drive/1liqwH6p_rPbNrV2D1jPPe8pOmoA0DCME?usp=sharing

@Bhavay-2001, if you're still keen, feel free to open a PR with the fix!

@Bhavay-2001 Bhavay-2001 linked a pull request Jun 27, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants