-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segment crashes #94
Comments
I am facing a similar issue: WARNING:processor.OcropyResegment:baseline part crosses existing x in region "FILE_0025_OCR-D-BIN-DENOISE-DESKEW"
WARNING:processor.OcropyResegment:baseline part crosses existing x in region "FILE_0025_OCR-D-BIN-DENOISE-DESKEW"
WARNING:processor.OcropyResegment:baseline part crosses existing x in region "FILE_0025_OCR-D-BIN-DENOISE-DESKEW"
WARNING:processor.OcropyResegment:baseline part crosses existing x in region "FILE_0025_OCR-D-BIN-DENOISE-DESKEW"
WARNING:processor.OcropyResegment:baseline part crosses existing x in region "FILE_0025_OCR-D-BIN-DENOISE-DESKEW"
WARNING:processor.OcropyResegment:baseline part crosses existing x in region "FILE_0025_OCR-D-BIN-DENOISE-DESKEW"
/home/mm/venv37-ocrd/lib/python3.7/site-packages/ocrd_cis/ocropy/segment.py:852: ShapelyDeprecationWarning: The 'type' attribute is deprecated, and will be removed in the future. You can use the 'geom_type' attribute instead.
baseline.type in ['Point', 'MultiPoint']):
/home/mm/venv37-ocrd/lib/python3.7/site-packages/ocrd_cis/ocropy/segment.py:859: ShapelyDeprecationWarning: The 'type' attribute is deprecated, and will be removed in the future. You can use the 'geom_type' attribute instead.
if (baseline.type == 'GeometryCollection' or
/home/mm/venv37-ocrd/lib/python3.7/site-packages/ocrd_cis/ocropy/segment.py:860: ShapelyDeprecationWarning: The 'type' attribute is deprecated, and will be removed in the future. You can use the 'geom_type' attribute instead.
baseline.type.startswith('Multi')):
/home/mm/venv37-ocrd/lib/python3.7/site-packages/ocrd_cis/ocropy/segment.py:852: ShapelyDeprecationWarning: The 'type' attribute is deprecated, and will be removed in the future. You can use the 'geom_type' attribute instead.
baseline.type in ['Point', 'MultiPoint']):
/home/mm/venv37-ocrd/lib/python3.7/site-packages/ocrd_cis/ocropy/segment.py:859: ShapelyDeprecationWarning: The 'type' attribute is deprecated, and will be removed in the future. You can use the 'geom_type' attribute instead.
if (baseline.type == 'GeometryCollection' or
/home/mm/venv37-ocrd/lib/python3.7/site-packages/ocrd_cis/ocropy/segment.py:860: ShapelyDeprecationWarning: The 'type' attribute is deprecated, and will be removed in the future. You can use the 'geom_type' attribute instead.
baseline.type.startswith('Multi')):
WARNING:processor.OcropySegment:Label 204 contour 10 is too small (133/2097) in region "FILE_0025_OCR-D-BIN-DENOISE-DESKEW"
WARNING:processor.OcropySegment:Label 204 contour 9 is too small (193/2097) in region "FILE_0025_OCR-D-BIN-DENOISE-DESKEW"
12:03:54.743 ERROR ocrd.processor.helpers.run_processor - Failure in processor 'ocrd-cis-ocropy-segment'
Traceback (most recent call last):
File "/home/mm/Desktop/core/ocrd/ocrd/processor/helpers.py", line 129, in run_processor
processor.process()
File "/home/mm/venv37-ocrd/lib/python3.7/site-packages/ocrd_cis/ocropy/segment.py", line 322, in process
input_file.pageId, zoom, rogroup=rogroup)
File "/home/mm/venv37-ocrd/lib/python3.7/site-packages/ocrd_cis/ocropy/segment.py", line 596, in _process_element
min_area=640/zoom/zoom)
File "/home/mm/venv37-ocrd/lib/python3.7/site-packages/ocrd_cis/ocropy/segment.py", line 148, in masks2polygons
for baseline in baselines], name)
File "/home/mm/venv37-ocrd/lib/python3.7/site-packages/ocrd_cis/ocropy/segment.py", line 148, in <listcomp>
for baseline in baselines], name)
File "/home/mm/venv37-ocrd/lib/python3.7/site-packages/shapely/geometry/base.py", line 582, in intersection
return shapely.intersection(self, other, grid_size=grid_size)
File "/home/mm/venv37-ocrd/lib/python3.7/site-packages/shapely/decorators.py", line 77, in wrapped
return func(*args, **kwargs)
File "/home/mm/venv37-ocrd/lib/python3.7/site-packages/shapely/set_operations.py", line 133, in intersection
return lib.intersection(a, b, **kwargs)
shapely.errors.GEOSException: TopologyException: Input geom 1 is invalid: Ring Self-intersection at or near point 657 659 at 657 659 for the following image ( in a workflow having the following steps:
|
|
I'm pretty sure the OP's problem happened on an outdated version (so the original problem has been fixed). Regarding @MehmedGIT's description, thanks for the detailled report. This likewise does not look like the version we have been using in ocrd_all (from fix-alpha-shape branch with last change in August). Also, in my case the workflow runs through. Here's the result for that page (OCR-D-OCR): – pretty bad indeed, but not crashing. (Ocropy cannot cope with empty pages, because it relies on connected-component statistics, which in this case will be just noise from the binarization, no actual glyphs.) @stweil your version is definitely outdated, I remember having fixed that long ago. |
The text was updated successfully, but these errors were encountered: