unet icon indicating copy to clipboard operation
unet copied to clipboard

Question about the data augmentation

Open Tao-Zhou opened this issue 7 years ago • 4 comments

in the dataPrepare.ipynb file, there are the code that #you will see 60 transformed images and their masks in data/membrane/train/aug num_batch = 3 for i,batch in enumerate(myGenerator): if(i >= num_batch): break my question is that how can get 60 transformed images? In my computer, I get at least 120 images, what's the reason? Could anyone help me? Thanks

Tao-Zhou avatar Aug 25 '18 13:08 Tao-Zhou

@Tao-Zhou i think its from https://github.com/zhixuhao/unet/blob/master/dataPrepare.ipynb image_arr,mask_arr = geneTrainNpy("data/membrane/train/aug/","data/membrane/train/aug/") #np.save("data/image_arr.npy",image_arr) #np.save("data/mask_arr.npy",mask_arr) The above lines first 60 are results of data augumentation done by zhixuhao if you run the code again you will get another 60 images .

ajithvcoder avatar Aug 28 '18 13:08 ajithvcoder

@ajithvallabai Thanks very much, I will have a try.

Tao-Zhou avatar Aug 30 '18 03:08 Tao-Zhou

Hello, I also have doubts about data augmentation. How can I know the exact number of augmented data or the rules of it? For example, my train data has 60 images, the batchsize is 2, epochs is 2. But after augmented, I create another directory to see the augmented results. The number of augmented images is 26. And it will change with different epochs, if epoch is 1, the number of augmented images is 24. What the reason for that?

Could someone explain that? Thanks a lot!

jizhang02 avatar May 26 '19 15:05 jizhang02

in the dataPrepare.ipynb file, there are the code that #you will see 60 transformed images and their masks in data/membrane/train/aug num_batch = 3 for i,batch in enumerate(myGenerator): if(i >= num_batch): break my question is that how can get 60 transformed images? In my computer, I get at least 120 images, what's the reason? Could anyone help me? Thanks

Out of 120 60 are augmented images and 60 are their corresponding masks. I hope this helps!

saqibshakeel035 avatar Aug 14 '20 07:08 saqibshakeel035