for studying; CNN preprocessing Codes here are programmed by myself and are used to simplify the processing in the daily study.
- reading and saving geotiff TiffReadClipWrite.py
- clipping the complete file to small patches TiffReadClipWrite.py
- selecting specific files according to user requirements and moving them to a new path SelectPatch.py
- producing training patches with special data types (such as samples for pix2pix which needs concatenating two individual samples) ConcatenateSamples.py
- transfer RGB images to HSV and segment shadows according a threshold in V band. (for the gully detection based on UAV images with a large areas of shadows) ShadowExtraction.py
- mosaic small patches into complete image through GDAL. GDALmosaic.py
- read spatial reference in original imagery and write it in target imagery. WriteSpatialReference.py
- read .pt(h) model file and transfer it to other type of models (.h5/.onnx) TransforPTtoothermodel.py
I used UNet, ResNet, ResUNet, pix2pix before, and I'll put them here in the next few weeks.
in this folder, you could use several net structure including RESUNET, RESUNET_PLUS_PLUS, UNET, AttU_Net in one train.py file. You could adjust the parameter of "MODELTYPE" in .yaml file to select different net structure.
- UNet
- UNet-Keras
- UNet-pytorch-origin version
- Adjusted UNet_pytorch can be found in ResUNet folder. (in train.py, adjusting the model to UNet in Line 42. The tag that can control the selection of models is in .ymal file.)
- Adjusted UNet_Keras (will be completed in the next few days)
- Tips: using mask01_crop (background: 0, target: 1)
- ResUNet
(the adjusted version1: add testing code; user can determine the learning rate, step size for the decrease of lr, validation steps, input paths and other parameters in .yaml file.)
- Tips: using mask_crop (background: 0, target: 255)
- pix2pix
I will focus on this repo in the next few weeks. in the current version, I rewrote the generator structure and used ResUNet (in keras Model) as the generator. The discriminator has not been changed until now.
Unet-Segmentation-Pytorch-Nest-of-Unets
pytorch including UNet, RCNN-UNet, Attention Unet, RCNN-Attention Unet and Nested UNet in Models.py.
in pytorch
a collection of GAN repositories.
All GAN completed by pytorch.
I am not clear about it now.