source: gs3-extensions/structured-image/trunk/README.txt@ 38235

Last change on this file since 38235 was 38235, checked in by davidb, 8 months ago

Updated details

File size: 2.4 KB
Line 
1This extension enhances Greenstone3's ability to process with images using
2the Google Vision API. This includes OCRing of text in documents, OCRing
3of text in photos, and labelling photos. Presentation of the OCR'd results
4in enhanced through the Mirador annotation viewer.
5
6At build-time, collections can tap into these capabilities using the plugins:
7
8 GoogleVisionImagePlugin.pm
9 GoogleVisionPagedImagePlugin.pm
10
11At runtime
12
13
14#---
15# Setup
16#---
17
18Run:
19
20 ./PREPARE-PYTHON3.sh
21
22 # TLDR
23 cd packages && ./COMPILE-AND-INSTALL.sh && cd ..
24 # See packages/README.txt for more details
25
26 # TLDR
27 cd src && ./PREPARE.sh && ./COMPILE.sh && ./INSTALL.sh && cd ..
28 # See src/README.txt for more details
29
30
31Review:
32 ant-start-settings.bash.in
33
34Copy to:
35 ant-start-settings.bash
36
37And edit accordingly. This controls how Greenstone accesses the SimpleAnnotationServer.
38
39
40To enable the Google Vision API, set up a key etc, see:
41
42 https://cloud.google.com/vision/docs/setup
43
44
45When you create a key, your browsesr downloads a JSON version of the key.
46
47
48#---
49# Using the Extension: Build-time
50#---
51
52The extension provides the GoogleVisionImagePlugin, for use in collections.
53
54Example use of the plugin:
55
56 <plugin name="GoogleVisionImagePlugin">
57 <option name="-enable_document_ocr"/>
58 <option name="-enable_image_labelling"/>
59 </plugin>
60
61The plugin currently has a hard-wired filename for the Google
62service key. This need's to be in the collection's 'etc'
63directory as follows:
64
65 etc/my-google-service-account-key.json
66
67
68For the 'atea-storage' Google Cloud Project, for example, a redacted version of
69the JSON key file looks like:
70
71{
72 "type": "service_account",
73 "project_id": "atea-storage",
74 "private_key_id": "7bc843de4257da515193eaa5b60468fcab5b3948",
75 "private_key": "-----BEGIN PRIVATE KEY-----\n???????.........??????=\n-----END PRIVATE KEY-----\n",
76 "client_email": "[email protected]",
77 "client_id": "123???...????",
78 "auth_uri": "https://accounts.google.com/o/oauth2/auth",
79 "token_uri": "https://oauth2.googleapis.com/token",
80 "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
81 "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/service-account%40atea-storage.iam.gserviceaccount.com"
82}
83
84
85#---
86# Using the Extension: Runtime
87#---
88
89
90Check out the 'intermuse' site and interface
91
92Build the intermuse-demo collection
93
94Visit the built collection in your browser
Note: See TracBrowser for help on using the repository browser.