![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
简伴
这个作者很懒,什么都没留下…
展开
-
python中的一些细节
一.正则表达式1.注意()()*和()+使用上的一点差异a = re.compile(r'Hello(wo)(wo)*world')b = re.compile(r'Hello(wo)+world')a和b的功能都是匹配以Hello开头和以world结,且这两者之间连接部分是1个或者多个wo的串,但是用他们匹配的结果在分组上是有区别的:a1 = a.search('Hellowoworld')a2 = a.search('Hellowowowoworld')a1.group(1)原创 2020-10-19 22:23:03 · 1308 阅读 · 1 评论 -
xml.etree.ElementTree使用报错"cannot serialize %r (type %s)" % (text, type(text).__name__)
python使用该库创建xml文件中添加text报错如下:"cannot serialize %r (type %s)" % (text, type(text).__name__)TypeError: cannot serialize 512 (type int)这里的512是我报错xml,etree.ElementTree.SubElement().text添加text内容时这里为数字...原创 2019-05-12 20:10:06 · 4269 阅读 · 0 评论 -
ubuntu下mmdetection项目中Faster R-CNN模型进行肺结节检测
mmdetection为香港中文大学和商汤科技用于目标检测和实例分割的开源项目,地址为https://github.com/open-mmlab/mmdetection一、安装。下载该项目后,命令行进入进入mmdetection目录,运行compile.sh程序,然后运行setup.py程序,我是在anaconda环境下进行的,在anaconda的相关目录下会生成mmdetection项目相关...原创 2019-07-01 16:44:01 · 2657 阅读 · 4 评论