摘要: import SimpleITK as sitk path = 'nii全路径' nii_obj = sitk.GetArrayFromImage(sitk.ReadImage(path)) #shape为(c,h,w),c为所有slice的数量 import nibable as nil nii_ 阅读全文
posted @ 2022-09-01 16:08 一点飞鸿 阅读(213) 评论(1) 推荐(0) 编辑
摘要: import torchpredict = torch.randn((4,3))# crossentropyloss不需要predict的概率为1,predict为logits# predict = torch.nn.functional.softmax(predict,dim = 1)target 阅读全文
posted @ 2022-03-24 22:46 一点飞鸿 阅读(400) 评论(0) 推荐(0) 编辑
摘要: 代码: cate_ids=np.unique(gt_box_array[:,-1]) for tmp_cateid in cate_ids: conf_matrix[tmp_cateid,0]+=1 原因:numpy里面不指定类型的话,默认是float64位,无法作为索引 修改:强转为int ,即c 阅读全文
posted @ 2022-03-09 18:06 一点飞鸿 阅读(3219) 评论(0) 推荐(1) 编辑
摘要: 用relationnet时,发现broadcast_power()的源码中的注释如下: 官方文档中的注释如下: 怎么算都算不出它这个结果。。。 自己用mxnet实验了一把,发现是注释错了,代码如下: 阅读全文
posted @ 2022-03-08 09:54 一点飞鸿 阅读(47) 评论(0) 推荐(0) 编辑
摘要: 修改:进到torch._six源码,看看里面是PY的哪个对象,修改成这对象名试试 _six.py 即将PY3修改为PY37 阅读全文
posted @ 2021-12-08 19:13 一点飞鸿 阅读(4444) 评论(1) 推荐(1) 编辑
摘要: 代码:maskrcnn-benchmark Python 3.6.13 |Anaconda, Inc Traceback (most recent call last): File "tools/train_net.py", line 18, in <module> from maskrcnn_be 阅读全文
posted @ 2021-12-08 19:03 一点飞鸿 阅读(4151) 评论(0) 推荐(1) 编辑
摘要: 参考mmdetection代码 地址:https://github.com/open-mmlab/mmdetection/blob/master/mmdet/core/visualization/image.py: state = np.random.get_state() # random col 阅读全文
posted @ 2021-10-25 18:30 一点飞鸿 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 描述: git clone ...时报错 fatal: unable to access 'https://github.com/github-eliviate/papers.git/': OpenSSL SSL_read: Connection was reset, errno 10054 解决: 阅读全文
posted @ 2021-10-24 21:56 一点飞鸿 阅读(1123) 评论(0) 推荐(0) 编辑
摘要: fatal: unable to access 'https://github.com/github-eliviate/papers.git/': Failed to connect to github.com port 443 after 21107 ms: Timed out 解决: git c 阅读全文
posted @ 2021-10-24 21:34 一点飞鸿 阅读(390) 评论(0) 推荐(0) 编辑
摘要: python3.8.5 pycharm 解决:将1改成2或者3 阅读全文
posted @ 2021-08-12 13:50 一点飞鸿 阅读(181) 评论(0) 推荐(0) 编辑