当前位置:网站首页>TypeError: Argument ‘angle‘ can not be treated as a double
TypeError: Argument ‘angle‘ can not be treated as a double
2022-07-01 00:41:00 【AI浩】
问题如下:
File "D:\rotation-yolov5-master\detect.py", line 173, in <module>
detect()
File "D:\rotation-yolov5-master\detect.py", line 78, in detect
pred = rotate_non_max_suppression(pred, opt.conf_thres, opt.iou_thres, classes=opt.classes, agnostic=True)
File "D:\rotation-yolov5-master\utils\general.py", line 869, in rotate_non_max_suppression
i = nms(boxes, scores)
File "D:\rotation-yolov5-master\utils\general.py", line 797, in nms
rotate_ious = rotate_iou(max_iou_boxes[-1], sort_boxes[1:])
File "D:\rotation-yolov5-master\utils\general.py", line 710, in rotate_iou
r_b1 = get_rotated_coors(box1[i])
File "D:\rotation-yolov5-master\utils\general.py", line 729, in get_rotated_coors
R[:2] = cv2.getRotationMatrix2D(angle=-a*180/math.pi, center=(cx,cy), scale=1)
TypeError: Argument 'angle' can not be treated as a double
解决方法:
将
R[:2] = cv2.getRotationMatrix2D(angle=-a*180/math.pi, center=(cx,cy), scale=1)
改为:
R[:2] = cv2.getRotationMatrix2D(angle=float(-a*180/math.pi), center=(cx,cy), scale=1)
边栏推荐
- Analyzing the wisdom principle in maker education practice
- [Deepin] 常用集合
- [LeetCode] 爬楼梯【70】
- Q弹松软的大号吐司,带来更舒服的睡眠
- [问题已处理]-nvidia-smi命令获取不到自身容器的GPU进程和外部的GPU进程号
- Chromatic judgement bipartite graph
- Looksrare team's "cash out" caused disturbance
- Service grid ASM year end summary: how do end users use the service grid?
- K210门禁毕设
- 奇偶链表[链表操作的两种大方向]
猜你喜欢

Windows环境下安装MongoDB数据库

Using C language to realize the exchange between the contents of two arrays (provided that the array is the same size)

解读创客教育所蕴含的科技素养

Solve idea:class' xxx 'not found in module' xxx‘

ORB-SLAM2源码学习(二)地图初始化

dc_labs--lab1的学习与总结

Vnctf 2022 cm CM1 re reproduction

TCP三次握手为什么不是两次或四次

双位置继电器ST2-2L/AC220V

软件开发完整流程
随机推荐
StrictMode带来的思考-StrictMode原理(5)
Locking relay ydb-100, 100V
Service
基础知识之二——STA相关的基本定义
06. on several ways of redis persistence
Opencv basic operation 2 realizes label2rgb and converts gray-scale images into color images
Call the classic architecture and build the model based on the classic
解决IDEA:Class ‘XXX‘ not found in module ‘XXX‘
Koa koa-combine-routers 分路由管理
Implementation of date class
Split the linked list [take next first and then cut the linked list to prevent chain breakage]
友盟(软件异常实时监听的好帮手:Crash)接入教程(有点基础的小白最易学的教程)
软件开发完整流程
How to do the performance pressure test of "Health Code"
蒹葭苍苍,白露为霜。
Impact relay zc-23/dc220v
解读创客教育所蕴含的科技素养
Metauniverse and virtual reality (II)
使用StrictMode-StrictMode原理(1)
What if the disk of datanode is full?