garmentiq.classification

Garment type classification.

Identifies which category a garment image belongs to, such as a short sleeve top, a vest dress, or a skirt. This is the first pipeline stage, because the garment type decides which landmarks and which measurement instructions apply downstream.

Beyond inference, this module covers the full model lifecycle: splitting a dataset, caching it in memory, training a model from scratch, fine-tuning a pretrained one, and evaluating the result.

 1# garmentiq/classification/__init__.py
 2"""Garment type classification.
 3
 4Identifies which category a garment image belongs to, such as a short sleeve top, a
 5vest dress, or a skirt. This is the first pipeline stage, because the garment type
 6decides which landmarks and which measurement instructions apply downstream.
 7
 8Beyond inference, this module covers the full model lifecycle: splitting a dataset,
 9caching it in memory, training a model from scratch, fine-tuning a pretrained one, and
10evaluating the result.
11"""
12from .train_test_split import train_test_split
13from .load_data import load_data
14from .load_model import load_model
15from .train_pytorch_nn import train_pytorch_nn
16from .fine_tune_pytorch_nn import fine_tune_pytorch_nn
17from .test_pytorch_nn import test_pytorch_nn
18from .predict import predict
19from .utils import (
20    CachedDataset,
21    seed_worker,
22    train_epoch,
23    validate_epoch,
24    save_best_model,
25    validate_train_param,
26    validate_test_param,
27)
28from .model_definition import (
29    CNN3, 
30    CNN4, 
31    tinyViT,
32)