Skip to content

Projects

Apparel Image Classification

A model and data pipeline for classifying clothing from product photos across inconsistent storefront categories

Sole designer and engineer Jun 2020 – Aug 2021

Apparel operations depend on category definitions as well as product images. When storefronts classify garment types differently, collecting their product information does not produce a consistent set of categories. At Sewon, my task was to build a model that classifies garments from photographs and the pipeline that prepares its inputs. I designed and implemented both on my own.

Collecting images was only the beginning

I collected training material by crawling Google image search. Downloaded search results are not automatically suitable training data. They still need checks for readable files, usable image shapes and organisation into the categories the model will learn.

The preserved early experiments include file-format checks and code that filters images by aspect ratio. I also loaded category folders, resized inputs and displayed labelled samples for inspection. These routines were not a complete validator for every bad image, but they made data preparation an explicit stage between collection and training.

The project also included a Python pipeline I wrote for vector-comparison data cleaning and post-processing. Preparing the material and training the classifier were part of the same development responsibility. The final project record reports 32,474 training images and a single RTX 2080.

Better training results did not automatically mean better predictions

I used TensorFlow and Keras to construct a convolutional neural network, or CNN, which learns visual features from images. The experiments standardised image dimensions and pixel values, then used horizontal flips and small rotations to vary training inputs. The aim was to account for differences in how the same garment category appears in photographs.

In the preserved early training logs, training accuracy continues to improve while validation results do not improve at the same rate. Learning the training material and handling new images had to be distinguished. The code separates training and validation inputs, monitors validation loss for early stopping, saves models and records the run in TensorBoard. That provides a view of the learning process rather than only its final score.

My responsibility was to assemble the data and connect preparation, training, validation and inference within the available hardware. Owning both data processing and model code let me work across the full path from an image to a prediction.

Letting someone upload a photograph

Running a training notebook and letting another person inspect a prediction are separate tasks. In the early implementation, I connected the model to a Flask upload interface. An uploaded image is resized to the training dimensions, passed into the model and displayed alongside its predicted category and score.

This provided a way to examine a prediction together with the photograph that produced it. Aggregate training logs show whether classifications were correct; individual examples help reveal what the model did with a particular input.

Working alongside the ERP transition

At Sewon, I also worked on EWERP, the move from a Delphi-based ERP to a cross-platform web stack. That gave me experience both in making business software accessible through a browser and in classifying the apparel data used in that business context.

The public EWERP repository preserves Django code for menu structures, program information, manuals and change records. It is a separate business tool from the garment classifier. The model experiments are in the AI repository; the related web ERP work is in Online-Fashion-ERP.

Results and the scope of the surviving evidence

The project record reports garment classification accuracy of 90% or higher. The public notebooks contain intermediate experiments, however, rather than a release with the identical final data, model and evaluation conditions. Their saved logs should not be presented as a reproduction of that final result, nor should the recorded accuracy be treated as a guarantee across every storefront.

The central work was connecting collection, cleaning, model training and result inspection as a sole developer. It taught me that applying a classifier to a workflow depends on the input-processing code and the path for examining its output as much as on the choice of model.

Garment classification experiments · Related EWERP code

Send message