【python】目标检测结果可视化

文章目录[隐藏]

watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBASmFja2lsaW5hX1N0b25l,size_6,color_FFFFFF,t_70,g_se,x_16

SimHei.ttf文件,请自行下载?

1 代码

import numpy as np
from PIL import Image, ImageFont, ImageDraw
import colorsys
import matplotlib.pyplot as plt


def DisplayDetectResult(img_path, out_classes, out_box, out_confidence):
    # Generate colors for drawing bounding boxes.
    hsv_tuples = [(x / len(out_classes), 1., 1.)
                  for x in range(len(out_classes))]
    colors = list(map(lambda x: colorsys.hsv_to_rgb(*x), hsv_tuples))
    colors = list(map(lambda x: (int(x[0] * 255), int(x[1] * 255), int(x[2] * 255)), colors))

    image = Image.open(img_path)

    fontStyle = 

版权声明:本文为CSDN博主「Jackilina_Stone」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/wss794/article/details/122750991

Jackilina_Stone

我还没有学会写个人说明!

暂无评论

发表评论

相关推荐

目标检测——yolov4损失函数

人工智能学习离不开实践的验证,推荐大家可以多在FlyAI-AI竞赛服务平台多参加训练和竞赛,以此来提升自己的能力。FlyAI是为AI开发者提供数据竞赛并支持GPU离线训练的一站式服务平台。每周免费提供项目开源算法样例

目标检测中的先验框(Anchor)

什么是先验框?
了解过目标检测算法的朋友们肯定知道先验框(Anchor)的概念,那么什么是先验框,为什么要有先验框?若要解释这个问题,首先我们需要了解边界框回归原理。
b