I deployed a GAN on a Raspberry Pi 4 and built a physical NFT minting device [P]
I trained a 128Ă128 DCGAN on my Macbook M3 and deployed it on a Raspberry Pi 4 connected to a LILYGO TTGO T-Display ESP32. The whole thing runs headlessly as a systemd service and generates hallucinated face hybrids at the press of a button. It is a 6-block generator (latent â 4Ă4 â 8Ă8 â 16Ă16 â 32Ă32 â 64Ă64 â 128Ă128) with feature maps starting at fĂ16=1024. Corresponding 6-block discriminator. Trained for 800 epochs on Apple Silicon MPS, 4 hours. Dataset was 2480 images across 11 subjects. One dominant anchor class (2000 images) contaminated with minority classes to produce hybrid outputs. (Can you guess who and what was included?). : ) I exported the model from PyTorch to ONNX (float32, 53MB). Inference takes 3 seconds per face on Pi 4. The Pi generates the face and sends it to the ESP32. The title is generated through a dictionary and a template sentence: "This is a <adjective> NFT and I want to <verb> it." The device was built as an art piece. I took it to the streets of NYC and let strangers use it. Full video: https://youtu.be/y-S74aoud54?si=yPh5GmCJZFIIzwq6 Happy to discuss the training pipeline, ONNX conversion, or anything you're curious about. submitted by /u/Numerous-Dentist-882 [link] [comments]
Comments
No comments yet. Start the discussion.