TY - BOOK AU - Husnain, Ahmer AU - Supervisor Dr. Muhammad Imran TI - Advance Food Grading System (AFG) U1 - 621.382,HUS PY - 2023/// CY - MCS, NUST PB - Rawalpindi KW - UG EE Project N1 - Near-infrared (NIR) spectroscopy is growing as a valuable non-destructive analytical technique, acquiring prominence in a variety of application areas. This thesis describes the creation of a lowcost, portable NIR-based device for classifying fruits and grading milk. Using NIR sensors AS7263, the device measures the absorption of light by fruit samples at six distinct wavelengths. The data gathered by the aforementioned sensors is processed by machine learning algorithms in order to classify produce and grade milk. The device includes a web application that enables realtime viewing of classification results, thereby facilitating the making of informed decisions. The results of principal component analysis (PCA) indicate that the proposed device can effectively differentiate between various fruits and accurately detect variable milk-water percentages. Two distinct R-based machine learning models demonstrate that the classif.ranger algorithm can effectively classify fruits based on their spectral reflectance values and milk samples based on their spectral reflectance data with an accuracy of 0.964% and 96.36%, respectively. The analysis verifies that machine learning algorithms can be utilized effectively in the agriculture and dairy industries for quality control and food safety applications. The proposed device provides a costeffective alternative to the costly spectrometers presently on the market, which can be prohibitive for researchers and producers ER -