Advertisement

第5章:数据封装与加载及显示

阅读量:

项目在GitHub平台的官方页面地址为:https://github.com/orobix/retina-unet>

可供查阅的相关学术文献链接包括:Retina blood vessel segmentation with a convolution neural network (U-net) 以及 Retina blood vessel segmentation with a convolution neural network (U-net)

1.数据封装成HDF5格式

复制代码
 import os

    
 import h5py
    
 import numpy as np
    
 from PIL import Image
    
  
    
 def write_hdf5(arr,outfile):  # arr:数据  outfile:数据保存文件位置
    
   with h5py.File(outfile,"w") as f:
    
     f.create_dataset("image", data=a

全部评论 (0)

还没有任何评论哟~