Mask RCNN 显微镜下细胞检测示例测试

参考链接:

https://blog.csdn.net/l297969586/article/details/79140840/

https://cloud.tencent.com/developer/news/189753

1、首先参考细胞检测对应链接:https://github.com/matterport/Mask_RCNN/tree/master/samples/nucleus

2、在path目录下新建文件夹cell,在cell目录下新建文件夹weights

3、下载数据集

官方下载地址:https://www.kaggle.com/c/data-science-bowl-2018/data

百度网盘地址:https://pan.baidu.com/s/1KaLW7wfGw6Q7Q47N4zCbgw

下载后将所有文件解压放在cell文件夹下,里面的CSV文件可以全部删除

4、修改参数:

#每次迭代GPU上训练的图片数量,可以根据自己显存大小来设置,一般1个大点的GPU设置2个就可以了,如果配置差点就设置为1吧,不然按照默认的6会出内存溢出的错误

IMAGES_PER_GPU = 2

5、开始训练及测试

方式1:使用train数据集(stage1_train减去验证集)从ImageNet权重开始训练新模型

添加命令行参数:

train --dataset=../../path/cell-- subset=train --weights=imagenet

方式2:使用完整stage1_train数据集从特定权重文件开始训练新模型

该方式是使用之前没训练完的权重文件

复制/home/ubuntu/.keras/models/resnet50_weights_tf_dim_ordering_tf_kernels_notop.h5

到目录/path/cell/weights下,并修改resnet50_weights_tf_dim_ordering_tf_kernels_notop.h5为weights.h5

添加命令行参数:

train --dataset=../../path/cell --subset=stage1_train --weights="../../path/cell/weights/weights.h5"

方式3:继续训练您之前训练过的模型

添加命令行参数:

train --dataset=../../path/cell --subset=train --weights=last

6、开始测试

添加命令行参数:

detect --dataset=../../path/cell --subset=stage1_test --weights=last

7、贴几张最后检测的结果图

猜你喜欢

转载自blog.csdn.net/oMoDao1/article/details/83584805