mmontielpz/jetseg
À propos
Efficient real-time semantic segmentation for low-power GPU-embedded systems. Research implementation in PyTorch.
IA et apprentissage automatiqueProgression mesurée des étoiles
- in 24h
- 0
- in 7 days
- Historique en cours
- in 15 days
- Historique en cours
- in 1 month
- Historique en cours
Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.
README.md
OriginalJetSeg
Efficient Real-Time Semantic Segmentation Model for Low-Power GPU-Embedded Systems
Miguel Lopez-Montiel, Daniel Alejandro Lopez, Oscar Montiel
Department of Intelligent Systems, Instituto Politécnico Nacional (CITEDI-IPN)
Status: Historical research implementation (2023). arXiv preprint — originally submitted to NeurIPS 2023 (not accepted).
Paper (arXiv) · PDF · DOI · Citation
Figure 1 from arXiv:2305.11419: JetSeg encoder–decoder architecture combining the 4-stage JetNet encoder (S0–S3) with an adapted RegSeg decoder.
Research Motivation
Real-time semantic segmentation for autonomous driving and robotics requires balancing pixel-level accuracy against strict latency, compute, and memory budgets. Many high-accuracy segmentation networks rely on workstation-class GPUs and exceed the memory and power envelope of embedded edge accelerators. JetSeg investigates an encoder–decoder design tailored for low-power GPU-embedded systems (such as NVIDIA Jetson devices) without post-training model compression, pretraining, or data augmentation.
Scientific Contributions
JetSeg (modules/model.py) pairs a lightweight encoder (JetNet) with an adapted RegSeg decoder and introduces four architectural and training components:
| Component | Implementation | Role in Paper (arXiv:2305.11419) |
|---|---|---|
| JetNet | modules/encoder.py | 4-stage encoder (S0–S3) built from configurable JetBlock units with stage-specific attention (CBAM in S0–S1, SAM in S2, ECAM in S3). |
| JetBlock | modules/block.py | Lightweight residual extraction unit combining grouped 1×1 pointwise convolutions (GPConv), Batch Normalization, lightweight activations (REU / TanhExp), channel shuffle, JetConv, and attention. |
| JetConv | modules/block.py | Combinated Dilated Depthwise Convolution (CDDC) pairing dilated asymmetric convolutions (3×1+1×3, 5×1+1×5, 7×1+1×7) with non-asymmetric depthwise convolutions (3×3, 5×5, 7×7), additive/concatenative fusion, and GPConv. |
| Adapted RegSeg Decoder | modules/decoder.py, modules/heads.py | Multi-stage upsampling decoder fusing S1–S3 encoder feature maps into dense segmentation predictions. |
| JetLoss | modules/loss.py | Composite segmentation loss (R_loss + P_loss + B_loss) combining Precision, Recall, and IoUB terms with class-balanced pixel-count weights. |
Paper-Reported Results
Verification Note: The figures below are paper-reported results from arXiv:2305.11419 (Section 3, Table 1) on the CamVid dataset. They have not been independently reproduced in this archival repository update, and pretrained checkpoints are not included in this repository.
| Model | Input Size | Pretrained | Data Aug | Model Opt | FLOPs (G) | Reported FPS (Workstation) |
|---|---|---|---|---|---|---|
| LinkNet | 640 × 360 |
No | No | No | 21.2 |
— |
| CGNet | 480 × 360 |
No | Yes | No | 6.0 |
— |
| MFENet | Original | Yes | Yes | No | 12.5 |
— |
| DSANet | 480 × 360 |
No | Yes | No | 37.4 |
75.3 |
| JetSeg (Ours) | 512 × 512 |
No | No | No | 1.125 |
158 |
- Embedded GPU evaluation (paper-reported): On NVIDIA Jetson AGX Xavier, Section 3 reports
39.9 FPSat1.125 GFLOPs(Section 4 Discussion also cites148 FPSon Titan RTX and39.1 FPSon Jetson AGX across configurations). The paper additionally reports successful execution on NVIDIA Jetson Nano 4GB. - Scope note: Table 1 of the 2023 preprint reports efficiency metrics (parameters, FLOPs, FPS) and omits a comparative numeric mIoU column; consult the preprint PDF for full experimental discussion and comparison caveats.
Hardware & Experimental Context
The original 2023 experiments were conducted with PyTorch in Docker containers across three target platforms:
| Platform | Paper-Reported Environment |
|---|---|
| Workstation | NVIDIA TITAN RTX GPU, PyTorch (Conda export in config/nips23.yml: Python 3.8.16, PyTorch 2.0.0, torchvision 0.15.1) |
| NVIDIA Jetson AGX Xavier | JetPack 5.0.2, NGC container nvcr.io/nvidia/l4t-ml:r35.1.0-py3 |
| NVIDIA Jetson Nano 4GB | JetPack 4.6.1, NGC container nvcr.io/nvidia/l4t-ml:r32.7.1-py3 |
- Dataset protocol (paper-reported): CamVid (
701frames,32classes), split into367training,101validation, and233test frames (512 × 512input, trained from scratch for15epochs without pretraining, augmentation, or compression).
Installation & Usage
This repository preserves the original 2023 PyTorch research implementation as an archival codebase. The scripts require CUDA.
git clone https://github.com/mmontielpz/jetseg.git
cd jetseg
conda env create -f config/nips23.yml
conda activate nips2023
Environment limitations: config/nips23.yml contains Linux-specific package pins and an original machine-specific
prefix:line — remove or edit that prefix before creating the environment. ARM64 Jetson boards require platform-specific PyTorch/L4T builds (such as NVIDIA NGCl4t-mlcontainers).
Dataset Preparation
The implemented loader supports CamVid (Cityscapes is a placeholder in modules/dataset.py). Prepare CamVid externally using the directory layout below:
data/camvid/
class_dict.csv
train/
train_labels/
val/
val_labels/
test/
test_labels/
Mask files must include an _L suffix before the file extension (see modules/dataset.py and modules/mltools.py).
Training & Evaluation
Run Python entry points from the py/ directory so the original path helpers resolve data/, train/, and results/ relative to the repository root:
mkdir -p train results
cd py
python train.py --dataset_name camvid --jsc 0 --jsm 3 --num_epochs 25 --batch_size 4
python test.py --help
python eval.py --dataset_name camvid --jsc 0 --jsm 3
Evaluation requires a matching trained checkpoint (not bundled here). Load trusted checkpoints only.
Performance Profiling
From the py/ directory:
python perf.py --jsc 0 --jsm 3 --platform_name xavier --img_size 512 256
The profiler instantiates the architecture without loading a trained checkpoint and records latency, FPS, FLOPs, parameter counts, and memory-related metrics. --platform_name is a reporting label; set it to match the hardware under test.
Repository Navigation
| Path | Description |
|---|---|
| assets/ | Original architecture figure extracted from arXiv:2305.11419 (jetseg-architecture.png) and repository social preview (social-preview.png) |
| config/ | Architecture configurations (config/arch_cfg.py), profiler hooks (config/hooks.py), and historical Conda environment (config/nips23.yml) |
| modules/ | Core PyTorch model (model.py, encoder.py, decoder.py, block.py, heads.py), custom activations (afunc.py), JetLoss (loss.py), CamVid dataset loader, metrics, and profiler |
| py/ | CLI scripts for training (train.py), testing (test.py), evaluation (eval.py), and profiling (perf.py) |
| nb/ | Original exploratory research notebooks (train.ipynb, test.ipynb, sandbox.ipynb) |
| sh/ | Original experiment shell scripts (run_experiment.sh, run_multi-gpus.sh) |
Citation
If you reference JetSeg in your work, please cite the arXiv preprint (also available in machine-readable CITATION.cff):
@article{lopezmontiel2023jetseg,
title={JetSeg: Efficient Real-Time Semantic Segmentation Model for Low-Power GPU-Embedded Systems},
author={Lopez-Montiel, Miguel and Lopez, Daniel Alejandro and Montiel, Oscar},
journal={arXiv preprint arXiv:2305.11419},
year={2023},
doi={10.48550/arXiv.2305.11419}
}
License
This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License (CC BY-SA 4.0). See LICENSE.
Explorer des projets similaires
Chargement…