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 ...
随机推荐
- linux常用英文单词记录
1.skip 跳过忽略 2.next 下一步3.hostname 主机名4.password 密码5.complete 完成6.network 网络7.conf config configuratio ...
- Elasticsearch-搭建自己的搜索系统
参考链接: https://blog.csdn.net/weixin_42730079/article/details/81113806 https://www.cnblogs.com/dreamro ...
- wqweqweqwe
本文目录 1 会话跟踪技术 2 cookie介绍 Django中操作Cookie Session Django中Session相关方法 Django中的Session配置 CBV中加装饰器 回到目录 ...
- fmt.Sprintf格式化使用
格式化写法: fmt.Sprintf(格式化样式, 参数列表-) 参数说明: 格式化样式:字符串形式,格式化动词以%开头. 参数列表:多个参数以逗号分隔,个数必须与格式化样式中的动词个数对应,否则运行 ...
- EFI系统引导的一些零碎知识点
EFI目录 下图只有Boot和Microsoft,如果你还装其他系统可能还会有其他的文件夹,比如你还装了Ubuntu(或者manjaro),那么会有个叫Ubuntu(manjaro)的文件夹与Boot ...
- 推荐一个SAM文件或者bam文件中flag含义解释工具
SAM是Sequence Alignment/Map 的缩写.像bwa等软件序列比对结果都会输出这样的文件.samtools网站上有专门的文档介绍SAM文件.具体地址:http://samtools. ...
- vim实现实时自动保存
进https://www.vim.org/scripts/script.php?script_id=4521网站下载vim -auto-save wget https://www.vim.org/s ...
- particular.js
参数 键值 参数选项/ 说明 实例 particles.number.value number 数量 40 particles.number.density.enable boolean t ...
- 【杂】暴力出奇迹,lz水数据
做了个填涂颜色的题qwq 洛谷上的qwq,然后我就把这道题水过去了qwq(显然这是不对的,我们不能水数据qwq)当然我本身是80分的qwq end-
- gulp打开gbk编码的html文件乱码
先上图,好忧伤: