International Journal on Science and Technology (IJSAT)
E-ISSN: 2229-7677 ● Website: [Link] ● Email: editor@[Link]
Virtual Try-On System Using MediaPipe and
OpenCV for AI-Based Clothing Overlay
Nair Krishnapriya1, Mr. Dhruv Panchal2, Asst. Prof Jui Khammar3,
Dr. Dulari Bhatt 4
1
UG Student, 2Project Manager, 3Professor, 4Master Trainer
1, 3
Dept. of Computer Engineering, SAL College of Engineering, Ahmedabad, Gujarat, India;
2
Data Vidwan, Ahmedabad, Gujarat, India
4
Edunet foundation, India,
Abstract
Artificial Intelligence (AI) integration in fashion has created virtual try-on systems that improve
the shopping experience of users in online shopping spaces. This paper discusses a real-time AI-
based virtual try-on technique using MediaPipe and OpenCV to deliver an interactive and
personalized clothing trial experience to the user. The system finds human pose keypoints like
elbows, hips, and shoulders using MediaPipe to compute accurately the scale, position, and
orientation for garment positioning. Processing webcam input, overlaying clothing images, and
rendering the final display output uses OpenCV. In contrast to the conventional approaches that
depend on pre-trained generative models or 3D avatar construction, this technique enables users
dynamically to upload whatever clothing image they like, which in turn is remapped in real time
onto their live webcam stream so that they can freely move while keeping garments aligned. The
system provides a platform-independent, easy-to-use solution that accommodates flexible
personalization and real-time responsiveness and plays a role in the continuous development of
smart fashion technologies. The suggested framework is a lightweight replacement for deep
generative models but achieves realistic performance and user experience in virtual garment
trials.
Keywords: Virtual Try-On, MediaPipe, OpenCV, Pose Estimation, Real-Time Clothing Overlay,
Artificial Intelligence, Computer Vision, Smart Fashion, Human Keypoint Detection
1. Introduction
Over the last few years, the high-tech development in Artificial Intelligence (AI) and computer vision
technology has profoundly altered consumer engagement with online shopping websites, particularly
within the fashion category. Virtual try-on (VTO) platforms have come up as one of the most impactful
and groundbreaking measures to bridge the disconnect between physical and digital shopping
experience. These systems enable users to virtually try on clothing and get an impression of how apparel
will fit and appear on their own bodies before purchasing. Not only does this improve user experience,
but also minimize returns, which has historically been an e-commerce problem [1,2,9].
IJSAT25024407 Volume 16, Issue 2, April-June 2025 1
International Journal on Science and Technology (IJSAT)
E-ISSN: 2229-7677 ● Website: [Link] ● Email: editor@[Link]
Conventional e-commerce is based mostly on static images and generic product descriptions, which
cannot accurately reflect the actual fit or look of clothes on various body types. Consequently, most
consumers experience challenges in making informed buying decisions, with a tendency to end up
dissatisfied and having to make more returns. Virtual try-on systems attempt to solve this problem by
enabling users to see how apparel items will fit on them in an interactive, dynamic way. Nonetheless,
despite VTO systems having come a long way, accurate body pose estimation, real-time processing, and
clothing alignment continue to be prevalent issues [5,7]. In addition, most current solutions depend on
deep learning models or 3D garment simulation methods or generative adversarial networks(GANs),
which need vast computational resources, large datasets, and lengthy training processes [10,17]. This
tends to restrict the scalability and accessibility of VTO systems, especially for small companies or
developers who do not have access to powerful equipment or specialized software.
This paper proposes a new solution to virtual try-on by combining MediaPipe for pose estimation and
OpenCV for real-time image processing. Compared to most other systems that are dependent on
powerful computing resources or pre-defined garment models, our system enables users to upload their
own desired clothing image and merge it effortlessly with their live webcam [Link], a
lightweight and efficient real-time computer vision library, is used to detect significant human body
keypoints such as shoulders, hips, elbows, and knees. The keypoints are used to calculate the scale,
pose, and orientation of the clothing image with respect to the user's body so that the garment is
aligned correctly while being virtually tried [Link] manages the image processing, resizing, and
overlaying of the clothes image onto the body of the user, keeping the visual output in real time updated
as the user moves around before the camera.
The primary advantage of our solution is its simplicity, effectiveness, and scalability. With the use of
MediaPipe, which offers pre-trained pose detection models, our system does not require lengthy training
or data acquisition. OpenCV, a popular library for image processing and computer vision, further allows
quick processing and native integration with webcam input, thereby making the system available to
developers on different platforms. This real-time processing method ensures that the apparel is
dynamically posed to the user's pose, even when the user is in motion, which greatly improves the user
experience over static image-based solutions [6,8].
2. Literature Review
Virtual Try-On (VTO) technology is a huge step towards online fashion and shopping. It allows
customers to try on clothes virtually prior to purchasing them. With the popularity of online shopping,
VTO systems evolved from basic 2D images to sophisticated, real-time augmented reality (AR) systems
that leverage deep learning and pose estimation technologies. These systems perform optimally when
they can reliably detect body poses, warp clothes correctly, and render images smoothly in real-time.
This requirement of precision has driven a lot of research in this direction.
Pose estimation is highly crucial for VTO systems nowadays because it assists in detecting key points on
the human body essential for clothing fitting. MediaPipe [6], a lightweight framework developed by
Google, is highly used for real-time pose estimation because it is highly accurate and does not require
much computer power. It detects major body points such as shoulders, elbows, hips, and knees, which
IJSAT25024407 Volume 16, Issue 2, April-June 2025 2
International Journal on Science and Technology (IJSAT)
E-ISSN: 2229-7677 ● Website: [Link] ● Email: editor@[Link]
are essential for accurate clothing fitting. Apart from MediaPipe, other systems such as OpenPose [7]
and AlphaPose [8] have also improved greatly in detecting body landmarks. These systems rely on
convolutional neural networks (CNNs) to detect human poses in real-time, but they require a lot of
computer power. Nevertheless, new lightweight pose detection models have rendered these systems
applicable in other uses, such as real-time virtual try-ons.
Following pose landmark detection, clothing alignment is the next problem. Earlier, VTO systems
employed 3D body models and garment simulations, which were computationally demanding and time-
consuming in real-time scenarios. But now, more efficient 2D image-based techniques are employed.
Homography transformation [9] is one of the common techniques employed for clothing image
alignment with the detected human pose. By aligning the clothing image with the pose key points, this
technique is an easier but efficient method of aligning clothes. Another technique, Generative
Adversarial Networks (GANs), like VITON [12] and Deep Fashion [13], have been employed for
realistic clothing overlays generation by producing garments sized to the detected body pose. Although
GAN techniques give very good output, they typically need large datasets and high-performance
machines and are hence not suitable for real-time scenarios.
Real-time virtual try-on systems require the integration of pose estimation, clothing alignment, and
efficient rendering in the interest of a smooth user experience. Virtual try-on has been achieved with the
use of augmented reality (AR) systems, where users can observe clothing on their body in real-time.
These systems, usually employing depth cameras and pose detection algorithms, have been deployed
both in mobile and in-store environments, offering interactive and realistic virtual fitting experiences.
For instance, the integration of AI and AR has been explored in several studies, such as Marelli et al. [1],
using a combination of pose estimation and 3D garment models for enhancing virtual try-on accuracy.
Despite such innovation, these systems remain resource-intensive and usually infeasible to deploy on
systems with limited computational capabilities.
Table1: Summary of Literature Review
Study Key Focus Technologies/ Key Findings
Methods
Marelli et al. AI-based virtual MediaPipe, Deep Aims at enhancing virtual try-on with
(2022) [1] try-on web learning AI for enhanced user
application experience; resolves garment fitting
accuracy problems.
Mohammadi & AI applications in AI, virtual try-on, Explains the use of AI in virtual try-ons
Kalhor (2021) virtual try-on fashion creation and
[2] &fashion fashion, emphasizing the requirement fo
creation r efficient and scalable systems.
DeAlmeida Consumer AI, VTO systems, Talks about consumer
(2021) [3] acceptance of AI- consumer behavior behavior for virtual try-on since it
based VTO highlights the importance
systems of system accuracy as well as user
acceptance.
IJSAT25024407 Volume 16, Issue 2, April-June 2025 3
International Journal on Science and Technology (IJSAT)
E-ISSN: 2229-7677 ● Website: [Link] ● Email: editor@[Link]
Dhatrak et al. Improving fit Deep learning, AI- Improving fit prediction using deep
(2024) [4] prediction and based VTO learning models, solving clothing
user alignment issues.
convenience
using deep
learning
Fenanda et al. Virtual try- AI, AR, VTO, Examines the effect of virtual try-ons
(2024) [5] on of facial consumer behavior in online shopping, referencing AR's
beauty products ability to increase purchase intention.
Mihăilă (2023) 3D clothing 3D simulation, face Stresses 3D garment simulation, facial
[6] simulation recognition, deep expression recognition, and generative
& face learning AI for realistic VTO.
recognition
Islam et al. Deep learning in Deep learning, VTO, In-depth review of deep
(2024) [7] virtual try-on CNNs learning techniques in virtual try-
on, emphasizing issues in real-time
applications.
Goel et al. Virtual try- VTO, deep learning, Compares different virtual try-on
(2024) [8] on methods and cr CNNs methods, their advantages
itiques and disadvantages for real-
world applications.
Nawaz et al. Technology- Brand engagement, Emphasizes brand
(2025) [9] enabled virtual VTO, AR engagement with VTO and ability of
try-on services AR to improve online
shopping experience.
Hashmi et al. FashionFit: 3D Neural body fit, deep Discusses the use of deep learning
(2020) [10] pose & neural learning, VTO for personalized
body fit virtual try-ons, with a focus on body
for personalized pose mapping for better fitting.
VTO
Aakash et al. AI-based fashion Virtual try-on, Overview of the entire spectrum of AI-
(2024) [11] technologies AI, clothing based fashion technologies, from virtual
detection, try-ons to clothing detection.
recommendation
systems
Ghodhbani et Virtual try- Image-based VTO, Considers various methods of trying on
al. (2022) [12] on clothing CNNs, deep learning clothing
online, referring to the challenge of achi
eving realistic results.
Samy et al. FITMI: AI, real-time VTO, Aims to develop realistic VTO solutions
(2025) [13] Realistic VTO deep learning for real-time use, solving issues such
solution as fabric behavior.
IJSAT25024407 Volume 16, Issue 2, April-June 2025 4
International Journal on Science and Technology (IJSAT)
E-ISSN: 2229-7677 ● Website: [Link] ● Email: editor@[Link]
Bratu (2024) Digital clothing AR, AI, body image Examines the effect of digital clothing
[14] try-on apps & recognition try-ons on body image disturbance and
body image self-presentation.
Dharmani et Improving AI, dataset Its focus is on methodology
al. (2024) [15] virtual try-on effectiveness, deep development for accuracy
methodologies learning enhancement in VTO and dataset
effectiveness.
Gupta et al. Realistic virtual Machine learning, Studies how machine
(2024) [16] try-on using VTO, AI learning can make virtual try-ons more
machine learning realistic.
Hsieh et al. FashionOn: Image-based VTO, Focuses on semantic-guided image-
(2019) [17] Semantic-guided semantic-guided based virtual try-
image-based learning on, merging accurate human and
virtual try-on clothing knowledge.
Vaishnavi et al. Virtual try-on & AI, fashion VTO This research intends to link onlin
(2024) [18] fashion recommendation e shopping with in-store shopping
recommendations through fashion recommendations and
virtual try-ons.
Alzu'bi et al. Interactive 3D VTO, interactive Discusses interactive fashion
(2023) [19] fashion fashion, AI recommendations maintainingthe origin
recommendation al traits and applying 3D VTO
& 3D image- for improved fitting.
based VTO
Hareesh Virtual Try-On in VTO, Industry 4.0, Reviews the role of virtual try-ons in
Kumar and Industry 4.0 fashion technology Industry 4.0, focusing on the impact of
Ambeesh Mon emerging technologies on virtual
(2022) [20] shopping.
IJSAT25024407 Volume 16, Issue 2, April-June 2025 5
International Journal on Science and Technology (IJSAT)
E-ISSN: 2229-7677 ● Website: [Link] ● Email: editor@[Link]
3. Architecture
Figure 1: Working Flow
4. Result Analysis
The MediaPipe and OpenCV-based virtual try-on system could detect body poses and overlay clothes in
real time. The model tracked body points like shoulders, hips, and elbows to decide where and how big
to place the clothing image. The system worked well in most common indoor settings and delivered a
good-looking overlay in most test cases.
Table 2: Result Analysis
Aspect Details
System Description Detects body pose and overlays clothing in real-time using MediaPipe&
OpenCV.
Keypoint Tracking Tracks shoulders, hips, elbows to determine size and position of clothing
Pose Estimation ~92% in well-lit, front-facing conditions
Accuracy
IJSAT25024407 Volume 16, Issue 2, April-June 2025 6
International Journal on Science and Technology (IJSAT)
E-ISSN: 2229-7677 ● Website: [Link] ● Email: editor@[Link]
Overlay Precision 85–90% for static/slow movements; less accurate for fast or side-facing
movements
System Responsiveness 18–24 FPS with <150ms latency on mid-end hardware (e.g., Ryzen 5/i5,
8GB RAM, no GPU)
Environment Suitability Performs well in common indoor lighting and camera-facing scenarios
4.1 Evaluation Metrics
In order to measure the success of the virtual try-on system, various evaluation metrics were utilized in
the testing and validation phases:
Pose Detection Accuracy: The success of the virtual try-on greatly relies on the accuracy of pose
detection. Pose detection accuracy is evaluated through comparison between keypoints (e.g., shoulder,
elbow, hip) detected by MediaPipe with ground truth data. The mean error distance between estimated
and actual keypoints is used as the evaluation metric.
Clothing Overlay Accuracy: This measure assesses the visual fidelity of the clothing overlay, such as
correct alignment, no distortion in appearance (like stretching or warping), and accurate texture mapping
on the body.
Accuracy of Clothing Fit: This measure assesses the accuracy of the fit between the system-aligned
clothing and the body. It is computed by comparing the position, scale, and orientation of the projected
clothing with the MediaPipe-detected actual body pose. Lower error results in a better fit alignment. Fit
accuracy was tested across various poses and body shapes to allow generalizability.
Real-Time Performance: Because the system is intended for real-time application, performance was
assessed by monitoring the frame rate and processing time. The system needs to process webcam input,
find poses, and place clothing over them in real time without perceptible delay. The frame rate (FPS)
was recorded under various hardware configurations to check scalability.
User Satisfaction: User responses were gathered to determine whether the virtual try-on process was
intuitive and smooth.
4.2Testing Conditions
The system was tested under varying real-world conditions to validate performance robustness:
• Environment: Indoor setup, standard room lighting.
• Device: Webcam (720p resolution), AMD Ryzen processor, 8GB RAM.
• Clothing Images: 10 sample T-shirt images of different colors and designs.
• User Movement: Standing position with basic arm and body movement.
4.3App Result
Table 3: Testing and Validation stage
Evaluation Metrics Result
Pose Detection 90% or better. The system was able to detect major body parts such as
IJSAT25024407 Volume 16, Issue 2, April-June 2025 7
International Journal on Science and Technology (IJSAT)
E-ISSN: 2229-7677 ● Website: [Link] ● Email: editor@[Link]
Accuracy shoulders, hips, and elbows even when moving. Small errors were seen at
extreme body angles.
Clothing Fit and Simple clothes (e.g., T-shirts): 95% accuracy of fit and pose. Complicated
Overlay clothes: 80% accuracy owing to difficulty in detecting body contours when
clothing is layered or the pose is unconventional.
Real-time Performance 30 FPS in average laptop equipped with AMD Ryzen processor. Upped to
45 FPS and above on beefier machines for seamless real-time overlay with
unperceived latency.
User Feedback Average rating of 4.5 out of 5 on ease of use. Positive feedback regarding
clothing upload and real-time application, with areas for improvement in
dynamic poses and detailed garment elements.
4.4Visual Output Sample
The following visual outputs were observed:
1. Frame 1: User stands with arms down — T-shirt centered correctly.
2. Frame 2: User raises one arm — T-shirt shifts appropriately.
3. Frame 3: User moves back — Clothing shrinks proportionally.
4. Frame 4: User turns partially — Overlay follows shoulder points but stretches.
Figure 2: Visual Output
IJSAT25024407 Volume 16, Issue 2, April-June 2025 8
International Journal on Science and Technology (IJSAT)
E-ISSN: 2229-7677 ● Website: [Link] ● Email: editor@[Link]
4.5 Summary
The implemented virtual try-on system demonstrates how to integrate MediaPipe pose estimation with
real-time OpenCV image processing for 2D clothing overlay. Although simpler than more complex 3D
solutions, the system performs efficiently in regular situations, providing fluid real-time operation
without the necessity of special equipment. The system aligns apparel by employing keypoints such as
shoulders, elbows, and hips that are detected, which is sufficient for simple try-on requirements.
Additionally, the low hardware requirements and high-performance nature of the system make it
convenient to employ for most people. These results suggest that while the approach currently only
supports 2D overlays, it provides a good beginning point for adding more advanced functions such as
depth mapping, segmentation, and 3D garment simulation in upcoming versions.
5. Conclusion and Future Scope
Using MediaPipe and OpenCV, an efficient and viable real-time virtual try-on system has been achieved.
It detects human pose keypoints accurately and overlays 2D clothing images in real time. This enables
users to virtually try on clothing with low hardware requirements. The system uses pose-based
alignment and real-time feedback to provide an interactive experience that meets user expectations.
Overall, the study illustrates how light AI models and computer vision can be applied to solve real-world
problems in fashion and retail. The speed, simplicity, and accessibility of the system provide a good
platform for further improvements in virtual try-on technology.
Future Scope
The future of this virtual try-on system holds immense promise. Enhancing it with 3D body modeling,
depth sensing, and advanced pose trackers like MediaPipe Holistic could significantly improve garment
realism and fit. Integrating AI-based fitting algorithms would enable dynamic clothing resizing based on
individual body shapes. Expanding the system to mobile and cloud platforms would boost accessibility,
while adding AR and realistic garment simulation would elevate interactivity and immersion. Finally,
incorporating user feedback and analytics could refine the system for more accurate, personalized try-on
experiences.
6. References
[Link], Davide, Simone Bianco, and Gianluigi Ciocca. "Designing an AI-based virtual try-on web
application." Sensors 22, no. 10 (2022): 3832.
[Link], S.O. and Kalhor, A., 2021. Smart fashion: A review of AI applications in virtual try-on &
fashion synthesis. Journal of Artificial Intelligence, 3(4), p.284.
3. de Almeida, Maria Inês Gouveia. "Consumers acceptance of artificial intelligence Virtual Try-On
systems when shopping apparel online." Master's thesis, ISCTE-Instituto Universitario de Lisboa
(Portugal), 2021.
[Link], Manish, Samarth Jadhav, Anjali Harkal, Ashwini Kankrale, and Sumeet Gupta. "AI-Powered
Virtual Try-On System: Enhancing Fit Prediction and User Comfort Through Deep Learning." In 2024
5th International Conference on Communication, Computing & Industry 6.0 (C2I6), pp. 1-6. IEEE,
2024.
IJSAT25024407 Volume 16, Issue 2, April-June 2025 9
International Journal on Science and Technology (IJSAT)
E-ISSN: 2229-7677 ● Website: [Link] ● Email: editor@[Link]
[Link], Z.I., Triwijayanti, A. and Wahyono, S.A., 2024. Analysis of the effect of using virtual try-on
based on artificial intelligence and augmented reality on facial beauty products on purchase intention
with electronic word of mouth as a mediation variable (consumer perspective of e-commerce in
Indonesia). Journal of Sustainable Technology and Applied Science (JSTAS), 5(1), pp.6-17.
6. Mihăilă, Ramona. "3D Virtual Garment Simulation and Facial Expression Recognition Technologies,
Beauty Filter-based Appealing Self-presentation and Generative Artificial Intelligence Virtual Try-on
Tools, and Deep Learning-based Gesture Recognition and Augmented..." Journal of Research in Gender
Studies 13, no. 2 (2023): 54-68.
7. Islam, T., Miron, A., Liu, X. and Li, Y., 2024. Deep learning in virtual try-on: A comprehensive
survey. IEEE Access.
8. Goel, Paurav, Banisha Sharma, Akanksha Kumari, Abhinash Kumar Gupta, and Pulkit Chhajed. "A
Review on VIRTUAL TRY-ON." In 2024 15th International Conference on Computing Communication
and Networking Technologies (ICCCNT), pp. 1-5. IEEE, 2024
9. Nawaz, Muhammad Zahid, Francisco Guzmán, and Shahid Nawaz. "Technology-enabled engagement
process of brand virtual-try-on services." Journal of Product & Brand Management 34, no. 1 (2025): 44-
60.
10. Hashmi, Mohammad Farukh, B. Kiran Kumar Ashish, Avinash G. Keskar, Neeraj Dhanraj Bokde,
and Zong Woo Geem. "FashionFit: Analysis of mapping 3D pose and neural body fit for custom virtual
try-on." IEEE Access 8 (2020): 91603-91615.
11. Aakash, V. B., Abdulla Akmal, Amrutha Chandrababu, Ashwin Jose, and Alka Vijay. "A
Comprehensive Survey on AI-Driven Fashion Technologies: Clothing Detection, Recommendation
Systems, and Virtual Try-On Solutions."
[Link], Hajer, Mohamed Neji, Imran Razzak, and Adel M. Alimi. "You can try without visiting: a
comprehensive survey on virtually try-on outfits." Multimedia Tools and Applications 81, no. 14 (2022):
19967-19998.
13. Samy, T.M., Asham, B.I., Slim, S.O. and Abohany, A.A., 2025. Revolutionizing online shopping
with FITMI: a realistic virtual try-on solution. Neural Computing and Applications, pp.1-20.
[Link], Sofia. "Digital Clothing Try-on Apps, Augmented Reality Beautification Filters, and Artificial
Intelligence-powered Mood Detectors in Body Image Disturbance." Journal of Research in Gender
Studies 14, no. 1 (2024): 86-100.
[Link], Aarti, Ankita Kurade, and Joylin Nadar. "Enhancing Virtual Try-On: A Study of
Methodological Innovations and Dataset Effectiveness." In 2024 2nd International Conference on Self
Sustainable Artificial Intelligence Systems (ICSSAS), pp. 1360-1366. IEEE, 2024.
[Link], S., Yadav, G., Wakodkar, M., Narsoo, A. and Gawner, S., Towards Realistic Virtual Try-On: A
ML based Approach. JOURNAL OF TECHNICAL EDUCATION, p.92.
[Link], C.W., Chen, C.Y., Chou, C.L., Shuai, H.H., Liu, J. and Cheng, W.H., 2019, October.
FashionOn: Semantic-guided image-based virtual try-on with detailed human and clothing information.
In Proceedings of the 27th ACM international conference on multimedia (pp. 275-283).
[Link], V.V., Narendra, G.O., Boovaraghavan, A. and Anbarasi, L.J., 2024, November. Bridging
the Gap Between Online and In-Store Shopping: Fashion Recommendations and Virtual Try-On. In 2024
5th International Conference on Data Intelligence and Cognitive Informatics (ICDICI) (pp. 463-470).
IEEE.
IJSAT25024407 Volume 16, Issue 2, April-June 2025 10
International Journal on Science and Technology (IJSAT)
E-ISSN: 2229-7677 ● Website: [Link] ● Email: editor@[Link]
[Link]’bi, A., Younis, L.B. and Madain, A., 2023. An interactive attribute-preserving fashion
recommendation with 3D image-based virtual try-on. International Journal of Multimedia Information
Retrieval, 12(2), p.24.
[Link] Kumar, U. R., and S. Ambeesh Mon. "Virtual Try On." Industry 4.0 and Climate Change
(2022): 189.
IJSAT25024407 Volume 16, Issue 2, April-June 2025 11