Many people find that travel photos, pet shots, and lifestyle photos turn out flat and lacking in atmosphere. Centering a subject or adding special effects is extremely complex and tedious for non-tech-savvy users — time-consuming and exhausting. Is there a simple, easy-to-use tool that can recognize people and pets with one tap, intelligently center them, and instantly transform photos and videos into cinematic quality shots?
Based on its powerful On-App AI technology architecture, Tuya launches the AI Portrait + Video Foreground development solution, combined with smart hardware to deliver a complete one-stop service chain. Leveraging mobile AI capabilities, it automatically detects and identifies target subjects in photos and videos, uses intelligent algorithms to rapidly calculate the subject’s center, and achieves precise centering. Combined with foreground templates delivered from the cloud (including static and dynamic templates), images are edited, encoded, and packaged — ultimately generating fun, subject-prominent "portrait-grade" photos or videos with a single tap.
While delivering outstanding visual effects, the solution also balances real-time performance, privacy security, and cost-effectiveness — making it an innovative choice for photo and video editing.
On-App AI Overall Architecture Diagram

For example: a pet feeder equipped with an IPC captures a funny or adorable moment of a pet. The phone instantly receives the related photo or video, uploads it to the Tuya-empowered app, and recognizes the pet while centering the frame with one tap. Tuya also provides a foreground template library for users to freely select and add — quick export is available after editing. The entire process is simple and convenient, far smarter than traditional editing features. The solution is currently applicable to any scenario requiring subject prominence and atmosphere enhancement.
Reference examples for a more intuitive understanding of the rendering effect:
Original Dog Photo

After Foreground Template Applied

For mobile model deployment, we use TensorFlow Lite — offering efficient inference, low latency, and low power consumption, with support for local offline operation. Subject centering + beautiful foreground templates help users effortlessly elevate content quality.
Cloud Foreground Template Delivery Flow Diagram

Note: In a future update, Tuya will support developers uploading custom foreground templates — stay tuned.
2.1 More Flexible AI Architecture: Lightweight and Dynamic
Model Detection and Dynamic Runtime Flow Diagram

2.2 Superior User Experience: Real-time and High Efficiency
Media Processing Flow Diagram

2.3 More Secure Computing: Low Cost and Privacy Protection
Local Processing Flow Diagram

Full development tutorial available at:
https://developer.tuya.com/cn/miniapp/solution-ai/ability/picture-solution/aiPhotos/overview
For any issues during development, please post your questions on the Tuya Developer Forum:
https://www.tuyaos.com/viewforum.php?f=3
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback