commit 82acfa83dc887e0277e47d107583889b9c0e604e Author: whaifree Date: Sat Oct 5 12:58:08 2024 +0800 添加数据处理脚本和H5数据集类 - 新增dataprocessing.py脚本,实现图像数据处理功能,包括文件读取、格式转换、低对比度筛选等 - 新增H5Dataset类,用于加载和访问H5格式的图像数据集 - 在项目中配置远程服务器部署和代码自动上传 - 添加IDE配置文件,包括项目路径、模块管理、代码检查等设置 diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/CDDFuse.iml b/.idea/CDDFuse.iml new file mode 100644 index 0000000..925622b --- /dev/null +++ b/.idea/CDDFuse.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/deployment.xml b/.idea/deployment.xml new file mode 100644 index 0000000..a1c367f --- /dev/null +++ b/.idea/deployment.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..c96565b --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,264 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..21ebe7b --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,13 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..e20fca0 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/MSRS_train/readme.md b/MSRS_train/readme.md new file mode 100644 index 0000000..57e7f92 --- /dev/null +++ b/MSRS_train/readme.md @@ -0,0 +1 @@ +Download the MSRS dataset from [this link](https://github.com/Linfeng-Tang/MSRS) and place it here. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..3b5c964 --- /dev/null +++ b/README.md @@ -0,0 +1,186 @@ +# CDDFuse +Codes for ***CDDFuse: Correlation-Driven Dual-Branch Feature Decomposition for Multi-Modality Image Fusion. (CVPR 2023)*** + +[Zixiang Zhao](https://zhaozixiang1228.github.io/), [Haowen Bai](), [Jiangshe Zhang](http://gr.xjtu.edu.cn/web/jszhang), [Yulun Zhang](https://yulunzhang.com/), [Shuang Xu](https://shuangxu96.github.io/), [Zudi Lin](https://zudi-lin.github.io/), [Radu Timofte](https://www.informatik.uni-wuerzburg.de/computervision/home/) and [Luc Van Gool](https://vision.ee.ethz.ch/people-details.OTAyMzM=.TGlzdC8zMjQ4LC0xOTcxNDY1MTc4.html). + +-[*[Paper]*](https://openaccess.thecvf.com/content/CVPR2023/html/Zhao_CDDFuse_Correlation-Driven_Dual-Branch_Feature_Decomposition_for_Multi-Modality_Image_Fusion_CVPR_2023_paper.html) +-[*[ArXiv]*](https://arxiv.org/abs/2104.06977) +-[*[Supplementary Materials]*](https://openaccess.thecvf.com/content/CVPR2023/supplemental/Zhao_CDDFuse_Correlation-Driven_Dual-Branch_CVPR_2023_supplemental.pdf) + + +## Update +- [2023/6] Training codes and config files are public available. +- [2023/4] Release inference code for infrared-visible image fusion and medical image fusion. + + +## Citation + +``` +@InProceedings{Zhao_2023_CVPR, + author = {Zhao, Zixiang and Bai, Haowen and Zhang, Jiangshe and Zhang, Yulun and Xu, Shuang and Lin, Zudi and Timofte, Radu and Van Gool, Luc}, + title = {CDDFuse: Correlation-Driven Dual-Branch Feature Decomposition for Multi-Modality Image Fusion}, + booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)}, + month = {June}, + year = {2023}, + pages = {5906-5916} +} +``` + +## Abstract + +Multi-modality (MM) image fusion aims to render fused images that maintain the merits of different modalities, e.g., functional highlight and detailed textures. To tackle the challenge in modeling cross-modality features and decomposing desirable modality-specific and modality-shared features, we propose a novel Correlation-Driven feature Decomposition Fusion (CDDFuse) network. Firstly, CDDFuse uses Restormer blocks to extract cross-modality shallow features. We then introduce a dual-branch Transformer-CNN feature extractor with Lite Transformer (LT) blocks leveraging long-range attention to handle low-frequency global features and Invertible Neural Networks (INN) blocks focusing on extracting high-frequency local information. A correlation-driven loss is further proposed to make the low-frequency features correlated while the high-frequency features uncorrelated based on the embedded information. Then, the LT-based global fusion and INN-based local fusion layers output the fused image. Extensive experiments demonstrate that our CDDFuse achieves promising results in multiple fusion tasks, including infrared-visible image fusion and medical image fusion. We also show that CDDFuse can boost the performance in downstream infrared-visible semantic segmentation and object detection in a unified benchmark. + +## 🌐 Usage + +### ⚙ Network Architecture + +Our CDDFuse is implemented in ``net.py``. + +### 🏊 Training +**1. Virtual Environment** +``` +# create virtual environment +conda create -n cddfuse python=3.8.10 +conda activate cddfuse +# select pytorch version yourself +# install cddfuse requirements +pip install -r requirements.txt +``` + +**2. Data Preparation** + +Download the MSRS dataset from [this link](https://github.com/Linfeng-Tang/MSRS) and place it in the folder ``'./MSRS_train/'``. + +**3. Pre-Processing** + +Run +``` +python dataprocessing.py +``` +and the processed training dataset is in ``'./data/MSRS_train_imgsize_128_stride_200.h5'``. + +**4. CDDFuse Training** + +Run +``` +python train.py +``` +and the trained model is available in ``'./models/'``. + +### 🏄 Testing + +**1. Pretrained models** + +Pretrained models are available in ``'./models/CDDFuse_IVF.pth'`` and ``'./models/CDDFuse_MIF.pth'``, which are responsible for the Infrared-Visible Fusion (IVF) and Medical Image Fusion (MIF) tasks, respectively. + +**2. Test datasets** + +The test datasets used in the paper have been stored in ``'./test_img/RoadScene'``, ``'./test_img/TNO'`` for IVF, ``'./test_img/MRI_CT'``, ``'./test_img/MRI_PET'`` and ``'./test_img/MRI_SPECT'`` for MIF. + +Unfortunately, since the size of **MSRS dataset** for IVF is 500+MB, we can not upload it for exhibition. It can be downloaded via [this link](https://github.com/Linfeng-Tang/MSRS). The other datasets contain all the test images. + +**3. Results in Our Paper** + +If you want to infer with our CDDFuse and obtain the fusion results in our paper, please run +``` +python test_IVF.py +``` +for Infrared-Visible Fusion and +``` +python test_MIF.py +``` +for Medical Image Fusion. + +The testing results will be printed in the terminal. + +The output for ``'test_IVF.py'`` is: + +``` +================================================================================ +The test result of TNO : + EN SD SF MI SCD VIF Qabf SSIM +CDDFuse 7.12 46.0 13.15 2.19 1.76 0.77 0.54 1.03 +================================================================================ + +================================================================================ +The test result of RoadScene : + EN SD SF MI SCD VIF Qabf SSIM +CDDFuse 7.44 54.67 16.36 2.3 1.81 0.69 0.52 0.98 +================================================================================ +``` +which can match the results in Table 1 in our original paper. + +The output for ``'test_MIF.py'`` is: + +``` +================================================================================ +The test result of MRI_CT : + EN SD SF MI SCD VIF Qabf SSIM +CDDFuse_IVF 4.83 88.59 33.83 2.24 1.74 0.5 0.59 1.31 +CDDFuse_MIF 4.88 79.17 38.14 2.61 1.41 0.61 0.68 1.34 +================================================================================ + +================================================================================ +The test result of MRI_PET : + EN SD SF MI SCD VIF Qabf SSIM +CDDFuse_IVF 4.23 81.69 28.04 1.87 1.82 0.66 0.65 1.46 +CDDFuse_MIF 4.22 70.74 29.57 2.03 1.69 0.71 0.71 1.49 +================================================================================ + +================================================================================ +The test result of MRI_SPECT : + EN SD SF MI SCD VIF Qabf SSIM +CDDFuse_IVF 3.91 71.81 20.66 1.9 1.87 0.65 0.68 1.45 +CDDFuse_MIF 3.9 58.31 20.87 2.49 1.35 0.97 0.78 1.48 +================================================================================ +``` +which can match the results in Table 5 in our original paper. + +## 🙌 CDDFuse + +### Illustration of our CDDFuse model. + + + +### Qualitative fusion results. + + + + + + + +### Quantitative fusion results. + +Infrared-Visible Image Fusion + + + +Medical Image Fusion + + + +MM detection + + + +MM segmentation + + + + +## 📖 Related Work + +- Zixiang Zhao, Haowen Bai, Jiangshe Zhang, Yulun Zhang, Kai Zhang, Shuang Xu, Dongdong Chen, Radu Timofte, Luc Van Gool. *Equivariant Multi-Modality Image Fusion.* **CVPR 2024**, https://arxiv.org/abs/2305.11443 + +- Zixiang Zhao, Haowen Bai, Yuanzhi Zhu, Jiangshe Zhang, Shuang Xu, Yulun Zhang, Kai Zhang, Deyu Meng, Radu Timofte, Luc Van Gool. +*DDFM: Denoising Diffusion Model for Multi-Modality Image Fusion.* **ICCV 2023 (Oral)**, https://arxiv.org/abs/2303.06840 + +- Zixiang Zhao, Shuang Xu, Chunxia Zhang, Junmin Liu, Jiangshe Zhang and Pengfei Li. *DIDFuse: Deep Image Decomposition for Infrared and Visible Image Fusion.* **IJCAI 2020**, https://www.ijcai.org/Proceedings/2020/135. + +- Zixiang Zhao, Shuang Xu, Jiangshe Zhang, Chengyang Liang, Chunxia Zhang and Junmin Liu. *Efficient and Model-Based Infrared and Visible Image Fusion via Algorithm Unrolling.* **IEEE Transactions on Circuits and Systems for Video Technology 2021**, https://ieeexplore.ieee.org/document/9416456. + +- Zixiang Zhao, Jiangshe Zhang, Haowen Bai, Yicheng Wang, Yukun Cui, Lilun Deng, Kai Sun, Chunxia Zhang, Junmin Liu, Shuang Xu. *Deep Convolutional Sparse Coding Networks for Interpretable Image Fusion.* **CVPR Workshop 2023**. https://robustart.github.io/long_paper/26.pdf. + +- Zixiang Zhao, Shuang Xu, Chunxia Zhang, Junmin Liu, Jiangshe Zhang. *Bayesian fusion for infrared and visible images.* **Signal Processing**, https://doi.org/10.1016/j.sigpro.2020.107734. + diff --git a/dataprocessing.py b/dataprocessing.py new file mode 100644 index 0000000..1b986f0 --- /dev/null +++ b/dataprocessing.py @@ -0,0 +1,93 @@ +import os +import h5py +import numpy as np +from tqdm import tqdm +from skimage.io import imread + + +def get_img_file(file_name): + imagelist = [] + for parent, dirnames, filenames in os.walk(file_name): + for filename in filenames: + if filename.lower().endswith(('.bmp', '.dib', '.png', '.jpg', '.jpeg', '.pbm', '.pgm', '.ppm', '.tif', '.tiff', '.npy')): + imagelist.append(os.path.join(parent, filename)) + return imagelist + +def rgb2y(img): + y = img[0:1, :, :] * 0.299000 + img[1:2, :, :] * 0.587000 + img[2:3, :, :] * 0.114000 + return y + +def Im2Patch(img, win, stride=1): + k = 0 + endc = img.shape[0] + endw = img.shape[1] + endh = img.shape[2] + patch = img[:, 0:endw-win+0+1:stride, 0:endh-win+0+1:stride] + TotalPatNum = patch.shape[1] * patch.shape[2] + Y = np.zeros([endc, win*win,TotalPatNum], np.float32) + for i in range(win): + for j in range(win): + patch = img[:,i:endw-win+i+1:stride,j:endh-win+j+1:stride] + Y[:,k,:] = np.array(patch[:]).reshape(endc, TotalPatNum) + k = k + 1 + return Y.reshape([endc, win, win, TotalPatNum]) + +def is_low_contrast(image, fraction_threshold=0.1, lower_percentile=10, + upper_percentile=90): + """Determine if an image is low contrast.""" + limits = np.percentile(image, [lower_percentile, upper_percentile]) + ratio = (limits[1] - limits[0]) / limits[1] + return ratio < fraction_threshold + +data_name="MSRS_train" +img_size=128 #patch size +stride=200 #patch stride + +IR_files = sorted(get_img_file(r"MSRS_train/ir")) +VIS_files = sorted(get_img_file(r"MSRS_train/vi")) + +assert len(IR_files) == len(VIS_files) +h5f = h5py.File(os.path.join('.\\data', + data_name+'_imgsize_'+str(img_size)+"_stride_"+str(stride)+'.h5'), + 'w') +h5_ir = h5f.create_group('ir_patchs') +h5_vis = h5f.create_group('vis_patchs') +train_num=0 +for i in tqdm(range(len(IR_files))): + I_VIS = imread(VIS_files[i]).astype(np.float32).transpose(2,0,1)/255. # [3, H, W] Uint8->float32 + I_VIS = rgb2y(I_VIS) # [1, H, W] Float32 + I_IR = imread(IR_files[i]).astype(np.float32)[None, :, :]/255. # [1, H, W] Float32 + + # crop + I_IR_Patch_Group = Im2Patch(I_IR,img_size,stride) + I_VIS_Patch_Group = Im2Patch(I_VIS, img_size, stride) # (3, 256, 256, 12) + + for ii in range(I_IR_Patch_Group.shape[-1]): + bad_IR = is_low_contrast(I_IR_Patch_Group[0,:,:,ii]) + bad_VIS = is_low_contrast(I_VIS_Patch_Group[0,:,:,ii]) + # Determine if the contrast is low + if not (bad_IR or bad_VIS): + avl_IR= I_IR_Patch_Group[0,:,:,ii] # available IR + avl_VIS= I_VIS_Patch_Group[0,:,:,ii] + avl_IR=avl_IR[None,...] + avl_VIS=avl_VIS[None,...] + + h5_ir.create_dataset(str(train_num), data=avl_IR, + dtype=avl_IR.dtype, shape=avl_IR.shape) + h5_vis.create_dataset(str(train_num), data=avl_VIS, + dtype=avl_VIS.dtype, shape=avl_VIS.shape) + train_num += 1 + +h5f.close() + +with h5py.File(os.path.join('data', + data_name+'_imgsize_'+str(img_size)+"_stride_"+str(stride)+'.h5'),"r") as f: + for key in f.keys(): + print(f[key], key, f[key].name) + + + + + + + diff --git a/image/IVF1.png b/image/IVF1.png new file mode 100644 index 0000000..8267a8a Binary files /dev/null and b/image/IVF1.png differ diff --git a/image/IVF2.png b/image/IVF2.png new file mode 100644 index 0000000..009643f Binary files /dev/null and b/image/IVF2.png differ diff --git a/image/MIF.png b/image/MIF.png new file mode 100644 index 0000000..38ccddb Binary files /dev/null and b/image/MIF.png differ diff --git a/image/MMDet.png b/image/MMDet.png new file mode 100644 index 0000000..66cd422 Binary files /dev/null and b/image/MMDet.png differ diff --git a/image/MMSeg.png b/image/MMSeg.png new file mode 100644 index 0000000..ae5af78 Binary files /dev/null and b/image/MMSeg.png differ diff --git a/image/Quantitative_IVF.png b/image/Quantitative_IVF.png new file mode 100644 index 0000000..c8bbe8c Binary files /dev/null and b/image/Quantitative_IVF.png differ diff --git a/image/Quantitative_MIF.png b/image/Quantitative_MIF.png new file mode 100644 index 0000000..1be0932 Binary files /dev/null and b/image/Quantitative_MIF.png differ diff --git a/image/Workflow.png b/image/Workflow.png new file mode 100644 index 0000000..dcd50c4 Binary files /dev/null and b/image/Workflow.png differ diff --git a/models/CDDFuse_IVF.pth b/models/CDDFuse_IVF.pth new file mode 100644 index 0000000..d279422 Binary files /dev/null and b/models/CDDFuse_IVF.pth differ diff --git a/models/CDDFuse_MIF.pth b/models/CDDFuse_MIF.pth new file mode 100644 index 0000000..072e39a Binary files /dev/null and b/models/CDDFuse_MIF.pth differ diff --git a/net.py b/net.py new file mode 100644 index 0000000..8353a2c --- /dev/null +++ b/net.py @@ -0,0 +1,403 @@ +import torch +import torch.nn as nn +import math +import torch.nn.functional as F +import torch.utils.checkpoint as checkpoint +from timm.models.layers import DropPath, to_2tuple, trunc_normal_ +from einops import rearrange + + +def drop_path(x, drop_prob: float = 0., training: bool = False): + """ + Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks). + This is the same as the DropConnect impl I created for EfficientNet, etc networks, however, + the original name is misleading as 'Drop Connect' is a different form of dropout in a separate paper... + See discussion: https://github.com/tensorflow/tpu/issues/494#issuecomment-532968956 ... I've opted for + changing the layer and argument names to 'drop path' rather than mix DropConnect as a layer name and use + 'survival rate' as the argument. + """ + if drop_prob == 0. or not training: + return x + keep_prob = 1 - drop_prob + # work with diff dim tensors, not just 2D ConvNets + shape = (x.shape[0],) + (1,) * (x.ndim - 1) + random_tensor = keep_prob + \ + torch.rand(shape, dtype=x.dtype, device=x.device) + random_tensor.floor_() # binarize + output = x.div(keep_prob) * random_tensor + return output + +class DropPath(nn.Module): + """ + Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks). + """ + + def __init__(self, drop_prob=None): + super(DropPath, self).__init__() + self.drop_prob = drop_prob + + def forward(self, x): + return drop_path(x, self.drop_prob, self.training) + + +class AttentionBase(nn.Module): + def __init__(self, + dim, + num_heads=8, + qkv_bias=False,): + super(AttentionBase, self).__init__() + self.num_heads = num_heads + head_dim = dim // num_heads + self.scale = nn.Parameter(torch.ones(num_heads, 1, 1)) + self.qkv1 = nn.Conv2d(dim, dim*3, kernel_size=1, bias=qkv_bias) + self.qkv2 = nn.Conv2d(dim*3, dim*3, kernel_size=3, padding=1, bias=qkv_bias) + self.proj = nn.Conv2d(dim, dim, kernel_size=1, bias=qkv_bias) + + def forward(self, x): + # [batch_size, num_patches + 1, total_embed_dim] + b, c, h, w = x.shape + qkv = self.qkv2(self.qkv1(x)) + q, k, v = qkv.chunk(3, dim=1) + q = rearrange(q, 'b (head c) h w -> b head c (h w)', + head=self.num_heads) + k = rearrange(k, 'b (head c) h w -> b head c (h w)', + head=self.num_heads) + v = rearrange(v, 'b (head c) h w -> b head c (h w)', + head=self.num_heads) + q = torch.nn.functional.normalize(q, dim=-1) + k = torch.nn.functional.normalize(k, dim=-1) + # transpose: -> [batch_size, num_heads, embed_dim_per_head, num_patches + 1] + # @: multiply -> [batch_size, num_heads, num_patches + 1, num_patches + 1] + attn = (q @ k.transpose(-2, -1)) * self.scale + attn = attn.softmax(dim=-1) + + out = (attn @ v) + + out = rearrange(out, 'b head c (h w) -> b (head c) h w', + head=self.num_heads, h=h, w=w) + + out = self.proj(out) + return out + +class Mlp(nn.Module): + """ + MLP as used in Vision Transformer, MLP-Mixer and related networks + """ + def __init__(self, + in_features, + hidden_features=None, + ffn_expansion_factor = 2, + bias = False): + super().__init__() + hidden_features = int(in_features*ffn_expansion_factor) + + self.project_in = nn.Conv2d( + in_features, hidden_features*2, kernel_size=1, bias=bias) + + self.dwconv = nn.Conv2d(hidden_features*2, hidden_features*2, kernel_size=3, + stride=1, padding=1, groups=hidden_features, bias=bias) + + self.project_out = nn.Conv2d( + hidden_features, in_features, kernel_size=1, bias=bias) + def forward(self, x): + x = self.project_in(x) + x1, x2 = self.dwconv(x).chunk(2, dim=1) + x = F.gelu(x1) * x2 + x = self.project_out(x) + return x + +class BaseFeatureExtraction(nn.Module): + def __init__(self, + dim, + num_heads, + ffn_expansion_factor=1., + qkv_bias=False,): + super(BaseFeatureExtraction, self).__init__() + self.norm1 = LayerNorm(dim, 'WithBias') + self.attn = AttentionBase(dim, num_heads=num_heads, qkv_bias=qkv_bias,) + self.norm2 = LayerNorm(dim, 'WithBias') + self.mlp = Mlp(in_features=dim, + ffn_expansion_factor=ffn_expansion_factor,) + def forward(self, x): + x = x + self.attn(self.norm1(x)) + x = x + self.mlp(self.norm2(x)) + return x + + +class InvertedResidualBlock(nn.Module): + def __init__(self, inp, oup, expand_ratio): + super(InvertedResidualBlock, self).__init__() + hidden_dim = int(inp * expand_ratio) + self.bottleneckBlock = nn.Sequential( + # pw + nn.Conv2d(inp, hidden_dim, 1, bias=False), + # nn.BatchNorm2d(hidden_dim), + nn.ReLU6(inplace=True), + # dw + nn.ReflectionPad2d(1), + nn.Conv2d(hidden_dim, hidden_dim, 3, groups=hidden_dim, bias=False), + # nn.BatchNorm2d(hidden_dim), + nn.ReLU6(inplace=True), + # pw-linear + nn.Conv2d(hidden_dim, oup, 1, bias=False), + # nn.BatchNorm2d(oup), + ) + def forward(self, x): + return self.bottleneckBlock(x) + +class DetailNode(nn.Module): + def __init__(self): + super(DetailNode, self).__init__() + # Scale is Ax + b, i.e. affine transformation + self.theta_phi = InvertedResidualBlock(inp=32, oup=32, expand_ratio=2) + self.theta_rho = InvertedResidualBlock(inp=32, oup=32, expand_ratio=2) + self.theta_eta = InvertedResidualBlock(inp=32, oup=32, expand_ratio=2) + self.shffleconv = nn.Conv2d(64, 64, kernel_size=1, + stride=1, padding=0, bias=True) + def separateFeature(self, x): + z1, z2 = x[:, :x.shape[1]//2], x[:, x.shape[1]//2:x.shape[1]] + return z1, z2 + def forward(self, z1, z2): + z1, z2 = self.separateFeature( + self.shffleconv(torch.cat((z1, z2), dim=1))) + z2 = z2 + self.theta_phi(z1) + z1 = z1 * torch.exp(self.theta_rho(z2)) + self.theta_eta(z2) + return z1, z2 + +class DetailFeatureExtraction(nn.Module): + def __init__(self, num_layers=3): + super(DetailFeatureExtraction, self).__init__() + INNmodules = [DetailNode() for _ in range(num_layers)] + self.net = nn.Sequential(*INNmodules) + def forward(self, x): + z1, z2 = x[:, :x.shape[1]//2], x[:, x.shape[1]//2:x.shape[1]] + for layer in self.net: + z1, z2 = layer(z1, z2) + return torch.cat((z1, z2), dim=1) + +# ============================================================================= + +# ============================================================================= +import numbers +########################################################################## +## Layer Norm +def to_3d(x): + return rearrange(x, 'b c h w -> b (h w) c') + + +def to_4d(x, h, w): + return rearrange(x, 'b (h w) c -> b c h w', h=h, w=w) + + +class BiasFree_LayerNorm(nn.Module): + def __init__(self, normalized_shape): + super(BiasFree_LayerNorm, self).__init__() + if isinstance(normalized_shape, numbers.Integral): + normalized_shape = (normalized_shape,) + normalized_shape = torch.Size(normalized_shape) + + assert len(normalized_shape) == 1 + + self.weight = nn.Parameter(torch.ones(normalized_shape)) + self.normalized_shape = normalized_shape + + def forward(self, x): + sigma = x.var(-1, keepdim=True, unbiased=False) + return x / torch.sqrt(sigma+1e-5) * self.weight + + +class WithBias_LayerNorm(nn.Module): + def __init__(self, normalized_shape): + super(WithBias_LayerNorm, self).__init__() + if isinstance(normalized_shape, numbers.Integral): + normalized_shape = (normalized_shape,) + normalized_shape = torch.Size(normalized_shape) + + assert len(normalized_shape) == 1 + + self.weight = nn.Parameter(torch.ones(normalized_shape)) + self.bias = nn.Parameter(torch.zeros(normalized_shape)) + self.normalized_shape = normalized_shape + + def forward(self, x): + mu = x.mean(-1, keepdim=True) + sigma = x.var(-1, keepdim=True, unbiased=False) + return (x - mu) / torch.sqrt(sigma+1e-5) * self.weight + self.bias + +class LayerNorm(nn.Module): + def __init__(self, dim, LayerNorm_type): + super(LayerNorm, self).__init__() + if LayerNorm_type == 'BiasFree': + self.body = BiasFree_LayerNorm(dim) + else: + self.body = WithBias_LayerNorm(dim) + + def forward(self, x): + h, w = x.shape[-2:] + return to_4d(self.body(to_3d(x)), h, w) + +########################################################################## +## Gated-Dconv Feed-Forward Network (GDFN) +class FeedForward(nn.Module): + def __init__(self, dim, ffn_expansion_factor, bias): + super(FeedForward, self).__init__() + + hidden_features = int(dim*ffn_expansion_factor) + + self.project_in = nn.Conv2d( + dim, hidden_features*2, kernel_size=1, bias=bias) + + self.dwconv = nn.Conv2d(hidden_features*2, hidden_features*2, kernel_size=3, + stride=1, padding=1, groups=hidden_features*2, bias=bias) + + self.project_out = nn.Conv2d( + hidden_features, dim, kernel_size=1, bias=bias) + + def forward(self, x): + x = self.project_in(x) + x1, x2 = self.dwconv(x).chunk(2, dim=1) + x = F.gelu(x1) * x2 + x = self.project_out(x) + return x + + +########################################################################## +## Multi-DConv Head Transposed Self-Attention (MDTA) +class Attention(nn.Module): + def __init__(self, dim, num_heads, bias): + super(Attention, self).__init__() + self.num_heads = num_heads + self.temperature = nn.Parameter(torch.ones(num_heads, 1, 1)) + + self.qkv = nn.Conv2d(dim, dim*3, kernel_size=1, bias=bias) + self.qkv_dwconv = nn.Conv2d( + dim*3, dim*3, kernel_size=3, stride=1, padding=1, groups=dim*3, bias=bias) + self.project_out = nn.Conv2d(dim, dim, kernel_size=1, bias=bias) + + def forward(self, x): + b, c, h, w = x.shape + + qkv = self.qkv_dwconv(self.qkv(x)) + q, k, v = qkv.chunk(3, dim=1) + + q = rearrange(q, 'b (head c) h w -> b head c (h w)', + head=self.num_heads) + k = rearrange(k, 'b (head c) h w -> b head c (h w)', + head=self.num_heads) + v = rearrange(v, 'b (head c) h w -> b head c (h w)', + head=self.num_heads) + + q = torch.nn.functional.normalize(q, dim=-1) + k = torch.nn.functional.normalize(k, dim=-1) + + attn = (q @ k.transpose(-2, -1)) * self.temperature + attn = attn.softmax(dim=-1) + + out = (attn @ v) + + out = rearrange(out, 'b head c (h w) -> b (head c) h w', + head=self.num_heads, h=h, w=w) + + out = self.project_out(out) + return out + + +########################################################################## +class TransformerBlock(nn.Module): + def __init__(self, dim, num_heads, ffn_expansion_factor, bias, LayerNorm_type): + super(TransformerBlock, self).__init__() + + self.norm1 = LayerNorm(dim, LayerNorm_type) + self.attn = Attention(dim, num_heads, bias) + self.norm2 = LayerNorm(dim, LayerNorm_type) + self.ffn = FeedForward(dim, ffn_expansion_factor, bias) + + def forward(self, x): + x = x + self.attn(self.norm1(x)) + x = x + self.ffn(self.norm2(x)) + + return x + + +########################################################################## +## Overlapped image patch embedding with 3x3 Conv +class OverlapPatchEmbed(nn.Module): + def __init__(self, in_c=3, embed_dim=48, bias=False): + super(OverlapPatchEmbed, self).__init__() + + self.proj = nn.Conv2d(in_c, embed_dim, kernel_size=3, + stride=1, padding=1, bias=bias) + + def forward(self, x): + x = self.proj(x) + return x + + +class Restormer_Encoder(nn.Module): + def __init__(self, + inp_channels=1, + out_channels=1, + dim=64, + num_blocks=[4, 4], + heads=[8, 8, 8], + ffn_expansion_factor=2, + bias=False, + LayerNorm_type='WithBias', + ): + + super(Restormer_Encoder, self).__init__() + + self.patch_embed = OverlapPatchEmbed(inp_channels, dim) + + self.encoder_level1 = nn.Sequential(*[TransformerBlock(dim=dim, num_heads=heads[0], ffn_expansion_factor=ffn_expansion_factor, + bias=bias, LayerNorm_type=LayerNorm_type) for i in range(num_blocks[0])]) + self.baseFeature = BaseFeatureExtraction(dim=dim, num_heads = heads[2]) + self.detailFeature = DetailFeatureExtraction() + + def forward(self, inp_img): + inp_enc_level1 = self.patch_embed(inp_img) + out_enc_level1 = self.encoder_level1(inp_enc_level1) + base_feature = self.baseFeature(out_enc_level1) + detail_feature = self.detailFeature(out_enc_level1) + return base_feature, detail_feature, out_enc_level1 + +class Restormer_Decoder(nn.Module): + def __init__(self, + inp_channels=1, + out_channels=1, + dim=64, + num_blocks=[4, 4], + heads=[8, 8, 8], + ffn_expansion_factor=2, + bias=False, + LayerNorm_type='WithBias', + ): + + super(Restormer_Decoder, self).__init__() + self.reduce_channel = nn.Conv2d(int(dim*2), int(dim), kernel_size=1, bias=bias) + self.encoder_level2 = nn.Sequential(*[TransformerBlock(dim=dim, num_heads=heads[1], ffn_expansion_factor=ffn_expansion_factor, + bias=bias, LayerNorm_type=LayerNorm_type) for i in range(num_blocks[1])]) + self.output = nn.Sequential( + nn.Conv2d(int(dim), int(dim)//2, kernel_size=3, + stride=1, padding=1, bias=bias), + nn.LeakyReLU(), + nn.Conv2d(int(dim)//2, out_channels, kernel_size=3, + stride=1, padding=1, bias=bias),) + self.sigmoid = nn.Sigmoid() + def forward(self, inp_img, base_feature, detail_feature): + out_enc_level0 = torch.cat((base_feature, detail_feature), dim=1) + out_enc_level0 = self.reduce_channel(out_enc_level0) + out_enc_level1 = self.encoder_level2(out_enc_level0) + if inp_img is not None: + out_enc_level1 = self.output(out_enc_level1) + inp_img + else: + out_enc_level1 = self.output(out_enc_level1) + return self.sigmoid(out_enc_level1), out_enc_level0 + +if __name__ == '__main__': + height = 128 + width = 128 + window_size = 8 + modelE = Restormer_Encoder().cuda() + modelD = Restormer_Decoder().cuda() + diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e57a759 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,10 @@ +einops==0.4.1 +kornia==0.2.0 +numpy==1.21.5 +opencv_python==4.5.3.56 +scikit_image==0.19.2 +scikit_learn==1.1.3 +scipy==1.7.3 +tensorboardX==2.5.1 +timm==0.4.12 +torch==1.8.1+cu111 diff --git a/test_IVF.py b/test_IVF.py new file mode 100644 index 0000000..f17df6f --- /dev/null +++ b/test_IVF.py @@ -0,0 +1,80 @@ +from net import Restormer_Encoder, Restormer_Decoder, BaseFeatureExtraction, DetailFeatureExtraction +import os +import numpy as np +from utils.Evaluator import Evaluator +import torch +import torch.nn as nn +from utils.img_read_save import img_save,image_read_cv2 +import warnings +import logging +warnings.filterwarnings("ignore") +logging.basicConfig(level=logging.CRITICAL) + +os.environ["CUDA_VISIBLE_DEVICES"] = "0" +ckpt_path=r"models/CDDFuse_IVF.pth" +for dataset_name in ["TNO","RoadScene"]: + print("\n"*2+"="*80) + model_name="CDDFuse " + print("The test result of "+dataset_name+' :') + test_folder=os.path.join('test_img',dataset_name) + test_out_folder=os.path.join('test_result',dataset_name) + + device = 'cuda' if torch.cuda.is_available() else 'cpu' + Encoder = nn.DataParallel(Restormer_Encoder()).to(device) + Decoder = nn.DataParallel(Restormer_Decoder()).to(device) + BaseFuseLayer = nn.DataParallel(BaseFeatureExtraction(dim=64, num_heads=8)).to(device) + DetailFuseLayer = nn.DataParallel(DetailFeatureExtraction(num_layers=1)).to(device) + + Encoder.load_state_dict(torch.load(ckpt_path)['DIDF_Encoder']) + Decoder.load_state_dict(torch.load(ckpt_path)['DIDF_Decoder']) + BaseFuseLayer.load_state_dict(torch.load(ckpt_path)['BaseFuseLayer']) + DetailFuseLayer.load_state_dict(torch.load(ckpt_path)['DetailFuseLayer']) + Encoder.eval() + Decoder.eval() + BaseFuseLayer.eval() + DetailFuseLayer.eval() + + with torch.no_grad(): + for img_name in os.listdir(os.path.join(test_folder,"ir")): + + data_IR=image_read_cv2(os.path.join(test_folder,"ir",img_name),mode='GRAY')[np.newaxis,np.newaxis, ...]/255.0 + data_VIS = image_read_cv2(os.path.join(test_folder,"vi",img_name), mode='GRAY')[np.newaxis,np.newaxis, ...]/255.0 + + data_IR,data_VIS = torch.FloatTensor(data_IR),torch.FloatTensor(data_VIS) + data_VIS, data_IR = data_VIS.cuda(), data_IR.cuda() + + feature_V_B, feature_V_D, feature_V = Encoder(data_VIS) + feature_I_B, feature_I_D, feature_I = Encoder(data_IR) + feature_F_B = BaseFuseLayer(feature_V_B + feature_I_B) + feature_F_D = DetailFuseLayer(feature_V_D + feature_I_D) + data_Fuse, _ = Decoder(data_VIS, feature_F_B, feature_F_D) + data_Fuse=(data_Fuse-torch.min(data_Fuse))/(torch.max(data_Fuse)-torch.min(data_Fuse)) + fi = np.squeeze((data_Fuse * 255).cpu().numpy()) + img_save(fi, img_name.split(sep='.')[0], test_out_folder) + + + eval_folder=test_out_folder + ori_img_folder=test_folder + + metric_result = np.zeros((8)) + for img_name in os.listdir(os.path.join(ori_img_folder,"ir")): + ir = image_read_cv2(os.path.join(ori_img_folder,"ir", img_name), 'GRAY') + vi = image_read_cv2(os.path.join(ori_img_folder,"vi", img_name), 'GRAY') + fi = image_read_cv2(os.path.join(eval_folder, img_name.split('.')[0]+".png"), 'GRAY') + metric_result += np.array([Evaluator.EN(fi), Evaluator.SD(fi) + , Evaluator.SF(fi), Evaluator.MI(fi, ir, vi) + , Evaluator.SCD(fi, ir, vi), Evaluator.VIFF(fi, ir, vi) + , Evaluator.Qabf(fi, ir, vi), Evaluator.SSIM(fi, ir, vi)]) + + metric_result /= len(os.listdir(eval_folder)) + print("\t\t EN\t SD\t SF\t MI\tSCD\tVIF\tQabf\tSSIM") + print(model_name+'\t'+str(np.round(metric_result[0], 2))+'\t' + +str(np.round(metric_result[1], 2))+'\t' + +str(np.round(metric_result[2], 2))+'\t' + +str(np.round(metric_result[3], 2))+'\t' + +str(np.round(metric_result[4], 2))+'\t' + +str(np.round(metric_result[5], 2))+'\t' + +str(np.round(metric_result[6], 2))+'\t' + +str(np.round(metric_result[7], 2)) + ) + print("="*80) \ No newline at end of file diff --git a/test_MIF.py b/test_MIF.py new file mode 100644 index 0000000..7793892 --- /dev/null +++ b/test_MIF.py @@ -0,0 +1,86 @@ +from net import Restormer_Encoder, Restormer_Decoder, BaseFeatureExtraction, DetailFeatureExtraction +import os +import numpy as np +from utils.Evaluator import Evaluator +import torch +import torch.nn as nn +from utils.img_read_save import img_save,image_read_cv2 +import warnings +import logging +warnings.filterwarnings("ignore") +logging.basicConfig(level=logging.CRITICAL) +import cv2 +os.environ["CUDA_VISIBLE_DEVICES"] = "0" +CDDFuse_path=r"models/CDDFuse_IVF.pth" +CDDFuse_MIF_path=r"models/CDDFuse_MIF.pth" +for dataset_name in ["MRI_CT","MRI_PET","MRI_SPECT"]: + print("\n"*2+"="*80) + print("The test result of "+dataset_name+" :") + print("\t\t EN\t SD\t SF\t MI\tSCD\tVIF\tQabf\tSSIM") + for ckpt_path in [CDDFuse_path,CDDFuse_MIF_path]: + model_name=ckpt_path.split('/')[-1].split('.')[0] + test_folder=os.path.join('test_img',dataset_name) + test_out_folder=os.path.join('test_result',dataset_name) + + + device = 'cuda' if torch.cuda.is_available() else 'cpu' + Encoder = nn.DataParallel(Restormer_Encoder()).to(device) + Decoder = nn.DataParallel(Restormer_Decoder()).to(device) + BaseFuseLayer = nn.DataParallel(BaseFeatureExtraction(dim=64, num_heads=8)).to(device) + DetailFuseLayer = nn.DataParallel(DetailFeatureExtraction(num_layers=1)).to(device) + + Encoder.load_state_dict(torch.load(ckpt_path)['DIDF_Encoder']) + Decoder.load_state_dict(torch.load(ckpt_path)['DIDF_Decoder']) + BaseFuseLayer.load_state_dict(torch.load(ckpt_path)['BaseFuseLayer']) + DetailFuseLayer.load_state_dict(torch.load(ckpt_path)['DetailFuseLayer']) + Encoder.eval() + Decoder.eval() + BaseFuseLayer.eval() + DetailFuseLayer.eval() + + with torch.no_grad(): + for img_name in os.listdir(os.path.join(test_folder,dataset_name.split('_')[0])): + data_IR=image_read_cv2(os.path.join(test_folder,dataset_name.split('_')[1],img_name),mode='GRAY')[np.newaxis,np.newaxis, ...]/255.0 + data_VIS = image_read_cv2(os.path.join(test_folder,dataset_name.split('_')[0],img_name), mode='GRAY')[np.newaxis,np.newaxis, ...]/255.0 + + data_IR,data_VIS = torch.FloatTensor(data_IR),torch.FloatTensor(data_VIS) + data_VIS, data_IR = data_VIS.cuda(), data_IR.cuda() + + feature_V_B, feature_V_D, feature_V = Encoder(data_VIS) + feature_I_B, feature_I_D, feature_I = Encoder(data_IR) + feature_F_B = BaseFuseLayer(feature_V_B + feature_I_B) + feature_F_D = DetailFuseLayer(feature_V_D + feature_I_D) + if ckpt_path==CDDFuse_path: + data_Fuse, _ = Decoder(data_IR+data_VIS, feature_F_B, feature_F_D) + else: + data_Fuse, _ = Decoder(None, feature_F_B, feature_F_D) + data_Fuse=(data_Fuse-torch.min(data_Fuse))/(torch.max(data_Fuse)-torch.min(data_Fuse)) + fi = np.squeeze((data_Fuse * 255).cpu().numpy()) + img_save(fi, img_name.split(sep='.')[0], test_out_folder) + eval_folder=test_out_folder + ori_img_folder=test_folder + + metric_result = np.zeros((8)) + for img_name in os.listdir(os.path.join(ori_img_folder,dataset_name.split('_')[0])): + ir = image_read_cv2(os.path.join(ori_img_folder,dataset_name.split('_')[1], img_name), 'GRAY') + vi = image_read_cv2(os.path.join(ori_img_folder,dataset_name.split('_')[0], img_name), 'GRAY') + fi = image_read_cv2(os.path.join(eval_folder, img_name.split('.')[0]+".png"), 'GRAY') + metric_result += np.array([Evaluator.EN(fi), Evaluator.SD(fi) + , Evaluator.SF(fi), Evaluator.MI(fi, ir, vi) + , Evaluator.SCD(fi, ir, vi), Evaluator.VIFF(fi, ir, vi) + , Evaluator.Qabf(fi, ir, vi), Evaluator.SSIM(fi, ir, vi)]) + + metric_result /= len(os.listdir(eval_folder)) + + print(model_name+'\t'+str(np.round(metric_result[0], 2))+'\t' + +str(np.round(metric_result[1], 2))+'\t' + +str(np.round(metric_result[2], 2))+'\t' + +str(np.round(metric_result[3], 2))+'\t' + +str(np.round(metric_result[4], 2))+'\t' + +str(np.round(metric_result[5], 2))+'\t' + +str(np.round(metric_result[6], 2))+'\t' + +str(np.round(metric_result[7], 2)) + ) + print("="*80) + + diff --git a/test_img/MRI_CT/CT/11.png b/test_img/MRI_CT/CT/11.png new file mode 100644 index 0000000..5414918 Binary files /dev/null and b/test_img/MRI_CT/CT/11.png differ diff --git a/test_img/MRI_CT/CT/12.png b/test_img/MRI_CT/CT/12.png new file mode 100644 index 0000000..0e14339 Binary files /dev/null and b/test_img/MRI_CT/CT/12.png differ diff --git a/test_img/MRI_CT/CT/13.png b/test_img/MRI_CT/CT/13.png new file mode 100644 index 0000000..0f1846a Binary files /dev/null and b/test_img/MRI_CT/CT/13.png differ diff --git a/test_img/MRI_CT/CT/14.png b/test_img/MRI_CT/CT/14.png new file mode 100644 index 0000000..e09e6ee Binary files /dev/null and b/test_img/MRI_CT/CT/14.png differ diff --git a/test_img/MRI_CT/CT/15.png b/test_img/MRI_CT/CT/15.png new file mode 100644 index 0000000..0e33255 Binary files /dev/null and b/test_img/MRI_CT/CT/15.png differ diff --git a/test_img/MRI_CT/CT/16.png b/test_img/MRI_CT/CT/16.png new file mode 100644 index 0000000..e8a647e Binary files /dev/null and b/test_img/MRI_CT/CT/16.png differ diff --git a/test_img/MRI_CT/CT/17.png b/test_img/MRI_CT/CT/17.png new file mode 100644 index 0000000..8dfb3e4 Binary files /dev/null and b/test_img/MRI_CT/CT/17.png differ diff --git a/test_img/MRI_CT/CT/18.png b/test_img/MRI_CT/CT/18.png new file mode 100644 index 0000000..c686ee6 Binary files /dev/null and b/test_img/MRI_CT/CT/18.png differ diff --git a/test_img/MRI_CT/CT/19.png b/test_img/MRI_CT/CT/19.png new file mode 100644 index 0000000..b6f570c Binary files /dev/null and b/test_img/MRI_CT/CT/19.png differ diff --git a/test_img/MRI_CT/CT/20.png b/test_img/MRI_CT/CT/20.png new file mode 100644 index 0000000..7df4a31 Binary files /dev/null and b/test_img/MRI_CT/CT/20.png differ diff --git a/test_img/MRI_CT/CT/21.png b/test_img/MRI_CT/CT/21.png new file mode 100644 index 0000000..8016007 Binary files /dev/null and b/test_img/MRI_CT/CT/21.png differ diff --git a/test_img/MRI_CT/CT/22.png b/test_img/MRI_CT/CT/22.png new file mode 100644 index 0000000..e587d6b Binary files /dev/null and b/test_img/MRI_CT/CT/22.png differ diff --git a/test_img/MRI_CT/CT/23.png b/test_img/MRI_CT/CT/23.png new file mode 100644 index 0000000..3013f4e Binary files /dev/null and b/test_img/MRI_CT/CT/23.png differ diff --git a/test_img/MRI_CT/CT/24.png b/test_img/MRI_CT/CT/24.png new file mode 100644 index 0000000..b48994d Binary files /dev/null and b/test_img/MRI_CT/CT/24.png differ diff --git a/test_img/MRI_CT/CT/25.png b/test_img/MRI_CT/CT/25.png new file mode 100644 index 0000000..ba68328 Binary files /dev/null and b/test_img/MRI_CT/CT/25.png differ diff --git a/test_img/MRI_CT/CT/26.png b/test_img/MRI_CT/CT/26.png new file mode 100644 index 0000000..6c92d82 Binary files /dev/null and b/test_img/MRI_CT/CT/26.png differ diff --git a/test_img/MRI_CT/CT/27.png b/test_img/MRI_CT/CT/27.png new file mode 100644 index 0000000..a601b50 Binary files /dev/null and b/test_img/MRI_CT/CT/27.png differ diff --git a/test_img/MRI_CT/CT/28.png b/test_img/MRI_CT/CT/28.png new file mode 100644 index 0000000..d6676a2 Binary files /dev/null and b/test_img/MRI_CT/CT/28.png differ diff --git a/test_img/MRI_CT/CT/29.png b/test_img/MRI_CT/CT/29.png new file mode 100644 index 0000000..4c41dc2 Binary files /dev/null and b/test_img/MRI_CT/CT/29.png differ diff --git a/test_img/MRI_CT/CT/30.png b/test_img/MRI_CT/CT/30.png new file mode 100644 index 0000000..364bd99 Binary files /dev/null and b/test_img/MRI_CT/CT/30.png differ diff --git a/test_img/MRI_CT/CT/31.png b/test_img/MRI_CT/CT/31.png new file mode 100644 index 0000000..3a54aee Binary files /dev/null and b/test_img/MRI_CT/CT/31.png differ diff --git a/test_img/MRI_CT/MRI/11.png b/test_img/MRI_CT/MRI/11.png new file mode 100644 index 0000000..240f673 Binary files /dev/null and b/test_img/MRI_CT/MRI/11.png differ diff --git a/test_img/MRI_CT/MRI/12.png b/test_img/MRI_CT/MRI/12.png new file mode 100644 index 0000000..699830a Binary files /dev/null and b/test_img/MRI_CT/MRI/12.png differ diff --git a/test_img/MRI_CT/MRI/13.png b/test_img/MRI_CT/MRI/13.png new file mode 100644 index 0000000..427f4e9 Binary files /dev/null and b/test_img/MRI_CT/MRI/13.png differ diff --git a/test_img/MRI_CT/MRI/14.png b/test_img/MRI_CT/MRI/14.png new file mode 100644 index 0000000..0db95c7 Binary files /dev/null and b/test_img/MRI_CT/MRI/14.png differ diff --git a/test_img/MRI_CT/MRI/15.png b/test_img/MRI_CT/MRI/15.png new file mode 100644 index 0000000..3d84e2d Binary files /dev/null and b/test_img/MRI_CT/MRI/15.png differ diff --git a/test_img/MRI_CT/MRI/16.png b/test_img/MRI_CT/MRI/16.png new file mode 100644 index 0000000..961cca5 Binary files /dev/null and b/test_img/MRI_CT/MRI/16.png differ diff --git a/test_img/MRI_CT/MRI/17.png b/test_img/MRI_CT/MRI/17.png new file mode 100644 index 0000000..146fe79 Binary files /dev/null and b/test_img/MRI_CT/MRI/17.png differ diff --git a/test_img/MRI_CT/MRI/18.png b/test_img/MRI_CT/MRI/18.png new file mode 100644 index 0000000..46e85d7 Binary files /dev/null and b/test_img/MRI_CT/MRI/18.png differ diff --git a/test_img/MRI_CT/MRI/19.png b/test_img/MRI_CT/MRI/19.png new file mode 100644 index 0000000..26ab174 Binary files /dev/null and b/test_img/MRI_CT/MRI/19.png differ diff --git a/test_img/MRI_CT/MRI/20.png b/test_img/MRI_CT/MRI/20.png new file mode 100644 index 0000000..88558cd Binary files /dev/null and b/test_img/MRI_CT/MRI/20.png differ diff --git a/test_img/MRI_CT/MRI/21.png b/test_img/MRI_CT/MRI/21.png new file mode 100644 index 0000000..2d0ebe2 Binary files /dev/null and b/test_img/MRI_CT/MRI/21.png differ diff --git a/test_img/MRI_CT/MRI/22.png b/test_img/MRI_CT/MRI/22.png new file mode 100644 index 0000000..81da724 Binary files /dev/null and b/test_img/MRI_CT/MRI/22.png differ diff --git a/test_img/MRI_CT/MRI/23.png b/test_img/MRI_CT/MRI/23.png new file mode 100644 index 0000000..41d31cd Binary files /dev/null and b/test_img/MRI_CT/MRI/23.png differ diff --git a/test_img/MRI_CT/MRI/24.png b/test_img/MRI_CT/MRI/24.png new file mode 100644 index 0000000..17a7219 Binary files /dev/null and b/test_img/MRI_CT/MRI/24.png differ diff --git a/test_img/MRI_CT/MRI/25.png b/test_img/MRI_CT/MRI/25.png new file mode 100644 index 0000000..89ed4a5 Binary files /dev/null and b/test_img/MRI_CT/MRI/25.png differ diff --git a/test_img/MRI_CT/MRI/26.png b/test_img/MRI_CT/MRI/26.png new file mode 100644 index 0000000..5ca50de Binary files /dev/null and b/test_img/MRI_CT/MRI/26.png differ diff --git a/test_img/MRI_CT/MRI/27.png b/test_img/MRI_CT/MRI/27.png new file mode 100644 index 0000000..79cdc38 Binary files /dev/null and b/test_img/MRI_CT/MRI/27.png differ diff --git a/test_img/MRI_CT/MRI/28.png b/test_img/MRI_CT/MRI/28.png new file mode 100644 index 0000000..c88b50a Binary files /dev/null and b/test_img/MRI_CT/MRI/28.png differ diff --git a/test_img/MRI_CT/MRI/29.png b/test_img/MRI_CT/MRI/29.png new file mode 100644 index 0000000..f835f3a Binary files /dev/null and b/test_img/MRI_CT/MRI/29.png differ diff --git a/test_img/MRI_CT/MRI/30.png b/test_img/MRI_CT/MRI/30.png new file mode 100644 index 0000000..6b29fbe Binary files /dev/null and b/test_img/MRI_CT/MRI/30.png differ diff --git a/test_img/MRI_CT/MRI/31.png b/test_img/MRI_CT/MRI/31.png new file mode 100644 index 0000000..88260c8 Binary files /dev/null and b/test_img/MRI_CT/MRI/31.png differ diff --git a/test_img/MRI_PET/MRI/11.png b/test_img/MRI_PET/MRI/11.png new file mode 100644 index 0000000..7d4ce21 Binary files /dev/null and b/test_img/MRI_PET/MRI/11.png differ diff --git a/test_img/MRI_PET/MRI/12.png b/test_img/MRI_PET/MRI/12.png new file mode 100644 index 0000000..b636a92 Binary files /dev/null and b/test_img/MRI_PET/MRI/12.png differ diff --git a/test_img/MRI_PET/MRI/13.png b/test_img/MRI_PET/MRI/13.png new file mode 100644 index 0000000..13ca982 Binary files /dev/null and b/test_img/MRI_PET/MRI/13.png differ diff --git a/test_img/MRI_PET/MRI/14.png b/test_img/MRI_PET/MRI/14.png new file mode 100644 index 0000000..19b4d72 Binary files /dev/null and b/test_img/MRI_PET/MRI/14.png differ diff --git a/test_img/MRI_PET/MRI/15.png b/test_img/MRI_PET/MRI/15.png new file mode 100644 index 0000000..d433fb1 Binary files /dev/null and b/test_img/MRI_PET/MRI/15.png differ diff --git a/test_img/MRI_PET/MRI/16.png b/test_img/MRI_PET/MRI/16.png new file mode 100644 index 0000000..defaedc Binary files /dev/null and b/test_img/MRI_PET/MRI/16.png differ diff --git a/test_img/MRI_PET/MRI/17.png b/test_img/MRI_PET/MRI/17.png new file mode 100644 index 0000000..fc64708 Binary files /dev/null and b/test_img/MRI_PET/MRI/17.png differ diff --git a/test_img/MRI_PET/MRI/18.png b/test_img/MRI_PET/MRI/18.png new file mode 100644 index 0000000..b56e195 Binary files /dev/null and b/test_img/MRI_PET/MRI/18.png differ diff --git a/test_img/MRI_PET/MRI/19.png b/test_img/MRI_PET/MRI/19.png new file mode 100644 index 0000000..286cff1 Binary files /dev/null and b/test_img/MRI_PET/MRI/19.png differ diff --git a/test_img/MRI_PET/MRI/20.png b/test_img/MRI_PET/MRI/20.png new file mode 100644 index 0000000..3c04646 Binary files /dev/null and b/test_img/MRI_PET/MRI/20.png differ diff --git a/test_img/MRI_PET/MRI/21.png b/test_img/MRI_PET/MRI/21.png new file mode 100644 index 0000000..61c315f Binary files /dev/null and b/test_img/MRI_PET/MRI/21.png differ diff --git a/test_img/MRI_PET/MRI/22.png b/test_img/MRI_PET/MRI/22.png new file mode 100644 index 0000000..3f5d573 Binary files /dev/null and b/test_img/MRI_PET/MRI/22.png differ diff --git a/test_img/MRI_PET/MRI/23.png b/test_img/MRI_PET/MRI/23.png new file mode 100644 index 0000000..f43d256 Binary files /dev/null and b/test_img/MRI_PET/MRI/23.png differ diff --git a/test_img/MRI_PET/MRI/24.png b/test_img/MRI_PET/MRI/24.png new file mode 100644 index 0000000..0c9eee4 Binary files /dev/null and b/test_img/MRI_PET/MRI/24.png differ diff --git a/test_img/MRI_PET/MRI/25.png b/test_img/MRI_PET/MRI/25.png new file mode 100644 index 0000000..ad3bde5 Binary files /dev/null and b/test_img/MRI_PET/MRI/25.png differ diff --git a/test_img/MRI_PET/MRI/26.png b/test_img/MRI_PET/MRI/26.png new file mode 100644 index 0000000..45554b7 Binary files /dev/null and b/test_img/MRI_PET/MRI/26.png differ diff --git a/test_img/MRI_PET/MRI/27.png b/test_img/MRI_PET/MRI/27.png new file mode 100644 index 0000000..69e1580 Binary files /dev/null and b/test_img/MRI_PET/MRI/27.png differ diff --git a/test_img/MRI_PET/MRI/28.png b/test_img/MRI_PET/MRI/28.png new file mode 100644 index 0000000..032c73a Binary files /dev/null and b/test_img/MRI_PET/MRI/28.png differ diff --git a/test_img/MRI_PET/MRI/29.png b/test_img/MRI_PET/MRI/29.png new file mode 100644 index 0000000..fa26af1 Binary files /dev/null and b/test_img/MRI_PET/MRI/29.png differ diff --git a/test_img/MRI_PET/MRI/30.png b/test_img/MRI_PET/MRI/30.png new file mode 100644 index 0000000..c956520 Binary files /dev/null and b/test_img/MRI_PET/MRI/30.png differ diff --git a/test_img/MRI_PET/MRI/31.png b/test_img/MRI_PET/MRI/31.png new file mode 100644 index 0000000..e0d1bb2 Binary files /dev/null and b/test_img/MRI_PET/MRI/31.png differ diff --git a/test_img/MRI_PET/MRI/32.png b/test_img/MRI_PET/MRI/32.png new file mode 100644 index 0000000..9eaddc7 Binary files /dev/null and b/test_img/MRI_PET/MRI/32.png differ diff --git a/test_img/MRI_PET/MRI/33.png b/test_img/MRI_PET/MRI/33.png new file mode 100644 index 0000000..eddb6bf Binary files /dev/null and b/test_img/MRI_PET/MRI/33.png differ diff --git a/test_img/MRI_PET/MRI/34.png b/test_img/MRI_PET/MRI/34.png new file mode 100644 index 0000000..e8843c8 Binary files /dev/null and b/test_img/MRI_PET/MRI/34.png differ diff --git a/test_img/MRI_PET/MRI/35.png b/test_img/MRI_PET/MRI/35.png new file mode 100644 index 0000000..ea04bc1 Binary files /dev/null and b/test_img/MRI_PET/MRI/35.png differ diff --git a/test_img/MRI_PET/MRI/36.png b/test_img/MRI_PET/MRI/36.png new file mode 100644 index 0000000..ee24b1a Binary files /dev/null and b/test_img/MRI_PET/MRI/36.png differ diff --git a/test_img/MRI_PET/MRI/37.png b/test_img/MRI_PET/MRI/37.png new file mode 100644 index 0000000..f7f46cb Binary files /dev/null and b/test_img/MRI_PET/MRI/37.png differ diff --git a/test_img/MRI_PET/MRI/38.png b/test_img/MRI_PET/MRI/38.png new file mode 100644 index 0000000..9c05ac2 Binary files /dev/null and b/test_img/MRI_PET/MRI/38.png differ diff --git a/test_img/MRI_PET/MRI/39.png b/test_img/MRI_PET/MRI/39.png new file mode 100644 index 0000000..6f93f84 Binary files /dev/null and b/test_img/MRI_PET/MRI/39.png differ diff --git a/test_img/MRI_PET/MRI/40.png b/test_img/MRI_PET/MRI/40.png new file mode 100644 index 0000000..3974602 Binary files /dev/null and b/test_img/MRI_PET/MRI/40.png differ diff --git a/test_img/MRI_PET/MRI/41.png b/test_img/MRI_PET/MRI/41.png new file mode 100644 index 0000000..1c8d913 Binary files /dev/null and b/test_img/MRI_PET/MRI/41.png differ diff --git a/test_img/MRI_PET/MRI/42.png b/test_img/MRI_PET/MRI/42.png new file mode 100644 index 0000000..a87f0be Binary files /dev/null and b/test_img/MRI_PET/MRI/42.png differ diff --git a/test_img/MRI_PET/MRI/43.png b/test_img/MRI_PET/MRI/43.png new file mode 100644 index 0000000..e58ec5d Binary files /dev/null and b/test_img/MRI_PET/MRI/43.png differ diff --git a/test_img/MRI_PET/MRI/44.png b/test_img/MRI_PET/MRI/44.png new file mode 100644 index 0000000..1fd7a73 Binary files /dev/null and b/test_img/MRI_PET/MRI/44.png differ diff --git a/test_img/MRI_PET/MRI/45.png b/test_img/MRI_PET/MRI/45.png new file mode 100644 index 0000000..d0b701d Binary files /dev/null and b/test_img/MRI_PET/MRI/45.png differ diff --git a/test_img/MRI_PET/MRI/46.png b/test_img/MRI_PET/MRI/46.png new file mode 100644 index 0000000..fb426f9 Binary files /dev/null and b/test_img/MRI_PET/MRI/46.png differ diff --git a/test_img/MRI_PET/MRI/47.png b/test_img/MRI_PET/MRI/47.png new file mode 100644 index 0000000..9b43bd1 Binary files /dev/null and b/test_img/MRI_PET/MRI/47.png differ diff --git a/test_img/MRI_PET/MRI/48.png b/test_img/MRI_PET/MRI/48.png new file mode 100644 index 0000000..062b4de Binary files /dev/null and b/test_img/MRI_PET/MRI/48.png differ diff --git a/test_img/MRI_PET/MRI/49.png b/test_img/MRI_PET/MRI/49.png new file mode 100644 index 0000000..f490fef Binary files /dev/null and b/test_img/MRI_PET/MRI/49.png differ diff --git a/test_img/MRI_PET/MRI/50.png b/test_img/MRI_PET/MRI/50.png new file mode 100644 index 0000000..dc245aa Binary files /dev/null and b/test_img/MRI_PET/MRI/50.png differ diff --git a/test_img/MRI_PET/MRI/51.png b/test_img/MRI_PET/MRI/51.png new file mode 100644 index 0000000..98251ed Binary files /dev/null and b/test_img/MRI_PET/MRI/51.png differ diff --git a/test_img/MRI_PET/MRI/52.png b/test_img/MRI_PET/MRI/52.png new file mode 100644 index 0000000..3b535bb Binary files /dev/null and b/test_img/MRI_PET/MRI/52.png differ diff --git a/test_img/MRI_PET/PET/11.png b/test_img/MRI_PET/PET/11.png new file mode 100644 index 0000000..31538c0 Binary files /dev/null and b/test_img/MRI_PET/PET/11.png differ diff --git a/test_img/MRI_PET/PET/12.png b/test_img/MRI_PET/PET/12.png new file mode 100644 index 0000000..02699b1 Binary files /dev/null and b/test_img/MRI_PET/PET/12.png differ diff --git a/test_img/MRI_PET/PET/13.png b/test_img/MRI_PET/PET/13.png new file mode 100644 index 0000000..4f521c3 Binary files /dev/null and b/test_img/MRI_PET/PET/13.png differ diff --git a/test_img/MRI_PET/PET/14.png b/test_img/MRI_PET/PET/14.png new file mode 100644 index 0000000..c547bc9 Binary files /dev/null and b/test_img/MRI_PET/PET/14.png differ diff --git a/test_img/MRI_PET/PET/15.png b/test_img/MRI_PET/PET/15.png new file mode 100644 index 0000000..c1cfe8f Binary files /dev/null and b/test_img/MRI_PET/PET/15.png differ diff --git a/test_img/MRI_PET/PET/16.png b/test_img/MRI_PET/PET/16.png new file mode 100644 index 0000000..9cfd951 Binary files /dev/null and b/test_img/MRI_PET/PET/16.png differ diff --git a/test_img/MRI_PET/PET/17.png b/test_img/MRI_PET/PET/17.png new file mode 100644 index 0000000..7e2d469 Binary files /dev/null and b/test_img/MRI_PET/PET/17.png differ diff --git a/test_img/MRI_PET/PET/18.png b/test_img/MRI_PET/PET/18.png new file mode 100644 index 0000000..91181ef Binary files /dev/null and b/test_img/MRI_PET/PET/18.png differ diff --git a/test_img/MRI_PET/PET/19.png b/test_img/MRI_PET/PET/19.png new file mode 100644 index 0000000..23b1b55 Binary files /dev/null and b/test_img/MRI_PET/PET/19.png differ diff --git a/test_img/MRI_PET/PET/20.png b/test_img/MRI_PET/PET/20.png new file mode 100644 index 0000000..91c4218 Binary files /dev/null and b/test_img/MRI_PET/PET/20.png differ diff --git a/test_img/MRI_PET/PET/21.png b/test_img/MRI_PET/PET/21.png new file mode 100644 index 0000000..5d7938c Binary files /dev/null and b/test_img/MRI_PET/PET/21.png differ diff --git a/test_img/MRI_PET/PET/22.png b/test_img/MRI_PET/PET/22.png new file mode 100644 index 0000000..c09aa6f Binary files /dev/null and b/test_img/MRI_PET/PET/22.png differ diff --git a/test_img/MRI_PET/PET/23.png b/test_img/MRI_PET/PET/23.png new file mode 100644 index 0000000..639666a Binary files /dev/null and b/test_img/MRI_PET/PET/23.png differ diff --git a/test_img/MRI_PET/PET/24.png b/test_img/MRI_PET/PET/24.png new file mode 100644 index 0000000..f34403d Binary files /dev/null and b/test_img/MRI_PET/PET/24.png differ diff --git a/test_img/MRI_PET/PET/25.png b/test_img/MRI_PET/PET/25.png new file mode 100644 index 0000000..ff553db Binary files /dev/null and b/test_img/MRI_PET/PET/25.png differ diff --git a/test_img/MRI_PET/PET/26.png b/test_img/MRI_PET/PET/26.png new file mode 100644 index 0000000..692d2fc Binary files /dev/null and b/test_img/MRI_PET/PET/26.png differ diff --git a/test_img/MRI_PET/PET/27.png b/test_img/MRI_PET/PET/27.png new file mode 100644 index 0000000..8e29f33 Binary files /dev/null and b/test_img/MRI_PET/PET/27.png differ diff --git a/test_img/MRI_PET/PET/28.png b/test_img/MRI_PET/PET/28.png new file mode 100644 index 0000000..057a24d Binary files /dev/null and b/test_img/MRI_PET/PET/28.png differ diff --git a/test_img/MRI_PET/PET/29.png b/test_img/MRI_PET/PET/29.png new file mode 100644 index 0000000..d833bb0 Binary files /dev/null and b/test_img/MRI_PET/PET/29.png differ diff --git a/test_img/MRI_PET/PET/30.png b/test_img/MRI_PET/PET/30.png new file mode 100644 index 0000000..aa40d14 Binary files /dev/null and b/test_img/MRI_PET/PET/30.png differ diff --git a/test_img/MRI_PET/PET/31.png b/test_img/MRI_PET/PET/31.png new file mode 100644 index 0000000..f9467ae Binary files /dev/null and b/test_img/MRI_PET/PET/31.png differ diff --git a/test_img/MRI_PET/PET/32.png b/test_img/MRI_PET/PET/32.png new file mode 100644 index 0000000..31538c0 Binary files /dev/null and b/test_img/MRI_PET/PET/32.png differ diff --git a/test_img/MRI_PET/PET/33.png b/test_img/MRI_PET/PET/33.png new file mode 100644 index 0000000..02699b1 Binary files /dev/null and b/test_img/MRI_PET/PET/33.png differ diff --git a/test_img/MRI_PET/PET/34.png b/test_img/MRI_PET/PET/34.png new file mode 100644 index 0000000..4f521c3 Binary files /dev/null and b/test_img/MRI_PET/PET/34.png differ diff --git a/test_img/MRI_PET/PET/35.png b/test_img/MRI_PET/PET/35.png new file mode 100644 index 0000000..c547bc9 Binary files /dev/null and b/test_img/MRI_PET/PET/35.png differ diff --git a/test_img/MRI_PET/PET/36.png b/test_img/MRI_PET/PET/36.png new file mode 100644 index 0000000..c1cfe8f Binary files /dev/null and b/test_img/MRI_PET/PET/36.png differ diff --git a/test_img/MRI_PET/PET/37.png b/test_img/MRI_PET/PET/37.png new file mode 100644 index 0000000..9cfd951 Binary files /dev/null and b/test_img/MRI_PET/PET/37.png differ diff --git a/test_img/MRI_PET/PET/38.png b/test_img/MRI_PET/PET/38.png new file mode 100644 index 0000000..7e2d469 Binary files /dev/null and b/test_img/MRI_PET/PET/38.png differ diff --git a/test_img/MRI_PET/PET/39.png b/test_img/MRI_PET/PET/39.png new file mode 100644 index 0000000..91181ef Binary files /dev/null and b/test_img/MRI_PET/PET/39.png differ diff --git a/test_img/MRI_PET/PET/40.png b/test_img/MRI_PET/PET/40.png new file mode 100644 index 0000000..23b1b55 Binary files /dev/null and b/test_img/MRI_PET/PET/40.png differ diff --git a/test_img/MRI_PET/PET/41.png b/test_img/MRI_PET/PET/41.png new file mode 100644 index 0000000..91c4218 Binary files /dev/null and b/test_img/MRI_PET/PET/41.png differ diff --git a/test_img/MRI_PET/PET/42.png b/test_img/MRI_PET/PET/42.png new file mode 100644 index 0000000..5d7938c Binary files /dev/null and b/test_img/MRI_PET/PET/42.png differ diff --git a/test_img/MRI_PET/PET/43.png b/test_img/MRI_PET/PET/43.png new file mode 100644 index 0000000..c09aa6f Binary files /dev/null and b/test_img/MRI_PET/PET/43.png differ diff --git a/test_img/MRI_PET/PET/44.png b/test_img/MRI_PET/PET/44.png new file mode 100644 index 0000000..639666a Binary files /dev/null and b/test_img/MRI_PET/PET/44.png differ diff --git a/test_img/MRI_PET/PET/45.png b/test_img/MRI_PET/PET/45.png new file mode 100644 index 0000000..f34403d Binary files /dev/null and b/test_img/MRI_PET/PET/45.png differ diff --git a/test_img/MRI_PET/PET/46.png b/test_img/MRI_PET/PET/46.png new file mode 100644 index 0000000..ff553db Binary files /dev/null and b/test_img/MRI_PET/PET/46.png differ diff --git a/test_img/MRI_PET/PET/47.png b/test_img/MRI_PET/PET/47.png new file mode 100644 index 0000000..692d2fc Binary files /dev/null and b/test_img/MRI_PET/PET/47.png differ diff --git a/test_img/MRI_PET/PET/48.png b/test_img/MRI_PET/PET/48.png new file mode 100644 index 0000000..8e29f33 Binary files /dev/null and b/test_img/MRI_PET/PET/48.png differ diff --git a/test_img/MRI_PET/PET/49.png b/test_img/MRI_PET/PET/49.png new file mode 100644 index 0000000..057a24d Binary files /dev/null and b/test_img/MRI_PET/PET/49.png differ diff --git a/test_img/MRI_PET/PET/50.png b/test_img/MRI_PET/PET/50.png new file mode 100644 index 0000000..d833bb0 Binary files /dev/null and b/test_img/MRI_PET/PET/50.png differ diff --git a/test_img/MRI_PET/PET/51.png b/test_img/MRI_PET/PET/51.png new file mode 100644 index 0000000..aa40d14 Binary files /dev/null and b/test_img/MRI_PET/PET/51.png differ diff --git a/test_img/MRI_PET/PET/52.png b/test_img/MRI_PET/PET/52.png new file mode 100644 index 0000000..f9467ae Binary files /dev/null and b/test_img/MRI_PET/PET/52.png differ diff --git a/test_img/MRI_SPECT/MRI/11.png b/test_img/MRI_SPECT/MRI/11.png new file mode 100644 index 0000000..9f154b4 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/11.png differ diff --git a/test_img/MRI_SPECT/MRI/12.png b/test_img/MRI_SPECT/MRI/12.png new file mode 100644 index 0000000..3dd4f29 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/12.png differ diff --git a/test_img/MRI_SPECT/MRI/13.png b/test_img/MRI_SPECT/MRI/13.png new file mode 100644 index 0000000..2630d42 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/13.png differ diff --git a/test_img/MRI_SPECT/MRI/14.png b/test_img/MRI_SPECT/MRI/14.png new file mode 100644 index 0000000..7d3e3a9 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/14.png differ diff --git a/test_img/MRI_SPECT/MRI/15.png b/test_img/MRI_SPECT/MRI/15.png new file mode 100644 index 0000000..bb9ac8c Binary files /dev/null and b/test_img/MRI_SPECT/MRI/15.png differ diff --git a/test_img/MRI_SPECT/MRI/16.png b/test_img/MRI_SPECT/MRI/16.png new file mode 100644 index 0000000..84274c8 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/16.png differ diff --git a/test_img/MRI_SPECT/MRI/17.png b/test_img/MRI_SPECT/MRI/17.png new file mode 100644 index 0000000..a3288ca Binary files /dev/null and b/test_img/MRI_SPECT/MRI/17.png differ diff --git a/test_img/MRI_SPECT/MRI/18.png b/test_img/MRI_SPECT/MRI/18.png new file mode 100644 index 0000000..70bf959 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/18.png differ diff --git a/test_img/MRI_SPECT/MRI/19.png b/test_img/MRI_SPECT/MRI/19.png new file mode 100644 index 0000000..10545ad Binary files /dev/null and b/test_img/MRI_SPECT/MRI/19.png differ diff --git a/test_img/MRI_SPECT/MRI/20.png b/test_img/MRI_SPECT/MRI/20.png new file mode 100644 index 0000000..544471a Binary files /dev/null and b/test_img/MRI_SPECT/MRI/20.png differ diff --git a/test_img/MRI_SPECT/MRI/21.png b/test_img/MRI_SPECT/MRI/21.png new file mode 100644 index 0000000..c608693 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/21.png differ diff --git a/test_img/MRI_SPECT/MRI/22.png b/test_img/MRI_SPECT/MRI/22.png new file mode 100644 index 0000000..12ca1a4 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/22.png differ diff --git a/test_img/MRI_SPECT/MRI/23.png b/test_img/MRI_SPECT/MRI/23.png new file mode 100644 index 0000000..f0b8dcd Binary files /dev/null and b/test_img/MRI_SPECT/MRI/23.png differ diff --git a/test_img/MRI_SPECT/MRI/24.png b/test_img/MRI_SPECT/MRI/24.png new file mode 100644 index 0000000..8e3a88b Binary files /dev/null and b/test_img/MRI_SPECT/MRI/24.png differ diff --git a/test_img/MRI_SPECT/MRI/25.png b/test_img/MRI_SPECT/MRI/25.png new file mode 100644 index 0000000..26e5bf5 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/25.png differ diff --git a/test_img/MRI_SPECT/MRI/26.png b/test_img/MRI_SPECT/MRI/26.png new file mode 100644 index 0000000..095e963 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/26.png differ diff --git a/test_img/MRI_SPECT/MRI/27.png b/test_img/MRI_SPECT/MRI/27.png new file mode 100644 index 0000000..4111124 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/27.png differ diff --git a/test_img/MRI_SPECT/MRI/28.png b/test_img/MRI_SPECT/MRI/28.png new file mode 100644 index 0000000..201c5e2 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/28.png differ diff --git a/test_img/MRI_SPECT/MRI/29.png b/test_img/MRI_SPECT/MRI/29.png new file mode 100644 index 0000000..b7bdb03 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/29.png differ diff --git a/test_img/MRI_SPECT/MRI/30.png b/test_img/MRI_SPECT/MRI/30.png new file mode 100644 index 0000000..578b988 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/30.png differ diff --git a/test_img/MRI_SPECT/MRI/31.png b/test_img/MRI_SPECT/MRI/31.png new file mode 100644 index 0000000..adb55fb Binary files /dev/null and b/test_img/MRI_SPECT/MRI/31.png differ diff --git a/test_img/MRI_SPECT/MRI/32.png b/test_img/MRI_SPECT/MRI/32.png new file mode 100644 index 0000000..fee8394 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/32.png differ diff --git a/test_img/MRI_SPECT/MRI/33.png b/test_img/MRI_SPECT/MRI/33.png new file mode 100644 index 0000000..a14b959 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/33.png differ diff --git a/test_img/MRI_SPECT/MRI/34.png b/test_img/MRI_SPECT/MRI/34.png new file mode 100644 index 0000000..9f12b12 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/34.png differ diff --git a/test_img/MRI_SPECT/MRI/35.png b/test_img/MRI_SPECT/MRI/35.png new file mode 100644 index 0000000..ae80d4f Binary files /dev/null and b/test_img/MRI_SPECT/MRI/35.png differ diff --git a/test_img/MRI_SPECT/MRI/36.png b/test_img/MRI_SPECT/MRI/36.png new file mode 100644 index 0000000..1c30905 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/36.png differ diff --git a/test_img/MRI_SPECT/MRI/37.png b/test_img/MRI_SPECT/MRI/37.png new file mode 100644 index 0000000..ef0da3d Binary files /dev/null and b/test_img/MRI_SPECT/MRI/37.png differ diff --git a/test_img/MRI_SPECT/MRI/38.png b/test_img/MRI_SPECT/MRI/38.png new file mode 100644 index 0000000..b5bf0e3 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/38.png differ diff --git a/test_img/MRI_SPECT/MRI/39.png b/test_img/MRI_SPECT/MRI/39.png new file mode 100644 index 0000000..ca57578 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/39.png differ diff --git a/test_img/MRI_SPECT/MRI/40.png b/test_img/MRI_SPECT/MRI/40.png new file mode 100644 index 0000000..0c30b7b Binary files /dev/null and b/test_img/MRI_SPECT/MRI/40.png differ diff --git a/test_img/MRI_SPECT/MRI/41.png b/test_img/MRI_SPECT/MRI/41.png new file mode 100644 index 0000000..6007519 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/41.png differ diff --git a/test_img/MRI_SPECT/MRI/42.png b/test_img/MRI_SPECT/MRI/42.png new file mode 100644 index 0000000..6a79ffc Binary files /dev/null and b/test_img/MRI_SPECT/MRI/42.png differ diff --git a/test_img/MRI_SPECT/MRI/43.png b/test_img/MRI_SPECT/MRI/43.png new file mode 100644 index 0000000..670f01c Binary files /dev/null and b/test_img/MRI_SPECT/MRI/43.png differ diff --git a/test_img/MRI_SPECT/MRI/44.png b/test_img/MRI_SPECT/MRI/44.png new file mode 100644 index 0000000..d0bd95d Binary files /dev/null and b/test_img/MRI_SPECT/MRI/44.png differ diff --git a/test_img/MRI_SPECT/MRI/45.png b/test_img/MRI_SPECT/MRI/45.png new file mode 100644 index 0000000..ee1d9e4 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/45.png differ diff --git a/test_img/MRI_SPECT/MRI/46.png b/test_img/MRI_SPECT/MRI/46.png new file mode 100644 index 0000000..8676ff3 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/46.png differ diff --git a/test_img/MRI_SPECT/MRI/47.png b/test_img/MRI_SPECT/MRI/47.png new file mode 100644 index 0000000..168fb87 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/47.png differ diff --git a/test_img/MRI_SPECT/MRI/48.png b/test_img/MRI_SPECT/MRI/48.png new file mode 100644 index 0000000..cfa02ce Binary files /dev/null and b/test_img/MRI_SPECT/MRI/48.png differ diff --git a/test_img/MRI_SPECT/MRI/49.png b/test_img/MRI_SPECT/MRI/49.png new file mode 100644 index 0000000..117ca88 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/49.png differ diff --git a/test_img/MRI_SPECT/MRI/50.png b/test_img/MRI_SPECT/MRI/50.png new file mode 100644 index 0000000..3cc3099 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/50.png differ diff --git a/test_img/MRI_SPECT/MRI/51.png b/test_img/MRI_SPECT/MRI/51.png new file mode 100644 index 0000000..74a9ef0 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/51.png differ diff --git a/test_img/MRI_SPECT/MRI/52.png b/test_img/MRI_SPECT/MRI/52.png new file mode 100644 index 0000000..9fcd264 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/52.png differ diff --git a/test_img/MRI_SPECT/MRI/53.png b/test_img/MRI_SPECT/MRI/53.png new file mode 100644 index 0000000..c5aeece Binary files /dev/null and b/test_img/MRI_SPECT/MRI/53.png differ diff --git a/test_img/MRI_SPECT/MRI/54.png b/test_img/MRI_SPECT/MRI/54.png new file mode 100644 index 0000000..8b027f4 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/54.png differ diff --git a/test_img/MRI_SPECT/MRI/55.png b/test_img/MRI_SPECT/MRI/55.png new file mode 100644 index 0000000..492a298 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/55.png differ diff --git a/test_img/MRI_SPECT/MRI/56.png b/test_img/MRI_SPECT/MRI/56.png new file mode 100644 index 0000000..c811cd9 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/56.png differ diff --git a/test_img/MRI_SPECT/MRI/57.png b/test_img/MRI_SPECT/MRI/57.png new file mode 100644 index 0000000..6dfbe4b Binary files /dev/null and b/test_img/MRI_SPECT/MRI/57.png differ diff --git a/test_img/MRI_SPECT/MRI/58.png b/test_img/MRI_SPECT/MRI/58.png new file mode 100644 index 0000000..eb6de0f Binary files /dev/null and b/test_img/MRI_SPECT/MRI/58.png differ diff --git a/test_img/MRI_SPECT/MRI/59.png b/test_img/MRI_SPECT/MRI/59.png new file mode 100644 index 0000000..edb0d91 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/59.png differ diff --git a/test_img/MRI_SPECT/MRI/60.png b/test_img/MRI_SPECT/MRI/60.png new file mode 100644 index 0000000..5a0f712 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/60.png differ diff --git a/test_img/MRI_SPECT/MRI/61.png b/test_img/MRI_SPECT/MRI/61.png new file mode 100644 index 0000000..1abeeee Binary files /dev/null and b/test_img/MRI_SPECT/MRI/61.png differ diff --git a/test_img/MRI_SPECT/MRI/62.png b/test_img/MRI_SPECT/MRI/62.png new file mode 100644 index 0000000..b0aed64 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/62.png differ diff --git a/test_img/MRI_SPECT/MRI/63.png b/test_img/MRI_SPECT/MRI/63.png new file mode 100644 index 0000000..6f09260 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/63.png differ diff --git a/test_img/MRI_SPECT/MRI/64.png b/test_img/MRI_SPECT/MRI/64.png new file mode 100644 index 0000000..e575adc Binary files /dev/null and b/test_img/MRI_SPECT/MRI/64.png differ diff --git a/test_img/MRI_SPECT/MRI/65.png b/test_img/MRI_SPECT/MRI/65.png new file mode 100644 index 0000000..45c82c6 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/65.png differ diff --git a/test_img/MRI_SPECT/MRI/66.png b/test_img/MRI_SPECT/MRI/66.png new file mode 100644 index 0000000..c6d99ce Binary files /dev/null and b/test_img/MRI_SPECT/MRI/66.png differ diff --git a/test_img/MRI_SPECT/MRI/67.png b/test_img/MRI_SPECT/MRI/67.png new file mode 100644 index 0000000..31c7f59 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/67.png differ diff --git a/test_img/MRI_SPECT/MRI/68.png b/test_img/MRI_SPECT/MRI/68.png new file mode 100644 index 0000000..6b1f468 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/68.png differ diff --git a/test_img/MRI_SPECT/MRI/69.png b/test_img/MRI_SPECT/MRI/69.png new file mode 100644 index 0000000..8236c86 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/69.png differ diff --git a/test_img/MRI_SPECT/MRI/70.png b/test_img/MRI_SPECT/MRI/70.png new file mode 100644 index 0000000..b4ab65e Binary files /dev/null and b/test_img/MRI_SPECT/MRI/70.png differ diff --git a/test_img/MRI_SPECT/MRI/71.png b/test_img/MRI_SPECT/MRI/71.png new file mode 100644 index 0000000..77530f8 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/71.png differ diff --git a/test_img/MRI_SPECT/MRI/72.png b/test_img/MRI_SPECT/MRI/72.png new file mode 100644 index 0000000..61b53a4 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/72.png differ diff --git a/test_img/MRI_SPECT/MRI/73.png b/test_img/MRI_SPECT/MRI/73.png new file mode 100644 index 0000000..b6b207f Binary files /dev/null and b/test_img/MRI_SPECT/MRI/73.png differ diff --git a/test_img/MRI_SPECT/MRI/74.png b/test_img/MRI_SPECT/MRI/74.png new file mode 100644 index 0000000..16e3c4a Binary files /dev/null and b/test_img/MRI_SPECT/MRI/74.png differ diff --git a/test_img/MRI_SPECT/MRI/75.png b/test_img/MRI_SPECT/MRI/75.png new file mode 100644 index 0000000..f40b182 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/75.png differ diff --git a/test_img/MRI_SPECT/MRI/76.png b/test_img/MRI_SPECT/MRI/76.png new file mode 100644 index 0000000..eaf1029 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/76.png differ diff --git a/test_img/MRI_SPECT/MRI/77.png b/test_img/MRI_SPECT/MRI/77.png new file mode 100644 index 0000000..7abca07 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/77.png differ diff --git a/test_img/MRI_SPECT/MRI/78.png b/test_img/MRI_SPECT/MRI/78.png new file mode 100644 index 0000000..cc9b6ed Binary files /dev/null and b/test_img/MRI_SPECT/MRI/78.png differ diff --git a/test_img/MRI_SPECT/MRI/79.png b/test_img/MRI_SPECT/MRI/79.png new file mode 100644 index 0000000..338085a Binary files /dev/null and b/test_img/MRI_SPECT/MRI/79.png differ diff --git a/test_img/MRI_SPECT/MRI/80.png b/test_img/MRI_SPECT/MRI/80.png new file mode 100644 index 0000000..4c78634 Binary files /dev/null and b/test_img/MRI_SPECT/MRI/80.png differ diff --git a/test_img/MRI_SPECT/MRI/81.png b/test_img/MRI_SPECT/MRI/81.png new file mode 100644 index 0000000..72715da Binary files /dev/null and b/test_img/MRI_SPECT/MRI/81.png differ diff --git a/test_img/MRI_SPECT/MRI/82.png b/test_img/MRI_SPECT/MRI/82.png new file mode 100644 index 0000000..632ae0b Binary files /dev/null and b/test_img/MRI_SPECT/MRI/82.png differ diff --git a/test_img/MRI_SPECT/MRI/83.png b/test_img/MRI_SPECT/MRI/83.png new file mode 100644 index 0000000..caa45db Binary files /dev/null and b/test_img/MRI_SPECT/MRI/83.png differ diff --git a/test_img/MRI_SPECT/SPECT/11.png b/test_img/MRI_SPECT/SPECT/11.png new file mode 100644 index 0000000..7c74e0f Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/11.png differ diff --git a/test_img/MRI_SPECT/SPECT/12.png b/test_img/MRI_SPECT/SPECT/12.png new file mode 100644 index 0000000..00e5565 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/12.png differ diff --git a/test_img/MRI_SPECT/SPECT/13.png b/test_img/MRI_SPECT/SPECT/13.png new file mode 100644 index 0000000..c37006a Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/13.png differ diff --git a/test_img/MRI_SPECT/SPECT/14.png b/test_img/MRI_SPECT/SPECT/14.png new file mode 100644 index 0000000..f0c9401 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/14.png differ diff --git a/test_img/MRI_SPECT/SPECT/15.png b/test_img/MRI_SPECT/SPECT/15.png new file mode 100644 index 0000000..d38f93e Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/15.png differ diff --git a/test_img/MRI_SPECT/SPECT/16.png b/test_img/MRI_SPECT/SPECT/16.png new file mode 100644 index 0000000..5e2e4aa Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/16.png differ diff --git a/test_img/MRI_SPECT/SPECT/17.png b/test_img/MRI_SPECT/SPECT/17.png new file mode 100644 index 0000000..5f1b011 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/17.png differ diff --git a/test_img/MRI_SPECT/SPECT/18.png b/test_img/MRI_SPECT/SPECT/18.png new file mode 100644 index 0000000..1dd9328 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/18.png differ diff --git a/test_img/MRI_SPECT/SPECT/19.png b/test_img/MRI_SPECT/SPECT/19.png new file mode 100644 index 0000000..76bbfb9 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/19.png differ diff --git a/test_img/MRI_SPECT/SPECT/20.png b/test_img/MRI_SPECT/SPECT/20.png new file mode 100644 index 0000000..fa5d269 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/20.png differ diff --git a/test_img/MRI_SPECT/SPECT/21.png b/test_img/MRI_SPECT/SPECT/21.png new file mode 100644 index 0000000..1658ce3 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/21.png differ diff --git a/test_img/MRI_SPECT/SPECT/22.png b/test_img/MRI_SPECT/SPECT/22.png new file mode 100644 index 0000000..3237b50 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/22.png differ diff --git a/test_img/MRI_SPECT/SPECT/23.png b/test_img/MRI_SPECT/SPECT/23.png new file mode 100644 index 0000000..dfc92c9 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/23.png differ diff --git a/test_img/MRI_SPECT/SPECT/24.png b/test_img/MRI_SPECT/SPECT/24.png new file mode 100644 index 0000000..5501cd0 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/24.png differ diff --git a/test_img/MRI_SPECT/SPECT/25.png b/test_img/MRI_SPECT/SPECT/25.png new file mode 100644 index 0000000..0c76300 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/25.png differ diff --git a/test_img/MRI_SPECT/SPECT/26.png b/test_img/MRI_SPECT/SPECT/26.png new file mode 100644 index 0000000..fe149b2 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/26.png differ diff --git a/test_img/MRI_SPECT/SPECT/27.png b/test_img/MRI_SPECT/SPECT/27.png new file mode 100644 index 0000000..bf9e707 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/27.png differ diff --git a/test_img/MRI_SPECT/SPECT/28.png b/test_img/MRI_SPECT/SPECT/28.png new file mode 100644 index 0000000..1b5ba24 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/28.png differ diff --git a/test_img/MRI_SPECT/SPECT/29.png b/test_img/MRI_SPECT/SPECT/29.png new file mode 100644 index 0000000..298d2f4 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/29.png differ diff --git a/test_img/MRI_SPECT/SPECT/30.png b/test_img/MRI_SPECT/SPECT/30.png new file mode 100644 index 0000000..0b6acd3 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/30.png differ diff --git a/test_img/MRI_SPECT/SPECT/31.png b/test_img/MRI_SPECT/SPECT/31.png new file mode 100644 index 0000000..2604359 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/31.png differ diff --git a/test_img/MRI_SPECT/SPECT/32.png b/test_img/MRI_SPECT/SPECT/32.png new file mode 100644 index 0000000..76a2950 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/32.png differ diff --git a/test_img/MRI_SPECT/SPECT/33.png b/test_img/MRI_SPECT/SPECT/33.png new file mode 100644 index 0000000..59768a6 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/33.png differ diff --git a/test_img/MRI_SPECT/SPECT/34.png b/test_img/MRI_SPECT/SPECT/34.png new file mode 100644 index 0000000..ad9b437 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/34.png differ diff --git a/test_img/MRI_SPECT/SPECT/35.png b/test_img/MRI_SPECT/SPECT/35.png new file mode 100644 index 0000000..47d6f46 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/35.png differ diff --git a/test_img/MRI_SPECT/SPECT/36.png b/test_img/MRI_SPECT/SPECT/36.png new file mode 100644 index 0000000..194ee3b Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/36.png differ diff --git a/test_img/MRI_SPECT/SPECT/37.png b/test_img/MRI_SPECT/SPECT/37.png new file mode 100644 index 0000000..c08a2be Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/37.png differ diff --git a/test_img/MRI_SPECT/SPECT/38.png b/test_img/MRI_SPECT/SPECT/38.png new file mode 100644 index 0000000..1000cff Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/38.png differ diff --git a/test_img/MRI_SPECT/SPECT/39.png b/test_img/MRI_SPECT/SPECT/39.png new file mode 100644 index 0000000..7504ad3 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/39.png differ diff --git a/test_img/MRI_SPECT/SPECT/40.png b/test_img/MRI_SPECT/SPECT/40.png new file mode 100644 index 0000000..ef37b1c Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/40.png differ diff --git a/test_img/MRI_SPECT/SPECT/41.png b/test_img/MRI_SPECT/SPECT/41.png new file mode 100644 index 0000000..345b15a Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/41.png differ diff --git a/test_img/MRI_SPECT/SPECT/42.png b/test_img/MRI_SPECT/SPECT/42.png new file mode 100644 index 0000000..0504323 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/42.png differ diff --git a/test_img/MRI_SPECT/SPECT/43.png b/test_img/MRI_SPECT/SPECT/43.png new file mode 100644 index 0000000..58fafe5 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/43.png differ diff --git a/test_img/MRI_SPECT/SPECT/44.png b/test_img/MRI_SPECT/SPECT/44.png new file mode 100644 index 0000000..23d83f9 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/44.png differ diff --git a/test_img/MRI_SPECT/SPECT/45.png b/test_img/MRI_SPECT/SPECT/45.png new file mode 100644 index 0000000..7238551 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/45.png differ diff --git a/test_img/MRI_SPECT/SPECT/46.png b/test_img/MRI_SPECT/SPECT/46.png new file mode 100644 index 0000000..a721173 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/46.png differ diff --git a/test_img/MRI_SPECT/SPECT/47.png b/test_img/MRI_SPECT/SPECT/47.png new file mode 100644 index 0000000..47b42d4 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/47.png differ diff --git a/test_img/MRI_SPECT/SPECT/48.png b/test_img/MRI_SPECT/SPECT/48.png new file mode 100644 index 0000000..779b64c Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/48.png differ diff --git a/test_img/MRI_SPECT/SPECT/49.png b/test_img/MRI_SPECT/SPECT/49.png new file mode 100644 index 0000000..5c7e244 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/49.png differ diff --git a/test_img/MRI_SPECT/SPECT/50.png b/test_img/MRI_SPECT/SPECT/50.png new file mode 100644 index 0000000..5c6549e Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/50.png differ diff --git a/test_img/MRI_SPECT/SPECT/51.png b/test_img/MRI_SPECT/SPECT/51.png new file mode 100644 index 0000000..a2bd858 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/51.png differ diff --git a/test_img/MRI_SPECT/SPECT/52.png b/test_img/MRI_SPECT/SPECT/52.png new file mode 100644 index 0000000..9d9780e Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/52.png differ diff --git a/test_img/MRI_SPECT/SPECT/53.png b/test_img/MRI_SPECT/SPECT/53.png new file mode 100644 index 0000000..e69ab9d Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/53.png differ diff --git a/test_img/MRI_SPECT/SPECT/54.png b/test_img/MRI_SPECT/SPECT/54.png new file mode 100644 index 0000000..9c99775 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/54.png differ diff --git a/test_img/MRI_SPECT/SPECT/55.png b/test_img/MRI_SPECT/SPECT/55.png new file mode 100644 index 0000000..5ad554a Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/55.png differ diff --git a/test_img/MRI_SPECT/SPECT/56.png b/test_img/MRI_SPECT/SPECT/56.png new file mode 100644 index 0000000..fb258bc Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/56.png differ diff --git a/test_img/MRI_SPECT/SPECT/57.png b/test_img/MRI_SPECT/SPECT/57.png new file mode 100644 index 0000000..5f307f1 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/57.png differ diff --git a/test_img/MRI_SPECT/SPECT/58.png b/test_img/MRI_SPECT/SPECT/58.png new file mode 100644 index 0000000..3d6ea2a Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/58.png differ diff --git a/test_img/MRI_SPECT/SPECT/59.png b/test_img/MRI_SPECT/SPECT/59.png new file mode 100644 index 0000000..d03255a Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/59.png differ diff --git a/test_img/MRI_SPECT/SPECT/60.png b/test_img/MRI_SPECT/SPECT/60.png new file mode 100644 index 0000000..152875d Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/60.png differ diff --git a/test_img/MRI_SPECT/SPECT/61.png b/test_img/MRI_SPECT/SPECT/61.png new file mode 100644 index 0000000..64a6e66 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/61.png differ diff --git a/test_img/MRI_SPECT/SPECT/62.png b/test_img/MRI_SPECT/SPECT/62.png new file mode 100644 index 0000000..4b1ce66 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/62.png differ diff --git a/test_img/MRI_SPECT/SPECT/63.png b/test_img/MRI_SPECT/SPECT/63.png new file mode 100644 index 0000000..b0e3f49 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/63.png differ diff --git a/test_img/MRI_SPECT/SPECT/64.png b/test_img/MRI_SPECT/SPECT/64.png new file mode 100644 index 0000000..e501678 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/64.png differ diff --git a/test_img/MRI_SPECT/SPECT/65.png b/test_img/MRI_SPECT/SPECT/65.png new file mode 100644 index 0000000..c5d188f Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/65.png differ diff --git a/test_img/MRI_SPECT/SPECT/66.png b/test_img/MRI_SPECT/SPECT/66.png new file mode 100644 index 0000000..eac3563 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/66.png differ diff --git a/test_img/MRI_SPECT/SPECT/67.png b/test_img/MRI_SPECT/SPECT/67.png new file mode 100644 index 0000000..f47088d Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/67.png differ diff --git a/test_img/MRI_SPECT/SPECT/68.png b/test_img/MRI_SPECT/SPECT/68.png new file mode 100644 index 0000000..c04f897 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/68.png differ diff --git a/test_img/MRI_SPECT/SPECT/69.png b/test_img/MRI_SPECT/SPECT/69.png new file mode 100644 index 0000000..3258afe Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/69.png differ diff --git a/test_img/MRI_SPECT/SPECT/70.png b/test_img/MRI_SPECT/SPECT/70.png new file mode 100644 index 0000000..b5c3c6f Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/70.png differ diff --git a/test_img/MRI_SPECT/SPECT/71.png b/test_img/MRI_SPECT/SPECT/71.png new file mode 100644 index 0000000..abbc0a8 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/71.png differ diff --git a/test_img/MRI_SPECT/SPECT/72.png b/test_img/MRI_SPECT/SPECT/72.png new file mode 100644 index 0000000..e1e0f56 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/72.png differ diff --git a/test_img/MRI_SPECT/SPECT/73.png b/test_img/MRI_SPECT/SPECT/73.png new file mode 100644 index 0000000..8fddfa8 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/73.png differ diff --git a/test_img/MRI_SPECT/SPECT/74.png b/test_img/MRI_SPECT/SPECT/74.png new file mode 100644 index 0000000..3418f69 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/74.png differ diff --git a/test_img/MRI_SPECT/SPECT/75.png b/test_img/MRI_SPECT/SPECT/75.png new file mode 100644 index 0000000..0a3aef1 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/75.png differ diff --git a/test_img/MRI_SPECT/SPECT/76.png b/test_img/MRI_SPECT/SPECT/76.png new file mode 100644 index 0000000..11514b8 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/76.png differ diff --git a/test_img/MRI_SPECT/SPECT/77.png b/test_img/MRI_SPECT/SPECT/77.png new file mode 100644 index 0000000..0a36914 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/77.png differ diff --git a/test_img/MRI_SPECT/SPECT/78.png b/test_img/MRI_SPECT/SPECT/78.png new file mode 100644 index 0000000..f09ddb2 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/78.png differ diff --git a/test_img/MRI_SPECT/SPECT/79.png b/test_img/MRI_SPECT/SPECT/79.png new file mode 100644 index 0000000..dd863d7 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/79.png differ diff --git a/test_img/MRI_SPECT/SPECT/80.png b/test_img/MRI_SPECT/SPECT/80.png new file mode 100644 index 0000000..46530c7 Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/80.png differ diff --git a/test_img/MRI_SPECT/SPECT/81.png b/test_img/MRI_SPECT/SPECT/81.png new file mode 100644 index 0000000..6ef57bb Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/81.png differ diff --git a/test_img/MRI_SPECT/SPECT/82.png b/test_img/MRI_SPECT/SPECT/82.png new file mode 100644 index 0000000..54df3cf Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/82.png differ diff --git a/test_img/MRI_SPECT/SPECT/83.png b/test_img/MRI_SPECT/SPECT/83.png new file mode 100644 index 0000000..a1f91bf Binary files /dev/null and b/test_img/MRI_SPECT/SPECT/83.png differ diff --git a/test_img/RoadScene/ir/FLIR_00211.jpg b/test_img/RoadScene/ir/FLIR_00211.jpg new file mode 100644 index 0000000..cd6ceb5 Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_00211.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_00977.jpg b/test_img/RoadScene/ir/FLIR_00977.jpg new file mode 100644 index 0000000..f590162 Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_00977.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_01130.jpg b/test_img/RoadScene/ir/FLIR_01130.jpg new file mode 100644 index 0000000..214fd5e Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_01130.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_04269.jpg b/test_img/RoadScene/ir/FLIR_04269.jpg new file mode 100644 index 0000000..d363a6c Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_04269.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_04424.jpg b/test_img/RoadScene/ir/FLIR_04424.jpg new file mode 100644 index 0000000..309a24f Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_04424.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_04484.jpg b/test_img/RoadScene/ir/FLIR_04484.jpg new file mode 100644 index 0000000..389bc5b Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_04484.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_04512.jpg b/test_img/RoadScene/ir/FLIR_04512.jpg new file mode 100644 index 0000000..95a0547 Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_04512.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_04593.jpg b/test_img/RoadScene/ir/FLIR_04593.jpg new file mode 100644 index 0000000..bf22587 Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_04593.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_04688.jpg b/test_img/RoadScene/ir/FLIR_04688.jpg new file mode 100644 index 0000000..2a90186 Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_04688.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_04722.jpg b/test_img/RoadScene/ir/FLIR_04722.jpg new file mode 100644 index 0000000..1a910dc Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_04722.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_04943.jpg b/test_img/RoadScene/ir/FLIR_04943.jpg new file mode 100644 index 0000000..50c113a Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_04943.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_05005.jpg b/test_img/RoadScene/ir/FLIR_05005.jpg new file mode 100644 index 0000000..ac896b2 Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_05005.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_05064.jpg b/test_img/RoadScene/ir/FLIR_05064.jpg new file mode 100644 index 0000000..5fa1b49 Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_05064.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_05105.jpg b/test_img/RoadScene/ir/FLIR_05105.jpg new file mode 100644 index 0000000..aa6ba9d Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_05105.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_05857.jpg b/test_img/RoadScene/ir/FLIR_05857.jpg new file mode 100644 index 0000000..b00a08e Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_05857.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_05879.jpg b/test_img/RoadScene/ir/FLIR_05879.jpg new file mode 100644 index 0000000..aa60eab Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_05879.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_05893.jpg b/test_img/RoadScene/ir/FLIR_05893.jpg new file mode 100644 index 0000000..7e9ee59 Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_05893.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_05914.jpg b/test_img/RoadScene/ir/FLIR_05914.jpg new file mode 100644 index 0000000..8ccb3ef Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_05914.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_05955.jpg b/test_img/RoadScene/ir/FLIR_05955.jpg new file mode 100644 index 0000000..02d4062 Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_05955.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_06282.jpg b/test_img/RoadScene/ir/FLIR_06282.jpg new file mode 100644 index 0000000..b39aa6f Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_06282.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_06325.jpg b/test_img/RoadScene/ir/FLIR_06325.jpg new file mode 100644 index 0000000..337b94e Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_06325.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_06392.jpg b/test_img/RoadScene/ir/FLIR_06392.jpg new file mode 100644 index 0000000..9eee9dc Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_06392.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_06430.jpg b/test_img/RoadScene/ir/FLIR_06430.jpg new file mode 100644 index 0000000..e8f3c57 Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_06430.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_06506.jpg b/test_img/RoadScene/ir/FLIR_06506.jpg new file mode 100644 index 0000000..66f6063 Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_06506.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_06570.jpg b/test_img/RoadScene/ir/FLIR_06570.jpg new file mode 100644 index 0000000..4613dc5 Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_06570.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_06795.jpg b/test_img/RoadScene/ir/FLIR_06795.jpg new file mode 100644 index 0000000..570ba97 Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_06795.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_06974.jpg b/test_img/RoadScene/ir/FLIR_06974.jpg new file mode 100644 index 0000000..1e57498 Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_06974.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_06993.jpg b/test_img/RoadScene/ir/FLIR_06993.jpg new file mode 100644 index 0000000..c89f37a Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_06993.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_06995.jpg b/test_img/RoadScene/ir/FLIR_06995.jpg new file mode 100644 index 0000000..d5fdb26 Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_06995.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_07190.jpg b/test_img/RoadScene/ir/FLIR_07190.jpg new file mode 100644 index 0000000..11f9785 Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_07190.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_07206.jpg b/test_img/RoadScene/ir/FLIR_07206.jpg new file mode 100644 index 0000000..f416512 Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_07206.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_07209.jpg b/test_img/RoadScene/ir/FLIR_07209.jpg new file mode 100644 index 0000000..90b30b7 Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_07209.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_07555.jpg b/test_img/RoadScene/ir/FLIR_07555.jpg new file mode 100644 index 0000000..8c0a759 Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_07555.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_07732.jpg b/test_img/RoadScene/ir/FLIR_07732.jpg new file mode 100644 index 0000000..6b1af3d Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_07732.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_07786.jpg b/test_img/RoadScene/ir/FLIR_07786.jpg new file mode 100644 index 0000000..a5edada Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_07786.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_07809.jpg b/test_img/RoadScene/ir/FLIR_07809.jpg new file mode 100644 index 0000000..e9652af Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_07809.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_07968.jpg b/test_img/RoadScene/ir/FLIR_07968.jpg new file mode 100644 index 0000000..13e707b Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_07968.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_07970.jpg b/test_img/RoadScene/ir/FLIR_07970.jpg new file mode 100644 index 0000000..4b046af Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_07970.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_08021.jpg b/test_img/RoadScene/ir/FLIR_08021.jpg new file mode 100644 index 0000000..eb39208 Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_08021.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_08058.jpg b/test_img/RoadScene/ir/FLIR_08058.jpg new file mode 100644 index 0000000..3a5a346 Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_08058.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_08094.jpg b/test_img/RoadScene/ir/FLIR_08094.jpg new file mode 100644 index 0000000..b610c8b Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_08094.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_08202.jpg b/test_img/RoadScene/ir/FLIR_08202.jpg new file mode 100644 index 0000000..8848aa6 Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_08202.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_08248.jpg b/test_img/RoadScene/ir/FLIR_08248.jpg new file mode 100644 index 0000000..82ee73d Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_08248.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_08284.jpg b/test_img/RoadScene/ir/FLIR_08284.jpg new file mode 100644 index 0000000..19f4ee0 Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_08284.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_08526.jpg b/test_img/RoadScene/ir/FLIR_08526.jpg new file mode 100644 index 0000000..b89b82b Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_08526.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_08592.jpg b/test_img/RoadScene/ir/FLIR_08592.jpg new file mode 100644 index 0000000..78fe108 Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_08592.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_08721.jpg b/test_img/RoadScene/ir/FLIR_08721.jpg new file mode 100644 index 0000000..213d7c6 Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_08721.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_08858.jpg b/test_img/RoadScene/ir/FLIR_08858.jpg new file mode 100644 index 0000000..c86a5f7 Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_08858.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_09465.jpg b/test_img/RoadScene/ir/FLIR_09465.jpg new file mode 100644 index 0000000..c31550c Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_09465.jpg differ diff --git a/test_img/RoadScene/ir/FLIR_video_02829.jpg b/test_img/RoadScene/ir/FLIR_video_02829.jpg new file mode 100644 index 0000000..97adc9e Binary files /dev/null and b/test_img/RoadScene/ir/FLIR_video_02829.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_00211.jpg b/test_img/RoadScene/vi/FLIR_00211.jpg new file mode 100644 index 0000000..2a2d75f Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_00211.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_00977.jpg b/test_img/RoadScene/vi/FLIR_00977.jpg new file mode 100644 index 0000000..7f34629 Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_00977.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_01130.jpg b/test_img/RoadScene/vi/FLIR_01130.jpg new file mode 100644 index 0000000..0df7b4c Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_01130.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_04269.jpg b/test_img/RoadScene/vi/FLIR_04269.jpg new file mode 100644 index 0000000..ad7a671 Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_04269.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_04424.jpg b/test_img/RoadScene/vi/FLIR_04424.jpg new file mode 100644 index 0000000..e35e5f6 Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_04424.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_04484.jpg b/test_img/RoadScene/vi/FLIR_04484.jpg new file mode 100644 index 0000000..ae74d2f Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_04484.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_04512.jpg b/test_img/RoadScene/vi/FLIR_04512.jpg new file mode 100644 index 0000000..85405aa Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_04512.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_04593.jpg b/test_img/RoadScene/vi/FLIR_04593.jpg new file mode 100644 index 0000000..03da75e Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_04593.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_04688.jpg b/test_img/RoadScene/vi/FLIR_04688.jpg new file mode 100644 index 0000000..bc932e5 Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_04688.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_04722.jpg b/test_img/RoadScene/vi/FLIR_04722.jpg new file mode 100644 index 0000000..9b5d973 Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_04722.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_04943.jpg b/test_img/RoadScene/vi/FLIR_04943.jpg new file mode 100644 index 0000000..d6e5cd3 Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_04943.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_05005.jpg b/test_img/RoadScene/vi/FLIR_05005.jpg new file mode 100644 index 0000000..cd11b9d Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_05005.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_05064.jpg b/test_img/RoadScene/vi/FLIR_05064.jpg new file mode 100644 index 0000000..64a1c49 Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_05064.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_05105.jpg b/test_img/RoadScene/vi/FLIR_05105.jpg new file mode 100644 index 0000000..3bebc4f Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_05105.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_05857.jpg b/test_img/RoadScene/vi/FLIR_05857.jpg new file mode 100644 index 0000000..cf42ea8 Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_05857.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_05879.jpg b/test_img/RoadScene/vi/FLIR_05879.jpg new file mode 100644 index 0000000..277f397 Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_05879.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_05893.jpg b/test_img/RoadScene/vi/FLIR_05893.jpg new file mode 100644 index 0000000..eb26bc1 Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_05893.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_05914.jpg b/test_img/RoadScene/vi/FLIR_05914.jpg new file mode 100644 index 0000000..2383723 Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_05914.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_05955.jpg b/test_img/RoadScene/vi/FLIR_05955.jpg new file mode 100644 index 0000000..33ef312 Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_05955.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_06282.jpg b/test_img/RoadScene/vi/FLIR_06282.jpg new file mode 100644 index 0000000..4532f5b Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_06282.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_06325.jpg b/test_img/RoadScene/vi/FLIR_06325.jpg new file mode 100644 index 0000000..ece45d5 Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_06325.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_06392.jpg b/test_img/RoadScene/vi/FLIR_06392.jpg new file mode 100644 index 0000000..b965046 Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_06392.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_06430.jpg b/test_img/RoadScene/vi/FLIR_06430.jpg new file mode 100644 index 0000000..f89f0cb Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_06430.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_06506.jpg b/test_img/RoadScene/vi/FLIR_06506.jpg new file mode 100644 index 0000000..24914d2 Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_06506.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_06570.jpg b/test_img/RoadScene/vi/FLIR_06570.jpg new file mode 100644 index 0000000..7e60a24 Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_06570.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_06795.jpg b/test_img/RoadScene/vi/FLIR_06795.jpg new file mode 100644 index 0000000..3783195 Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_06795.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_06974.jpg b/test_img/RoadScene/vi/FLIR_06974.jpg new file mode 100644 index 0000000..97d8440 Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_06974.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_06993.jpg b/test_img/RoadScene/vi/FLIR_06993.jpg new file mode 100644 index 0000000..753b425 Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_06993.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_06995.jpg b/test_img/RoadScene/vi/FLIR_06995.jpg new file mode 100644 index 0000000..bc9472f Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_06995.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_07190.jpg b/test_img/RoadScene/vi/FLIR_07190.jpg new file mode 100644 index 0000000..e2cec6b Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_07190.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_07206.jpg b/test_img/RoadScene/vi/FLIR_07206.jpg new file mode 100644 index 0000000..9d16ae7 Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_07206.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_07209.jpg b/test_img/RoadScene/vi/FLIR_07209.jpg new file mode 100644 index 0000000..c4094d8 Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_07209.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_07555.jpg b/test_img/RoadScene/vi/FLIR_07555.jpg new file mode 100644 index 0000000..dd10e85 Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_07555.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_07732.jpg b/test_img/RoadScene/vi/FLIR_07732.jpg new file mode 100644 index 0000000..cc74e9b Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_07732.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_07786.jpg b/test_img/RoadScene/vi/FLIR_07786.jpg new file mode 100644 index 0000000..b1b7b48 Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_07786.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_07809.jpg b/test_img/RoadScene/vi/FLIR_07809.jpg new file mode 100644 index 0000000..2de5cd4 Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_07809.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_07968.jpg b/test_img/RoadScene/vi/FLIR_07968.jpg new file mode 100644 index 0000000..ac1febd Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_07968.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_07970.jpg b/test_img/RoadScene/vi/FLIR_07970.jpg new file mode 100644 index 0000000..c3bf951 Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_07970.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_08021.jpg b/test_img/RoadScene/vi/FLIR_08021.jpg new file mode 100644 index 0000000..52d2c9e Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_08021.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_08058.jpg b/test_img/RoadScene/vi/FLIR_08058.jpg new file mode 100644 index 0000000..a3dfaec Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_08058.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_08094.jpg b/test_img/RoadScene/vi/FLIR_08094.jpg new file mode 100644 index 0000000..12d90ff Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_08094.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_08202.jpg b/test_img/RoadScene/vi/FLIR_08202.jpg new file mode 100644 index 0000000..e6d0b31 Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_08202.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_08248.jpg b/test_img/RoadScene/vi/FLIR_08248.jpg new file mode 100644 index 0000000..02ecb16 Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_08248.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_08284.jpg b/test_img/RoadScene/vi/FLIR_08284.jpg new file mode 100644 index 0000000..e7de1e5 Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_08284.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_08526.jpg b/test_img/RoadScene/vi/FLIR_08526.jpg new file mode 100644 index 0000000..2abe574 Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_08526.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_08592.jpg b/test_img/RoadScene/vi/FLIR_08592.jpg new file mode 100644 index 0000000..0f0ef47 Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_08592.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_08721.jpg b/test_img/RoadScene/vi/FLIR_08721.jpg new file mode 100644 index 0000000..af32c05 Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_08721.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_08858.jpg b/test_img/RoadScene/vi/FLIR_08858.jpg new file mode 100644 index 0000000..45fed5b Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_08858.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_09465.jpg b/test_img/RoadScene/vi/FLIR_09465.jpg new file mode 100644 index 0000000..73a38d3 Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_09465.jpg differ diff --git a/test_img/RoadScene/vi/FLIR_video_02829.jpg b/test_img/RoadScene/vi/FLIR_video_02829.jpg new file mode 100644 index 0000000..e32454e Binary files /dev/null and b/test_img/RoadScene/vi/FLIR_video_02829.jpg differ diff --git a/test_img/TNO/ir/01.png b/test_img/TNO/ir/01.png new file mode 100644 index 0000000..c38c5e7 Binary files /dev/null and b/test_img/TNO/ir/01.png differ diff --git a/test_img/TNO/ir/02.png b/test_img/TNO/ir/02.png new file mode 100644 index 0000000..bc24f16 Binary files /dev/null and b/test_img/TNO/ir/02.png differ diff --git a/test_img/TNO/ir/03.png b/test_img/TNO/ir/03.png new file mode 100644 index 0000000..7f13765 Binary files /dev/null and b/test_img/TNO/ir/03.png differ diff --git a/test_img/TNO/ir/04.png b/test_img/TNO/ir/04.png new file mode 100644 index 0000000..8426357 Binary files /dev/null and b/test_img/TNO/ir/04.png differ diff --git a/test_img/TNO/ir/05.png b/test_img/TNO/ir/05.png new file mode 100644 index 0000000..3d396b8 Binary files /dev/null and b/test_img/TNO/ir/05.png differ diff --git a/test_img/TNO/ir/06.png b/test_img/TNO/ir/06.png new file mode 100644 index 0000000..008199d Binary files /dev/null and b/test_img/TNO/ir/06.png differ diff --git a/test_img/TNO/ir/07.png b/test_img/TNO/ir/07.png new file mode 100644 index 0000000..ad53018 Binary files /dev/null and b/test_img/TNO/ir/07.png differ diff --git a/test_img/TNO/ir/08.png b/test_img/TNO/ir/08.png new file mode 100644 index 0000000..a1ab241 Binary files /dev/null and b/test_img/TNO/ir/08.png differ diff --git a/test_img/TNO/ir/09.png b/test_img/TNO/ir/09.png new file mode 100644 index 0000000..1c54044 Binary files /dev/null and b/test_img/TNO/ir/09.png differ diff --git a/test_img/TNO/ir/10.png b/test_img/TNO/ir/10.png new file mode 100644 index 0000000..a60f65b Binary files /dev/null and b/test_img/TNO/ir/10.png differ diff --git a/test_img/TNO/ir/11.png b/test_img/TNO/ir/11.png new file mode 100644 index 0000000..2ec5a87 Binary files /dev/null and b/test_img/TNO/ir/11.png differ diff --git a/test_img/TNO/ir/12.png b/test_img/TNO/ir/12.png new file mode 100644 index 0000000..115e823 Binary files /dev/null and b/test_img/TNO/ir/12.png differ diff --git a/test_img/TNO/ir/13.png b/test_img/TNO/ir/13.png new file mode 100644 index 0000000..98ba48b Binary files /dev/null and b/test_img/TNO/ir/13.png differ diff --git a/test_img/TNO/ir/14.png b/test_img/TNO/ir/14.png new file mode 100644 index 0000000..837010d Binary files /dev/null and b/test_img/TNO/ir/14.png differ diff --git a/test_img/TNO/ir/15.png b/test_img/TNO/ir/15.png new file mode 100644 index 0000000..8dcdaa7 Binary files /dev/null and b/test_img/TNO/ir/15.png differ diff --git a/test_img/TNO/ir/16.png b/test_img/TNO/ir/16.png new file mode 100644 index 0000000..6c4abcc Binary files /dev/null and b/test_img/TNO/ir/16.png differ diff --git a/test_img/TNO/ir/17.png b/test_img/TNO/ir/17.png new file mode 100644 index 0000000..e38af64 Binary files /dev/null and b/test_img/TNO/ir/17.png differ diff --git a/test_img/TNO/ir/18.png b/test_img/TNO/ir/18.png new file mode 100644 index 0000000..77698d2 Binary files /dev/null and b/test_img/TNO/ir/18.png differ diff --git a/test_img/TNO/ir/19.png b/test_img/TNO/ir/19.png new file mode 100644 index 0000000..49913ed Binary files /dev/null and b/test_img/TNO/ir/19.png differ diff --git a/test_img/TNO/ir/20.png b/test_img/TNO/ir/20.png new file mode 100644 index 0000000..1323d4d Binary files /dev/null and b/test_img/TNO/ir/20.png differ diff --git a/test_img/TNO/ir/21.png b/test_img/TNO/ir/21.png new file mode 100644 index 0000000..2233c27 Binary files /dev/null and b/test_img/TNO/ir/21.png differ diff --git a/test_img/TNO/ir/22.png b/test_img/TNO/ir/22.png new file mode 100644 index 0000000..69c844f Binary files /dev/null and b/test_img/TNO/ir/22.png differ diff --git a/test_img/TNO/ir/23.png b/test_img/TNO/ir/23.png new file mode 100644 index 0000000..884b0c1 Binary files /dev/null and b/test_img/TNO/ir/23.png differ diff --git a/test_img/TNO/ir/24.png b/test_img/TNO/ir/24.png new file mode 100644 index 0000000..7e3d9fb Binary files /dev/null and b/test_img/TNO/ir/24.png differ diff --git a/test_img/TNO/ir/25.png b/test_img/TNO/ir/25.png new file mode 100644 index 0000000..235f1ad Binary files /dev/null and b/test_img/TNO/ir/25.png differ diff --git a/test_img/TNO/vi/01.png b/test_img/TNO/vi/01.png new file mode 100644 index 0000000..5eb1d0e Binary files /dev/null and b/test_img/TNO/vi/01.png differ diff --git a/test_img/TNO/vi/02.png b/test_img/TNO/vi/02.png new file mode 100644 index 0000000..7016fec Binary files /dev/null and b/test_img/TNO/vi/02.png differ diff --git a/test_img/TNO/vi/03.png b/test_img/TNO/vi/03.png new file mode 100644 index 0000000..44b7ec4 Binary files /dev/null and b/test_img/TNO/vi/03.png differ diff --git a/test_img/TNO/vi/04.png b/test_img/TNO/vi/04.png new file mode 100644 index 0000000..a14235d Binary files /dev/null and b/test_img/TNO/vi/04.png differ diff --git a/test_img/TNO/vi/05.png b/test_img/TNO/vi/05.png new file mode 100644 index 0000000..64f9a27 Binary files /dev/null and b/test_img/TNO/vi/05.png differ diff --git a/test_img/TNO/vi/06.png b/test_img/TNO/vi/06.png new file mode 100644 index 0000000..bf02704 Binary files /dev/null and b/test_img/TNO/vi/06.png differ diff --git a/test_img/TNO/vi/07.png b/test_img/TNO/vi/07.png new file mode 100644 index 0000000..c7de49b Binary files /dev/null and b/test_img/TNO/vi/07.png differ diff --git a/test_img/TNO/vi/08.png b/test_img/TNO/vi/08.png new file mode 100644 index 0000000..109e8aa Binary files /dev/null and b/test_img/TNO/vi/08.png differ diff --git a/test_img/TNO/vi/09.png b/test_img/TNO/vi/09.png new file mode 100644 index 0000000..0e9eb34 Binary files /dev/null and b/test_img/TNO/vi/09.png differ diff --git a/test_img/TNO/vi/10.png b/test_img/TNO/vi/10.png new file mode 100644 index 0000000..a6b45a7 Binary files /dev/null and b/test_img/TNO/vi/10.png differ diff --git a/test_img/TNO/vi/11.png b/test_img/TNO/vi/11.png new file mode 100644 index 0000000..df666fe Binary files /dev/null and b/test_img/TNO/vi/11.png differ diff --git a/test_img/TNO/vi/12.png b/test_img/TNO/vi/12.png new file mode 100644 index 0000000..a432909 Binary files /dev/null and b/test_img/TNO/vi/12.png differ diff --git a/test_img/TNO/vi/13.png b/test_img/TNO/vi/13.png new file mode 100644 index 0000000..df8280c Binary files /dev/null and b/test_img/TNO/vi/13.png differ diff --git a/test_img/TNO/vi/14.png b/test_img/TNO/vi/14.png new file mode 100644 index 0000000..2eca50f Binary files /dev/null and b/test_img/TNO/vi/14.png differ diff --git a/test_img/TNO/vi/15.png b/test_img/TNO/vi/15.png new file mode 100644 index 0000000..22d0aac Binary files /dev/null and b/test_img/TNO/vi/15.png differ diff --git a/test_img/TNO/vi/16.png b/test_img/TNO/vi/16.png new file mode 100644 index 0000000..ea31746 Binary files /dev/null and b/test_img/TNO/vi/16.png differ diff --git a/test_img/TNO/vi/17.png b/test_img/TNO/vi/17.png new file mode 100644 index 0000000..e94d2a2 Binary files /dev/null and b/test_img/TNO/vi/17.png differ diff --git a/test_img/TNO/vi/18.png b/test_img/TNO/vi/18.png new file mode 100644 index 0000000..737d95a Binary files /dev/null and b/test_img/TNO/vi/18.png differ diff --git a/test_img/TNO/vi/19.png b/test_img/TNO/vi/19.png new file mode 100644 index 0000000..ef2030b Binary files /dev/null and b/test_img/TNO/vi/19.png differ diff --git a/test_img/TNO/vi/20.png b/test_img/TNO/vi/20.png new file mode 100644 index 0000000..b4fef18 Binary files /dev/null and b/test_img/TNO/vi/20.png differ diff --git a/test_img/TNO/vi/21.png b/test_img/TNO/vi/21.png new file mode 100644 index 0000000..8cf3b5a Binary files /dev/null and b/test_img/TNO/vi/21.png differ diff --git a/test_img/TNO/vi/22.png b/test_img/TNO/vi/22.png new file mode 100644 index 0000000..9cfe11e Binary files /dev/null and b/test_img/TNO/vi/22.png differ diff --git a/test_img/TNO/vi/23.png b/test_img/TNO/vi/23.png new file mode 100644 index 0000000..754e2f7 Binary files /dev/null and b/test_img/TNO/vi/23.png differ diff --git a/test_img/TNO/vi/24.png b/test_img/TNO/vi/24.png new file mode 100644 index 0000000..760f0bf Binary files /dev/null and b/test_img/TNO/vi/24.png differ diff --git a/test_img/TNO/vi/25.png b/test_img/TNO/vi/25.png new file mode 100644 index 0000000..2c21a15 Binary files /dev/null and b/test_img/TNO/vi/25.png differ diff --git a/train.py b/train.py new file mode 100644 index 0000000..9ca0938 --- /dev/null +++ b/train.py @@ -0,0 +1,219 @@ +# -*- coding: utf-8 -*- + +''' +------------------------------------------------------------------------------ +Import packages +------------------------------------------------------------------------------ +''' + +from net import Restormer_Encoder, Restormer_Decoder, BaseFeatureExtraction, DetailFeatureExtraction +from utils.dataset import H5Dataset +import os +os.environ['KMP_DUPLICATE_LIB_OK'] = 'True' +import sys +import time +import datetime +import torch +import torch.nn as nn +from torch.utils.data import DataLoader +from utils.loss import Fusionloss, cc +import kornia + + + +''' +------------------------------------------------------------------------------ +Configure our network +------------------------------------------------------------------------------ +''' + + +os.environ['CUDA_VISIBLE_DEVICES'] = '0' +criteria_fusion = Fusionloss() +model_str = 'CDDFuse' + +# . Set the hyper-parameters for training +num_epochs = 120 # total epoch +epoch_gap = 40 # epoches of Phase I + +lr = 1e-4 +weight_decay = 0 +batch_size = 8 +GPU_number = os.environ['CUDA_VISIBLE_DEVICES'] +# Coefficients of the loss function +coeff_mse_loss_VF = 1. # alpha1 +coeff_mse_loss_IF = 1. +coeff_decomp = 2. # alpha2 and alpha4 +coeff_tv = 5. + +clip_grad_norm_value = 0.01 +optim_step = 20 +optim_gamma = 0.5 + + +# Model +device = 'cuda' if torch.cuda.is_available() else 'cpu' +DIDF_Encoder = nn.DataParallel(Restormer_Encoder()).to(device) +DIDF_Decoder = nn.DataParallel(Restormer_Decoder()).to(device) +BaseFuseLayer = nn.DataParallel(BaseFeatureExtraction(dim=64, num_heads=8)).to(device) +DetailFuseLayer = nn.DataParallel(DetailFeatureExtraction(num_layers=1)).to(device) + +# optimizer, scheduler and loss function +optimizer1 = torch.optim.Adam( + DIDF_Encoder.parameters(), lr=lr, weight_decay=weight_decay) +optimizer2 = torch.optim.Adam( + DIDF_Decoder.parameters(), lr=lr, weight_decay=weight_decay) +optimizer3 = torch.optim.Adam( + BaseFuseLayer.parameters(), lr=lr, weight_decay=weight_decay) +optimizer4 = torch.optim.Adam( + DetailFuseLayer.parameters(), lr=lr, weight_decay=weight_decay) + +scheduler1 = torch.optim.lr_scheduler.StepLR(optimizer1, step_size=optim_step, gamma=optim_gamma) +scheduler2 = torch.optim.lr_scheduler.StepLR(optimizer2, step_size=optim_step, gamma=optim_gamma) +scheduler3 = torch.optim.lr_scheduler.StepLR(optimizer3, step_size=optim_step, gamma=optim_gamma) +scheduler4 = torch.optim.lr_scheduler.StepLR(optimizer4, step_size=optim_step, gamma=optim_gamma) + +MSELoss = nn.MSELoss() +L1Loss = nn.L1Loss() +Loss_ssim = kornia.losses.SSIM(11, reduction='mean') + + +# data loader +trainloader = DataLoader(H5Dataset(r"data/MSRS_train_imgsize_128_stride_200.h5"), + batch_size=batch_size, + shuffle=True, + num_workers=0) + +loader = {'train': trainloader, } +timestamp = datetime.datetime.now().strftime("%m-%d-%H-%M") + +''' +------------------------------------------------------------------------------ +Train +------------------------------------------------------------------------------ +''' + +step = 0 +torch.backends.cudnn.benchmark = True +prev_time = time.time() + +for epoch in range(num_epochs): + ''' train ''' + for i, (data_VIS, data_IR) in enumerate(loader['train']): + data_VIS, data_IR = data_VIS.cuda(), data_IR.cuda() + DIDF_Encoder.train() + DIDF_Decoder.train() + BaseFuseLayer.train() + DetailFuseLayer.train() + + DIDF_Encoder.zero_grad() + DIDF_Decoder.zero_grad() + BaseFuseLayer.zero_grad() + DetailFuseLayer.zero_grad() + + optimizer1.zero_grad() + optimizer2.zero_grad() + optimizer3.zero_grad() + optimizer4.zero_grad() + + if epoch < epoch_gap: #Phase I + feature_V_B, feature_V_D, _ = DIDF_Encoder(data_VIS) + feature_I_B, feature_I_D, _ = DIDF_Encoder(data_IR) + data_VIS_hat, _ = DIDF_Decoder(data_VIS, feature_V_B, feature_V_D) + data_IR_hat, _ = DIDF_Decoder(data_IR, feature_I_B, feature_I_D) + + cc_loss_B = cc(feature_V_B, feature_I_B) + cc_loss_D = cc(feature_V_D, feature_I_D) + mse_loss_V = 5 * Loss_ssim(data_VIS, data_VIS_hat) + MSELoss(data_VIS, data_VIS_hat) + mse_loss_I = 5 * Loss_ssim(data_IR, data_IR_hat) + MSELoss(data_IR, data_IR_hat) + + Gradient_loss = L1Loss(kornia.filters.SpatialGradient()(data_VIS), + kornia.filters.SpatialGradient()(data_VIS_hat)) + + loss_decomp = (cc_loss_D) ** 2/ (1.01 + cc_loss_B) + + loss = coeff_mse_loss_VF * mse_loss_V + coeff_mse_loss_IF * \ + mse_loss_I + coeff_decomp * loss_decomp + coeff_tv * Gradient_loss + + loss.backward() + nn.utils.clip_grad_norm_( + DIDF_Encoder.parameters(), max_norm=clip_grad_norm_value, norm_type=2) + nn.utils.clip_grad_norm_( + DIDF_Decoder.parameters(), max_norm=clip_grad_norm_value, norm_type=2) + optimizer1.step() + optimizer2.step() + else: #Phase II + feature_V_B, feature_V_D, feature_V = DIDF_Encoder(data_VIS) + feature_I_B, feature_I_D, feature_I = DIDF_Encoder(data_IR) + feature_F_B = BaseFuseLayer(feature_I_B+feature_V_B) + feature_F_D = DetailFuseLayer(feature_I_D+feature_V_D) + data_Fuse, feature_F = DIDF_Decoder(data_VIS, feature_F_B, feature_F_D) + + + mse_loss_V = 5*Loss_ssim(data_VIS, data_Fuse) + MSELoss(data_VIS, data_Fuse) + mse_loss_I = 5*Loss_ssim(data_IR, data_Fuse) + MSELoss(data_IR, data_Fuse) + + cc_loss_B = cc(feature_V_B, feature_I_B) + cc_loss_D = cc(feature_V_D, feature_I_D) + loss_decomp = (cc_loss_D) ** 2 / (1.01 + cc_loss_B) + fusionloss, _,_ = criteria_fusion(data_VIS, data_IR, data_Fuse) + + loss = fusionloss + coeff_decomp * loss_decomp + loss.backward() + nn.utils.clip_grad_norm_( + DIDF_Encoder.parameters(), max_norm=clip_grad_norm_value, norm_type=2) + nn.utils.clip_grad_norm_( + DIDF_Decoder.parameters(), max_norm=clip_grad_norm_value, norm_type=2) + nn.utils.clip_grad_norm_( + BaseFuseLayer.parameters(), max_norm=clip_grad_norm_value, norm_type=2) + nn.utils.clip_grad_norm_( + DetailFuseLayer.parameters(), max_norm=clip_grad_norm_value, norm_type=2) + optimizer1.step() + optimizer2.step() + optimizer3.step() + optimizer4.step() + + # Determine approximate time left + batches_done = epoch * len(loader['train']) + i + batches_left = num_epochs * len(loader['train']) - batches_done + time_left = datetime.timedelta(seconds=batches_left * (time.time() - prev_time)) + prev_time = time.time() + sys.stdout.write( + "\r[Epoch %d/%d] [Batch %d/%d] [loss: %f] ETA: %.10s" + % ( + epoch, + num_epochs, + i, + len(loader['train']), + loss.item(), + time_left, + ) + ) + + # adjust the learning rate + + scheduler1.step() + scheduler2.step() + if not epoch < epoch_gap: + scheduler3.step() + scheduler4.step() + + if optimizer1.param_groups[0]['lr'] <= 1e-6: + optimizer1.param_groups[0]['lr'] = 1e-6 + if optimizer2.param_groups[0]['lr'] <= 1e-6: + optimizer2.param_groups[0]['lr'] = 1e-6 + if optimizer3.param_groups[0]['lr'] <= 1e-6: + optimizer3.param_groups[0]['lr'] = 1e-6 + if optimizer4.param_groups[0]['lr'] <= 1e-6: + optimizer4.param_groups[0]['lr'] = 1e-6 + +if True: + checkpoint = { + 'DIDF_Encoder': DIDF_Encoder.state_dict(), + 'DIDF_Decoder': DIDF_Decoder.state_dict(), + 'BaseFuseLayer': BaseFuseLayer.state_dict(), + 'DetailFuseLayer': DetailFuseLayer.state_dict(), + } + torch.save(checkpoint, os.path.join("models/CDDFuse_"+timestamp+'.pth')) + + diff --git a/utils/Evaluator.py b/utils/Evaluator.py new file mode 100644 index 0000000..0c6270e --- /dev/null +++ b/utils/Evaluator.py @@ -0,0 +1,305 @@ + +import numpy as np +import cv2 +import sklearn.metrics as skm +from scipy.signal import convolve2d +import math +from skimage.metrics import structural_similarity as ssim + +def image_read_cv2(path, mode='RGB'): + img_BGR = cv2.imread(path).astype('float32') + assert mode == 'RGB' or mode == 'GRAY' or mode == 'YCrCb', 'mode error' + if mode == 'RGB': + img = cv2.cvtColor(img_BGR, cv2.COLOR_BGR2RGB) + elif mode == 'GRAY': + img = np.round(cv2.cvtColor(img_BGR, cv2.COLOR_BGR2GRAY)) + elif mode == 'YCrCb': + img = cv2.cvtColor(img_BGR, cv2.COLOR_BGR2YCrCb) + return img + +class Evaluator(): + @classmethod + def input_check(cls, imgF, imgA=None, imgB=None): + if imgA is None: + assert type(imgF) == np.ndarray, 'type error' + assert len(imgF.shape) == 2, 'dimension error' + else: + assert type(imgF) == type(imgA) == type(imgB) == np.ndarray, 'type error' + assert imgF.shape == imgA.shape == imgB.shape, 'shape error' + assert len(imgF.shape) == 2, 'dimension error' + + @classmethod + def EN(cls, img): # entropy + cls.input_check(img) + a = np.uint8(np.round(img)).flatten() + h = np.bincount(a) / a.shape[0] + return -sum(h * np.log2(h + (h == 0))) + + @classmethod + def SD(cls, img): + cls.input_check(img) + return np.std(img) + + @classmethod + def SF(cls, img): + cls.input_check(img) + return np.sqrt(np.mean((img[:, 1:] - img[:, :-1]) ** 2) + np.mean((img[1:, :] - img[:-1, :]) ** 2)) + + @classmethod + def AG(cls, img): # Average gradient + cls.input_check(img) + Gx, Gy = np.zeros_like(img), np.zeros_like(img) + + Gx[:, 0] = img[:, 1] - img[:, 0] + Gx[:, -1] = img[:, -1] - img[:, -2] + Gx[:, 1:-1] = (img[:, 2:] - img[:, :-2]) / 2 + + Gy[0, :] = img[1, :] - img[0, :] + Gy[-1, :] = img[-1, :] - img[-2, :] + Gy[1:-1, :] = (img[2:, :] - img[:-2, :]) / 2 + return np.mean(np.sqrt((Gx ** 2 + Gy ** 2) / 2)) + + @classmethod + def MI(cls, image_F, image_A, image_B): + cls.input_check(image_F, image_A, image_B) + return skm.mutual_info_score(image_F.flatten(), image_A.flatten()) + skm.mutual_info_score(image_F.flatten(), + image_B.flatten()) + + @classmethod + def MSE(cls, image_F, image_A, image_B): # MSE + cls.input_check(image_F, image_A, image_B) + return (np.mean((image_A - image_F) ** 2) + np.mean((image_B - image_F) ** 2)) / 2 + + @classmethod + def CC(cls, image_F, image_A, image_B): + cls.input_check(image_F, image_A, image_B) + rAF = np.sum((image_A - np.mean(image_A)) * (image_F - np.mean(image_F))) / np.sqrt( + (np.sum((image_A - np.mean(image_A)) ** 2)) * (np.sum((image_F - np.mean(image_F)) ** 2))) + rBF = np.sum((image_B - np.mean(image_B)) * (image_F - np.mean(image_F))) / np.sqrt( + (np.sum((image_B - np.mean(image_B)) ** 2)) * (np.sum((image_F - np.mean(image_F)) ** 2))) + return (rAF + rBF) / 2 + + @classmethod + def PSNR(cls, image_F, image_A, image_B): + cls.input_check(image_F, image_A, image_B) + return 10 * np.log10(np.max(image_F) ** 2 / cls.MSE(image_F, image_A, image_B)) + + @classmethod + def SCD(cls, image_F, image_A, image_B): # The sum of the correlations of differences + cls.input_check(image_F, image_A, image_B) + imgF_A = image_F - image_A + imgF_B = image_F - image_B + corr1 = np.sum((image_A - np.mean(image_A)) * (imgF_B - np.mean(imgF_B))) / np.sqrt( + (np.sum((image_A - np.mean(image_A)) ** 2)) * (np.sum((imgF_B - np.mean(imgF_B)) ** 2))) + corr2 = np.sum((image_B - np.mean(image_B)) * (imgF_A - np.mean(imgF_A))) / np.sqrt( + (np.sum((image_B - np.mean(image_B)) ** 2)) * (np.sum((imgF_A - np.mean(imgF_A)) ** 2))) + return corr1 + corr2 + + @classmethod + def VIFF(cls, image_F, image_A, image_B): + cls.input_check(image_F, image_A, image_B) + return cls.compare_viff(image_A, image_F)+cls.compare_viff(image_B, image_F) + + @classmethod + def compare_viff(cls,ref, dist): # viff of a pair of pictures + sigma_nsq = 2 + eps = 1e-10 + + num = 0.0 + den = 0.0 + for scale in range(1, 5): + + N = 2 ** (4 - scale + 1) + 1 + sd = N / 5.0 + + # Create a Gaussian kernel as MATLAB's + m, n = [(ss - 1.) / 2. for ss in (N, N)] + y, x = np.ogrid[-m:m + 1, -n:n + 1] + h = np.exp(-(x * x + y * y) / (2. * sd * sd)) + h[h < np.finfo(h.dtype).eps * h.max()] = 0 + sumh = h.sum() + if sumh != 0: + win = h / sumh + + if scale > 1: + ref = convolve2d(ref, np.rot90(win, 2), mode='valid') + dist = convolve2d(dist, np.rot90(win, 2), mode='valid') + ref = ref[::2, ::2] + dist = dist[::2, ::2] + + mu1 = convolve2d(ref, np.rot90(win, 2), mode='valid') + mu2 = convolve2d(dist, np.rot90(win, 2), mode='valid') + mu1_sq = mu1 * mu1 + mu2_sq = mu2 * mu2 + mu1_mu2 = mu1 * mu2 + sigma1_sq = convolve2d(ref * ref, np.rot90(win, 2), mode='valid') - mu1_sq + sigma2_sq = convolve2d(dist * dist, np.rot90(win, 2), mode='valid') - mu2_sq + sigma12 = convolve2d(ref * dist, np.rot90(win, 2), mode='valid') - mu1_mu2 + + sigma1_sq[sigma1_sq < 0] = 0 + sigma2_sq[sigma2_sq < 0] = 0 + + g = sigma12 / (sigma1_sq + eps) + sv_sq = sigma2_sq - g * sigma12 + + g[sigma1_sq < eps] = 0 + sv_sq[sigma1_sq < eps] = sigma2_sq[sigma1_sq < eps] + sigma1_sq[sigma1_sq < eps] = 0 + + g[sigma2_sq < eps] = 0 + sv_sq[sigma2_sq < eps] = 0 + + sv_sq[g < 0] = sigma2_sq[g < 0] + g[g < 0] = 0 + sv_sq[sv_sq <= eps] = eps + + num += np.sum(np.log10(1 + g * g * sigma1_sq / (sv_sq + sigma_nsq))) + den += np.sum(np.log10(1 + sigma1_sq / sigma_nsq)) + + vifp = num / den + + if np.isnan(vifp): + return 1.0 + else: + return vifp + + @classmethod + def Qabf(cls, image_F, image_A, image_B): + cls.input_check(image_F, image_A, image_B) + gA, aA = cls.Qabf_getArray(image_A) + gB, aB = cls.Qabf_getArray(image_B) + gF, aF = cls.Qabf_getArray(image_F) + QAF = cls.Qabf_getQabf(aA, gA, aF, gF) + QBF = cls.Qabf_getQabf(aB, gB, aF, gF) + + # 计算QABF + deno = np.sum(gA + gB) + nume = np.sum(np.multiply(QAF, gA) + np.multiply(QBF, gB)) + return nume / deno + + @classmethod + def Qabf_getArray(cls,img): + # Sobel Operator Sobel + h1 = np.array([[1, 2, 1], [0, 0, 0], [-1, -2, -1]]).astype(np.float32) + h2 = np.array([[0, 1, 2], [-1, 0, 1], [-2, -1, 0]]).astype(np.float32) + h3 = np.array([[-1, 0, 1], [-2, 0, 2], [-1, 0, 1]]).astype(np.float32) + + SAx = convolve2d(img, h3, mode='same') + SAy = convolve2d(img, h1, mode='same') + gA = np.sqrt(np.multiply(SAx, SAx) + np.multiply(SAy, SAy)) + aA = np.zeros_like(img) + aA[SAx == 0] = math.pi / 2 + aA[SAx != 0]=np.arctan(SAy[SAx != 0] / SAx[SAx != 0]) + return gA, aA + + @classmethod + def Qabf_getQabf(cls,aA, gA, aF, gF): + L = 1 + Tg = 0.9994 + kg = -15 + Dg = 0.5 + Ta = 0.9879 + ka = -22 + Da = 0.8 + GAF,AAF,QgAF,QaAF,QAF = np.zeros_like(aA),np.zeros_like(aA),np.zeros_like(aA),np.zeros_like(aA),np.zeros_like(aA) + GAF[gA>gF]=gF[gA>gF]/gA[gA>gF] + GAF[gA == gF] = gF[gA == gF] + GAF[gA 1: + refA = convolve2d(refA, np.rot90(win, 2), mode='valid') + refB = convolve2d(refB, np.rot90(win, 2), mode='valid') + dist = convolve2d(dist, np.rot90(win, 2), mode='valid') + refA = refA[::2, ::2] + refB = refB[::2, ::2] + dist = dist[::2, ::2] + + mu1A = convolve2d(refA, np.rot90(win, 2), mode='valid') + mu1B = convolve2d(refB, np.rot90(win, 2), mode='valid') + mu2 = convolve2d(dist, np.rot90(win, 2), mode='valid') + mu1_sq_A = mu1A * mu1A + mu1_sq_B = mu1B * mu1B + mu2_sq = mu2 * mu2 + mu1A_mu2 = mu1A * mu2 + mu1B_mu2 = mu1B * mu2 + sigma1A_sq = convolve2d(refA * refA, np.rot90(win, 2), mode='valid') - mu1_sq_A + sigma1B_sq = convolve2d(refB * refB, np.rot90(win, 2), mode='valid') - mu1_sq_B + sigma2_sq = convolve2d(dist * dist, np.rot90(win, 2), mode='valid') - mu2_sq + sigma12_A = convolve2d(refA * dist, np.rot90(win, 2), mode='valid') - mu1A_mu2 + sigma12_B = convolve2d(refB * dist, np.rot90(win, 2), mode='valid') - mu1B_mu2 + + sigma1A_sq[sigma1A_sq < 0] = 0 + sigma1B_sq[sigma1B_sq < 0] = 0 + sigma2_sq[sigma2_sq < 0] = 0 + + gA = sigma12_A / (sigma1A_sq + eps) + gB = sigma12_B / (sigma1B_sq + eps) + sv_sq_A = sigma2_sq - gA * sigma12_A + sv_sq_B = sigma2_sq - gB * sigma12_B + + gA[sigma1A_sq < eps] = 0 + gB[sigma1B_sq < eps] = 0 + sv_sq_A[sigma1A_sq < eps] = sigma2_sq[sigma1A_sq < eps] + sv_sq_B[sigma1B_sq < eps] = sigma2_sq[sigma1B_sq < eps] + sigma1A_sq[sigma1A_sq < eps] = 0 + sigma1B_sq[sigma1B_sq < eps] = 0 + + gA[sigma2_sq < eps] = 0 + gB[sigma2_sq < eps] = 0 + sv_sq_A[sigma2_sq < eps] = 0 + sv_sq_B[sigma2_sq < eps] = 0 + + sv_sq_A[gA < 0] = sigma2_sq[gA < 0] + sv_sq_B[gB < 0] = sigma2_sq[gB < 0] + gA[gA < 0] = 0 + gB[gB < 0] = 0 + sv_sq_A[sv_sq_A <= eps] = eps + sv_sq_B[sv_sq_B <= eps] = eps + + numA += np.sum(np.log10(1 + gA * gA * sigma1A_sq / (sv_sq_A + sigma_nsq))) + numB += np.sum(np.log10(1 + gB * gB * sigma1B_sq / (sv_sq_B + sigma_nsq))) + denA += np.sum(np.log10(1 + sigma1A_sq / sigma_nsq)) + denB += np.sum(np.log10(1 + sigma1B_sq / sigma_nsq)) + + vifpA = numA / denA + vifpB =numB / denB + + if np.isnan(vifpA): + vifpA=1 + if np.isnan(vifpB): + vifpB = 1 + return vifpA+vifpB diff --git a/utils/dataset.py b/utils/dataset.py new file mode 100644 index 0000000..666175f --- /dev/null +++ b/utils/dataset.py @@ -0,0 +1,22 @@ +import torch.utils.data as Data +import h5py +import numpy as np +import torch + +class H5Dataset(Data.Dataset): + def __init__(self, h5file_path): + self.h5file_path = h5file_path + h5f = h5py.File(h5file_path, 'r') + self.keys = list(h5f['ir_patchs'].keys()) + h5f.close() + + def __len__(self): + return len(self.keys) + + def __getitem__(self, index): + h5f = h5py.File(self.h5file_path, 'r') + key = self.keys[index] + IR = np.array(h5f['ir_patchs'][key]) + VIS = np.array(h5f['vis_patchs'][key]) + h5f.close() + return torch.Tensor(VIS), torch.Tensor(IR) \ No newline at end of file diff --git a/utils/img_read_save.py b/utils/img_read_save.py new file mode 100644 index 0000000..41ca23b --- /dev/null +++ b/utils/img_read_save.py @@ -0,0 +1,21 @@ +import numpy as np +import cv2 +import os +from skimage.io import imsave + +def image_read_cv2(path, mode='RGB'): + img_BGR = cv2.imread(path).astype('float32') + assert mode == 'RGB' or mode == 'GRAY' or mode == 'YCrCb', 'mode error' + if mode == 'RGB': + img = cv2.cvtColor(img_BGR, cv2.COLOR_BGR2RGB) + elif mode == 'GRAY': + img = np.round(cv2.cvtColor(img_BGR, cv2.COLOR_BGR2GRAY)) + elif mode == 'YCrCb': + img = cv2.cvtColor(img_BGR, cv2.COLOR_BGR2YCrCb) + return img + +def img_save(image,imagename,savepath): + if not os.path.exists(savepath): + os.makedirs(savepath) + # Gray_pic + imsave(os.path.join(savepath, "{}.png".format(imagename)),image) \ No newline at end of file diff --git a/utils/loss.py b/utils/loss.py new file mode 100644 index 0000000..acb17b8 --- /dev/null +++ b/utils/loss.py @@ -0,0 +1,54 @@ +import torch +import torch.nn as nn +import torch.nn.functional as F + + + +class Fusionloss(nn.Module): + def __init__(self): + super(Fusionloss, self).__init__() + self.sobelconv=Sobelxy() + + def forward(self,image_vis,image_ir,generate_img): + image_y=image_vis[:,:1,:,:] + x_in_max=torch.max(image_y,image_ir) + loss_in=F.l1_loss(x_in_max,generate_img) + y_grad=self.sobelconv(image_y) + ir_grad=self.sobelconv(image_ir) + generate_img_grad=self.sobelconv(generate_img) + x_grad_joint=torch.max(y_grad,ir_grad) + loss_grad=F.l1_loss(x_grad_joint,generate_img_grad) + loss_total=loss_in+10*loss_grad + return loss_total,loss_in,loss_grad + +class Sobelxy(nn.Module): + def __init__(self): + super(Sobelxy, self).__init__() + kernelx = [[-1, 0, 1], + [-2,0 , 2], + [-1, 0, 1]] + kernely = [[1, 2, 1], + [0,0 , 0], + [-1, -2, -1]] + kernelx = torch.FloatTensor(kernelx).unsqueeze(0).unsqueeze(0) + kernely = torch.FloatTensor(kernely).unsqueeze(0).unsqueeze(0) + self.weightx = nn.Parameter(data=kernelx, requires_grad=False).cuda() + self.weighty = nn.Parameter(data=kernely, requires_grad=False).cuda() + def forward(self,x): + sobelx=F.conv2d(x, self.weightx, padding=1) + sobely=F.conv2d(x, self.weighty, padding=1) + return torch.abs(sobelx)+torch.abs(sobely) + + +def cc(img1, img2): + eps = torch.finfo(torch.float32).eps + """Correlation coefficient for (N, C, H, W) image; torch.float32 [0.,1.].""" + N, C, _, _ = img1.shape + img1 = img1.reshape(N, C, -1) + img2 = img2.reshape(N, C, -1) + img1 = img1 - img1.mean(dim=-1, keepdim=True) + img2 = img2 - img2.mean(dim=-1, keepdim=True) + cc = torch.sum(img1 * img2, dim=-1) / (eps + torch.sqrt(torch.sum(img1 ** + 2, dim=-1)) * torch.sqrt(torch.sum(img2**2, dim=-1))) + cc = torch.clamp(cc, -1., 1.) + return cc.mean() \ No newline at end of file