04 2020 档案

摘要:解决办法:将numpy降级为1.17.5版本可解决 阅读全文
posted @ 2020-04-23 12:24 DuanYongchun 阅读(4096) 评论(0) 推荐(0)
摘要:直接在Jupyter Notebook的Cell中执行命令行命令只需在需要执行的命令之前加上【!】 例如: !pip install numpy 此命令表示直接在Jupyter Notebook中安装Numpy. 阅读全文
posted @ 2020-04-22 19:43 DuanYongchun 阅读(691) 评论(0) 推荐(0)
摘要:安装Jupyter Kernel:ipykernel pip install ipykernel 连接虚拟环境到Jupyter Kernel python -m ipykernel install --user --name 环境名 --display-name 简称 例: python -m ip 阅读全文
posted @ 2020-04-22 19:07 DuanYongchun 阅读(2180) 评论(0) 推荐(0)
摘要:概要: 可能有的同学在使用Python的时候喜欢使用.py文件,而有的同学喜欢使用Jupyter Notebook做开发,但是苦于不会使用远程服务器的Jupyter Notebook而放弃,而这篇文章将教会你怎样远程访问Jupyter Notebook。 官方地址:官方地址 远访配置: 创建Jupy 阅读全文
posted @ 2020-04-22 18:58 DuanYongchun 阅读(630) 评论(0) 推荐(0)
摘要:概要: 由于缺少pycocotools包引发的错误,而pycocotools包需要cython和C编译器,所以在安装cython之前需要先安装Cython。 解决办法: 安装cython pip install -U cython Linux安装pycocotools pip install "gi 阅读全文
posted @ 2020-04-22 13:38 DuanYongchun 阅读(16684) 评论(0) 推荐(2)
摘要:解决办法:使用arxiv.org的备用地址xxx.itp.ac.cn 例:将arxiv.org/abs/1911.00068更换为xxx.itp.ac.cn/abs/1911.00068 阅读全文
posted @ 2020-04-17 22:30 DuanYongchun 阅读(1352) 评论(0) 推荐(0)
摘要:一、Labelme简介: labelme是麻省理工(MIT)的计算机科学和人工智能实验室(CSAIL)研发的图像标注工具,人们可以使用该工具创建定制化标注任务或执行图像标注,项目源代码已经开源。 项目开源地址:https://github.com/CSAILVision/LabelMeAnnotat 阅读全文
posted @ 2020-04-15 00:32 DuanYongchun 阅读(1161) 评论(0) 推荐(0)
摘要:import os root_dir = r'pycococreatortools' # os.path.join(root_dir, str):将root_dir,str部分合成一个整体 print("执行结果:", os.path.join(root_dir, '_os_path_')) fil 阅读全文
posted @ 2020-04-14 15:38 DuanYongchun 阅读(443) 评论(0) 推荐(1)
摘要:源码: #!/usr/bin/python # -*- coding:utf8 -*- import os import random def mod_file_name(root_dir): files = os.listdir(root_dir) # 获取当前目录的所有文件及文件夹 for fi 阅读全文
posted @ 2020-04-14 15:19 DuanYongchun 阅读(246) 评论(0) 推荐(0)
摘要:您可能会想,“如果它如此容易理解,为什么不只使用png二进制掩码格式。” 请记住,我们尝试制作COCO数据集的原因不是因为它是表示带注释的图像的最佳方式,而是因为其他所有人都在使用它。 前期准备: 安装pycocotools:Windows下安装- pip install git+https://g 阅读全文
posted @ 2020-04-14 13:01 DuanYongchun 阅读(960) 评论(0) 推荐(0)
摘要:当前目录:【./】(同级目录)可省略 上一级目录:【../】 上上一级目录:【../../】 阅读全文
posted @ 2020-04-13 11:28 DuanYongchun 阅读(3327) 评论(0) 推荐(0)
摘要:执行: pip install -U scikit-image 阅读全文
posted @ 2020-04-12 23:17 DuanYongchun 阅读(1308) 评论(0) 推荐(0)
摘要:执行: apt update && apt install -y libsm6 libxext6 libxrender-dev 阅读全文
posted @ 2020-04-12 23:16 DuanYongchun 阅读(2089) 评论(0) 推荐(0)
摘要:官方教程:https://pillow.readthedocs.io/en/stable/handbook/tutorial.html 之后再写教程 读取图片转换格式并保存 import os import shutil from PIL import Image import numpy as n 阅读全文
posted @ 2020-04-11 01:07 DuanYongchun 阅读(425) 评论(0) 推荐(0)
摘要:import os import numpy as np # # name:txt文件名 # rootdir:根路径 # metaimage:原始图像路径 # imglabel:标签图像路径 # def write_to_txt(name, root_dir, metaimage, imglabel 阅读全文
posted @ 2020-04-11 00:11 DuanYongchun 阅读(1926) 评论(0) 推荐(0)
摘要:https://blog.csdn.net/XunCiy/article/details/89070315?depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1&utm_s 阅读全文
posted @ 2020-04-10 18:16 DuanYongchun 阅读(2601) 评论(0) 推荐(0)
摘要:import torch # 如正常则静默 a = torch.Tensor([1.]) # 如正常则静默 a.cuda() # 如正常则返回"tensor([ 1.], device='cuda:0')" from torch.backends import cudnn # 如正常则静默 cudn 阅读全文
posted @ 2020-04-10 17:21 DuanYongchun 阅读(13642) 评论(0) 推荐(0)
摘要:Ubuntu系统执行: sudo apt-get install libgeos-dev CentOS系统执行: sudo yum install geos-devel 阅读全文
posted @ 2020-04-10 10:41 DuanYongchun 阅读(6025) 评论(0) 推荐(0)
摘要:Linux: cat /usr/local/cuda/version.txt Windows: # Windows终端 nvcc --version 阅读全文
posted @ 2020-04-10 07:09 DuanYongchun 阅读(631) 评论(0) 推荐(0)
摘要:首先用root用户登录,cd到home目录:执行命令: # 查看删除账户命令 userdel -h # 删除账户 userdel -r duanyongchun(要删除的账户名) 阅读全文
posted @ 2020-04-09 13:14 DuanYongchun 阅读(976) 评论(0) 推荐(0)
摘要:原因:这个原因是因为在使用Crossentropyloss作为损失函数时,output=net(input)的output应该是[batchsize, n_class, height, weight],而label则是[batchsize, height, weight],label是单通道灰度图; 阅读全文
posted @ 2020-04-09 11:39 DuanYongchun 阅读(12321) 评论(0) 推荐(1)
摘要:在出现错误的地方加上: with torch.no_grad(): test_loader = init_data_loader(X_test, y_test, torch.device('cpu'), batch_size, num_workers=0) print("Starting infer 阅读全文
posted @ 2020-04-09 00:50 DuanYongchun 阅读(30506) 评论(1) 推荐(1)
摘要:【uname -a】 【cat /proc/version】 【cat /etc/redhat-release】 查看详细信息 wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env. 阅读全文
posted @ 2020-04-08 09:35 DuanYongchun 阅读(271) 评论(0) 推荐(1)
摘要:下载文件:(由于外网下载较慢,所以这里采用清华源镜像下载)清华源镜像网站 wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-2020.02-Linux-x86_64.sh (1)cd 到刚刚下载的.sh文件所在目 阅读全文
posted @ 2020-04-07 22:41 DuanYongchun 阅读(3787) 评论(0) 推荐(0)
摘要:执行命令:(Linux与Windows均适用) $ git clone https://github.com/NVIDIA/apex $ cd apex $ pip install -v --no-cache-dir --global-option="--cpp_ext" --global-opti 阅读全文
posted @ 2020-04-07 18:26 DuanYongchun 阅读(8374) 评论(0) 推荐(0)
摘要:前言 在很多场景下,我们需要使用Windows系统远程访问Ubuntu系统,传统的连接方式有(1)通过SSH服务连接,也就是只有终端的形式;(2)通过图形界面访问服务器。通过SSH服务连接很简单,这里不做介绍,通过图形界面访问主要有xrdp和vnc两种方式,本文我主要介绍通过xrdp连接服务器。 U 阅读全文
posted @ 2020-04-07 15:28 DuanYongchun 阅读(1670) 评论(0) 推荐(0)
摘要:简单K折交叉验证源码:( 将数据集拆分为k个连续的折叠(默认情况下不进行混洗)。 然后将每个折叠用作一次验证,而剩下的k-1个折叠形成训练集。 ) import numpy as np from sklearn.model_selection import KFold X = np.array([[ 阅读全文
posted @ 2020-04-07 09:23 DuanYongchun 阅读(737) 评论(0) 推荐(0)
摘要:前期准备 下载3DSlicer并安装: 3DSlicer官网(http://www.slicer.org)或者直接下载(https://download.slicer.org),需要注意目前该插件只支持最新的3DSlicer Preview版本(4.11.x) 官网下载速度慢,直接百度网盘: 链接: 阅读全文
posted @ 2020-04-05 15:37 DuanYongchun 阅读(4248) 评论(7) 推荐(1)