The Problem
Indonesian Batik carries centuries of cultural meaning in its motifs. Each pattern tells a story tied to specific regions, ceremonies, and social statuses. But unless you grew up studying textile art, telling a Parang from a Kawung is surprisingly hard.
I wanted to see if a convolutional neural network could do it reliably. The goal was not just classification accuracy, but building something that could actually educate users about the cultural significance behind each motif.
The Architecture
I went with EfficientNet B0 as the backbone. It is a compact model that punches well above its weight through compound scaling. The key decisions:
- Transfer learning from ImageNet weights, freezing the early layers
- Progressive unfreezing of deeper layers during fine-tuning
- Data augmentation (rotation, horizontal flip, color jitter) to compensate for the small dataset
The dataset had roughly 500 images across 5 motif classes. Not a lot, which made augmentation and transfer learning essential.
What I Learned
The biggest surprise was that fixed-resolution training outperformed progressive resizing. The literature suggests progressive resizing (starting small, gradually increasing image size) should help, but for this specific dataset it hurt generalization.
Final numbers:
- Accuracy: 87.14%
- ROC AUC: 0.9431
Not perfect, but strong enough to build a useful tool. The model is deployed via Streamlit and provides confidence histograms alongside cultural information for each prediction.
Key Takeaway
Transfer learning is incredibly powerful for small datasets, but you still need to be thoughtful about training strategy. The "standard" approach does not always win. Test your assumptions.
The full project is on GitHub and you can try the live demo.