https://github.com/kaczmarj/model-inference-plugin-rdf
Python plugin to write cell segmentation/classification model outputs to RDF file.
https://github.com/kaczmarj/model-inference-plugin-rdf
Last synced: about 2 months ago
JSON representation
Python plugin to write cell segmentation/classification model outputs to RDF file.
- Host: GitHub
- URL: https://github.com/kaczmarj/model-inference-plugin-rdf
- Owner: kaczmarj
- Created: 2021-09-23T03:04:55.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-12T15:30:42.000Z (over 2 years ago)
- Last Synced: 2025-02-10T03:22:19.306Z (4 months ago)
- Language: Python
- Size: 34.2 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# plugin to create rdf file for cell segmentation/classification model outputs
# Example
In the following example, we initialize the plugin, add a polygon, add a point,
and save the state to disk.```python
import sbumed_predictions_to_graph# Initialize the plugin with metadata.
plugin_state = sbumed_predictions_to_graph.State(
path="predictions.ttl.gz",
creator="Jakub Kaczmarzyk",
name="HoverNet Analysis Pipeline",
github_url="https://github.com/david-belinsky-sbu/Hovernet_modified/commit/6cd610a32472184d6fbf341cb24902c4180ca3e8",
slide_path="path/to/slide.svs",
description="multi-class segmentation using HoverNet",
)# Add polygon to the state.
plugin_state.add(
cell_type="lymphocyte",
probability=0.92,
polygon_coords=[(24, 50), (10, 10), (20, 4), (24, 50)],
)# Add point to the state.
plugin.state.add(
cell_type="lymphocyte",
probability=0.86,
point=[(25, 10)],
)# Write the state to disk. This file can be read by viewing software.
plugin_state.write()
```