---
# System prepended metadata

title: 專題報告

---

# 專題報告
## DataBase:
* **資料夾:**
    每個資料夾都有一般的CT Dicom檔案
    * clinicalParameters : 應該是一些病人的資料，但要密碼需要跟對方詢問看看
    * ILD_DB_volumeROIs : volume labels. Different value stand for different symptom. Have 17 value.(healthy=1, emphysema=2, ground_glass=3, fibrosis=4...)
    * ILD_DB_txtROIs : Each folder contains DICOM images and a .txt file containing annotations.
    * ILD_DB_talismanTestSuite : A fixed validation suite, 
        1. healthy: 3011 
        2. emphysema: 407
        3. ground_glass: 2226
        4. fibrosis: 2962
        5. micronodules: 5988
    * ILD_DB_lungMasks : CT Dicom and Mask Dicom.
![](https://i.imgur.com/jsjM2Wv.jpg)
CT Dicom to JPG
![](https://i.imgur.com/k4Y1fej.jpg)
CT Masked Dicom to JPG

* **病人數量:**
    * 113個病人
    * 幾乎都有三十張左右的肺部切片 

## 影像前處理：
*    **GrayScale Thresholding :**
        *    利用cv2的Threshold_Binary，藉由調整threshold value來改善灰階影像的呈現

![](https://i.imgur.com/2BdgtjU.jpg)

![](https://i.imgur.com/GoHa0Kq.jpg)

![](https://i.imgur.com/R4ZqEcg.jpg)

### 圖一

![](https://i.imgur.com/iQd3qlT.jpg)

![](https://i.imgur.com/vdW8ULe.jpg)

![](https://i.imgur.com/FoR5Dfh.jpg)

### 圖二


*    **Edge detection :**
        * Canny edge detection:
            Canny edge 來畫出邊界(contour)，並把想要的邊界取出即可做出masked image
            ![](https://i.imgur.com/sNYWbY6.jpg)

            ![](https://i.imgur.com/8JNfvpr.jpg)
## DATA Description:
* 醫生的資料統整
* ![](https://i.imgur.com/Rztfsgd.png)
* Lin Doctor (ILD ' Normal lung CT Folder)
    * ILD
        * 067(1),120(2),163(3),192(4),195(5)
    * Normal
        * 006(11),011(12),016(13)
* Wu Doctor(test folder)
    * ILD
        * 196(6),023(7),076(8),034(9),197(10)
    * Normal
        * Normal_01(14),Normal_02(15)
* ILD(735),Normal(436)
## TRAIN MODEL
* 將資料依照訓練和測試的不同組合，分別做三次不同的訓練
* 為了評估模型預測準確率的範圍
## COMBINATION_ONE
### Train
<!-- * ![](https://i.imgur.com/8dyP2ow.jpg) -->
* ![](https://i.imgur.com/ETIdnfa.jpg)
* **accuracy:1.0**
### Test
<!-- * ![](https://i.imgur.com/XagCIhB.png) -->
* ![](https://i.imgur.com/bVuZf7i.jpg)
* **accuracy:0.85**
<!--     * 002_train.h5 -->
## -----------------------------------------------------------
## COMBINATION_TWO
### Train
<!-- * ![](https://i.imgur.com/aN35f6k.png) -->
<!-- * ![](https://i.imgur.com/spUaoeu.jpg) -->
* ![](https://i.imgur.com/lE5cn8d.jpg)
* **accuracy:1.0**
### Test
<!-- * ![](https://i.imgur.com/Tb2sIxq.jpg) -->
* ![](https://i.imgur.com/VH6V2bn.jpg)
* **accuracy:0.93**
<!--     * 005_train.h5 -->
## -----------------------------------------------------------
## COMBINATION_THREE
### Train
* ![](https://i.imgur.com/3sxXteA.jpg)
* **accuracy:0.806**
### Test
<!-- * ![](https://i.imgur.com/YZYo2Y7.jpg) -->
* ![](https://i.imgur.com/ohUkJnl.jpg)
* **accuracy:0.56**
<!--     * 014_train.h5 -->
## CAM output 
* 利用前面訓練好的模型，觀察模型在意的特徵
* 利用HEATMAP標示出來
* 圖片中顏色越明顯的代表模型覺得是重要的圖片特徵
### **With ILD**
* ![](https://i.imgur.com/HhZ76zZ.jpg)
<!-- * 1_19 -->
* ![](https://i.imgur.com/8HvlLCN.jpg)
<!-- * 5_23 -->
* ![](https://i.imgur.com/5xzgGXe.jpg)
<!-- * 7_23 -->
* ![](https://i.imgur.com/7rlRkdu.jpg)
<!-- * 9_23 -->
### **Without ILD**
* ![](https://i.imgur.com/BG5AQsX.jpg)
<!-- * 11_35 -->
* ![](https://i.imgur.com/IKO9yPl.jpg)
<!-- * 12_35 -->
* ![](https://i.imgur.com/Tnsc3Kh.jpg)
<!-- * 13_15 -->
* ![](https://i.imgur.com/nWgJqbr.jpg)
<!-- * 14_35 -->


