aws-samples / host-yolov8-on-sagemaker-endpoint

MIT No Attribution
35 stars 24 forks source link

prediction_output elements are of type ultralytics.engine.results.Results. Requirements.txt need nvgpu #17

Closed AnandSrikumar closed 3 months ago

AnandSrikumar commented 7 months ago

Hi Team, for result in prediction_output: pass here the result is of type ultralytics.engine.results.Results, when we try to get result.keys, we get an exception. In order to get the boxes and confidence scores, we need

for result in prediction_output:
        boxes = result.boxes.xyxy
        conf = result.boxes.conf

As I checked the documentation, we also have attributes masks, keypoints and probs. The boxes is ultralytics.engine.results.Boxes object. The object has attributes of xyxy, xywh, xyxyn etc. boxes.xyxy or boxes.xywh return tensor element so to get the float point we need .item() function to retrieve.

In the requirements.txt, we need to add nvgpu, somehow the aws doesn't have nvgpu installed when we deploy the endpoint.

Can I raise a PR by fixing it?

shahromil16 commented 3 months ago

Added nvgpu. Thanks for identifying the issue.