数据处理

我确实按照昨天想的把图片resize成了1000*1000大小 bounding box也重新计算了。
以下是修改以后的matlab代码。

%% ==================================================================%
%     OPEN AND VIEW PNG FORMAT DDSM IMAGES WITH THEIR ANNOTATIONS
%                        -ope---(MAIN FILE)----
% ===================================================================%
%           Author - Anmol Sharma (Undergraduate Engineering Student)
%      Affiliation - DAV Institute of Engineering & Technology
%      Supervisers - Dr. Jayasree Chakraborty* and Dr. Abhishek Midya#
%                    *Research Fellow, Memorial Sloan Kettering Cancer Center
%                    #Assistant Professor, NIT Silchar
%      Description - The code is used to view the PNG format DDSM images
%                    created using the openDDSMLJPEG1AndConvertToPNG.m
%                    script. This script opens the PNG file, and then also
%                    opens the corresponding OVERLAY file to get the boundary
%                    information of the mass present in that particular
%                    mammogram.
%          License - Copyright (C) 2015  Anmol Sharma
%
%                    This program is free software: you can redistribute it
%                    and/or modify it under the terms of the GNU General
%                    Public License as published by the Free Software
%                    Foundation, either version 2 of the License, or (at
%                    your option) any later version.
%
%                    This program is distributed in the hope that it will
%                    be useful, but WITHOUT ANY WARRANTY; without even the
%                    implied warranty of MERCHANTABILITY or FITNESS FOR A
%                    PARTICULAR PURPOSE.  See the GNU General Public License
%                    for more details.
%
%                    You should have received a copy of the GNU General
%                    Public License along with this programmax_y.  If not,
%                    see <http://www.gnu.org/licenses/>.
%===================================================================%
clear all
clc
%% SET THESE PATHS FIRST!
% Needed to load PNG files
directoryOfDDSMPNG = 'D:\cancers_jpg_test\';
directoryOfDDSMPNG_new = 'D:\cancers_jpg_test_new\';
disp(directoryOfDDSMPNG)
% Needed to load OVERLAY FIles
directoryOfDDSM = 'D:\OVERLAY_CC_test\';imageOutputFileFormat = '*.jpg'; % Notice the STAR dot. Can be *.tif, *.jpg...
filenames = dir(strcat([directoryOfDDSMPNG, imageOutputFileFormat]));disp(filenames)
for i = 1:length(filenames)disp( filenames(i).name((1:(length(filenames(i).name) - 5))))overlayName = strcat([directoryOfDDSM, filenames(i).name((1:(length(filenames(i).name) - 4))), '.OVERLAY']);jpgName_new = strcat([directoryOfDDSMPNG_new, filenames(i).name((1:(length(filenames(i).name) - 4))), '.jpg']);JPGName = strcat([filenames(i).name((1:(length(filenames(i).name) - 4))), '.jpg']);[num]=count_overlay(overlayName)for j = 1:num[bnd_c,bnd_r] = readBoundary(overlayName, j);%bnd_c²¡ÔîÇøÓòµÄËùÓкá×ø±ê£¬bnd_r²¡ÔîÇøÓòµÄËùÓÐÁÐ×ø±ê% disp(bnd_c)min_x=min(bnd_c)max_x=max(bnd_c)width=max_x-min_xmin_y=min(bnd_r)max_y=max(bnd_r)height=max_y-min_yleft_x=min_xleft_y=min_yimage = imread(strcat(directoryOfDDSMPNG, filenames(i).name));[heightOfImage, widthOfImage] = size(image);     B = imresize(image,[1000 1000])[heightOfImage1, widthOfImage1] = size(B)% temp_mask = poly2mask(bnd_c,bnd_r, 1000,1000);imshow(B,[])% PATH=imwrite(B,jpgName_new)hold onscale_w=1000/widthOfImagescale_y=1000/heightOfImageA = [left_x*scale_w,left_y*scale_y,width*scale_w,height*scale_y]write(JPGName,A)%       rectangle('Position',A) rectangle('Position',A,'EdgeColor','r')plot(bnd_c*scale_w, bnd_r*scale_y, '-r'); pause;close all;endend

我真的很想哭,看到结果和昨天一样,我真的想打人了。我又不知道能和谁去讨论,只能自己在这里写。

  • 一共929张图片。这里只是跑了单类别,但是肺炎的程序是用(正常,病灶)两个类别。

我不知道我到底哪里出了问题
1.数据量少?
2.数据问题?—解决办法:

再用retinaNet 跑一遍肺炎的数据集

  • 把rsna-肺炎的代码再跑一遍

之后就报错,这个错误我在以前遇到过,应该是版本问题不匹配,后来我也忘了怎么解决的了,不过我现在想要用我的代码跑一遍肺炎的数据集。
实验室要关门了。。。
如果这个结果可以跑通就证明我的代码没有问题,还是数据的问题!!!
如果这个跑不通,就证明我的代码有问题!!

下面的这个bug是用原来的author的codes work的,可能是因为version的问题,不过后来我似乎solve了。。。我实在想不起来我怎么做到的了,,好像以前的blog中record了。。


Traceback (most recent call last):

File “train.py”, line 511, in

main()

File “train.py”, line 496, in main

callbacks=callbacks,

File “/home/ld/anaconda3/lib/python3.6/site-packages/keras/legacy/interfaces.py”, line 91, in wrapper

return func(*args, **kwargs)

File “/home/ld/anaconda3/lib/python3.6/site-packages/keras/engine/training.py”, line 1418, in fit_generator

initial_epoch=initial_epoch)

File “/home/ld/anaconda3/lib/python3.6/site-packages/keras/engine/training_generator.py”, line 251, in fit_generator

callbacks.on_epoch_end(epoch, epoch_logs)

File “/home/ld/anaconda3/lib/python3.6/site-packages/keras/callbacks.py”, line 79, in on_epoch_end

callback.on_epoch_end(epoch, logs)

File “keras-retinanet/keras_retinanet/callbacks/common.py”, line 31, in on_epoch_end

self.callback.on_epoch_end(epoch, logs=logs)

File “keras-retinanet/keras_retinanet/callbacks/eval_rsna.py”, line 72, in on_epoch_end

self.model,

File “keras-retinanet/keras_retinanet/utils/eval_rsna.py”, line 360, in evaluate

annotations          = all_annotations[i][label]

IndexError: index 0 is out of bounds for axis 0 with size 0


好难过真的心都碎了真的

觉得自己一个人一直扛着所有的事情,就连心里想说的,也不可以和bf说,似乎我们不是一个世界,我也不想过多打扰他的世界,他的世界太过于简单。
我只能沉迷于代码中,其实?
也算是好事吧,否则我一天胡思乱想的,抗住这个压力还蛮好的,我说实话还蛮享受现在的日子的。

回去就想睡觉,看一会《how to change your mind》然后明天又是活力满满的一天~~~~

加油

RetinaNet模型在DDSM数据集的应用问题(3)相关推荐

  1. RetinaNet模型在DDSM数据集的应用问题(2)

    今日的工作内容 专注学习,早日对抗抑郁症! github的使用 研究图片的底层,LJPEG是否可以送入RetinaNet读数据–可能不可以 github 1.我准备把每天的进展和代码(retinaNe ...

  2. DL之MaskR-CNN:基于类MaskR-CNN算法(RetinaNet+mask head)利用数据集(resnet50_coco_v0.2.0.h5)实现目标检测和目标图像分割(语义分割)

    DL之MaskR-CNN:基于类MaskR-CNN算法(RetinaNet+mask head)利用数据集(resnet50_coco_v0.2.0.h5)实现目标检测和目标图像分割(语义分割) 目录 ...

  3. python计算多个模型在不同数据集上的预测概率、获取每个数据集上的最优模型、多个最优模型的ROC曲线进行对比分析

    pytyon计算多个模型在不同数据集上的预测概率.获取每个数据集上的最佳模型.多个最优模型的ROC曲线进行对比分析 目录

  4. ML之LiR2PolyR4PolyR:使用线性回归LiR、二次多项式回归2PolyR、四次多项式回归4PolyR模型在披萨数据集上拟合(train)、价格回归预测(test)

    ML之LiR&2PolyR&4PolyR:使用线性回归LiR.二次多项式回归2PolyR.四次多项式回归4PolyR模型在披萨数据集上拟合(train).价格回归预测(test) 目录 ...

  5. ML之LiR2PolyR:使用线性回归LiR、二次多项式回归2PolyR模型在披萨数据集上拟合(train)、价格回归预测(test)

    ML之LiR&2PolyR:使用线性回归LiR.二次多项式回归2PolyR模型在披萨数据集上拟合(train).价格回归预测(test) 目录 输出结果 设计思路 核心代码 输出结果 设计思路 ...

  6. ML之LiR:使用线性回归LiR回归模型在披萨数据集上拟合(train)、价格回归预测(test)

    ML之LiR:使用线性回归LiR回归模型在披萨数据集上拟合(train).价格回归预测(test) 目录 输出结果 设计思路 核心代码 输出结果 设计思路 核心代码 r= LinearRegressi ...

  7. DL之CycleGAN:基于TF利用CycleGAN模型对apple2orange数据集实现图像转换—训练测试过程全记录

    DL之CycleGAN:基于TF利用CycleGAN模型对apple2orange数据集实现图像转换-训练&测试过程全记录 目录 apple2orange数据集 输出结果 训练&测试过 ...

  8. DL之pix2pix:基于TF利用pix2pix模型对food_resized数据集实现Auto Color自动上色技术—训练测试过程全记录

    DL之pix2pix:基于TF利用pix2pix模型对food_resized数据集实现Auto Color自动上色技术 目录 训练 food_resized数据集展示 TB过程监控 1.SCALAR ...

  9. 【Pytorch神经网络实战案例】40 TextCNN模型分析IMDB数据集评论的积极与消极

    卷积神经网络不仅在图像视觉领域有很好的效果,而且在基于文本的NLP领域也有很好的效果.TextCN如模型是卷积神经网络用于文本处理方面的一个模型. 在TextCNN模型中,通过多分支卷积技术实现对文本 ...

最新文章

  1. java new newinstance_Java中newInstance()和new()区别
  2. TCP滑动窗口(发送窗口和接受窗口)
  3. PicCompress一个精简的图片压缩工具
  4. C++STL之vector的说明及使用
  5. 杭电1241java实现dfs
  6. MySQL Range Optimization
  7. redis常用命令(高级篇)
  8. hiveserver2启动不起来_汽车一键启动除了点火,还有这些功能!车主:现在才明白...
  9. 腾讯起诉西瓜视频直播《王者荣耀》;人人车否认破产;苹果人事大变动! | 极客头条...
  10. jeecms升级shiro漏洞报错处理
  11. Facade(装饰模式)
  12. 提问的智慧(转自github)
  13. PLSQL使用SYSTEM用户连接报错:ORA-01031: insufficient privileges
  14. 尔雅 科学通史(吴国盛) 个人笔记及课后习题 2018 第三章 中古时代的欧洲和阿拉伯
  15. 跨境B2B电商市场血雨腥风,供应链管理系统成争夺焦点
  16. QQ号大规模被盗与你我有什么关系?你我该如何做?
  17. 流媒体协议:互联网视频分发协议介绍(渐进式、HLS、DASH、HDS、RTMP协议)
  18. oracle报错imp报错00008,Oracle imp导入数据时报IMP-00032与IMP-00008的解决方法
  19. TW6869 drivers porting for freescaleandroid
  20. 苹果未能安装macos_苹果在过去十年中未能达到人体工程学

热门文章

  1. 电脑如何分区重装系统
  2. 游戏模型师是做什么的?薪资高不高?
  3. Android 工具类
  4. 矢志不渝,人生会慢慢露出轮廓。
  5. 【直播教程】直播间没人看?5大技巧教你提升!
  6. 阿里118道面试题合集(送答案):天猫+蚂蚁金服+阿里巴巴
  7. 支付宝支付--手机支付
  8. Bagging和Boosting(偏差与方差)
  9. 人工智能领域排名|按AI顶会评实力:美国7倍领先中国,谷歌雄霸全球第一,腾讯和清华分获中国产学No.1...
  10. 黑苹果简单的手动开启显示器HiDPI教程