AI-Powered Artist Recognition With Raspberry Pi
by Hamzzah kattan in Circuits > Raspberry Pi
17 Views, 0 Favorites, 0 Comments
AI-Powered Artist Recognition With Raspberry Pi

Hi, I’m Hamzzah, My project uses AI to identify the artist of a painting in real-time, recognizing iconic styles like Van Gogh’s swirling brushstrokes or Picasso’s cubist shapes. Imagine pointing a webcam at a painting and instantly seeing “Monet” on a small LCD screen—cool, right? This project solves the problem of time-consuming manual artist identification, making it easy for students, educators, and art lovers to explore art history. Long-term, it could expand to lesser-known artists, help museum curators, or even authenticate art!
I’m building this with a Raspberry Pi, USB webcam, and 16x2 LCD, using a custom AI models trained on Google Colab. So far, I’ve collected data, trained a model, and tested it with promising results. This Instructable covers my journey from scratch, with tips and challenges, and I’ll update it in ~2 weeks when the project is complete. Follow along to build your own AI art recognizer!
Why AI? AI excels at spotting patterns in brushstrokes, colors, and compositions that humans might miss, automating what usually needs expert eyes. Let’s dive in!
Supplies
.jpeg)
Materials and Tools
- Electronics:
- Raspberry Pi (e.g., Pi 4 or 5) – Raspberry Pi Official
- Webcam (USB-compatible) – Generic USB Webcam
- I2C 16x2 LCD Display (0x27 address) – Adafruit LCD
- USB Cables and Power Supply
- Maker Part:
- Wood sheets (for 17x27x11 cm box)
- Wood glue
- Sandpaper (medium and fine grit)
- Wood paint (any color)
- Laser cutter (e.g., Glowforge) – Glowforge
- Drill with hole saw attachment
- Software/Tools:
- Python 3
- OpenCV – OpenCV Python
- Ultralytics YOLOv8 – YOLOv8
- ONNX Runtime – ONNX
- smbus for I2C – Python smbus
- Google Colab (for training)
- References:
- PyTorch Tutorials – PyTorch
- Raspberry Pi Documentation – RPi Docs
- Estimated Cost: Building The Project from scratch would cost approximately €220-€300, depending on sourced materials. This includes the Raspberry Pi (€100-€200), webcam (€20-€30), and wood/tools (€20-€40). Refer to the updated Bill of Materials (BOM) PDF for a detailed breakdown
Downloads
Setting Up the Raspberry Pi

Step 1: Setting Up the Raspberry Pi
Kick off your adventure by preparing the brain of the project! Start by flashing the latest Raspberry Pi OS onto a microSD card using the Raspberry Pi Imager. Once booted, connect to your Pi via SSH or VNC. Install essential Python libraries with:
- pip install opencv-python ultralytics onnxruntime smbus2 Connect the USB webcam and I2C LCD (ensure the address is 0x27—check with i2cdetect -y 1 if needed). Power up and test the camera with python -c "import cv2; print(cv2.VideoCapture(0).read())" to confirm it works. This step sets the foundation for a seamless build—let’s move to housing it next!
Building the Custom Box
.jpeg)
.jpeg)

.jpeg)

Get ready to craft a sleek home for your project with a custom-designed box that’s both functional and stylish! The box measures 17x27x11 cm, perfectly sized to snugly house the Raspberry Pi, webcam, and LCD while keeping cables organized. One side features a precisely cut space for the LCD screen, allowing you to view artist names on the go. Two holes, drilled on the sides, let USB and power cables pass through to connect to a laptop, ensuring minimal interference and easy access.
Techniques Used:
- Laser Cutting: I used a laser cutter to slice wooden pieces for the side panels, base, and top with pinpoint accuracy, ensuring clean edges and perfect fits.
- Laser Engraving: Adding a personal touch, I engraved a decorative design on the top panel, blending art with function.
- Custom Cut for LCD Screen: With the laser cutter, I carved a custom cutout matching the LCD’s exact dimensions for a flawless integration.
- Gluing: Wood glue bonded all pieces together, creating a sturdy structure that withstands handling.
- Sanding: Sandpaper smoothed rough edges, prepping the surface for a polished look.
- Painting: A coat of wood paint gave the box a professional finish while protecting the wood.
- Drilling for Cable Management: A hole saw drilled two side holes for cables, keeping the setup tidy.
- Drilling a Hole for Webcam: A top hole was added to mount the webcam inside, maintaining a clean aesthetic.
This simple yet effective design not only protects the components but also makes it portable—perfect for showing off your creation!
Preparing the Training Set





Turn your project into a smart art detective by building a robust training set! I printed artworks by Claude Monet, Da Vinci, Picasso, and Van Gogh on paper, then captured photos using both the webcam and my phone to simulate real-life conditions. To mimic the detection process, I gathered additional pictures with frames and manually cropped them, adding variety to the dataset. This real-world approach ensured the model could handle the bounding box outputs and diverse lighting, setting the stage for accurate predictions—keep reading to see how I trained it!
Training the Model




Now, let’s train the brains behind the model with not one, but two powerful models! I developed a detection model using YOLOv8n, a lightweight version ideal for the Raspberry Pi’s limited resources, to improve prediction accuracy by identifying paintings first. For classification, I expanded the dataset with more webcam-captured and manually cropped images to simulate bounding box outputs. After numerous training runs, I experimented with augmentations (e.g., rotation, blur) and model versions. ResNet-34 proved too heavy for the Pi, so I switched to ResNet-18, striking the perfect balance of performance and efficiency. This dual-model setup is the heart of the project—stay tuned to see it in action!
Coding the Detection and Classification


Bring your project to life with code that ties it all together! Using Python, I loaded the YOLOv8n detection model and ResNet-18 classification model in ONNX format, setting up the webcam at 320x240 or any other resolution. The system detects paintings frame by frame, then classifies them, displaying results on the LCD and video feed. There’s a small delay or lag—reasonable given the dual-model processing—but I tried skipping 2-3 frames with little difference. This step showcases the magic of real-time art recognition—let’s optimize it next!
Visualization and Dashboard
Make your results pop with stunning visualization! OpenCV overlays bounding boxes and artist names with confidence percentages on the live video feed, creating an engaging display. I used a VNC connection to set up a basic dashboard on my laptop, letting me monitor detections remotely. This visual feedback turns the project into an interactive tool—perfect for presentations or personal use!
Testing and Optimization
Test your creation and dream big for the future! I ran it with various paintings, tweaking confidence thresholds (e.g., 0.5) to balance accuracy and detections. The lag is manageable, but we’ll explore skipping more frames or higher resolutions later. Looking ahead, the system could expand to include less popular artists, assist museum curators in organizing exhibits, support art event planners, and even aid in art authentication—imagine the possibilities! This project is just the beginning of a transformative tool.
Conclusion
It is more than a project—it’s a gateway to exploring art through technology! By detecting and identifying masterpieces in real-time, it enhances education and appreciation, all housed in a custom wooden box. The impact reaches students, enthusiasts, and potentially museums, with room to grow. For improvements, consider higher resolution, a graphical interface, or more artist data. Thank you for joining this journey—build your own and share your story!