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

Detecting more than 100 objects in a single image using retinanet #2452

Closed
DKosatov opened this issue May 31, 2024 · 1 comment
Closed

Detecting more than 100 objects in a single image using retinanet #2452

DKosatov opened this issue May 31, 2024 · 1 comment
Assignees

Comments

@DKosatov
Copy link

Hello, could you explain if it is possible to use retinanet to find more than 100 objects in one image?

My images may contain more than 100 objects of the same type.
I'm setting max_detections=400 for MultiClassNonMaxSuppression.

keras_cv.layers.MultiClassNonMaxSuppression(
    bounding_box_format="xyxy",
    from_logits=True,
    iou_threshold=0.2,
    confidence_threshold=0.6,
    max_detections=400
)

But

y_pred = mt.predict(image_batch)
print(y_pred['confidence'][0])

It always contains no more than 100 predicted objects and 300 (-1.).
Please tell me if there is a way to fix this

@DKosatov
Copy link
Author

DKosatov commented Jun 1, 2024

Since the objects in the image were of the same class, it was necessary to add
max_detections_per_class=400
After that, everything works correctly.

@DKosatov DKosatov closed this as completed Jun 1, 2024
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

No branches or pull requests

2 participants