# Ai plugin ocr support

**URL:** https://meta.discourse.org/t/ai-plugin-ocr-support/277915
**Category:** Feature
**Tags:** ai
**Created:** [September 5, 2023, 9:01pm UTC](https://meta.discourse.org/t/ai-plugin-ocr-support/277915 "2023-09-05T21:01:13Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![ozkn](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ozkn/32/196013_2.png) [@ozkn](https://meta.discourse.org/u/ozkn)
#### Post date: [September 5, 2023, 9:01pm UTC](https://meta.discourse.org/t/ai-plugin-ocr-support/277915/1 "2023-09-05T21:01:13Z")

</div>

Can support be added to the Discourse ai plugin to add the text in the images to the post (ocr)? Can google lens api (cloud vision) support be added for this?

Example: [GitHub - communiteq/discourse-ocr-uploads · GitHub](https://github.com/communiteq/discourse-ocr-uploads)

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [September 5, 2023, 9:16pm UTC](https://meta.discourse.org/t/ai-plugin-ocr-support/277915/2 "2023-09-05T21:16:01Z")

</div>

It’s in our roadmap to leverage a multi-modal LLM to create image descriptions, which should also provide some level of OCR. But for pure OCR maybe give that plugin a try?

---

<div class="post-metadata">

### Author: ![ozkn](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ozkn/32/196013_2.png) [@ozkn](https://meta.discourse.org/u/ozkn)
#### Post date: [September 6, 2023, 9:14am UTC](https://meta.discourse.org/t/ai-plugin-ocr-support/277915/3 "2023-09-06T09:14:53Z")

</div>

I used this plugin in older versions of Discourse and it worked. But unfortunately it no longer works in the new version of Discourse

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [February 21, 2024, 1:37pm UTC](https://meta.discourse.org/t/ai-plugin-ocr-support/277915/4 "2024-02-21T13:37:10Z")

</div>

See [AI Image Captioning Feature in Discourse AI Plugin](https://meta.discourse.org/t/ai-image-captioning-feature-in-discourse-ai-plugin/296087), this is now ready and enabled here on meta.

---

<div class="post-metadata">

### Author: ![ozkn](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ozkn/32/196013_2.png) [@ozkn](https://meta.discourse.org/u/ozkn)
#### Post date: [February 21, 2024, 7:20pm UTC](https://meta.discourse.org/t/ai-plugin-ocr-support/277915/5 "2024-02-21T19:20:05Z")

</div>

Thanks for this feature, I will try it @Falco @pmusaraj

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [February 21, 2024, 10:42pm UTC](https://meta.discourse.org/t/ai-plugin-ocr-support/277915/6 "2024-02-21T22:42:07Z")

</div>

I think we should still keep this open, the captioning feature is adjacent to OCR but not exactly OCR.

OCR for example would allow you to take a photo of your notes and then upload and print them exactly. The AI captioning is much more sophisticated but also does not give you that fidelity of printing an entire page of text.

Not sure when we will have time to work on an OCR, but it does feel a bit different.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [March 28, 2024, 10:08am UTC](https://meta.discourse.org/t/ai-plugin-ocr-support/277915/7 "2024-03-28T10:08:06Z")

</div>

Now that Anthropic Claude 3 has vision support it does a decent job with ocr jobs, for example

> **[Claude Opus 3 OCR example - AI Conversation - Sam Saffron's Blog](https://discuss.samsaffron.com/discourse-ai/ai-bot/shared-ai-conversations/SgoTgmNJ-ZB-wz4JAZETtw)**
>
> AI Conversation with Claude-3-opus:
> sam: \[IMG\_7354\] 
> What is the text exactly on this tweet screenshot claude\_3\_opus\_bot: The text in the tweet screenshot says: 
> Simon Willison @simonw · 16h 
> Anyone been experimenting with…

---

<div class="post-metadata">

### Author: ![Tris20](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tris20/32/264639_2.png) [@Tris20](https://meta.discourse.org/u/Tris20)
#### Post date: [March 28, 2024, 10:46am UTC](https://meta.discourse.org/t/ai-plugin-ocr-support/277915/8 "2024-03-28T10:46:52Z")

</div>

> **[Supported countries and regions](https://www.anthropic.com/supported-countries)**
>
> Anthropic is an AI safety and research company that's working to build reliable, interpretable, and steerable AI systems.

_Cries in German_

🇩🇪🍺 🫲😭🫱 🥨 🌭

* * *

On a serious note, I have curiosity about how it would perform on an image like this:

 ![The image shows a command-line interface with multiple commands, some of which have resulted in errors related to LFS (Large File Storage) access permissions, and successful uploading of LFS objects in a later attempt. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/f/0/7/f075bc5935e35777e7a28898e6a7ac29d082adbc.png)

Tesseract gets the following:

> MINGW64 ~/Source/Repos/Sut. Driver. Firmware  
> $ git push  
> Locking support detected on remote “origin”. Consider enabling it with:  
> $ git config Ifs ‘1fs.locksverify true  
> LFS: Access forbidden. Check your access level.  
> error: failed to push some refs to  
> MINGW64 ~/Source/Repos/Sut. Driver. Firmware  
> $ git push  
> Locking support detected on remote “origin”. Consider enabling it with:  
> $ git config Ifs. /\fs.locksverify true  
> Uploading LFS objects: 100% (1/1), 584 KB | 0 B/s, done.  
> Enumerating objects: 9, done.  
> Counting objects: 100% (9/9), done.  
> Delta compression using up to 8 threads  
> Compressing objects: 100% (3/3), done.  
> Writing objects: 100% (5/5), 478 bytes | 478.00 KiB/s, done.  
> Total 5 (delta 1), reused 0 (delta 0), pack-reused 0 »  
> remote:  
> remote: To create a merge request for visit:  
> remote: 1  
> remote:  
> To  
> 2c50e5b. . ba25f3e  
> L MINGN64 ~/Source/Repos /Sut. Driver. Firmware

(Ok I’m surprised at how reasonable this result is. Tesseract often changes line order and glitches letters with these types of examples.)

Sam would it be possible for you to throw that image in to claude and post the result?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [March 28, 2024, 12:02pm UTC](https://meta.discourse.org/t/ai-plugin-ocr-support/277915/9 "2024-03-28T12:02:06Z")

</div>

Feel free to try here, Claude creative persona here has vision support, just enabled it

---

<div class="post-metadata">

### Author: ![Tris20](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tris20/32/264639_2.png) [@Tris20](https://meta.discourse.org/u/Tris20)
#### Post date: [March 28, 2024, 12:15pm UTC](https://meta.discourse.org/t/ai-plugin-ocr-support/277915/10 "2024-03-28T12:15:27Z")

</div>

> [@On another topic](https://meta.discourse.org/t/301329/6):
>
> The image has a background showing a winding path through a hilly, natural landscape. The text appears to be promoting guided tutorials or a learning path specifically for helping users succeed on the Discourse platform.

[https://meta.discourse.org/t/parsing-complex-json-data-in-tris20-code/301329](https://meta.discourse.org/t/parsing-complex-json-data-in-tris20-code/301329)

This is either a skill issue on my side, or Claude is having little trouble 😅

---

<div class="post-metadata">

### Author: ![Tris20](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tris20/32/264639_2.png) [@Tris20](https://meta.discourse.org/u/Tris20)
#### Post date: [March 28, 2024, 12:23pm UTC](https://meta.discourse.org/t/ai-plugin-ocr-support/277915/11 "2024-03-28T12:23:38Z")

</div>

Skill issue 😅 I was using the Forum Helper rather than the Creative personality.

Claude Creative gives us this:

> MINGW64 ~/Source/Repos/Sut.Driver.Firmware (kingfisher)  
> $ git push  
> Locking support detected on remote “origin”. Consider enabling it with:  
> $ git config lfs.[http://tfs.locksverify](http://tfs.locksverify/) true  
> LFS: Access forbidden. Check your access level.  
> error: failed to push some refs to ‘[http://tfs.lockeed/tfs/HnC/TEC/SUT/Driver%20Firmware/\_git/Sut.Driver.Firmware’](http://tfs.lockeed/tfs/HnC/TEC/SUT/Driver%20Firmware/_git/Sut.Driver.Firmware%E2%80%99)
> 
> MINGW64 ~/Source/Repos/Sut.Driver.Firmware (kingfisher)  
> $ git push  
> Locking support detected on remote “origin”. Consider enabling it with:  
> $ git config lfs.[http://tfs.locked/tfs.locksverify](http://tfs.locked/tfs.locksverify) true  
> Uploading LFS objects: 100% (1/1), 584 KB | 0 B/s, done.  
> Enumerating objects: 9, done.  
> Counting objects: 100% (9/9), done.  
> Delta compression using up to 8 threads  
> Compressing objects: 100% (3/3), done.  
> Writing objects: 100% (5/5), 478 bytes | 478.00 KiB/s, done.  
> Total 5 (delta 1), reused 0 (delta 0), pack-reused 0  
> remote: To create a merge request for kingfisher, visit:  
> remote: [http://tfs.locked/tfs/HRC/TEC/SUT/\_git/Sut.Driver.Firmware/pullrequest/new?sourceRef=kingfisher&targetRef=develop](http://tfs.locked/tfs/HRC/TEC/SUT/_git/Sut.Driver.Firmware/pullrequest/new?sourceRef=kingfisher&targetRef=develop)  
> remote:  
> To [http://tfs.locked/tfs/HRC/TEC/SUT/\_git/Sut.Driver.Firmware](http://tfs.locked/tfs/HRC/TEC/SUT/_git/Sut.Driver.Firmware)  
> 2c50e5b…ba25f3e kingfisher - kingfisher
> 
> MINGW64 ~/Source/Repos/Sut.Driver.Firmware (kingfisher)  
> $

Interesting result. I feel like the two are roughly on a par with each other in this example but with different faults. Claude has halucinated the URL here, making a contextual guess that we are doing a pull request based on the git issue.

Tesseract doesn’t halicunate, and in this case seems to be more correct. The only thing that stands out is `1fs` on line 4, and `\fs` on line 10 instead of `lfs`.

Claude also makes a similar error throughout, using `tfs` instead of `lfs`. It’s surprising because the extrapolation of URL based on context shows it understood the context, but then instead of lfs which is prominent in this problem domain, it created something completely new: tfs

 ![A colorful kingfisher bird is perched on a branch against a serene backdrop of green foliage and calm water. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/e/9/2/e925d4de18b8aa82c545bd0164e8803a79007362.jpeg)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [April 2, 2024, 4:32am UTC](https://meta.discourse.org/t/ai-plugin-ocr-support/277915/12 "2024-04-02T04:32:56Z")

</div>

What I found absolutely jaw dropping here is that you have an OCR engine you can interact with.

Don’t like the kingfisher hallucination … fine … just ask it not to do that thing.

Really mind bending what you can do with this tech:

> **[Git Push Errors: Locking and Access Issues](https://meta.discourse.org/discourse-ai/ai-bot/shared-ai-conversations/q8V7Vy97cjMkIzktxovWHw)**
>
> sam: Tell me exactly what this says please 
> \[image\]

(apologies for broken image in the OP, we are fixing it, the image is)

 ![image](https://global.discourse-cdn.com/meta/original/4X/a/f/2/af2b81764bfb89ce1a3016dd470ab99e18aeea93.png)
