AI-BASED VIRTUAL EYEWEAR TRY-ON SYSTEM By NAME: [Your Name] HT NO: [Your Hall Ticket Number] UNDER THE ESTEEMED GUIDANCE OF [Guide's Name] DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Introduction This project enables users to virtually try on glasses using AI face detection via MediaPipe. It helps people see how a frame looks on their face before purchase.
Modules in the Project → Image Upload Module → Try-On Module → Glasses Collection Module Each module helps to enhance the virtual trial room experience.
HTML Code Used <input type="file" id="imageUpload" accept="image/*" /> <canvas id="canvas"></canvas> <img src="glasses/pngwing.com.png" class="glasses-option" />
JavaScript / MediaPipe Logic → Detect face landmarks using MediaPipe → Get eye positions → Draw glasses on correct position using canvas API Basic Code Example: const imageUpload = document.getElementById("imageUpload"); const canvas = document.getElementById("canvas");
Output Screenshot [Insert screenshot here showing glasses on face]
THANK YOU! For your attention and support.
JavaScript Used in the Project We used JavaScript to perform 3 main tasks: 1️⃣ Load the uploaded image: - JavaScript reads the image chosen by the user. 2️⃣ Draw the image and glasses on canvas: - The canvas is used to show the face and overlay the selected glasses image. 3️⃣ Detect eyes using MediaPipe: - MediaPipe FaceMesh finds the eye positions. - JavaScript uses those points to place glasses correctly on the face. ➡️ This gives a realistic virtual try-on effect without any backend.