I deployed a GAN on a Raspberry Pi 4 and built a physical NFT minting device [P]
![I deployed a GAN on a Raspberry Pi 4 and built a physical NFT minting device [P]](/_next/image?url=https%3A%2F%2Fpreview.redd.it%2Fk63kpgs2xu7h1.jpg%3Fwidth%3D140%26height%3D140%26crop%3D1%3A1%2Csmart%26auto%3Dwebp%26s%3D28094e042e5525ab21414c714edb14a51d731f8c&w=3840&q=75)
| 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. [link] [comments] |
Want to read more?
Check out the full article on the original site