【语义分割】——FCN测试

项目: 采用mmsegmentation

下载预训练的模型: from fcn

硬件条件

  • 1070单卡(8GB)
  • cuda10.1,cudnn7.6.3

1. 测试

配置好相关的环境后,采用官方的测试demo脚本。get_start

from mmseg.apis import inference_segmentor, init_segmentor
import mmcv

config_file = 'configs/pspnet/pspnet_r50-d8_512x1024_40k_cityscapes.py'
checkpoint_file = 'checkpoints/pspnet_r50-d8_512x1024_40k_cityscapes_20200605_003338-2966598c.pth'

# build the model from a config file and a checkpoint file
model = init_segmentor(config_file, checkpoint_file, device='cuda:0')

# test a single image and show the results
img = 'test.jpg'  # or img = mmcv.imread(img), which will only load it once
result = inference_segmentor(model, img)
# visualize the results in a new window
model.show_result(img, result, show=True)
# or save the visualization results to image files
model.show_result(img, result, out_file='result.jpg')

# test a video and show the results
video = mmcv.VideoReader('video.mp4')
for frame in video:
    result = inference_segmentor(model, frame)
    model.show_result(frame, result, wait_time=1)

2. 速度/可视化结果

Cityscapes

MethodBackbonetotal_itersCrop SizeInf time (fps)
FCNR-50-D840k512×10241.431

在这里插入图片描述

ADE20K

MethodBackbonetotal_itersCrop SizeInf time (fps)
FCNR-50-D880k512×5124.371

在这里插入图片描述

Pascal VOC 2012 + Aug

MethodBackbonetotal_itersCrop SizeInf time (fps)
FCNR-50-D820k512×5125.214

在这里插入图片描述

总结

  • 同样的模型,对比来说,使用最后一个数据集训练的效果是最好的。分割效果+干扰。

other

  • 原理+训练
  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值