# wzmiaomiao/deep-learning-for-image-processing architecture

> Architecture diagram of the GitHub repository wzmiaomiao/deep-learning-for-image-processing, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/wzmiaomiao/deep-learning-for-image-processing
- Repository: https://github.com/wzmiaomiao/deep-learning-for-image-processing

## Overview

This repository is an educational collection of image-processing and deep-learning examples, rather than one integrated application. Its principal workflow is to study a task or network, prepare data, build and train a model, then use prediction or evaluation examples; deployment and model-analysis projects extend that workflow. The README documents classification, detection, segmentation, instance segmentation, and keypoint detection. The graph groups those tutorial branches and selected internal components. Many implementations were not sampled, so their internal connections are omitted rather than inferred.

Main entry points: [`pytorch_classification/MobileViT/model.py`](https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/pytorch_classification/MobileViT/model.py) (MobileViT model), [`pytorch_object_detection`](https://github.com/wzmiaomiao/deep-learning-for-image-processing/tree/master/pytorch_object_detection) (Detection examples), [`others_project/textcnnKeras/models.py`](https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/others_project/textcnnKeras/models.py) (TextCNN model), [`pytorch_object_detection/faster_rcnn/network_files/det_utils.py`](https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/pytorch_object_detection/faster_rcnn/network_files/det_utils.py) (Faster R-CNN utilities)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_classification["Classification"]
  node_cls_examples["Classification examples"]
  node_mobilevit["MobileViT model<br/>[model.py]"]
  node_mobilevit_config["MobileViT config<br/>[model_config.py]"]
  node_mobilevit_transformer["MobileViT transformer<br/>[transformer.py]"]
  node_tf_cls["TensorFlow classification"]
  node_textcnn["TextCNN model<br/>[models.py]"]
end

subgraph group_detection["Object Detection"]
  node_detection_examples["Detection examples"]
  node_faster_rcnn_boxes["Faster R-CNN boxes<br/>[boxes.py]"]
  node_faster_rcnn_utils["Faster R-CNN utilities<br/>[det_utils.py]"]
  node_mask_rcnn_boxes["Mask R-CNN boxes<br/>[boxes.py]"]
  node_mask_rcnn_utils["Mask R-CNN utilities<br/>[det_utils.py]"]
  node_yolo_dataset["YOLO dataset loader<br/>[datasets.py]"]
end

subgraph group_segmentation["Segmentation"]
  node_segmentation_examples["Segmentation examples"]
end

subgraph group_keypoints["Keypoints"]
  node_keypoint_examples["Keypoint examples"]
  node_deeppose_model["DeepPose model<br/>[model.py]"]
  node_hrnet_eval["HRNet train evaluation"]
  node_hrnet_transforms["HRNet transforms<br/>[transforms.py]"]
end

subgraph group_deployment["Deployment"]
  node_onnx_export["ONNX export<br/>[main.py]"]
  node_flask_service["Flask inference service<br/>[main.py]"]
  node_pruning["Model pruning<br/>[main.py]"]
end

subgraph group_extras["Utilities"]
  node_anchor_tools["Anchor clustering<br/>[main.py]"]
  node_widerface_converter["WIDERFace converter<br/>[main.py]"]
  node_custom_data["Custom dataset example<br/>[main.py]"]
end

node_learner(("Learner"))

node_learner -->|"studies and trains"| node_cls_examples
node_learner -->|"studies and trains"| node_tf_cls
node_learner -->|"studies and trains"| node_detection_examples
node_learner -->|"studies and trains"| node_segmentation_examples
node_learner -->|"studies and trains"| node_keypoint_examples
node_mobilevit -->|"imports"| node_mobilevit_config
node_mobilevit -->|"imports"| node_mobilevit_transformer
node_textcnn -.->|"supports text classification"| node_learner
node_faster_rcnn_utils -->|"uses"| node_faster_rcnn_boxes
node_yolo_dataset -.->|"provides training data"| node_detection_examples
node_mask_rcnn_utils -.->|"uses"| node_mask_rcnn_boxes
node_hrnet_eval -->|"imports"| node_hrnet_transforms
node_learner -.->|"exports model"| node_onnx_export
node_learner -.->|"runs inference"| node_flask_service
node_learner -.->|"experiments with pruning"| node_pruning
node_learner -.->|"tunes detector anchors"| node_anchor_tools
node_learner -.->|"converts annotations"| node_widerface_converter
node_learner -.->|"learns data loading"| node_custom_data

click node_cls_examples "https://github.com/wzmiaomiao/deep-learning-for-image-processing/tree/master/pytorch_classification"
click node_mobilevit "https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/pytorch_classification/MobileViT/model.py"
click node_mobilevit_config "https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/pytorch_classification/MobileViT/model_config.py"
click node_mobilevit_transformer "https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/pytorch_classification/MobileViT/transformer.py"
click node_tf_cls "https://github.com/wzmiaomiao/deep-learning-for-image-processing/tree/master/tensorflow_classification"
click node_textcnn "https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/others_project/textcnnKeras/models.py"
click node_detection_examples "https://github.com/wzmiaomiao/deep-learning-for-image-processing/tree/master/pytorch_object_detection"
click node_faster_rcnn_boxes "https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/pytorch_object_detection/faster_rcnn/network_files/boxes.py"
click node_faster_rcnn_utils "https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/pytorch_object_detection/faster_rcnn/network_files/det_utils.py"
click node_mask_rcnn_boxes "https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/pytorch_object_detection/mask_rcnn/network_files/boxes.py"
click node_mask_rcnn_utils "https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/pytorch_object_detection/mask_rcnn/network_files/det_utils.py"
click node_yolo_dataset "https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/pytorch_object_detection/yolov3_spp/build_utils/datasets.py"
click node_segmentation_examples "https://github.com/wzmiaomiao/deep-learning-for-image-processing/tree/master/pytorch_segmentation"
click node_keypoint_examples "https://github.com/wzmiaomiao/deep-learning-for-image-processing/tree/master/pytorch_keypoint"
click node_deeppose_model "https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/pytorch_keypoint/DeepPose/model.py"
click node_hrnet_eval "https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/pytorch_keypoint/HRNet/train_utils/train_eval_utils.py"
click node_hrnet_transforms "https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/pytorch_keypoint/HRNet/transforms.py"
click node_onnx_export "https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/deploying_service/deploying_pytorch/convert_onnx_cls/main.py"
click node_flask_service "https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/deploying_service/deploying_pytorch/pytorch_flask_service/main.py"
click node_pruning "https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/deploying_service/pruning_model_pytorch/main.py"
click node_anchor_tools "https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/others_project/kmeans_anchors/main.py"
click node_widerface_converter "https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/others_project/trans_widerface_to_xml/main.py"
click node_custom_data "https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/pytorch_classification/custom_dataset/main.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cls_examples,node_mobilevit,node_mobilevit_config,node_mobilevit_transformer,node_tf_cls,node_textcnn toneBlue
class node_detection_examples,node_faster_rcnn_boxes,node_faster_rcnn_utils,node_mask_rcnn_boxes,node_mask_rcnn_utils,node_yolo_dataset toneAmber
class node_segmentation_examples toneMint
class node_keypoint_examples,node_deeppose_model,node_hrnet_eval,node_hrnet_transforms toneRose
class node_onnx_export,node_flask_service,node_pruning,node_learner toneIndigo
class node_anchor_tools,node_widerface_converter,node_custom_data toneTeal
```

## Components

### Classification

- [Classification examples](https://github.com/wzmiaomiao/deep-learning-for-image-processing/tree/master/pytorch_classification): `pytorch_classification`
- [MobileViT model](https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/pytorch_classification/MobileViT/model.py): `pytorch_classification/MobileViT/model.py`
- [MobileViT config](https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/pytorch_classification/MobileViT/model_config.py): `pytorch_classification/MobileViT/model_config.py`
- [MobileViT transformer](https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/pytorch_classification/MobileViT/transformer.py): `pytorch_classification/MobileViT/transformer.py`
- [TensorFlow classification](https://github.com/wzmiaomiao/deep-learning-for-image-processing/tree/master/tensorflow_classification): `tensorflow_classification`
- [TextCNN model](https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/others_project/textcnnKeras/models.py): `others_project/textcnnKeras/models.py`

### Object Detection

- [Detection examples](https://github.com/wzmiaomiao/deep-learning-for-image-processing/tree/master/pytorch_object_detection): `pytorch_object_detection`
- [Faster R-CNN boxes](https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/pytorch_object_detection/faster_rcnn/network_files/boxes.py): `pytorch_object_detection/faster_rcnn/network_files/boxes.py`
- [Faster R-CNN utilities](https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/pytorch_object_detection/faster_rcnn/network_files/det_utils.py): `pytorch_object_detection/faster_rcnn/network_files/det_utils.py`
- [Mask R-CNN boxes](https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/pytorch_object_detection/mask_rcnn/network_files/boxes.py): `pytorch_object_detection/mask_rcnn/network_files/boxes.py`
- [Mask R-CNN utilities](https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/pytorch_object_detection/mask_rcnn/network_files/det_utils.py): `pytorch_object_detection/mask_rcnn/network_files/det_utils.py`
- [YOLO dataset loader](https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/pytorch_object_detection/yolov3_spp/build_utils/datasets.py): `pytorch_object_detection/yolov3_spp/build_utils/datasets.py`

### Segmentation

- [Segmentation examples](https://github.com/wzmiaomiao/deep-learning-for-image-processing/tree/master/pytorch_segmentation): `pytorch_segmentation`

### Keypoints

- [Keypoint examples](https://github.com/wzmiaomiao/deep-learning-for-image-processing/tree/master/pytorch_keypoint): `pytorch_keypoint`
- [DeepPose model](https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/pytorch_keypoint/DeepPose/model.py): `pytorch_keypoint/DeepPose/model.py`
- [HRNet train evaluation](https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/pytorch_keypoint/HRNet/train_utils/train_eval_utils.py): `pytorch_keypoint/HRNet/train_utils/train_eval_utils.py`
- [HRNet transforms](https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/pytorch_keypoint/HRNet/transforms.py): `pytorch_keypoint/HRNet/transforms.py`

### Deployment

- [ONNX export](https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/deploying_service/deploying_pytorch/convert_onnx_cls/main.py): `deploying_service/deploying_pytorch/convert_onnx_cls/main.py`
- [Flask inference service](https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/deploying_service/deploying_pytorch/pytorch_flask_service/main.py): `deploying_service/deploying_pytorch/pytorch_flask_service/main.py`
- [Model pruning](https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/deploying_service/pruning_model_pytorch/main.py): `deploying_service/pruning_model_pytorch/main.py`

### Utilities

- [Anchor clustering](https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/others_project/kmeans_anchors/main.py): `others_project/kmeans_anchors/main.py`
- [WIDERFace converter](https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/others_project/trans_widerface_to_xml/main.py): `others_project/trans_widerface_to_xml/main.py`
- [Custom dataset example](https://github.com/wzmiaomiao/deep-learning-for-image-processing/blob/master/pytorch_classification/custom_dataset/main.py): `pytorch_classification/custom_dataset/main.py`

### Other components

- **Learner**

## Connections

- Learner → Classification examples: studies and trains
- Learner → TensorFlow classification: studies and trains
- Learner → Detection examples: studies and trains
- Learner → Segmentation examples: studies and trains
- Learner → Keypoint examples: studies and trains
- MobileViT model → MobileViT config: imports (evidence: `pytorch_classification/MobileViT/model.py`)
- MobileViT model → MobileViT transformer: imports (evidence: `pytorch_classification/MobileViT/model.py`)
- TextCNN model → Learner: supports text classification
- Faster R-CNN utilities → Faster R-CNN boxes: uses (evidence: `pytorch_object_detection/faster_rcnn/network_files/rpn_function.py`)
- YOLO dataset loader → Detection examples: provides training data (evidence: `pytorch_object_detection/yolov3_spp/train_multi_GPU.py`)
- Mask R-CNN utilities → Mask R-CNN boxes: uses
- HRNet train evaluation → HRNet transforms: imports (evidence: `pytorch_keypoint/HRNet/train_utils/train_eval_utils.py`)
- Learner → ONNX export: exports model
- Learner → Flask inference service: runs inference
- Learner → Model pruning: experiments with pruning
- Learner → Anchor clustering: tunes detector anchors
- Learner → WIDERFace converter: converts annotations
- Learner → Custom dataset example: learns data loading
