冰山企鹅群体用例包
iceberg-penguins.search的Python项目详细描述
质量指标
先决条件-所有这些都可以通过下面的命令在网桥上使用
- Linux系统
- Python3
- CPU和NVIDIA GPU+CUDA CuDNN
软件依赖项-这些将与下面的安装一起自动安装
- scipy==1.2.1
- 枕头>;=6.2.2
- 火炬
- scikit学习==0.19.1
- 火炬视觉==0.2.0
- opencv python
- 光栅
- 未来
安装
准备工作: 这些指令特定于XSEDE网桥,但如果存在cuda、python3和NVIDIA P100 GPU,则可以使用其他资源,在这种情况下,可以跳过特定于网桥的“模块加载”指令。在
对于Unix或Mac用户:
使用Unix或Mac命令行终端通过ssh登录到网桥。可以直接或通过XSEDE门户登录网桥。请参阅Bridges User's Guide。在
对于Windows用户:
有许多工具可用于ssh访问网桥。请参见Ubuntu、MobaXterm或PuTTY
PSC桥
一旦你登录到桥上,你可以按照两种方法之一安装冰山企鹅。在
方法1(推荐):
“$”后面的行是输入(或剪切和粘贴)到终端中的命令(请注意,所有命令都区分大小写,意味着大写字母和小写字母是有区别的。)“#”后面的所有内容都是注释,用于解释命令的原因,不应包含在输入的内容中。不以“$”或“[penguins_env]$”开头的行是您应该看到的输出。在
$ pwd /home/username $ cd$SCRATCH# switch to your working space. $ mkdir Penguins # create a directory to work in. $ cd Penguins # move into your working directory. $ module load cuda # load parallel computing architecture. $ module load python3 # load correct python version. $ virtualenv penguins_env # create a virtual environment to isolate your work from the default system. $ source penguins_env/bin/activate # activate your environment. Notice the command line prompt changes to show your environment on the next line.[penguins_env] $ pwd /pylon5/group/username/Penguins [penguins_env] $ exportPYTHONPATH=<path>/penguins_env/lib/python3.5/site-packages # set a system variable to point python to your specific code. (Replace <path> with the results of pwd command above.[penguins_env] $ pip install iceberg_penguins.search # pip is a python tool to extract the requested software (iceberg_penguins.search in this case) from a repository. (this may take several minutes).
方法2(从源代码安装;仅推荐给开发人员):
^{pr2}$测试
[iceberg_penguins] $ deactivate # exit your virtual environment. $ interact -p GPU-small # request a compute node. This package has been tested on P100 GPUs on bridges, but that does not exclude any other resource that offers the same GPUs. (this may take a minute or two or more to receive an allocation). $ cd$SCRATCH/Penguins # make sure you are in the same directory where everything was set up before. $ module load cuda # load parallel computing architecture, as before. $ module load python3 # load correct python version, as before. $ source penguins_env/bin/activate # activate your environment, no need to create a new environment because the Penguins tools are installed and isolated here.[iceberg_penguins] $ iceberg_penguins.detect --help # this will display a help screen of available usage and parameters.
预测
- 在:https://bit.ly/3eLSMuz下载预先培训的模型
您可以下载到本地计算机并使用scp、ftp、rsync或Globus来transfer to bridges。在
这里提供的是在第300个纪元的模型,我们称之为“我的模型”。在
请将模型文件放在此处:<;checkpoints_dir>;/MY\u model/
然后,按照上面“To test”下的环境设置命令进行操作。 最后,运行单个PNG图像块预测的脚本是:
冰山_企鹅。探测[--参数…]
冰山_企鹅。探测--gpu ids 0--name MY_MODEL--epoch 300--checkpoints_dir'../MODEL\upath/'--输出测试--输入\-im../data/MY\IMG_平铺.png在
参数:
- --gpu_ids:用于测试的gpu
- --名称:用于测试的模型的名称
- --epoch:我们用哪个纪元来测试模型
- --checkpoints_dir:包含训练模型的文件夹的路径
- --output:保存输出的目录
- --input iu im:输入图像的路径
- 项目
标签: