Package: pybpmn-parser
pybpmn-parserStarter code for using thehdBPMNdataset for diagram recognition research.Thedump_coco.pyscript can be used to convert the images and BPMN XMLs into aCOCOdataset.
COCO is a common format used in computer vision research to annotate the objects and keypoints in images.pythonscripts/dump_coco.pypath/to/hdBPMNpath/to/target/coco/directory/hdbpmnMoreover, thedemo.ipynbJupyter notebook can be used to visualize
(1) the extracted bounding boxes, keypoints, and relations,
and (2) the annotated BPMN diagram overlayed over the hand-drawn image.
Note that the latter requires thebpmn-to-imagetool, which in turn requires a nodejs installation.Installationpipinstallpybpmn-parserDevelopmentIn order to set up the necessary environment:create an environmentpybpmn-parserwith the help ofconda:conda env create -f environment.ymlactivate the new environment with:conda activate pybpmn-parserNOTE:The conda environment will have pybpmn-parser installed in editable mode.
Some changes, e.g. insetup.cfg, might require you to runpip install -e .again.Optional and needed only once aftergit clone:install JupyterLab kernelpython -m ipykernel install --user --name "${CONDA_DEFAULT_ENV}" --display-name "$(python -V) (${CONDA_DEFAULT_ENV})"install severalpre-commitgit hooks with:pre-commitinstall# You might also want to run `pre-commit autoupdate`and checkout the configuration under.pre-commit-config.yaml.
The-n, --no-verifyflag ofgit commitcan be used to deactivate pre-commit hooks temporarily.Project Organization├── LICENSE.txt             <- License as chosen on the command-line.
├── README.md               <- The top-level README for developers.
├── data
│   ├── external            <- Data from third party sources.
│   ├── interim             <- Intermediate data that has been transformed.
│   ├── processed           <- The final, canonical data sets for modeling.
│   └── raw                 <- The original, immutable data dump.
├── docs                    <- Directory for Sphinx documentation in rst or md.
├── environment.yml         <- The conda environment file for reproducibility.
├── notebooks               <- Jupyter notebooks. Naming convention is a number (for
│                              ordering), the creator's initials and a description,
│                              e.g. `1.0-fw-initial-data-exploration`.
├── pyproject.toml          <- Build system configuration. Do not change!
├── scripts                 <- Analysis and production scripts which import the
│                              actual Python package, e.g. train_model.py.
├── setup.cfg               <- Declarative configuration of your project.
├── setup.py                <- Use `pip install -e .` to install for development or
│                              or create a distribution with `tox -e build`.
├── src
│   └── pybpmn              <- Actual Python package where the main functionality goes.
├── tests                   <- Unit tests which can be run with `py.test`.
├── .coveragerc             <- Configuration for coverage reports of unit tests.
├── .isort.cfg              <- Configuration for git hook that sorts imports.
└── .pre-commit-config.yaml <- Configuration of pre-commit git hooks.NoteThis project has been set up usingPyScaffold4.0.1 and thedsproject extension0.6.1.