赞
踩
作品设计背景:
2021年印发的《儿童青少年脊柱弯曲异常防控技术指南》,将青少年的脊柱弯曲情况纳入体检内容。2022年6月,关于脊柱侧弯情况纳入中小学生体检内容的新闻报道上了热搜。可见,脊柱疾病问题已成为人们关注的热点疾病之一。随着现代生活水平的提高以及电脑和手机的大量普及使用,在我国脊柱相关疾病的发病率也越来越高。脊柱疾病主要包括颈椎病、脊柱畸形、脊柱退行性疾病、腰椎间盘突出、脊柱肿瘤等,其中脊柱退行性疾病已成为中老年患者的常见病、多发病 。当前医生主要是根据临床症状和医学图像,包括CT图像、MRI图像以及X光图像等进行脊柱疾病的诊断。医生在诊断的过程中难免掺杂个人主观因素,对医学图像的标注也需要耗费较长时间,并且易由于疲劳而导致医生可能出现漏诊或误诊的风险。
本作品立足脊柱外科医生的日常诊断工作,应桂林市人民医院脊柱骨病科医生的委托开发完成的。作品基于百度飞桨深度学习平台,将PP-YOLOv2模型进行迁移学习应用于脊柱疾病患者的MRI图像数据集,并基于训练好的模型开发出可视化且可解释的端到端的辅助脊柱疾病诊断界面,使脊柱外科医生能够简单操作使用的同时,体验到人工智能技术的“神奇”,帮助项目在医院的落地应用。
作品效果图(分别是单机版,Web端和手机APP)如下:
脊柱外科医生真实使用辅助诊断软件:
最新的PaddleDetection包我已经放在了/home/aistudio/data/data98540/PaddleDetection-release-2.1.zip,解压后,安装相关的模块即可
!unzip -oq /home/aistudio/data/data98540/PaddleDetection-release-2.1.zip
!pip install -r /home/aistudio/PaddleDetection-release-2.1/requirements.txt
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Requirement already satisfied: tqdm in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from -r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 1)) (4.36.1) Requirement already satisfied: typeguard in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from -r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 2)) (2.13.3) Requirement already satisfied: visualdl>=2.1.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from -r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (2.2.0) Requirement already satisfied: opencv-python in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from -r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 4)) (4.1.1.26) Requirement already satisfied: PyYAML in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from -r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 5)) (5.1.2) Requirement already satisfied: shapely in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from -r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 6)) (1.8.4) Requirement already satisfied: scipy in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from -r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 7)) (1.6.3) Requirement already satisfied: terminaltables in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from -r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 8)) (3.1.10) Requirement already satisfied: Cython in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from -r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 9)) (0.29) Requirement already satisfied: pycocotools in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from -r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 10)) (2.0.4) Requirement already satisfied: setuptools>=42.0.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from -r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 12)) (56.2.0) Requirement already satisfied: lap in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from -r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 13)) (0.4.0) Requirement already satisfied: sklearn in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from -r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 14)) (0.0) Requirement already satisfied: motmetrics in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from -r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 15)) (1.2.5) Requirement already satisfied: openpyxl in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from -r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 16)) (3.0.5) Requirement already satisfied: pre-commit in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (1.21.0) Requirement already satisfied: bce-python-sdk in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (0.8.53) Requirement already satisfied: shellcheck-py in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (0.7.1.1) Requirement already satisfied: Flask-Babel>=1.0.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (1.0.0) Requirement already satisfied: requests in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (2.22.0) Requirement already satisfied: matplotlib in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (2.2.3) Requirement already satisfied: pandas in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (1.1.5) Requirement already satisfied: Pillow>=7.0.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (7.1.2) Requirement already satisfied: flask>=1.1.1 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (1.1.1) Requirement already satisfied: six>=1.14.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (1.16.0) Requirement already satisfied: numpy in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (1.20.3) Requirement already satisfied: flake8>=3.7.9 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (4.0.1) Requirement already satisfied: protobuf>=3.11.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (3.20.1) Requirement already satisfied: scikit-learn in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from sklearn->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 14)) (0.24.2) Requirement already satisfied: xmltodict>=0.12.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from motmetrics->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 15)) (0.13.0) Requirement already satisfied: jdcal in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from openpyxl->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 16)) (1.4.1) Requirement already satisfied: et-xmlfile in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from openpyxl->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 16)) (1.0.1) Requirement already satisfied: pyflakes<2.5.0,>=2.4.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from flake8>=3.7.9->visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (2.4.0) Requirement already satisfied: pycodestyle<2.9.0,>=2.8.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from flake8>=3.7.9->visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (2.8.0) Requirement already satisfied: mccabe<0.7.0,>=0.6.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from flake8>=3.7.9->visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (0.6.1) Requirement already satisfied: importlib-metadata<4.3 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from flake8>=3.7.9->visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (4.2.0) Requirement already satisfied: itsdangerous>=0.24 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from flask>=1.1.1->visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (1.1.0) Requirement already satisfied: click>=5.1 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from flask>=1.1.1->visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (7.0) Requirement already satisfied: Jinja2>=2.10.1 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from flask>=1.1.1->visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (3.0.0) Requirement already satisfied: Werkzeug>=0.15 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from flask>=1.1.1->visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (0.16.0) Requirement already satisfied: Babel>=2.3 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from Flask-Babel>=1.0.0->visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (2.8.0) Requirement already satisfied: pytz in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from Flask-Babel>=1.0.0->visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (2019.3) Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from matplotlib->visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (3.0.9) Requirement already satisfied: kiwisolver>=1.0.1 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from matplotlib->visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (1.1.0) Requirement already satisfied: python-dateutil>=2.1 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from matplotlib->visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (2.8.2) Requirement already satisfied: cycler>=0.10 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from matplotlib->visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (0.10.0) Requirement already satisfied: pycryptodome>=3.8.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from bce-python-sdk->visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (3.9.9) Requirement already satisfied: future>=0.6.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from bce-python-sdk->visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (0.18.0) Requirement already satisfied: virtualenv>=15.2 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from pre-commit->visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (16.7.9) Requirement already satisfied: toml in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from pre-commit->visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (0.10.0) Requirement already satisfied: aspy.yaml in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from pre-commit->visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (1.3.0) Requirement already satisfied: cfgv>=2.0.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from pre-commit->visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (2.0.1) Requirement already satisfied: identify>=1.0.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from pre-commit->visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (1.4.10) Requirement already satisfied: nodeenv>=0.11.1 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from pre-commit->visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (1.3.4) Requirement already satisfied: certifi>=2017.4.17 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from requests->visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (2019.9.11) Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from requests->visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (1.25.6) Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from requests->visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (3.0.4) Requirement already satisfied: idna<2.9,>=2.5 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from requests->visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (2.8) Requirement already satisfied: threadpoolctl>=2.0.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from scikit-learn->sklearn->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 14)) (2.1.0) Requirement already satisfied: joblib>=0.11 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from scikit-learn->sklearn->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 14)) (0.14.1) Requirement already satisfied: zipp>=0.5 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from importlib-metadata<4.3->flake8>=3.7.9->visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (3.8.1) Requirement already satisfied: typing-extensions>=3.6.4 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from importlib-metadata<4.3->flake8>=3.7.9->visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (4.3.0) Requirement already satisfied: MarkupSafe>=2.0.0rc2 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from Jinja2>=2.10.1->flask>=1.1.1->visualdl>=2.1.0->-r /home/aistudio/PaddleDetection-release-2.1/requirements.txt (line 3)) (2.0.1)
ratio比例系数
import random import os #生成train.txt和val.txt random.seed(2020) xml_dir = '/home/aistudio/Annotations'#标签文件地址 img_dir = '/home/aistudio/images'#图像文件地址 path_list = list() for img in os.listdir(img_dir): img_path = os.path.join(img_dir,img) xml_path = os.path.join(xml_dir,img.replace('JPG', 'xml').replace('jpg', 'xml')) path_list.append((img_path, xml_path)) random.shuffle(path_list) ratio = 0.9 train_f = open('/home/aistudio/work/train.txt','w') #生成训练文件 val_f = open('/home/aistudio/work/val.txt' ,'w')#生成验证文件 for i ,content in enumerate(path_list): img, xml = content text = img + ' ' + xml + '\n' if i < len(path_list) * ratio: train_f.write(text) else: val_f.write(text) train_f.close() val_f.close() #生成标签文档 label = ['Normal','Spondylisthesis','IVD bulges']#设置你想检测的类别 with open('/home/aistudio/work/label_list.txt', 'w') as f: for text in label: f.write(text+'\n')
此次使用的是 PaddleDetection-release-2.1/configs/ppyolo/ppyolov2_r50vd_dcn_voc.yml 文件,并开启vdl
如果只是想体验项目,可以直接跳到预测步骤,不执行训练,模型权重保存在PaddleDetection-release-2.1/output/ppyolov2_r50vd_dcn_voc/best_model.pdparams
只需要修改对应的红色部分
PaddleDetection-release-2.1/configs/datasets/voc.yml
如果爆内存就修改这两个文件的batch_size:
PaddleDetection-release-2.1/configs/ppyolo/base/ppyolov2_reader.yml
PaddleDetection-release-2.1/configs/ppyolo/ppyolov2_r50vd_dcn_voc.yml
%cd ~/PaddleDetection-release-2.1/
!python tools/train.py -c configs/ppyolo/ppyolov2_r50vd_dcn_voc.yml --eval --use_vdl=True --vdl_log_dir="./output"
/home/aistudio/PaddleDetection-release-2.1
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/tensor/creation.py:125: DeprecationWarning: `np.object` is a deprecated alias for the builtin `object`. To silence this warning, use `object` by itself. Doing this will not modify any behavior and is safe.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
if data.dtype == np.object:
W0831 14:32:21.507980 981 device_context.cc:404] Please NOTE: device: 0, GPU Compute Capability: 7.0, Driver API Version: 11.2, Runtime API Version: 10.1
W0831 14:32:21.512575 981 device_context.cc:422] device: 0, cuDNN Version: 7.6.
[08/31 14:32:24] ppdet.utils.checkpoint INFO: Finish loading model weights: /home/aistudio/PaddleDetection-release-2.1/output/ppyolov2_r50vd_dcn_voc/829.pdparams
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/tensor/creation.py:125: DeprecationWarning: `np.object` is a deprecated alias for the builtin `object`. To silence this warning, use `object` by itself. Doing this will not modify any behavior and is safe.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
if data.dtype == np.object:
[08/31 14:32:25] ppdet.engine INFO: Epoch: [0] [ 0/90] learning_rate: 0.000000 loss_xy: 2.666259 loss_wh: 1.638850 loss_iou: 8.968576 loss_iou_aware: 2.907263 loss_obj: 10.715614 loss_cls: 3.092380 loss: 29.988943 eta: 1 day, 4:43:17 batch_cost: 0.5744 data_cost: 0.0034 ips: 10.4452 images/s
%cd ~/PaddleDetection-release-2.1/
!python -u tools/eval.py -c configs/ppyolo/ppyolov2_r50vd_dcn_voc.yml -o weights=output/ppyolov2_r50vd_dcn_voc/746.pdparams
/home/aistudio/PaddleDetection-release-2.1
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/tensor/creation.py:125: DeprecationWarning: `np.object` is a deprecated alias for the builtin `object`. To silence this warning, use `object` by itself. Doing this will not modify any behavior and is safe.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
if data.dtype == np.object:
W0419 22:02:03.941251 1997 device_context.cc:404] Please NOTE: device: 0, GPU Compute Capability: 7.0, Driver API Version: 11.0, Runtime API Version: 10.1
W0419 22:02:03.945798 1997 device_context.cc:422] device: 0, cuDNN Version: 7.6.
[04/19 22:02:07] ppdet.utils.checkpoint INFO: Finish loading model weights: output/ppyolov2_r50vd_dcn_voc/746.pdparams
[04/19 22:02:07] ppdet.engine INFO: Eval iter: 0
[04/19 22:02:09] ppdet.metrics.metrics INFO: Accumulating evaluatation results...
[04/19 22:02:09] ppdet.metrics.metrics INFO: mAP(0.50, 11point) = 98.05%
[04/19 22:02:09] ppdet.engine INFO: Total sample number: 60, averge FPS: 26.92499838712076
打开可视化(现在可视化功能已下线,等恢复之后可执行这个步骤)
步骤:
打开左侧可视化
设置logdir : 路径选择PaddleDetection-release-2.1/output
选择模型文件:路径选择PaddleDetection-release-2.1/output/ppyolov2_r50vd_dcn_voc/best_model.pdparams
然后按下面的打开VisualDL
即可看到如图
这是我训练了100epochs的结果,如果接下去训练mAP应该会更高。
还有下图的参数记录
在执行tools/infer.py后,在output文件夹下会生成对应的预测结果
%cd ~/PaddleDetection-release-2.1/
cd ~/PaddleDetection-release-2.1/
!python tools/infer.py -c configs/ppyolo/ppyolov2_r50vd_dcn_voc.yml -o weights=output/ppyolov2_r50vd_dcn_voc/best_model.pdparams --infer_img=/home/aistudio/smoke1.png
/home/aistudio/PaddleDetection-release-2.1
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/matplotlib/__init__.py:107: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
from collections import MutableMapping
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/matplotlib/rcsetup.py:20: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
from collections import Iterable, Mapping
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/matplotlib/colors.py:53: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
from collections import Sized
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/tensor/creation.py:125: DeprecationWarning: `np.object` is a deprecated alias for the builtin `object`. To silence this warning, use `object` by itself. Doing this will not modify any behavior and is safe.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
if data.dtype == np.object:
W0707 10:35:11.390235 1627 device_context.cc:404] Please NOTE: device: 0, GPU Compute Capability: 7.0, Driver API Version: 10.1, Runtime API Version: 10.1
W0707 10:35:11.394752 1627 device_context.cc:422] device: 0, cuDNN Version: 7.6.
[07/07 10:35:16] ppdet.utils.checkpoint INFO: Finish loading model weights: output/ppyolov2_r50vd_dcn_voc/best_model.pdparams
[07/07 10:35:17] ppdet.engine INFO: Detection bbox results save in output/smoke1.png
[1] Jamaludin A,Lootus M,Kadir T,etal.Automation of reading of radiological features from magnetic resonance images(MRIs) of the lumbar spine without human intervention is comparable with an expertradiologist[J].European Spine Journal,2017,26 (5):1374-1383.
[2] 武玉欣.基于深度学习的LDH自动诊断系统研究与开发[D].济南:山东大学,2021.
[3] 刘彤彤,杨环,西永明,等.机器学习在脊柱疾病智能诊治中的应用综述[J].计算机科学,2021,48(11):597-607.
[4] Xiang Long,Kaipeng Deng,Guanzhong Wang,etal.PP-YOLO:An effective and efficient implementation of object detector[J].arXiv preprint arXiv:2007.12099,2020.
[5] Xin Huang,Xinxin Wang,Wenyu Lv,etal.PP-YOLOv2:A practical object detector[J].arXiv preprint arXiv: 2104.10419, 2021.
[6] PaddelPaddle AI Studio.用PaddlePaddle实现卷积可视化方法Grad-CAM[EB/OL].https://aistudio.baidu.com/aistudio/projectdetail/243356.
[7] 毕然,孙高峰,周湘阳,刘威威.零基础实践深度学习[M].北京:清华大学出版社,2020.
[8] 刘祥龙,杨晴红,胡晓光,于佃海等.飞桨PaddlePaddle深度学习实战[M].北京:机械工业出版社,2020.
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。