AI-vtar

AI styled avatars you can mint as NFTs on Polygon Amoy with IPFS storage.

AI-vtar

Created At

ETHGlobal New Delhi

Project Description

AI‑vtar lets anyone turn a selfie into a stylized AI avatar and mint it as an NFT on the Polygon Amoy testnet. Upload or capture a photo, pick a style (Anime, Realistic, Cartoon), and the app processes it with an AI-inspired image pipeline. The image and metadata are pinned to IPFS via Pinata, and the NFT is minted using an ERC‑721 contract. The dApp focuses on identity use cases for social and metaverse experiences, with a neon, mobile‑first UI and resilient flows that work even on spotty networks. If the onchain mint can’t be demonstrated live, we provide Figma prototypes and a local demo fallback.

How it's Made

Frontend HTML/CSS/JS with a neon glassmorphism UI. Pages: dashboard.html, profile.html, settings.html Image capture via the browser camera and file uploads handled with FormData. Web3 wallet connect using MetaMask (Ethers.js/Web3.js), plus a one click network switch to Polygon Amoy. Backend: Python Flask API (backend/app.py) with CORS enabled and SQLite via SQLAlchemy. Image pipeline uses PIL and OpenCV: decode → face aware crop fallback → enhancement → style filter (Anime/Realistic/Cartoon) → save processed output. Robust in memory upload path supports JPG/PNG/WEBP/HEIC/HEIF; saves to backend/processed/ with PIL fallback if cv2.imwrite fails. IPFS and NFT IPFS pinning through Pinata. First pin the processed image, then generate and pin metadata.json (name, description, image, attributes). Mint on Polygon Amoy using an ERC‑721 contract; tokenURI points to the IPFS metadata. Contract address is user configurable in settings.html to simplify redeploys.

  • Dev/Infra and Reliability: No heavy build step, static site served via python -m http.server. Health endpoint and graceful error toasts on the frontend. Fallbacks: Base64 processing endpoint if multipart upload fails. Figma prototypes for UI walkthrough if live demo is unavailable. Acknowledgement: Cheap L2/sidechains + mainstream wallets make on chain identity accessible. Impact: Creators and gamers get portable, on chain avatars in minutes. Next: Add ERC721Enumerable and ERC2981 royalties, Recent Mints and improved face detection (MediaPipe/ONNX).
background image mobile

Join the mailing list

Get the latest news and updates