Posts

Showing posts from May, 2021

what is good dataset?

Image
    First things first, we need  to learn how to identify good data set! .I can make it easy for you  acronyms:                                                                            R-O-C-C-C                                                                                                                        R for reliable.       Like a good friend, good data sources are ...

image clustering technique using Kmeans

Image
 Kmeans algorithm is widely used to cluster image i.e grouping the image as per the color.  Kmeans basically use the technique to form a cluster by making decision boundry the code below will help you to get the proper grip on the idea. code import numpy as np import cv2 import matplotlib.pyplot as plt original_image = cv2.imread("/content/sample_data/ocen.png") original_image this few lines is importing essential lib. and uploading the image to see the cluster image of it. img=cv2.cvtColor(original_image,cv2.COLOR_BGR2RGB) #Next, converts the MxNx3 image into a Kx3 matrix where K=MxN and each row is now a vector in the 3-D space of RGB. vectorized = img.reshape(( -1 , 3 )) #We convert the unit8 values to float as it is a requirement of the k-means method of OpenCV. vect...