Choice GAN architecture for adjusting image quality - pytorch

I have experience with segmentation and classification of radiology images. For a new project I want to adjust image quality using a conditional GAN (or comparable) architecture. However, I have trouble finding the correct/most appropriate architecture.
My data in short: I have an images (X) with three different variations in image quality (X^1, X^2 and X^3), each variation is specific for a image. My goal is to train a conditional architecture to provide image Y with an adjusted image quality Y^1 if prompted.
Does anyone have some suggestions for a fitting architecture or tutorial to apply to my problem?

Related

Can't overcome Overfitting - GrayScale Images from Numerical Arrays and CNN with PyTorch

I am trying to implement an image classification task for the grayscale images, which were converted from some sensor readings. It means that I had initially time series data e.g. acceleration or displacement, then I transformed them into images. Before I do the transformation, I did apply normalization across the data. I have a 1000x9 image dimension where 1000 represents the total time step and 9 is the number of data points. The split ratio is 70%, 15%, and 15% for training, validation, and test data sets. There are 10 different labels, each label has 100 images, it's a multi-class classification task.
An example of my array before image conversion is:
As you see above, the precisions are so sensitive. When I convert them into images, I am able to see the darkness and white part of the image;
Imagine that I have a directory from D1 to D9 (damaged cases) and UN (health case) and there are so many images like this.
Then, I have a CNN-network where my goal is to make a classification. But, there is a significant overfitting issue and whatever I do it's not working out. One of the architecture I've been working on;
Model summary;
I also augment the data. After 250 epochs, this is what I get;
So, what I wonder is that I tried to apply some regularization or augmentation but they do not give me kind of solid results. I experimented it by changing the number of hidden units, layers, etc. Would you think that I need to fully change my architecture? I basically consider two blocks of CNN and FC layers at the end. This is not the first time I've been working on images like this, but I cannot mitigate this overfitting issue. I appreciate it if any of you give me some solid suggestions so I can get smooth results. i was thinking to use some pre-trained models for transfer learning but the image dimension causes some problems, do you know if I can use any of those pre-trained models with 1000x9 image dimension? I know there are some overfiting topics in the forum, but since those images are coming from numerical arrays and I could not make it work, I wanted to create a new title. Thank you!

azure custom vision model precision

Im having problems in identifying the best way to optimize the custom vision model.
In using Image classification, will labeling the same image with different label at different time effect the precision of machine learning?
//for example labeling and training image A today with the label 't-shirt', labeling and training image A tomorrow with the label 'blue'.
//We are basically trying to input one classification at a time with the same image (total of five classification, such as style and color) and wanted to know whether this way will effect the prediction precision.
Will labeling larger amount of data at once when inputing the image for machine learning increase the precision of the model? (for example, will there be any difference between 50 label and 100 label for an image to learn at a time?)
Is there any way to teach machine learning to identify object recognition using the result gained from the image classification, else can i teach image classification and object recognition separately with the same type of image?
Will running the learning process of the machine learning longer (for example, the difference between 1hour and 10hours) always give better results?

Training a CNN on temporal image data

I am working on a project where I have 1024x1024 brain images over time depicting blood flow. A blood flow parameter image is computed using the brain images over time, and is off the same dimension (1024 x 1024). My goal is to train a CNN to learn the mapping between the brain images over time and the blood flow parameter image.
I've looked into current CNN architectures, but it seems like most research on CNNs is either done for classification on single images (not images over time) or action recognition on video data, which I'm not sure my problem falls under. If anyone can provide me with any insight or papers I can read on how to train a model on temporal data, with the output being an image (rather than a classification score), that would be immensely helpful.

Keras data augmentation with change in outputs

I want to do regression with images. There are images of roads and the associated steering angle. As I want to apply data augmentation in Keras I would like to flip the input images horizontally but that would imply that the steering angle has to change its sign if the image is flipped. As far as I can see the documentation does not cover this problem. Is there a tutorial explaining how this can be achieved?
You have to write your own data-generator.
Check out the ImageLoader class (custom image generator) in my code here:
https://github.com/Golbstein/EDSR-Keras/blob/master/utilities.py

Image pre-processing for convolutional neural network

I want to make mushroom classifier with tensorflow using CNN.
But, I wonder about image data pre-processing.
Should I remove background of picture as black color or just use raw picture?
Also, if any pre-processing step before cnn what I do, please let me know.
The question is a little bit too broad, but I'll give you a hint.
Should I remove background of picture as black color or just use raw picture?
If you can do this, you can achieve higher accuracy with data augmentation, because you can generate training images with various backgrounds, thus help generalization.
Note however that by just removing the background the neural network will likely "get used" to the black background, so you would need to translate your test images as well, which in turn needs image segmentation.
Since image segmentation is even harder than classification, the background is usually left unchanged.
Also, if any pre-processing step before CNN what I do, please let me know.
The one pre-processing step that works consistently for all image related tasks is zero-centering: compute the mean value across the training set and use that value to zero-center the images. Be careful not to use test images in computing the mean.

Resources