There are various varieties of Rice and lentils. Price fabrication and adulteration have been some of the various issues faced by the consumers, farmers and wholesale retailers. Traditional methods for Identification of these similar types of grains and their quality analysis are crude and inaccurate. Methods were tried to implemented earlier but due to financial inability and low efficiency, they weren’t successful. To overcome this problem, the project proposes a method that uses a machine learning technique for identification and quality analysis of these grains. Rice and Lentils which have the maximum consumption have been selected. Lentils are designated into classes based on colors. The technique of determining the elegance of a lentil is with the aid of seed coat shade. Red lentils can be confirmed through the cotyledon coloration. Lentil types may also have a huge variety of seed coat colors from inexperienced, red, speckled inexperienced, black and tan. The cotyledon colour may be red, yellow or inexperienced. The size and color of every Indian Lentil type (i.e. Red, Green, and Yellow, Black, White) are decided to be large or Medium or small, then size and colour end up part of the grade name. An smart machine is used to perceive the kind of Indian lentils from bulk samples. The proposed machine allows kernel length and coloration size using picture processing techniques. These Lentil size measurements, when combined with color attributes of the sample, classify three lentil varieties commonly grown in India with the highest accuracy. Rice is one of most consumed grains in India so its quality is of utmost importance. In this project, we identify and grade five types of rice and grade them with the help of their distinguished features such as size, color, shape, and surface. The project works in three phases viz., Feature Extraction, Training, and Testing. Various rice grain has a different shape, size, surface and various lentils come in different colors, Hence the feature that will be extracted is texture and colors. The method of regression will be adopted for the grading mechanism where the output will be in terms of percentage purity. The methodology for the extraction of the feature will be GLCM and Edge Detection where for supervised learning SVM and Back Propagation will be utilized. The project provides an efficient replacement for the traditional grading mechanism and standardizes the pricing of farm products based on their quality only.