| title | Petri Net Converter Suite |
|---|---|
| emoji | 🔄 |
| colorFrom | blue |
| colorTo | purple |
| sdk | docker |
| app_port | 7860 |
| pinned | false |
| license | mit |
A Gradio-based application that converts hand-drawn Petri net sketches into digital formats using computer vision and OCR.
🚀 Try the live demo on Hugging Face Spaces
The application processes images of Petri net diagrams and automatically:
- Detects places, transitions, and arcs using computer vision
- Extracts text labels using OCR
- Converts the detected elements into standard formats (PNML, JSON, GraphViz, etc.)
- Provides visual feedback of the detection process
Python 3.8+ and the dependencies listed in requirements.txt.
- Clone the repository:
git clone <repository-url>
cd petri-net-converter- Install dependencies:
pip install -r requirements.txt- Set up environment variables (optional, for full functionality):
cp env.example .env
# Edit .env and add your API keys:
# GROQ_API_KEY=your_groq_api_key_here
# ROBOFLOW_API_KEY=your_roboflow_api_key_here- Run the application:
python app.pyThe application will start on http://localhost:7860.
- Image Processor Tab: Upload an image of a Petri net sketch and a YAML configuration file, then click "Process"
- Configuration Editor Tab: Create or modify YAML configuration files for processing parameters
- Petri Net Converter Tab: Convert processed results into various output formats
- Input: PNG, JPG, JPEG images + YAML configuration files
- Output: PNML (XML), PetriObj, JSON, GraphViz DOT, PNG visualizations
MIT License