目标检测
CV/NLP大虾
https://github.com/hanhui269/
展开
-
img2bgr
img = cv2.imread(root + file) # img = cv2.imread('256.jpg') img = cv2.resize(img,(1920,1080)) # cv2.imwrite('1_1960.jpg',img) img = img.transpose(2, 0, 1) # BGR , to 3x416x416 # img = img[:, :, ::-1].transpose(2, 0, 1) # BGR to RGB, to 3x416x41原创 2021-09-17 18:30:19 · 109 阅读 · 0 评论 -
检测中的precision,recall,AP,mAP
首先得了解基本分类PR曲线我们当然希望检测的结果P越高越好,R也越高越好,但事实上这两者在某些情况下是矛盾的。比如极端情况下,我们只检测出了一个结果,且是准确的,那么Precision就是100%,但是Recall就很低;而如果我们把所有结果都返回,那么必然Recall必然很大,但是Precision很低。因此在不同的场合中需要自己判断希望P比较高还是R比较高。如果是做实验研究,可以绘制Precision-Recall曲线来帮助分析。这里我们举一个简单的例子,假设我们的数据集中共有五个待检测的原创 2021-09-10 10:55:26 · 1008 阅读 · 0 评论 -
车牌识别-调研
调研1.https://github.com/Liuyubao/PlateRecognition目录地址:XX\TestingCode\plate_car_detecthttps://github.com/hpc203/license-plate-detect-recoginition-pytorchimport argparseimport torchimport numpy as npfrom utils import cfg_mnet, py_cpu_nms, decode,原创 2021-06-30 17:01:58 · 237 阅读 · 0 评论 -
faster rcnn代码讲解
faster rcnn forward def forward(self, imgs, bboxes, labels, scale): """Forward Faster R-CNN and calculate losses. Here are notations used. * :math:`N` is the batch size. * :math:`R` is the number of bounding boxes per原创 2021-05-18 18:43:35 · 1163 阅读 · 0 评论 -
各类IOU介绍以及实现
IOU介绍iougioucioudiouiou代码实现def bbox_iou(box1, box2, x1y1x2y2=True, GIoU=False, DIoU=False, CIoU=False): # Returns the IoU of box1 to box2. box1 is 4, box2 is nx4 box2 = box2.t() # Get the coordinates of bounding boxes if x1y1x2y2:原创 2021-05-10 18:22:09 · 416 阅读 · 0 评论 -
yolov ssd faster-rcnn系列文章
收藏几篇讲解较好的YOLO系列文章。参考文章;https://blog.csdn.net/g11d111/article/details/108845799https://zhuanlan.zhihu.com/p/183781646https://zhuanlan.zhihu.com/p/186014243https://zhuanlan.zhihu.com/p/172121380原创 2021-05-08 17:57:12 · 101 阅读 · 0 评论 -
SSD模型剪枝前后对比
模型SSD,数据集人脸。原始map为0.70。原始权重为11.5M,裁剪后权重大小为6M。flops裁剪30%。裁剪后map为0.685裁剪demo1裁剪config配置后部分检测图片对比:在这里插入图片描述原创 2021-03-31 16:02:06 · 899 阅读 · 3 评论 -
YoloV1-V5系列
YoloV1-V5系列1.YoloV12.YoloV23.YoloV3预测框最终得到的边框坐标值是bx,by,bw,bh即边界框bbox相对于feature map的位置和大小,是我们需要的预测输出坐标。但我们网络实际上的学习目标是tx,ty,tw,th这4个offsets,其中tx,ty是预测的坐标偏移值,tw,th是尺度缩放,有了这4个offsets,自然可以根据之前的公式去求得真正需要的bx,by,bw,bh4个坐标。4.YoloV45.YoloV5参考文章:https://z原创 2020-09-15 16:51:21 · 285 阅读 · 0 评论 -
AdaptiveAvgPool2d
In [1]: import torchIn [2]: a = torch.rand([4,3,4,4])In [3]: a.size()Out[3]: torch.Size([4, 3, 4, 4])In [4]: b = torch.nn.functional.adaptive_avg_pool2d(a, (1,1)) # 自适应池化,指定池化输出尺寸为 1 * 1In [5]: b.size()Out[5]: torch.Size([4, 3, 1, 1])def _ma.原创 2020-06-23 14:35:58 · 794 阅读 · 0 评论 -
opencv.rectangle got TypeError:tuple type
当从Image或numpy生成的图像矩阵中包含不同类型的数据时候,则会导致此问题。采用如下进行连续array,则解决此问题nps=np.ascontiguousarray(nps,dtype=np.uint8)cv2.rectangle(nps,(x1,y1),(x2,y2),(0,255,0),-1)原创 2020-06-19 14:47:49 · 171 阅读 · 0 评论 -
目标检测总综述
目标检测总综述https://cloud.tencent.com/developer/news/281788https://zhuanlan.zhihu.com/p/37998710https://www.cnblogs.com/wangyong/p/8523814.html原创 2020-04-24 22:51:36 · 1111 阅读 · 0 评论