2023-2-7-openMMLab AI实战营 笔记(五)

MMDetection 项目概况

mmdetection工具包

MMDetection 运行环境搭建(基于OpenBayes计算平台))

openbayes计算平台的介绍:

新建容器

  1. 基本信息:

  1. 数据绑定:

使用MMDetection 进行模型推理

# Author:yujunyu
# -*- codeing = utf-8 -*-
# @Time :2023/2/8 17:38
# @Author :yujunyu
# @Site :
# @File :test2.py
# @software: PyCharm

from mmdet.apis import init_detector, inference_detector, show_result_pyplot

config_file = 'mask_rcnn_r50_fpn_2x_coco.py'
checkpoints_file = 'mask_rcnn_r50_fpn_2x_coco_bbox_mAP-0.392__segm_mAP-0.354_20200505_003907-3e542a40.pth'

model = init_detector(config_file, checkpoints_file, device='cuda:0')

result = inference_detector(model, 'mmdet_demo.jpg')

show_result_pyplot(model, 'mmdet_demo.jpg', result)

介绍mmdetection中的一些概念

使用MMDetection 训练模型,检测图像中水果

猜你喜欢

转载自blog.csdn.net/weixin_59605625/article/details/128937733