Skip to content

Commit

Permalink
📦 0.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
bertsky authored Oct 27, 2022
1 parent 75aab9b commit 6c72ac0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.1.2] - 2022-10-27
### Fixed
- `make deps`: fix CUDA detection even more
- apply `device` param as passed
Expand All @@ -29,3 +31,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
<!-- link-labels -->
[unreleased]: ../../compare/v0.1.1...master
[0.1.1]: ../../compare/v0.1.0...v0.1.1
[0.1.2]: ../../compare/v0.1.1...v0.1.2
23 changes: 16 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ To be used with [PAGE-XML](https://github.com/PRImA-Research-Lab/PAGE-XML) docum
```
Usage: ocrd-detectron2-segment [OPTIONS]
Detect regions with Detectron2
Detect regions with Detectron2 models
> Use detectron2 to segment each page into regions.
Expand All @@ -69,15 +69,20 @@ Usage: ocrd-detectron2-segment [OPTIONS]
> boxes), post-process the predictions:
> - panoptic segmentation: take the provided segment label map, and
> apply the segment to class label map
> apply the segment to class label map,
> - instance segmentation: find an optimal non-overlapping set (flat
> map) of instances via non-maximum suppression; then extend / shrink
> the surviving masks to fully include / exclude connected components
> in the foreground that are on the boundary
> map) of instances via non-maximum suppression,
> - both: avoid overlapping pre-existing top-level regions (incremental
> segmentation).
> Then extend / shrink the surviving masks to fully include / exclude
> connected components in the foreground that are on the boundary.
> Finally, find the convex hull polygon for each region, and map its
> class id to a new PAGE region type (and subtype).
> (Does not annotate `ReadingOrder` or `TextLine`s or `@orientation`.)
> Produce a new output file by serialising the resulting hierarchy.
Options:
Expand All @@ -86,6 +91,8 @@ Options:
-g, --page-id ID Physical page ID(s) to process
--overwrite Remove existing output pages/images
(with --page-id, remove only those)
--profile Enable profiling
--profile-file Write cProfile stats to this file. Implies --profile
-p, --parameter JSON-PATH Parameters, either verbatim JSON string
or JSON file path
-P, --param-override KEY VAL Override a single JSON object key-value pair,
Expand All @@ -97,15 +104,17 @@ Options:
-C, --show-resource RESNAME Dump the content of processor resource RESNAME
-L, --list-resources List names of processor resources
-J, --dump-json Dump tool description as JSON and exit
-D, --dump-module-dir Output the 'module' directory with resources for this processor
-h, --help This help message
-V, --version Show version
Parameters:
"categories" [array - REQUIRED]
maps each region category (position) of the model to a PAGE region
type (and subtype if separated by colon), e.g.
type (and @type or @custom if separated by colon), e.g.
['TextRegion:paragraph', 'TextRegion:heading',
'TextRegion:floating', 'TableRegion', 'ImageRegion'] for PubLayNet
'TextRegion:floating', 'TableRegion', 'ImageRegion'] for PubLayNet;
categories with an empty string will be skipped during prediction
"min_confidence" [number - 0.5]
confidence threshold for detections
"model_config" [string - REQUIRED]
Expand Down
2 changes: 1 addition & 1 deletion ocrd_detectron2/ocrd-tool.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"git_url": "https://github.com/bertsky/ocrd_detectron2",
"version": "0.1.1",
"version": "0.1.2",
"tools": {
"ocrd-detectron2-segment": {
"executable": "ocrd-detectron2-segment",
Expand Down

0 comments on commit 6c72ac0

Please sign in to comment.