# lxztju/pytorch_classification

利用pytorch实现图像分类的一个完整的代码，训练，预测，TTA，模型融合，模型部署，cnn提取特征，svm或者随机森林等进行分类，模型蒸馏，一个完整的代码

Repository: https://github.com/lxztju/pytorch_classification
Canonical: https://ross.abutalabs.com/products/pytorch_classification
Language: Jupyter Notebook
License: MIT
License Family: permissive
Topics: pytorch, image-classification, deployment, svm, knn, cnn, label-smoothing, densenet, resnext, resnet, flask, random-forest, knowledge-distillation
Last push: 2023-02-06T13:30:18+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 2327, "days_push": 1304, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1466, forks 343 (observed 2026-08-28T04:04:48.402645+00:00)

## What it is
A complete PyTorch image classification codebase built on torchvision, covering training, prediction, TTA, model ensembling, knowledge distillation, and CNN feature extraction with classifiers like SVM and random forest. It also includes deployment options via Flask + Redis, C++ libtorch, and TensorRT inference.

## Use cases
- train an image classification model in pytorch
- deploy a trained cnn model with flask or libtorch
- perform test-time augmentation (tta) for predictions
- ensemble multiple models with weighted or voting fusion
- extract cnn features and classify with svm or random forest
- apply knowledge distillation to a smaller model
- export a pytorch model to tensorrt or c++ for inference

## When to choose
- you want an end-to-end pytorch image classification pipeline with training and deployment
- you need torchvision-based models like resnet, densenet, efficientnet, or swin transformer with modern training tricks
- you want to deploy models in c++ via libtorch or tensorrt
- you need feature extraction plus classical classifiers like svm or random forest

## When to avoid
- you need a maintained library with frequent updates and official support
- you want object detection, segmentation, or other vision tasks beyond classification
- you need a high-level training API like pytorch lightning with minimal boilerplate
- you are not working in python or c++ environments

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, image-processing, llm-training, deployment
- domain: computer-vision, image-processing, deep-learning, machine-learning
- platform: python, cpp
- tags: image-classification, pytorch, torchvision, model-deployment, knowledge-distillation, tta, libtorch, tensorrt, model-ensemble, flask-api, gpu

## Member repositories
- lxztju/pytorch_classification (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:48.402645+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:35:03.541996+00:00, confidence not recorded.
  - readme: https://github.com/lxztju/pytorch_classification (fetched 2026-08-28T04:04:48.402645+00:00, sha 61bdb88eb316)
- Data as of 2026-08-30T08:39:29.467469+00:00.
