Alright, let me tell you about this “horse and tiger” thing I messed around with today. It’s kinda silly, but I learned a few things, so here we go.

It all started because I was bored, plain and simple. I was scrolling through some image datasets, just killing time, and I saw one with horses and tigers. I thought, “Hey, I’ve never tried to build an image classifier specifically for those two. Why not?”
So, first thing I did was grab the dataset. It wasn’t huge, maybe a couple hundred images of each, horses and tigers. I split it into training and validation sets, you know, the usual 80/20 split. Nothing fancy.
Next, I fired up my trusty Python environment and started hacking away with TensorFlow/Keras. I decided to go with a simple Convolutional Neural Network (CNN) architecture. I’m not trying to win any awards here, just wanted something quick and dirty.
I stacked a couple of Conv2D layers, each followed by a MaxPooling2D layer, and then flattened the output. Threw in a few Dense layers with ReLU activation, and finally, a Dense layer with sigmoid activation for the binary classification (horse or tiger).
Here’s where things got a little…interesting. The model trained surprisingly fast, which was cool. But the accuracy on the validation set was all over the place! Like, one epoch it would be 90%, the next it would be 60%. What the heck?

I stared at the code for a while, scratching my head. I checked my data loading pipeline, made sure I wasn’t accidentally shuffling labels or something dumb. Nope, everything seemed fine.
Then it hit me: Data augmentation! The dataset was pretty small, and maybe the model was just overfitting like crazy. So, I added some random rotations, zoom, and horizontal flips to the training images.
BOOM! Suddenly, the training stabilized. The validation accuracy still fluctuated a bit, but it was consistently in the 80-90% range. Not bad for a quick and dirty model!
I messed around with the learning rate and batch size a bit, just to see if I could squeeze out a few more percentage points. It helped a little, but nothing dramatic.
Finally, I saved the model and tried it out on a few random horse and tiger images I found online. It worked pretty well! Misclassified a few, but overall, not bad at all.

Lessons Learned:
- Small datasets can be a pain. Data augmentation is your friend!
- Even simple CNNs can do a decent job on image classification.
- Sometimes, the obvious solution is the right one. I spent way too long debugging before realizing it was just overfitting.
So, yeah, that was my “horse and tiger” adventure for the day. Nothing earth-shattering, but it was a fun little project and a good reminder of the importance of data augmentation. Now, what should I classify tomorrow…?