# gokul-k-19/cip architecture

> Architecture diagram of the GitHub repository gokul-k-19/cip, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gokul-k-19/cip
- Repository: https://github.com/gokul-k-19/cip

## Overview

#### Purpose
CIP is a Python-based computer-vision / image-classification repository. The minimal README provides no operational documentation; architecture is inferred from the top-level model, prediction, augmentation, and checking scripts.

#### Entry Points
Likely workflow entry points are standalone Python scripts rather than a packaged application:
- `Final_SGCM.py`
- `Final_pred.py`
- `prediction.py`
- `checking_prediction.py`
- `checking_severity.py`

These names indicate separate execution paths for final model execution, inference, prediction validation, and severity-oriented evaluation.

#### Model Layer
The repository contains multiple neural-network architecture implementations or experiment variants:
- `efficientnet.py`
- `mobilenetv3.py`
- `mobilevit.py`
- `shufflenet.py`

These modules form the core model boundary: training/inference orchestration scripts should select, instantiate, load, or evaluate one of these model families. Their presence suggests an emphasis on efficient/mobile-oriented image models rather than a server or UI architecture.

#### SGCM Processing Path
SGCM appears to be a domain-specific processing, classification, or model stage:
- `SGCM.py`
- `Final_SGCM.py`

`SGCM.py` likely contains reusable SGCM logic, while `Final_SGCM.py` likely acts as a finalized experiment or runnable pipeline. Treat SGCM as a separate architectural stage until code inspection determines whether it is preprocessing, feature extraction, or a dedicated model.

#### Data Preparation and Inference Flow
A probable primary flow is: input images/data → augmentation or preprocessing → chosen model/SGCM stage → prediction output → validation/checking.
Relevant boundaries are:
- Data transformation: `augmented.py`
- Inference/prediction: `prediction.py`, `Final_pred.py`
- Result checking: `checking_prediction.py`, `checking_severity.py`

Keep augmentation independent from model definitions so the same prepared inputs can be evaluated across EfficientNet, MobileNetV3, MobileViT, ShuffleNet, and SGCM paths.

#### Runtime and External Dependencies
The runtime is Python, with no package manifest, service definitions, container configuration, or deployment infrastructure visible in the repository. The model filenames strongly imply a deep-learning framework and image-processing dependencies, but no specific framework, dataset location, model-artifact store, external API, database, or cloud service can be confirmed from the supplied tree.

#### Integration Boundaries
The main integration contracts to establish when extending the repository are:
- Input dataset/image format consumed by `augmented.py` and prediction scripts.
- Tensor, label, checkpoint, and output formats shared by `SGCM.py` and the architecture modules.
- Evaluation/reporting inputs expected by `checking_prediction.py` and `checking_severity.py`.
- Model-selection and checkpoint-loading behavior used by `Final_pred.py` and `Final_SGCM.py`.

Main entry points: [`prediction.py`](https://github.com/gokul-k-19/cip/blob/main/prediction.py) (Prediction runner), [`Final_pred.py`](https://github.com/gokul-k-19/cip/blob/main/Final_pred.py) (Final prediction), [`augmented.py`](https://github.com/gokul-k-19/cip/blob/main/augmented.py) (Augmentation), [`Final_SGCM.py`](https://github.com/gokul-k-19/cip/blob/main/Final_SGCM.py) (Final SGCM)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pipeline["Execution Pipeline"]
  node_input_images[("Input images / dataset<br/>data input")]
  node_augmentation["Augmentation<br/>data transformation<br/>[augmented.py]"]
  node_prediction["Prediction runner<br/>inference script<br/>[prediction.py]"]
  node_final_prediction["Final prediction<br/>inference entry point<br/>[Final_pred.py]"]
  node_final_sgcm["Final SGCM<br/>SGCM entry point<br/>[Final_SGCM.py]"]
  node_sgcm["SGCM logic<br/>domain processing<br/>[SGCM.py]"]
  node_prediction_output["Prediction outputs<br/>result data"]
end

subgraph group_models["Model Implementations"]
  node_efficientnet["EfficientNet<br/>model implementation<br/>[efficientnet.py]"]
  node_mobilenetv3["MobileNetV3<br/>model implementation<br/>[mobilenetv3.py]"]
  node_mobilevit["MobileViT<br/>model implementation<br/>[mobilevit.py]"]
  node_shufflenet["ShuffleNet<br/>model implementation<br/>[shufflenet.py]"]
end

subgraph group_evaluation["Validation"]
  node_prediction_check["Prediction checking<br/>validation script"]
  node_severity_check["Severity checking<br/>severity evaluation"]
end

node_input_images -->|"raw images"| node_augmentation
node_augmentation -->|"prepared inputs"| node_prediction
node_augmentation -->|"prepared inputs"| node_final_prediction
node_augmentation -->|"prepared inputs"| node_final_sgcm
node_prediction -.->|"selects or loads"| node_efficientnet
node_prediction -.->|"selects or loads"| node_mobilenetv3
node_prediction -.->|"selects or loads"| node_mobilevit
node_prediction -.->|"selects or loads"| node_shufflenet
node_final_prediction -.->|"model option"| node_efficientnet
node_final_prediction -.->|"model option"| node_mobilenetv3
node_final_prediction -.->|"model option"| node_mobilevit
node_final_prediction -.->|"model option"| node_shufflenet
node_final_sgcm -->|"runs"| node_sgcm
node_prediction -->|"predictions"| node_prediction_output
node_final_prediction -->|"predictions"| node_prediction_output
node_final_sgcm -->|"results"| node_prediction_output
node_prediction_output -->|"validate predictions"| node_prediction_check
node_prediction_output -->|"evaluate severity"| node_severity_check

click node_augmentation "https://github.com/gokul-k-19/cip/blob/main/augmented.py"
click node_prediction "https://github.com/gokul-k-19/cip/blob/main/prediction.py"
click node_final_prediction "https://github.com/gokul-k-19/cip/blob/main/Final_pred.py"
click node_final_sgcm "https://github.com/gokul-k-19/cip/blob/main/Final_SGCM.py"
click node_sgcm "https://github.com/gokul-k-19/cip/blob/main/SGCM.py"
click node_efficientnet "https://github.com/gokul-k-19/cip/blob/main/efficientnet.py"
click node_mobilenetv3 "https://github.com/gokul-k-19/cip/blob/main/mobilenetv3.py"
click node_mobilevit "https://github.com/gokul-k-19/cip/blob/main/mobilevit.py"
click node_shufflenet "https://github.com/gokul-k-19/cip/blob/main/shufflenet.py"
click node_prediction_check "https://github.com/gokul-k-19/cip/blob/main/checking_prediction.py"
click node_severity_check "https://github.com/gokul-k-19/cip/blob/main/checking_severity.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_input_images,node_augmentation,node_prediction,node_final_prediction,node_final_sgcm,node_sgcm,node_prediction_output toneBlue
class node_efficientnet,node_mobilenetv3,node_mobilevit,node_shufflenet toneAmber
class node_prediction_check,node_severity_check toneMint
```

## Components

### Execution Pipeline

Standalone scripts coordinate preparation and inference.

- **Input images / dataset**: data input · Image and label format is an integration contract.
- [Augmentation](https://github.com/gokul-k-19/cip/blob/main/augmented.py): data transformation · `augmented.py`
- [Prediction runner](https://github.com/gokul-k-19/cip/blob/main/prediction.py): inference script · `prediction.py`
- [Final prediction](https://github.com/gokul-k-19/cip/blob/main/Final_pred.py): inference entry point · Finalized prediction and checkpoint-loading workflow. · `Final_pred.py`
- [Final SGCM](https://github.com/gokul-k-19/cip/blob/main/Final_SGCM.py): SGCM entry point · Runnable SGCM-oriented experiment or pipeline. · `Final_SGCM.py`
- [SGCM logic](https://github.com/gokul-k-19/cip/blob/main/SGCM.py): domain processing · Reusable SGCM stage; its exact role requires code inspection. · `SGCM.py`
- **Prediction outputs**: result data · Output format is consumed by validation scripts.

### Model Implementations

Alternative efficient image-classification architectures.

- [EfficientNet](https://github.com/gokul-k-19/cip/blob/main/efficientnet.py): model implementation · `efficientnet.py`
- [MobileNetV3](https://github.com/gokul-k-19/cip/blob/main/mobilenetv3.py): model implementation · `mobilenetv3.py`
- [MobileViT](https://github.com/gokul-k-19/cip/blob/main/mobilevit.py): model implementation · `mobilevit.py`
- [ShuffleNet](https://github.com/gokul-k-19/cip/blob/main/shufflenet.py): model implementation · `shufflenet.py`

### Validation

Prediction and severity results are checked separately.

- [Prediction checking](https://github.com/gokul-k-19/cip/blob/main/checking_prediction.py): validation script · `checking_prediction.py`
- [Severity checking](https://github.com/gokul-k-19/cip/blob/main/checking_severity.py): severity evaluation · `checking_severity.py`

## Connections

- Input images / dataset → Augmentation: raw images
- Augmentation → Prediction runner: prepared inputs
- Augmentation → Final prediction: prepared inputs
- Augmentation → Final SGCM: prepared inputs
- Prediction runner → EfficientNet: selects or loads
- Prediction runner → MobileNetV3: selects or loads
- Prediction runner → MobileViT: selects or loads
- Prediction runner → ShuffleNet: selects or loads
- Final prediction → EfficientNet: model option
- Final prediction → MobileNetV3: model option
- Final prediction → MobileViT: model option
- Final prediction → ShuffleNet: model option
- Final SGCM → SGCM logic: runs
- Prediction runner → Prediction outputs: predictions
- Final prediction → Prediction outputs: predictions
- Final SGCM → Prediction outputs: results
- Prediction outputs → Prediction checking: validate predictions
- Prediction outputs → Severity checking: evaluate severity
