macOS间歇性卡顿问题
今天偶然发现的,macOS系统下,比如打字的时候,无法连续输入,基本上输入几个字就会卡顿几秒,打开软件啥的也一样。 奇怪的是CPU占用率非常低,磁盘读写也非常低。 1. onedrive 在我一个应用一个应用的退出之后发现,原来是onedr […]
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject
mmdet运行时报错:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
Traceback (most recent call last): File "tools/train.py", line 13, in <module> from mmdet.apis import set_random_seed, train_detector File "/home/ubuntu/bigdisk/part2/iterdet1.2/mmdet/apis/__init__.py", line 1, in <module> from .inference import (async_inference_detector, inference_detector, File "/home/ubuntu/bigdisk/part2/iterdet1.2/mmdet/apis/inference.py", line 9, in <module> from mmdet.core import get_classes File "/home/ubuntu/bigdisk/part2/iterdet1.2/mmdet/core/__init__.py", line 5, in <module> from .mask import * # noqa: F401, F403 File "/home/ubuntu/bigdisk/part2/iterdet1.2/mmdet/core/mask/__init__.py", line 2, in <module> from .structures import BitmapMasks, PolygonMasks File "/home/ubuntu/bigdisk/part2/iterdet1.2/mmdet/core/mask/structures.py", line 5, in <module> import pycocotools.mask as maskUtils ModuleNotFoundError: No module named 'pycocotools' |
原因是numpy版本太低,安装一下高版本的numpy即可: pip install numpy==1.20.1 本文最后更新于2022年5月2日,已超 […]
如何批量删除VOC数据集中某个类别
按照下面的格式,一个一个的删除:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# 批量移除xml标注中的某一个类别标签 import xml.etree.cElementTree as ET import os path_root = ['VOC2007/Annotations'] CLASSES = ["crowd"] # 填入想要删去的类别,每次删去一个类 for anno_path in path_root: xml_list = os.listdir(anno_path) for axml in xml_list: path_xml = os.path.join(anno_path, axml) tree = ET.parse(path_xml) root = tree.getroot() print("root",root) for child in root.findall('object'): name = child.find('name').text print("name",name) if name in CLASSES: # 这里可以反向写,不在Class的删掉 root.remove(child) # 重写 tree.write(os.path.join('VOC2007/Annotations_new', axml)) # 记得新建annotations_new文件夹 |
本文最后更新于2022年5月1日,已超过 1 年没有更新,如果文章内容或图片资源失效,请留言反馈,我们会及时处理,谢谢!
一些机器视觉领域常用的期刊或者会议的缩写
期刊: TMI IEEE Trans. Med. Imaging IEEE Transactions on Medical Imaging TIP IEEE Trans. Image Process. IEEE Transactions […]
Mathtype如何在64位macOS系统中使用?
自从macOS升级到10.15版本之后,只支持64位软件,因此像Mathtype这种软件就无法使用了。 因为Mathtype不支持64位的macOS系统,另外,貌似官方短时间也不打算出一个正式的版本来支持,搞不懂他们是怎么想的。 目前唯一的 […]
hdiutil: compact failed – 资源暂时不可用
使用hdiutil进行压缩的时候出现:hdiutil: compact failed – 资源暂时不可用 解决方案: 先:hdiutil attach XJJ_PASSWORD.sparsebundle/ 再:hdiutil detach […]
macOS下sparsebundle格式删除文件时候空间无法释放
macOS下使用稀疏捆绑磁盘映像和稀疏磁盘映像都会出现删除文件之后,空间没有释放的问题。 这是由文件格式特性导致的,解决方法: hdiutil compact /path/to/sparsebundle 本文最后更新于2022年4月17日, […]
稀疏捆绑磁盘映像和稀疏磁盘映像的区别
稀疏捆绑磁盘映像和稀疏磁盘映像都是一种打包方式,只不过稀疏捆绑磁盘映像存的时候是分块存的,每个块的大小是8M。 稀疏磁盘映像是直接以文件存的,这一点可以通过右键映像,通过有无查看包内容区别。 所以,建议机械硬盘使用稀疏磁盘映像,固态硬盘使用 […]
修改SSH的默认连接端口
有段时间在终端SSH其他电脑的时候总是timeout或者Connection refused,只有指定端口-p 22才好使。 后来发现,原来端口被改了,修改默认连接端口号的方式如下: 打开ssh配置文件:vi ~/.ssh/config 修 […]
macOS下使用ZSH终端粘贴命令有延迟怎么办?
之前用BASH的时候,粘贴速度特别快,后来换了ZSH,有时粘贴一条命令会一个字一个字的往上蹦。 修改方式如下: 打开配置文件:vim ~/.zshrc 在末尾粘贴如下代码:
1 2 3 4 5 6 7 8 9 10 |
pasteinit() { OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]} zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`? } pastefinish() { zle -N self-insert $OLD_SELF_INSERT } zstyle :bracketed-paste-magic paste-init pasteinit zstyle :bracketed-paste-magic paste-finish pastefinish |
[…]