Comments (6)
To the latter: perhaps in core we should offer a filter based on the filename directly (instead of the image features). Something like Workspace.image_from_page(... filename=None ...)
and similar for image_from_segment
. Of course, both parameters might interact, so if both filename
and feature_filter
/ feature_selector
are given, then one would have to verify that the image with that filename also fulfills these features.
What do you think, @kba?
from browse-ocrd.
Oh, it's not as easy though: Even with a @filename
filter, we cannot just use that to configure our ImageVersionSelector
, because obviously the path name changes for each page. @hnesk IIUC your approach was to use the selector only to retrieve its image features, and then pass that on to get_image
. But what if the image with the right features does not exist and cannot be downloaded? For core, we would have to try and download each AlternativeImage to rule that out (which seems like a waste of resources)...
from browse-ocrd.
To the latter: perhaps in core we should offer a filter based on the filename directly (instead of the image features).
I build the ImageVersionSelector around the notion of features, because Workspace.image_from_page expects it that way, if there would a filename filter, I would happily use that.
Oh, it's not as easy though: Even with a @filename filter, we cannot just use that to configure our ImageVersionSelector, because obviously the path name changes for each page.
No problem here: The ImageVersionSelector gets configured for each page individually with the current AlternativeImages and their filenames.
I think your fix in #38 fixes the problem already. Do you have an example workspace?
from browse-ocrd.
if there would a filename filter, I would happily use that.
No problem here: The ImageVersionSelector gets configured for each page individually with the current AlternativeImages and their filenames.
Oh, in that case – we should go for it. ocrd_browser would not have to mess with the image feature mechanism. See https://github.com/bertsky/core/tree/workspace-altimg-retrieve-existing for the preliminaries in core. The next step would be to (wait for approval+merge in core) and then utilize it in get_image
.
I think your fix in #38 fixes the problem already. Do you have an example workspace?
No, only the first half – see above. For an example, it suffices to take any valid PAGE-XML and add an AlternativeImage to it with no @comments
and a non-existing @filename
.
from browse-ocrd.
Ok, I got it now! It really is necessary to distinguish the images by filename, so it would be great if your branch gets merged.
from browse-ocrd.
Ok, so let's wait for OCR-D/core#845
from browse-ocrd.
Related Issues (20)
- chdir to workspace HOT 1
- make TextView and PageView searchable
- cannot run in Python pre 3.7.2 anymore HOT 2
- Feature Request: Scroll lock panels
- Integrate page-xml-draw HOT 4
- PageView: PNG-Export
- PageView: Additional information in tooltip HOT 1
- page view: add baselines if available HOT 1
- PageView: component menu not editable HOT 2
- Display / edit of GT labelling metadata HOT 1
- support path names with spaces
- ViewPage: ReadingOrder display ignores tables
- AlternativeImage selection glitch
- False warning about number of images per grp/page
- Support remote images HOT 3
- AttributeError: 'EntryPoints' object has no attribute 'get' HOT 2
- use last fileGrp as default HOT 3
- add CLI options for better Dockerization HOT 2
- Application crashes on launch HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from browse-ocrd.