No video

61 - How to create Gabor feature banks for machine learning

  Рет қаралды 17,004

DigitalSreeni

DigitalSreeni

Күн бұрын

Gabor is a great kernel to generate (extract) features from images for machine learning based image segmentation. This tutorial explains the process of generating feature banks using Gabor in Python. The tutorial also explains the process of applying these filters to an image.

Пікірлер: 39
@humbertogeologia
@humbertogeologia 2 жыл бұрын
One of the best tutorials i have ever seen... Good job and please keep the good work. Thanks
@masumehoseini8370
@masumehoseini8370 4 жыл бұрын
your videos are really good. the best in Gabor filters. thanks a lot.
@mahrouch
@mahrouch 4 жыл бұрын
Very instructive video, thank you very much
@MithileshDSCS
@MithileshDSCS 3 жыл бұрын
Hey once the dataframe is created, what should we do to predict the best set of parameters?
@thunderbolt489
@thunderbolt489 Жыл бұрын
Thank you for this video. I have question on training multiple images. For that do we need to concatenate the data to the df['Original Image'] column itself. Are there any changes needed while generating gabor features. Can you please let me know. Thanks in advance for the reply.
@cedricvumisa7416
@cedricvumisa7416 3 жыл бұрын
many thanks sir! good work!
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
You are welcome!
@limonhalder3933
@limonhalder3933 Жыл бұрын
What should i do for ultrasound images? What should be the parameters?
@umairsabir3519
@umairsabir3519 4 жыл бұрын
Hey Sreeni, your videos are quite knowledgable and productive for others. Just a quick question, can I use the Gabor filter for the detection of ROI regions from images. Suppose I have an image and the mask of the ROI region . Then I use Gabor to extract the features of that particular ROI region using the mask and train ML model. So, if a new image is coming, can I use that ML model to give me that particular ROI region? Its like object detection but in my dataset, the ROI instance does not vary. The only variation can be translation, scaling, rotation or affine.
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
Gabor is just a feature extractor, the exact application using gabor needs to be defined by you. In your example, you can use gabor from a small patch of your image to train a model (RF or SVM). But to find similar regions in other images you need to apply the trained model to entire image and then look at the probably map to find regions with high probability. But why go through all the exercise if template marching can do it easily?
@umairsabir3519
@umairsabir3519 4 жыл бұрын
@@DigitalSreeni I agree that template matching can do the trick. But template maching fails if the new image differs in translation, rotation, scaling, affine warping or shearing. I went through your non rigid transformation techniques as well. In the begining it seemed that dense flow is a good option but in my results dense flow is deforming the image after doing the registration. So if a new image has a different colour than reference image. The image is distorted or deformed after registration. But it works well with same color images.
@user-id3qp7bq9o
@user-id3qp7bq9o 4 жыл бұрын
Very Informative tuitorial. God bless you. if I want to extract gabor feature from 1000 images, where i need to modify in this code? I would appreciate any help. :)
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
Please watch my video 67 to learn how to apply a function to multiple images. In summary, you can put everything into a for loop and keep reading images and applying Gabor. Or, you can define a function for Gabor and apply it to each image that you read.
@user-id3qp7bq9o
@user-id3qp7bq9o 4 жыл бұрын
@@DigitalSreeni Thank you so much. Stay Safe
@engineering_with_motivation
@engineering_with_motivation 3 жыл бұрын
Very Informative tutorial. I want to extract Gabor feature from 1000 images and feed the features to CNN. How can I do that? I will appreciate any help.
@janasstory4974
@janasstory4974 4 жыл бұрын
how to get feature vector
@Camila-fv9qj
@Camila-fv9qj Жыл бұрын
Cant import getgaborkernal Give me an error there is no getgaborkernal in cv2
@lee-qk2vk
@lee-qk2vk 5 ай бұрын
i think plt.subplot would be better to show the three images
@pacomermela6497
@pacomermela6497 3 жыл бұрын
I'm not able to read GeoTiff files using the code in this examble. I supose cv2.imread don't support GeoTiff files. I'm thinking to convert the GeoTiff image in an NumPy array with 3 dimensions... The cv2.filter2D convolute properly with NumPy arrays? Thank you
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
Almost every image processing library threads images as numpy array. Even if you use any library that reads images as other objects you have to convert them to numpy array for any processing. Therefore, if you manage to read your images as numpy array you can follow the process from this video and also other image processing operations. Geotiff is like regular tiff except it has metadata data embedded. You can use rasterio or georaster library to read those files.
@nashraraza4324
@nashraraza4324 4 жыл бұрын
Can you please demonstrate how to show gabor filtered images with different orientations and wavelengths created in a filter bank?
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
Not sure what your exact question is, is it about displaying images and filters? In that case just plt.imshow() them. If it is about using the filters or machine learning please watch the follow up videos on my playlist.
@alexiscarlier2773
@alexiscarlier2773 4 жыл бұрын
Great again !! I have one more questions sorry... but really thanks you for your quick answer. I have some little grayscales images with homogeneous texture. Do you have a way for resume this gabor filters or others kernels into a single feature to be able to compares theses images? For example, I only use the median pixel value for regression analysis. Or in this case, is it preferable to use GLCM matrix for example?
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
What is your goal with this process? Are you trying to classify images based on their texture? If so, you can extract features and classify the entire image rather than segment each pixel. I plan on recording videos to use convolutional network outputs as inputs to Random Forest and I will make a video on classification.
@alexiscarlier2773
@alexiscarlier2773 4 жыл бұрын
@@DigitalSreeni I want to make a regression based on vegetations indices to predict an amount of nitrogen in this picture representing a field. But I think that adding a textural feature could improve the regression. But I need a single features of texture, but I don't know what kind of statistical feature use? How to sum up a gabor filter for example?
@minamohammed1321
@minamohammed1321 4 жыл бұрын
Hello, how to use gabor filter and PCA for dimensionality reduction opencv
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
I am not a big fan of PCA but if you want to know how to use it then you can just import it from sklearn: from sklearn.decomposition import PCA
@easirarafat7304
@easirarafat7304 3 жыл бұрын
sir, would you help me how to define a hyperspectral image(Indian pines dataset CSV file) as an image in this Gabor filtering code?
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
For hyperspectral images you can separate the channel you wish to send through feature extraction. You can use other channels as features during your training. I don't see any special tricks you need to apply, just identify the channel that requires feature extraction and apply Gabor (or other features).
@janasstory4974
@janasstory4974 4 жыл бұрын
how to do it for 40 orientations
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
Instead of range(2) for theta, change it to define a specific range, for example range(0, 90, 2) changes theta from 0 to 90 in steps of 2.
@yurikleb
@yurikleb 4 жыл бұрын
Great Tutorials! very clear, detailed and informative! Many thanks for putting those together. I'm learning a lot. Do you have any plans making a video about using HOG Feature Descriptor to train a model for object detection/classification?
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
Gabor is superior to HOG, in my view. If you can create feature banks with Gabor then I don't think you need HOG features anymore for machine learning. In summary, no I do not plan on talking about HOG.
@alexiscarlier2773
@alexiscarlier2773 4 жыл бұрын
Can we also use GLCM in the same way for image segmentation?
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
Ground Launched Cruise Missile? :) Anyway, GLCM, I guess you mean grey-level co-occurrence matrix can also be used for texture based analysis but I find Gabor to be more efficient.
@alexiscarlier2773
@alexiscarlier2773 4 жыл бұрын
@@DigitalSreeni yeah okok, but I don't really understand how? Because the matrix comes from a pretty large windows ? So finally, is it applicable at every pixel? and how does it work on the border between two texture?
@thorin6172
@thorin6172 4 жыл бұрын
How do it for dicom image? Becausse for these special images this code doesn't work for extract features :-(
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
It does work for dicom images and I have used it. Since dicom format can be tricky you just need to find out how to read them into python. I’ve used Pydicom in the past.
@thorin6172
@thorin6172 4 жыл бұрын
​@@DigitalSreeni Image in this format is corect read in python but I got this error: "img2 = cv2.cvtColor(ds, cv2.COLOR_BGR2GRAY) TypeError: src is not a numpy array, neither a scalar" where ds= dicom.dcmread('image-000001.dcm').
Whoa
01:00
Justin Flom
Рет қаралды 54 МЛН
Angry Sigma Dog 🤣🤣 Aayush #momson #memes #funny #comedy
00:16
ASquare Crew
Рет қаралды 46 МЛН
WILL IT BURST?
00:31
Natan por Aí
Рет қаралды 40 МЛН
How Stable Diffusion Works (AI Image Generation)
30:21
Gonkee
Рет қаралды 146 М.
A Complete Overview of Word Embeddings
17:17
AssemblyAI
Рет қаралды 106 М.
The Spectrogram and the Gabor Transform
13:15
Steve Brunton
Рет қаралды 63 М.
Why GPUs Outpace CPUs?
28:24
DigitalSreeni
Рет қаралды 2,4 М.
58 - What are Gabor filters?
25:59
DigitalSreeni
Рет қаралды 52 М.
Neural Networks Explained from Scratch using Python
17:38
Bot Academy
Рет қаралды 339 М.
69 - Image classification using Bag of Visual Words (BOVW)
38:09
DigitalSreeni
Рет қаралды 19 М.
Whoa
01:00
Justin Flom
Рет қаралды 54 МЛН