Different filters for pretrainned network

1 view (last 30 days)
Dina
Dina on 6 Aug 2024
Answered: Jaimin on 9 Aug 2024
if i have a group of images and i filtered all of them with different filters , is there a way or method or a published something or calculate a fator to know me which filtered group is best with specific pretrainned transfer learning network for classification task using matlab without training the network with each group of filtered images

Answers (2)

Image Analyst
Image Analyst on 6 Aug 2024
Only you would know if they preprocessing filters you tried will help your network classify the images better than with no preprocessing filters. I suggest you look at the images where the classification was wrong and try to figure out how to make those images look like the images your network worked well on.
We don't even know what your images look like since you forgot to attach any here. And you didn't say what you want to know. Are you trying to apply one class to the whole image (like whether or not it has puppies in it) or do you want to classify on a pixel-by-pixel basis (like indicate which pixels are puppy pixels and which are background pixels)?
Why do you think that preprocessing will help? Maybe you don't even need to do it. Does it fail badly if you don't preprocess?
Do you know what an ROC curve is? Maybe you should build one up to determine which filter is best. https://en.wikipedia.org/wiki/Receiver_operating_characteristic MATLAB has ROC functions roc, rocmetrics, etc. that might help.
  2 Comments
Dina
Dina on 6 Aug 2024
Edited: Dina on 6 Aug 2024
  • Sample of images are attached, the images are ultrasound images
  • The transfer learing for the network used for binary classification as normal and abnormal.
  • i used filters like quassian,median,wiener ,... filters that might be useful to enhance the quality of the ultrasound images.
  • i have a folder of the original noisy image and a folder for each applied filter
i dont know if the filtering is useful in training the network or not , and if it will affect in the training of the network to high the validation accuracy , which better in that case to train the network with each specific filtered images and etc or to calculate factors or values to know which one of these filters is the best without training the full network for each filtered images folder @Image Analyst

Sign in to comment.


Jaimin
Jaimin on 9 Aug 2024
Hi @Dina,
I understand that you want to evaluate existing pre-trained models using images processed with different types of filters to determine which approach most suitable for binary classification during transfer learning.
I can suggest you a 2-step process to achieve this.
First step: Feature extraction
Evaluate images with different filters using a pre-trained model (e.g., "resnet50") and fetch the feature vector from that model, follow these steps:
  1. Load the Pre-trained Model
  2. Prepare Image Groups
  3. Extract Features
Second step: Analyse Features
Collect the feature vectors for all images in each group (e.g. normal and abnormal). These vectors can then be used to perform statistical analysis, such as Principal Component Analysis (PCA) or calculating silhouette scores, to evaluate the separability and quality of the features extracted from each filtered group.
Compare the results from the different filtered groups to determine which filter produces the most discriminative features. This helps you identify the best filtering method to use before starting the transfer learning process.
For your reference, I have attached some useful resources
Performing transfer learning using resnet50: https://www.mathworks.com/help/deeplearning/ref/resnet50.html
Principal Component Analysis: https://www.mathworks.com/help/stats/pca.html
I hope this will be helpful to you.

Categories

Find more on Image Data Workflows in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!