Skip to content

A deep learning-based system for detecting and localizing Code128 finder patterns from normalized 1D signals. The project includes dataset preparation, model training, and evaluation tools optimized for low-complexity operations.

License

Notifications You must be signed in to change notification settings

aidinattar/code128-net

Repository files navigation

Code128-Net

CCDS Tests

A deep learning-based system for detecting and localizing Code128 finder patterns from normalized 1D signals.

The project includes:

  • 📦 Dataset loading and preprocessing
  • 🧠 Model definition and training (PyTorch)
  • 🔍 Evaluation and plotting tools
  • 🛠️ CLI scripts for training, prediction, and processing

🔧 Installation

git clone https://github.com/aidinattar/code128-net.git
cd code128-net
make requirements

You can also create a virtual environment with make create_environment if you use Conda.


🚀 Quickstart

Train a model:

make train

Run inference on test data:

make predict

Evaluate results and generate plots:

make evaluate

Run all tests:

make test

🧠 Project Structure

code128-net/
├── data/               # Raw, processed and interim datasets
├── models/             # Trained model weights
├── reports/            # Output plots and evaluation results
├── code128net/         # Main source code
│   ├── config.py
│   ├── dataset.py
│   ├── features.py
│   ├── plots.py
│   ├── evaluation.py
│   └── modeling/
│       ├── model.py
│       ├── train.py
│       └── predict.py
├── tests/              # Unit tests with pytest
├── requirements.txt
├── Makefile
└── README.md

📈 Model Outputs

The model predicts 4 outputs for each signal:

  • class: the type of finder pattern (StartA, StartB, StartC, Stop, NoPattern)
  • index: the starting index of the pattern
  • ppe: the pattern's proportional position estimate
  • direction: the direction (0 or 1)

🧪 Testing

Unit tests are implemented using pytest:

pytest tests/

Tests cover:

  • Model architecture and forward pass
  • Dataset and data loading
  • Loss computation and training loop
  • CLI scripts (via typer.testing.CliRunner)

📄 License

This project is open-source and available under the MIT License.


✍️ Author

Created by Aidin Attar for a deep learning assignment on 1D signal analysis using PyTorch.

About

A deep learning-based system for detecting and localizing Code128 finder patterns from normalized 1D signals. The project includes dataset preparation, model training, and evaluation tools optimized for low-complexity operations.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published