# maaxxe/train_kaggle_plank_detector architecture

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

- Interactive diagram: https://gitdiagram.com/maaxxe/train_kaggle_plank_detector
- Repository: https://github.com/maaxxe/train_kaggle_plank_detector
- Video tour (about a minute): https://gitdiagram.com/maaxxe/train_kaggle_plank_detector/video

## Overview

This repository is a collection of computer-vision training projects rather than a single deployed application. Its main workflow is annotated plank images → dataset preparation and augmentation → quadrilateral detector training → model checkpoints; a separate GAN project trains synthetic-image generation, while GeoNet targets segmentation and instance extraction. The tree also contains a PaddlePaddle GeoNet port and checkpoint-conversion path. README contents were not provided, and excerpts are partial, so unsampled subsystem wiring is shown only where the tree or sampled code supports it.

Main entry points: [`Plankeye/train/train_v7.py`](https://github.com/maaxxe/train_kaggle_plank_detector/blob/main/Plankeye/train/train_v7.py) (Detector training), [`Plankeye/model/model_v7_1.py`](https://github.com/maaxxe/train_kaggle_plank_detector/blob/main/Plankeye/model/model_v7_1.py) (Quadrilateral detector), [`GAN_PlankEYE/models.py`](https://github.com/maaxxe/train_kaggle_plank_detector/blob/main/GAN_PlankEYE/models.py) (Generator and discriminator), [`GAN_PlankEYE/train.py`](https://github.com/maaxxe/train_kaggle_plank_detector/blob/main/GAN_PlankEYE/train.py) (GAN training)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_plankeye["PlankEye detection"]
  node_plank_dataset["Dataset and splits<br/>[train_v7.py]"]
  node_plank_aug["Image augmentation<br/>[train_v7.py]"]
  node_plank_model["Quadrilateral detector<br/>[model_v7_1.py]"]
  node_plank_train["Detector training<br/>[train_v7.py]"]
  node_plank_checkpoints["Detector checkpoints"]
  node_plank_inference["Corner predictions<br/>[model_v7_1.py]"]
end

subgraph group_gan["Synthetic data GAN"]
  node_gan_data["Mask image pairs<br/>[dataset.py]"]
  node_gan_model["Generator and discriminator<br/>[models.py]"]
  node_gan_train["GAN training<br/>[train.py]"]
  node_gan_output["Synthetic images<br/>[generate.py]"]
end

subgraph group_geonet["GeoNet segmentation"]
  node_geonet_data["Images and labels"]
  node_geonet_model["MultiFormeNet"]
  node_geonet_train["GeoNet training"]
  node_geonet_instances["Instance extraction"]
end

subgraph group_paddle["Paddle port"]
  node_torch_weights["PyTorch checkpoint"]
  node_npz_weights["NPZ weights"]
  node_paddle_model["Paddle MultiFormeNet"]
  node_paddle_train["Paddle training"]
end

node_annotated_data["Annotated images"]

node_annotated_data -->|"provides labels"| node_plank_dataset
node_plank_dataset -->|"loads samples"| node_plank_aug
node_plank_train -->|"builds loaders"| node_plank_dataset
node_plank_train -->|"trains"| node_plank_model
node_plank_train -->|"saves weights"| node_plank_checkpoints
node_plank_model -->|"predicts corners"| node_plank_inference
node_gan_data -->|"provides pairs"| node_gan_train
node_gan_train -->|"trains"| node_gan_model
node_gan_model -->|"generates"| node_gan_output
node_geonet_data -->|"provides samples"| node_geonet_train
node_geonet_train -->|"trains"| node_geonet_model
node_geonet_model -->|"extracts instances"| node_geonet_instances
node_torch_weights -->|"converts to"| node_npz_weights
node_npz_weights -.->|"initializes from"| node_paddle_train
node_paddle_train -->|"trains"| node_paddle_model

click node_plank_dataset "https://github.com/maaxxe/train_kaggle_plank_detector/blob/main/Plankeye/train/train_v7.py"
click node_plank_aug "https://github.com/maaxxe/train_kaggle_plank_detector/blob/main/Plankeye/train/train_v7.py"
click node_plank_model "https://github.com/maaxxe/train_kaggle_plank_detector/blob/main/Plankeye/model/model_v7_1.py"
click node_plank_train "https://github.com/maaxxe/train_kaggle_plank_detector/blob/main/Plankeye/train/train_v7.py"
click node_plank_checkpoints "https://github.com/maaxxe/train_kaggle_plank_detector/tree/main/Plankeye/model_poids"
click node_plank_inference "https://github.com/maaxxe/train_kaggle_plank_detector/blob/main/Plankeye/model/model_v7_1.py"
click node_gan_data "https://github.com/maaxxe/train_kaggle_plank_detector/blob/main/GAN_PlankEYE/dataset.py"
click node_gan_model "https://github.com/maaxxe/train_kaggle_plank_detector/blob/main/GAN_PlankEYE/models.py"
click node_gan_train "https://github.com/maaxxe/train_kaggle_plank_detector/blob/main/GAN_PlankEYE/train.py"
click node_gan_output "https://github.com/maaxxe/train_kaggle_plank_detector/blob/main/GAN_PlankEYE/generate.py"
click node_geonet_data "https://github.com/maaxxe/train_kaggle_plank_detector/blob/main/GeoNet_paddle/train/train_geonet_baidu.py"
click node_geonet_model "https://github.com/maaxxe/train_kaggle_plank_detector/blob/main/GeoNet/model/multiforme_model.py"
click node_geonet_train "https://github.com/maaxxe/train_kaggle_plank_detector/blob/main/GeoNet_paddle/train/train_geonet_baidu.py"
click node_geonet_instances "https://github.com/maaxxe/train_kaggle_plank_detector/blob/main/GeoNet/model/multiforme_model.py"
click node_torch_weights "https://github.com/maaxxe/train_kaggle_plank_detector/blob/main/GeoNet_paddle/tools/export_torch_checkpoint_npz.py"
click node_npz_weights "https://github.com/maaxxe/train_kaggle_plank_detector/tree/main/GeoNet_paddle/model_poids"
click node_paddle_model "https://github.com/maaxxe/train_kaggle_plank_detector/blob/main/GeoNet_paddle/model/multiforme_model.py"
click node_paddle_train "https://github.com/maaxxe/train_kaggle_plank_detector/blob/main/GeoNet_paddle/train/train_geonet_baidu.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_plank_dataset,node_plank_aug,node_plank_model,node_plank_train,node_plank_checkpoints,node_plank_inference toneBlue
class node_gan_data,node_gan_model,node_gan_train,node_gan_output toneAmber
class node_geonet_data,node_geonet_model,node_geonet_train,node_geonet_instances toneMint
class node_torch_weights,node_npz_weights,node_paddle_model,node_paddle_train toneRose
class node_annotated_data toneIndigo
```

## Components

### PlankEye detection

- [Dataset and splits](https://github.com/maaxxe/train_kaggle_plank_detector/blob/main/Plankeye/train/train_v7.py): `Plankeye/train/train_v7.py`
- [Image augmentation](https://github.com/maaxxe/train_kaggle_plank_detector/blob/main/Plankeye/train/train_v7.py): `Plankeye/train/train_v7.py`
- [Quadrilateral detector](https://github.com/maaxxe/train_kaggle_plank_detector/blob/main/Plankeye/model/model_v7_1.py): `Plankeye/model/model_v7_1.py`
- [Detector training](https://github.com/maaxxe/train_kaggle_plank_detector/blob/main/Plankeye/train/train_v7.py): `Plankeye/train/train_v7.py`
- [Detector checkpoints](https://github.com/maaxxe/train_kaggle_plank_detector/tree/main/Plankeye/model_poids): `Plankeye/model_poids`
- [Corner predictions](https://github.com/maaxxe/train_kaggle_plank_detector/blob/main/Plankeye/model/model_v7_1.py): `Plankeye/model/model_v7_1.py`

### Synthetic data GAN

- [Mask image pairs](https://github.com/maaxxe/train_kaggle_plank_detector/blob/main/GAN_PlankEYE/dataset.py): `GAN_PlankEYE/dataset.py`
- [Generator and discriminator](https://github.com/maaxxe/train_kaggle_plank_detector/blob/main/GAN_PlankEYE/models.py): `GAN_PlankEYE/models.py`
- [GAN training](https://github.com/maaxxe/train_kaggle_plank_detector/blob/main/GAN_PlankEYE/train.py): `GAN_PlankEYE/train.py`
- [Synthetic images](https://github.com/maaxxe/train_kaggle_plank_detector/blob/main/GAN_PlankEYE/generate.py): `GAN_PlankEYE/generate.py`

### GeoNet segmentation

- [Images and labels](https://github.com/maaxxe/train_kaggle_plank_detector/blob/main/GeoNet_paddle/train/train_geonet_baidu.py): `GeoNet_paddle/train/train_geonet_baidu.py`
- [MultiFormeNet](https://github.com/maaxxe/train_kaggle_plank_detector/blob/main/GeoNet/model/multiforme_model.py): `GeoNet/model/multiforme_model.py`
- [GeoNet training](https://github.com/maaxxe/train_kaggle_plank_detector/blob/main/GeoNet_paddle/train/train_geonet_baidu.py): `GeoNet_paddle/train/train_geonet_baidu.py`
- [Instance extraction](https://github.com/maaxxe/train_kaggle_plank_detector/blob/main/GeoNet/model/multiforme_model.py): `GeoNet/model/multiforme_model.py`

### Paddle port

- [PyTorch checkpoint](https://github.com/maaxxe/train_kaggle_plank_detector/blob/main/GeoNet_paddle/tools/export_torch_checkpoint_npz.py): `GeoNet_paddle/tools/export_torch_checkpoint_npz.py`
- [NPZ weights](https://github.com/maaxxe/train_kaggle_plank_detector/tree/main/GeoNet_paddle/model_poids): `GeoNet_paddle/model_poids`
- [Paddle MultiFormeNet](https://github.com/maaxxe/train_kaggle_plank_detector/blob/main/GeoNet_paddle/model/multiforme_model.py): `GeoNet_paddle/model/multiforme_model.py`
- [Paddle training](https://github.com/maaxxe/train_kaggle_plank_detector/blob/main/GeoNet_paddle/train/train_geonet_baidu.py): `GeoNet_paddle/train/train_geonet_baidu.py`

### Other components

- **Annotated images**

## Connections

- Annotated images → Dataset and splits: provides labels
- Dataset and splits → Image augmentation: loads samples
- Detector training → Dataset and splits: builds loaders
- Detector training → Quadrilateral detector: trains
- Detector training → Detector checkpoints: saves weights
- Quadrilateral detector → Corner predictions: predicts corners
- Mask image pairs → GAN training: provides pairs
- GAN training → Generator and discriminator: trains
- Generator and discriminator → Synthetic images: generates
- Images and labels → GeoNet training: provides samples
- GeoNet training → MultiFormeNet: trains
- MultiFormeNet → Instance extraction: extracts instances
- PyTorch checkpoint → NPZ weights: converts to
- NPZ weights → Paddle training: initializes from
- Paddle training → Paddle MultiFormeNet: trains
