当前位置:网站首页>Yolact++ Pytorch环境
Yolact++ Pytorch环境
2022-06-28 05:59:00 【Gone_float】
Anaconda3安装可以参考Deeplabv3+ 环境配置-Anaconda3 + Pytorch1.8 + Cuda10.1 + opencv3.2.0
环境配置
- 首先为pytorch创建一个anaconda虚拟环境,环境名字可自己确定,这里使用 yolact++ 作为环境名:
$ conda create -n yolact++ python==3.8
- 安装成功后激活yolact++环境
$ source activate
$ conda activate yolact++
- 在所创建的环境下安装pytorch,查看本机cuda版本
$ conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch
$ conda install cudnn=7.6.5
注意:10.2处应为cuda的安装版本号
编辑~./bashrc文件,设置使用yolact++环境下的python3.8
alias python='~/anaconda3/envs/yolact++/bin/python3.8'
- 更新环境变量
$ source ~/.bashrc
- 再次激活 yolact++
conda activate yolact++
- 测试
python
import torch
torch.cuda.is_available()
torch.cuda.device_count()
torch.cuda.current_device()
Yolact++项目克隆安装
- 克隆和安装Yolact++
$ git clone https://github.com/dbolya/yolact.git
- 安装所需库
在yolact++环境中, 路径yolact下执行
$ pip install cython
$ pip install opencv-python pillow pycocotools matplotlib
- 安装DCN
$ git clone https://github.com/jinfagang/DCNv2_latest.git
- 在yolact++环境中, 路径DCNv2_latest下执行
$ cd DCNv2_latest
$ python setup.py build develop
$ python testcuda.py # run examples and gradient check on gpu
测试图片
下载测试图片到testfile
下,权重文件到weights下
使用yolact_plus_base模型
python eval.py --trained_model=weights/yolact_plus_base_54_800000.pth --score_threshold=0.15 --top_k=15 --image=testfiles/elephant.jpg:testfiles/elephant_seg.jpg
使用yolact_plus_resnet50模型
python eval.py --trained_model=weights/yolact_plus_resnet50_54_800000.pth --score_threshold=0.15 --top_k=15 --image=testfiles/elephant.jpg:testfiles/elephant_seg2.jpg
测试视频
python eval.py --trained_model=weights/yolact_plus_resnet50_54_800000.pth --score_threshold=0.15 --top_k=15 --video_multiframe=4 --video=testfiles/drive.mp4:testfiles/drive1.mp4
边栏推荐
- Comparison between relational database and document database
- 【无标题】
- Lenovo hybrid cloud Lenovo xcloud, new enterprise IT service portal
- pytorch详解
- Shanghai Yuge ASR CAT1 4G module 2-way low power 4G application
- [CAD drawing Video] AutoCAD 2014 master's way
- mac下安装多个版本php并且进行管理
- Valueerror: iterative over raw text documents expected, string object received
- Sklearn Feature Engineering (summary)
- numpy. reshape, numpy. Understanding of transfer
猜你喜欢

Data middle office: six questions data middle office

ES9023音频解码芯片的工作原理

容量调度绝对值配置队列使用与避坑

6. graduation design temperature and humidity monitoring system (esp8266 + DHT11 +oled real-time upload temperature and humidity data to the public network server and display the real-time temperature

Common basic functions of Oracle

Example of MVVM framework based on kotlin+jetpack

The windows environment redis uses AOF persistence and cannot generate an AOF file. After generation, the content of the AOF file cannot be loaded

Yygh-8-appointment registration

基于Kotlin+JetPack实现的MVVM框架的示例

JSP
随机推荐
bash install. SH ******** error
V4L2 驱动层分析
idea根据数据库表生成实体类
Lenovo hybrid cloud Lenovo xcloud, new enterprise IT service portal
若依实现下拉框
原动力×云原生正发声 降本增效大讲堂
Object object to list collection
Apple MDM Bypass 免越狱绕过MDM配置锁 免费
How to add live chat in your Shopify store?
qtcanpool 知 07:Ribbon
密码学笔记
Academic search related papers
Filecoin黑客松开发者大赛
Qtcanpool knowledge 07:ribbon
Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
Video tutorial on website operation to achieve SEO operation [21 lectures]
YYGH-BUG-03
慢内容广告:品牌增长的长线主义
Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance
深度學習19種損失函數