Hysen Labs
Open-source project
Ugenteraan/Deep_Hierarchical_Classification avatar
Ugenteraan

Deep_Hierarchical_Classification

PyTorch Implementation of Deep Hierarchical Classification for Category Prediction in E-commerce System

100 stars22 forksPythonMIT
01
DEEP OPEN-SOURCE ANALYSIS

Deep Hierarchical Classification: a PyTorch reimplementation

A non-official PyTorch implementation of Deep Hierarchical Classification for e-commerce category prediction, using a ResNet50 with CBAM backbone and tested on Cifar-100.

02
DEEP OPEN-SOURCE ANALYSIS

What kind of implementation this is

The README is careful to call this a non-official implementation of the DHC paper. That means it was written by the repository author rather than released by the original researchers, and the code is a working reference for the approach. The project description frames the target as category prediction in e-commerce systems. Because it is a reimplementation, the code tracks the paper's structure rather than adding new machinery.

03
DEEP OPEN-SOURCE ANALYSIS

Backbone and test set

The classifier uses ResNet50 with CBAM as its backbone network. Performance was tested on Cifar-100, and the README describes the dataset structure in detail so the hierarchy is clear before any custom work starts. The backbone pairing is simply stated, without an explanation of why the two are combined.

04
DEEP OPEN-SOURCE ANALYSIS

The Cifar-100 structure

Cifar-100 is arranged in two levels. There are 20 superclasses, and each superclass holds 5 subclasses, giving 100 subclasses in total. Each subclass has 600 images, split as 500 for training and 100 for testing. That two-level shape is exactly what the hierarchical classifier is built to exploit.

05
DEEP OPEN-SOURCE ANALYSIS

Adapting it to your own data

To use the code on a custom dataset, the README asks for train and test CSV files plus a metafile, with the dataset folder serving as the reference. The dictionary variable in the level dict file must be updated to match the dataset hierarchy, and the load dataset file has to be modified as well. Datasets with more than two levels require adding classifier layers in the ResNet50 model file. The steps are ordered, so a two-level dataset needs only the first two changes. The README gives no accuracy numbers or training recipes beyond this.

07
DEEP OPEN-SOURCE ANALYSIS

Official sources

08
Community notes

Community notes