Exception: 'dlib.mmod_rectangle' object has no attribute 'right' - 例外:'dlib.mmod_rectangle'对象没有属性'right'
I'm using dlib for face detection and getting this error
Exception: 'dlib.mmod_rectangle' object has no attribute 'right'
What is the problem? I'm using cnn version of dlib which should run on gpu and here is the code
detector = dlib.cnn_face_detection_model_v1('mmod_human_face_detector.dat')
img = dlib.load_rgb_image(img_path)
dets = detector(img, 1)
Solution 1
If you use cnn version of dlib, it does not return you simple rectangle. It returns you an instance of a class, which have the rectangle inside of it.
class dlib.mmod_rectangle:
# Wrapper around a rectangle object and a detection confidence score.
confidence
rect
This is the definitation of the class. it has a field rect, where you can find your points. http://dlib.net/python/index.html#dlib.mmod_rectangle
aipool: https://ai-pool.com/d/exception____dlib_mmod_rectangle__object_has_no_attribute__right_
Exception: 'dlib.mmod_rectangle' object has no attribute 'right' - 例外:'dlib.mmod_rectangle'对象没有属性'right'的更多相关文章
- AttributeError: 'tuple' object has no attribute 'extend'
出错demo In [5]: a.extend([4,5]) --------------------------------------------------------------------- ...
- AttributeError: 'module' object has no attribute 'Thread'
$ python thread.py starting at: 2015-08-05 00:24:24Traceback (most recent call last): File "th ...
- 解决window7 x64位Anaconda启动报错:AttributeError: '_NamespacePath' object has no attribute 'sort'
最近论文需要用到python做数据分析,python语法简单,但是Windows下安装第三方包恶心的要命,statsmodels用pip死活安装不上,网上查了说包相互依赖windows下的pip不能下 ...
- AttributeError: 'NoneType' object has no attribute 'split' 报错处理
报错场景 social_django 组件对原生 django 的支持较好, 但是因为 在此DRF进行的验证为 JWT 方式 和 django 的验证存在区别, 因此需要进行更改自行支持 JWT 方式 ...
- 解决Win7(x64)Anaconda3报错:AttributeError: '_NamespacePath' object has no attribute 'sort'
最近论文需要用到python做数据分析,python语法简单,但是Windows下安装第三方包恶心的要命,statsmodels用pip死活安装不上,网上查了说包相互依赖windows下的pip不能下 ...
- 测试类执行报错:AttributeError: 'Testlei' object has no attribute 'test_cases' 和data,unpack用法解析
a=[{"}] import unittest from ddt import ddt,data,unpack @ddt class Testlei(unittest.TestCase): ...
- AttributeError: 'unicode' object has no attribute 'tzinfo' 未解决
Internal Server Error: /demo/machineinfo.htmlTraceback (most recent call last): File "C:\Python ...
- Django 运行报异常:AttributeError: 'str' object has no attribute 'get'
Technorati Tags: Python,Django,Web 在使用django.contrib.auth用户机制进行用户的验证.登录.注销操作时,遇到这个异常. 首先是写了一个登录的视图,要 ...
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
最近在编写Python脚本过程中遇到一个问题比较奇怪:Python脚本完全正常没问题,但执行总报错"AttributeError: 'module' object has no attrib ...
随机推荐
- RHCSA
系统管理 redhat 7 破解修改root密码 修改系统主机名 修改系统地址掩码网关 创建系统默认软件仓库 安装系统内核升级 绑定到外部验证服务LDAP.配置 autofs 用户组管理 创建用户组 ...
- CentOS 7编译OpenWRT
安装必要的依赖 yum install subversion binutils bzip2 gcc gcc-c++ gawk gettext flex ncurses-devel zlib-devel ...
- 阿里云ECS相关
RAM授权: https://help.aliyun.com/document_detail/28639.html 安全组: https://jingyan.baidu.com/article/afd ...
- MySQL中使用union all获得并集的排序
项目中有时候因为某些不可逆转的原因使得表中存储的数据难以满足在页面中的展示要求.之前的项目上有文章内容的展示功能,文章分为三个状态待发布.已发布.已下线.他们在数据表中判断状态的字段(PROMOTE_ ...
- VWmare设置挂载目录
[root@localhost ~]# mkdir -p /mnt/cdrom #首先创建一个挂载目录 [root@localhost ~]# mount -t auto /dev/cdrom / ...
- PostgreSQL 与 PostGIS
PostgreSQL 是一种对象-关系型数据库管理系统(ORDBMS),也是目前功能最强大.特性最丰富和最复杂的自由软件数据库系统.它起源于伯克利(BSD)的数据库研究计划,目前是最重要的开源数据库产 ...
- sourcetree,创建工作流报错:Fatal: Not a gitflow-enabled repo yet. Please run 'git flow init' first.-》解决办法
1.打开项目下.git/config文件,或者如下图操作: 2.打开config文件以后,删除所有 [gitflow *条目并保存文件 3.关闭并重新打开sourcetree 4.仓库->Git ...
- Python自动发送邮件提示:smtplib.SMTPServerDisconnected: please run connect() first
参考:http://blog.csdn.net/leven_change/article/details/66976695
- HTML5外包注意事项-开发HTML5游戏的九大坑与解决方法剖析
随着移动社区兴起,势必带动HTML5的革命.未来一两年内,HTML5移动游戏必将呈现大爆发趋势. 以下是整理的HTML5游戏研发.市场趋势以及渠道布局和技术解决方案的内容.希望大家能从本文中找到对HT ...
- Docker Swarm集群中部署Traefik负载均衡器
一.创建单节点的Docker Swarm集群 docker swarm init 二.在Swarm集群中创建一个网络 docker network create --driver=overlay tr ...