0

I want to get the results with two decimal places, such as 0.92, 0.94, etc.

How can I modify the values in this library so that they have two decimal places for example.

0.9 to 0.92, 0.93, 0.97

alpalac 0.9 become alpalac 0.93

the easy and simple way

0nespo
  • 1
  • 2
  • it should be "{:.2f}".format() – toyota Supra May 09 '23 at 10:43
  • @toyotaSupra I already use this format, but the detection value remains 0.9 not 0.92, 0.93 – 0nespo May 09 '23 at 11:12
  • Can you print one code only? – toyota Supra May 09 '23 at 11:57
  • 1
    @toyotaSupra no, I changed the format to the yolov8 library. however the output I want doesn't change at all. . yolo>engine>result.py . . [label = (f'{name} {conf:.2f}' if conf else name) if labels else None] [text = f"{', '.join(f'{names[j] if names else j} {pred_probs[j]:.2f}' for j in top5i)}] – 0nespo May 09 '23 at 13:54

0 Answers0