Desktop application for analyzing PERT/CPM network diagrams from images. The pipeline combines computer vision, OCR, graph reconstruction, human review, CPM/PERT calculation, visualization, and report export.
- Detect AON and AOA diagrams from PNG/JPEG images.
- Detect activities, durations, arrows, and dependencies.
- Use a review workflow when OCR or graph reconstruction is uncertain.
- Calculate earliest/latest times, float, critical activities, and critical paths.
- Export authoritative results to JSON, CSV, Excel, and PDF.
- Run the analysis through a Qt desktop GUI or the CLI.
- Python 3.11 or newer.
- Tesseract OCR executable available on
PATHfor OCR-enabled analysis. - Qt runtime is installed through the
guiextra.
On Debian/Ubuntu:
sudo apt-get install tesseract-ocr tesseract-ocr-eng tesseract-ocr-araCreate a virtual environment and install the complete feature set:
python -m venv .venv
.venv/bin/python -m pip install --upgrade pip
.venv/bin/pip install -e '.[all]'Optional feature groups are available as gui, ocr, reports, and dev.
Launch the GUI:
.venv/bin/pert-analyzerAnalyze one image through the CLI:
.venv/bin/pert-analyzer --cli --image path/to/diagram.pngThe CLI reports the project duration, critical path, activity count, and critical activity count when the graph passes validation. Results that require review are intentionally blocked from producing misleading CPM output.
For headless environments:
QT_QPA_PLATFORM=offscreen PYTHONPATH=. .venv/bin/python -m pytestThe test suite contains unit, integration, GUI, reference-acceptance, and benchmark tests.
| Directory | Responsibility |
|---|---|
pert_analyzer/cv |
Image preprocessing, shape/arrow detection, OCR, reconstruction, and validation |
pert_analyzer/analysis |
CPM and PERT calculation |
pert_analyzer/graph |
Graph construction and NetworkX adaptation |
pert_analyzer/pipeline |
End-to-end orchestration and review workflow |
pert_analyzer/gui |
Qt application, review screens, validation, results, and visualization |
pert_analyzer/reporting |
Report model and JSON/CSV/Excel/PDF exporters |
tests |
Unit, integration, GUI, reference, and benchmark coverage |
docs |
Acceptance reports, benchmark results, and UI evidence |
The application does not silently calculate CPM from an invalid or uncertain graph. It marks the session as requiring review and allows the user to correct activities, durations, or dependencies before continuing. This is deliberate: a visually plausible result is not necessarily a mathematically valid result.
Image analysis quality depends on diagram clarity, OCR quality, and the ability to distinguish graph geometry from text and decoration. Real-world diagrams may require human review, especially during dependency reconstruction. Performance also varies with image size and visual complexity.
MIT