-
Notifications
You must be signed in to change notification settings - Fork 754
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
Hello, I would like to ask you about the following error when training the dbnet model on the ICDAR2017 dataset。 #1388
Comments
Hi, this error may caused due to invalid polygonal bounding boxes with self-intersection included in the annotation of the dataset. If you are using MMOCR 1.x version, you can directly add our
If you are using the MMOCR 0.x version, we recommend you to write a script to filter out the invalid samples or fix them, take the following codes as an example. # if you want to filter out the invalid polygons, simply replace them with [x, y, x+w, y, x+w, y+h, x, y+h]
box = [0, 0, 3, 3]
polygon = Polygon([(0,0), (0,3), (3,3), (3,0), (2,0), (2,2), (1,2), (1,1), (2,1), (2,0), (0,0)])
if not polygon.is_valid:
x, y, w, h = box
polygon = [x, y, x+w, y, x+w, y+h, x, y+h]
# or you can mark this sample as ignored
if not polygon.is_valid:
ignored = 1 |
Thank you very much for your answer. I'll try it out right away |
Regarding the MMOCR version, is there any difference between the 1. X version and the mmocr default version? |
Excuse me again, when training in version 1.x, ImportError: cannot import name 'register_all_modules' from 'mmocr.utils' 。 |
Hi, 1.x is the latest major update that MMOCR has released, which introduces many new features (check our latest document for more details English Doc/Chinese Doc). The 0.x version (default version) will be deprecated at the end of this year, hence we recommend users transfer to the 1.x version. Since the 1.x version relies on the new MMEngine, it does not share the same running env with the 0.x version. You have to install it following our installation guide. |
raise TopologicalError(
shapely.errors.TopologicalError: The operation 'GEOSIntersection_r' could not be performed. Likely cause is invalidity of the geometry <shapely.geometry.polygon.Polygon object at 0x7f63038f4520>
The text was updated successfully, but these errors were encountered: