Code Monkey home page Code Monkey logo

lios's Introduction

Linux-intelligent-ocr-solution

Lios is a free and open source software for converting print in to text using either scanner or a camera, It can also produce text out of scanned images from other sources such as Pdf, Image, Folder containing Images or screenshot. Program is given total accessibility for visually impaired. Lios is written in python3, and we release it under GPL-3 license. There are great many possibilities for this program, Feedback is the key to it, Expecting your feedback.

Features

  1. Import images from Scanner, PDFs, Folder, or Webcam,
  2. Take and Recognize Screenshot,
  3. Recognize Selected Areas(Rectangle selection),
  4. Support two OCR Engines (Cuneiform,Tesseract),
  5. Text-Cleaner - Post process your output with match-replace dialog,
  6. Full Auto Rotation for any Language(If aspell installed for the language, Eg : "sudo apt-get install aspell-hi" for Hindi,
  7. Side by side view of image and output
  8. Advanced Scanner Brightness optimizer,
  9. Text Reader for low vision with Highlighting, With user selected Color, Font, and Background Color,
  10. Audio converter(espeak),
  11. Spell-checker(aspell),
  12. Export as pdf (text/images),
  13. Dictionary Support for English(Artha)
  14. Options for save, load and reset settings,
  15. Other options - Find, Find-and-Replace, Go-To-Page, Go-To-Line, Append file, Punch File, Selection of starting page number, page numbering mode and number of pages to scan, Selection of Scan area, brightness, resolution and time between repeated scanning, Output Insert position, image rotation and zoom options, etc

Installing

Dependency list : python3, python3-imaging-sane|python3-sane, python3-speechd, tesseract-ocr, imagemagick, cuneiform, espeak,poppler-utils, python3-enchant,aspell-en, gir1.2-gst-plugins-base-1.0, gir1.2-gstreamer-1.0

git clone https://github.com/zendalona/lios.git
cd lios
python3 setup.py install --install-data=/usr

Following the third step for a system-wide installation is not necessary. You can use the following commands instead, as long as you have all the dependecies installed. This will be useful if you are a Lios developer.

export PYTHONPATH=.
bin/lios --datadir 'share/lios'

Links

Forum : https://groups.google.com/forum/#!forum/lios

Home Page : http://zendalona.com/lios/

Disclaimer

Copyright (c) 2011-2015 Lios Development Team 

All rights reserved . Redistribution and use in source and binary forms, with or without modification,

are permitted provided that the following conditions are met: 

Redistributions of source code must retain the below copyright notice, 

this list of conditions and the following disclaimer. 

Redistributions in binary form must reproduce the below copyright notice, 

this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 

Neither the name of the nor the Lios team names of its 

contributors may be used to endorse or promote products derived from this software without specific prior written permission. 

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 

FREE SOFTWARE FREE SOCIETY

lios's People

Contributors

balazsszalab avatar freddii avatar nalin-x-linux avatar nandedamana avatar sthibaul avatar xzz53 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lios's Issues

Get error when I run lios after installed it in Ubuntu 18.04 LTS use git and python3

Hello, after I installed lios in Ubuntu18.04 use git and python3 , I run lios in shell as root , I get error as bellow:

`/usr/local/lib/python3.6/dist-packages/lios/ui/gtk/text_view.py:21: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
from gi.repository import Gtk
/usr/local/lib/python3.6/dist-packages/lios/ui/gtk/print_dialog.py:23: PyGIWarning: PangoCairo was imported without specifying a version first. Use gi.require_version('PangoCairo', '1.0') before import to ensure that the right version gets loaded.
from gi.repository import PangoCairo
/usr/local/lib/python3.6/dist-packages/lios/cam.py:19: PyGIWarning: GstVideo was imported without specifying a version first. Use gi.require_version('GstVideo', '1.0') before import to ensure that the right version gets loaded.
from gi.repository import GdkX11, GstVideo
/usr/local/lib/python3.6/dist-packages/lios/ui/gtk/terminal.py:21: PyGIWarning: Vte was imported without specifying a version first. Use gi.require_version('Vte', '2.91') before import to ensure that the right version gets loaded.
from gi.repository import Gtk, GObject, Vte

(lios:19607): Gtk-WARNING **: 23:58:52.428: Cannot connect attribute 'text' for cell renderer class 'lios+ui+gtk+tree_view+CellRendererToggle' since attribute does not exist
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/lios/main.py", line 1329, in make_preferences_effective
self.dict = dictionary.Dict(dictionary.dictionary_language_dict[languages[self.preferences.language]])
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/bin/lios", line 8, in
linux_intelligent_ocr_solution()
File "/usr/local/lib/python3.6/dist-packages/lios/main.py", line 342, in init
self.make_preferences_effective()
File "/usr/local/lib/python3.6/dist-packages/lios/main.py", line 1350, in make_preferences_effective
pacman -S aspell-fr""").format(languages[self.preferences.language]))
IndexError: list index out of range`

Error while opening group4 tiff file with multiple pages in side it

Dear specialists,
Yours solution LIOS is very probably The best and The onlyone solution available for visually impaired Linux users. It is working excellently. BUt till The time when user want to open .tif file which contain multiple pages. In this case, app do not In my case, The tiff file have been produced by GPL Ghostscript. When opening .tiff file, it do not create The list of images. So conversion from .pdf to .png fails.
May be, that it have worked with other versions of helper software, which you are using. And that new version contain some other options from command line. To examine The cause of my issue, I will run lios as non root user from mate-terminal because in this case, I can easily capture The possible error messages.

Issue after fresh install

Receiving this error on a fresh git clone. Ubuntu 22.10

$ lios
/usr/local/lib/python3.10/dist-packages/lios/ui/gtk/print_dialog.py:26: PyGIWarning: PangoCairo was imported without specifying a version first. Use gi.require_version('PangoCairo', '1.0') before import to ensure that the right version gets loaded.
  from gi.repository import PangoCairo

(lios:8645): Gtk-WARNING **: 12:04:54.677: Cannot connect attribute 'text' for cell renderer class 'lios+ui+gtk+tree_view+CellRendererToggle' since attribute does not exist
Traceback (most recent call last):
  File "/usr/bin/lios", line 35, in <module>
    linux_intelligent_ocr_solution(args.files)
  File "/usr/local/lib/python3.10/dist-packages/lios/main.py", line 347, in __init__
    self.make_preferences_effective()
  File "/usr/local/lib/python3.10/dist-packages/lios/main.py", line 1328, in make_preferences_effective
    lang = languages[self.preferences.language]
IndexError: list index out of range

Python 3.5.2 - error - No module named 'gi'

Traceback (most recent call last):
  File "/usr/bin/lios", line 3, in <module>
    from lios.main import *
  File "/home/parsibox/.virtualenvs/cv/local/lib/python3.5/site-packages/lios/main.py", line 26, in <module>
    from lios import scanner, editor, imageview, cam, ocr, preferences, speech, train_tesseract
  File "/home/parsibox/.virtualenvs/cv/local/lib/python3.5/site-packages/lios/editor.py", line 20, in <module>
    from lios.ui.gtk import text_view, tree_view, widget, dialog, file_chooser, containers, window
  File "/home/parsibox/.virtualenvs/cv/local/lib/python3.5/site-packages/lios/ui/gtk/text_view.py", line 21, in <module>
    from gi.repository import  Gtk
ImportError: No module named 'gi.repository'

(cv) parsibox@parsibox-VirtualBox:~/Desktop/digit$ pip install gi 
Requirement already satisfied: gi in /home/parsibox/.virtualenvs/cv/lib/python3.5/site-packages
Requirement already satisfied: requests in /home/parsibox/.virtualenvs/cv/lib/python3.5/site-packages (from gi)

tessaract trainer not working

Hi, we are using archlinux and facing issue running train-tesseract.

/usr/lib/python3.7/site-packages/lios/ui/gtk/loop.py:21: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk
/usr/lib/python3.7/site-packages/lios/ui/gtk/terminal.py:21: PyGIWarning: Vte was imported without specifying a version first. Use gi.require_version('Vte', '2.91') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk, GObject, Vte

(train-tesseract:30997): Gtk-WARNING **: 14:22:07.286: Cannot connect attribute 'text' for cell renderer class 'lios+ui+gtk+tree_view+CellRendererToggle' since attribute does not exist
language_combobox_changed Started
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3.7/site-packages/lios/train_tesseract.py", line 643, in language_combobox_changed
    self.output_terminal.run_command(cmd)
  File "/usr/lib/python3.7/site-packages/lios/ui/gtk/terminal.py", line 48, in run_command
    self.feed_child(command, length)
TypeError: Vte.Terminal.feed_child() takes exactly 2 arguments (3 given)

[Solved]Lios broken on upgrade to Ubuntu 22.10

I recently discovered your great app! Thank you.
However, since upgrading to 22.10, lios won't start up.
Here is the error I get:

/usr/lib/python3/dist-packages/lios/ui/gtk/text_view.py:21: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '4.0') before import to ensure that the right version gets loaded.
from gi.repository import Gtk
/usr/lib/python3/dist-packages/lios/ui/gtk/widget.py:24: PyGIWarning: Atk was imported without specifying a version first. Use gi.require_version('Atk', '1.0') before import to ensure that the right version gets loaded.
from gi.repository import Atk
Traceback (most recent call last):
File "/usr/bin/lios", line 3, in
from lios.main import *
File "/usr/lib/python3/dist-packages/lios/main.py", line 27, in
from lios import scanner, editor, imageview, cam, ocr, preferences, speech, train_tesseract
File "/usr/lib/python3/dist-packages/lios/editor.py", line 20, in
from lios.ui.gtk import text_view, tree_view, widget, dialog, file_chooser, containers, window
File "/usr/lib/python3/dist-packages/lios/ui/gtk/widget.py", line 166, in
class Separator(Gtk.HSeparator):
File "/usr/lib/python3/dist-packages/gi/overrides/init.py", line 32, in _getattr_
return getattr(self._introspection_module, name)
File "/usr/lib/python3/dist-packages/gi/module.py", line 123, in _getattr_
raise AttributeError("%r object has no attribute %r" % (
AttributeError: 'gi.repository.Gtk' object has no attribute 'HSeparator'

Any help would be appreciated - I'm a regular linux user, but not much experience in coding!

index error main.py

Mint cinnamon 64bit fresh install.
Lios install from git-clone
Tesseract w/ train from git-clone

Getting index error line 1327 lang = languages[self.preferences.language]
What to do?

Also getting Gtk warning cannot connect attribute "text" ... Does not exist.

One more thing. All dependencies are satisfied save one. Python3 imaging sane. Can't find it anywhere. Is this a problem? Thanks.

python3-espeak: "The package is of bad quality"

Lintian check results for /home/user/Downloads/python3-espeak_0.5-1_amd64_rebuild.deb:
E: python3-espeak: control-file-has-bad-owner md5sums linux/linux != root/root
E: python3-espeak: control-file-has-bad-owner postinst linux/linux != root/root
E: python3-espeak: control-file-has-bad-owner prerm linux/linux != root/root

train-tesseract starts but doesn't work properly

I would like to use train-tesseract, but when I run it, the language profile doesn't load, it just appears at the bottom
Loading components of ...
and the running graphics line. The language data is not loaded.
When I open train-tesseract in the command-line, the system reports errors:

language_combobox_changed Started
Exception in thread Thread-9:
Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3/dist-packages/lios/train_tesseract.py", line 643, in language_combobox_changed
    self.output_terminal.run_command(cmd)
  File "/usr/lib/python3/dist-packages/lios/ui/gtk/terminal.py", line 48, in run_command
    self.feed_child(command, length)
TypeError: Vte.Terminal.feed_child() takes exactly 2 arguments (3 given)

for other options in the Train images-box tab:

Generate-Image-Using-Fonts
generate_image_with_spec Started
Exception in thread Thread-6:

Annotate(Detect boxes)
make_box_file_for_images Started
make_box_file_for_images Started
Exception in thread Thread-3:

The same type of message and error will appear.

Linux Mint 20.3
xfce4 4.16.0

Couldn't find tesseract dictionaries on Debian

Hello,

We've had issues with starting lios at all on Debian, because the tesseract data is in l"/usr/share/tesseract-ocr/4.00/tessdata" instead of "/usr/share/tesseract-ocr/tessdata". Perhaps the tesseract backend should just use the output of the "tesseract --list-langs" command?

Samuel

[DMP 2024]: Linux-Intelligence-OCR-Solution - Enhancement

Ticket Contents

Description

LIOS is a free and open-source software designed for converting printed text into digital format using scanners or cameras. It is also capable of generating text from scanned images sourced from various formats, including PDFs, images, image folders, or screenshots. The program ensures complete accessibility for visually impaired users through a graphical user interface (GUI). Leveraging OCR engines like Tesseract and Cuneiform, LIOS facilitates the conversion of images to text.

Significantly, LIOS is included in the Debian repository and distinguishes itself as the exclusive accessible OCR user interface within the GNU/Linux environment. Furthermore, it has been developed inclusively, allowing many sighted individuals to also benefit from its features.

Goals & Mid-Point Milestone

Goals

  • Make the UI simpler more easier by moving/removing many UI components
  • Make the UI more readable for Low vision by providing easy switchable themes
  • Make items in preferences more reasonably categorized
  • Fix scanner driver issues
  • Fix all reported bugs

Setup/Installation

No response

Expected Outcome

No response

Acceptance Criteria

No response

Implementation Details

Python, Gtk, Cairo

Mockups/Wireframes

No response

Product Name

Linux-Intelligence-OCR-Solution - LIOS - Enhancement

Organisation Name

Zendalona

Domain

⁠Education

Tech Skills Needed

Python

Mentor(s)

@

Category

Accessibility

installed all dictionary of tesseract-ocr still cannot find any dictionary except eng

atc@ATC:/usr/share/tesseract-ocr/tessdata$ ls
afr.traineddata        fra.cube.word-freq      mya.traineddata
amh.traineddata        fra.tesseract_cube.nn   nep.traineddata
ara.cube.bigrams       fra.traineddata         nld.traineddata
ara.cube.fold          frk.traineddata         nor.traineddata
ara.cube.lm            frm.traineddata         ori.traineddata
ara.cube.nn            gle.traineddata         osd.traineddata
ara.cube.params        gle_uncial.traineddata  pan.traineddata
ara.cube.size          glg.traineddata         pdf.ttf
ara.cube.word-freq     grc.traineddata         pol.traineddata
ara.traineddata        guj.traineddata         por.traineddata
asm.traineddata        hat.traineddata         pus.traineddata
aze_cyrl.traineddata   heb.traineddata         ron.traineddata
aze.traineddata        hin.cube.bigrams        rus.cube.fold
bel.traineddata        hin.cube.fold           rus.cube.lm
ben.traineddata        hin.cube.lm             rus.cube.nn
bod.traineddata        hin.cube.nn             rus.cube.params
bos.traineddata        hin.cube.params         rus.cube.size
bul.traineddata        hin.cube.word-freq      rus.cube.word-freq
cat.traineddata        hin.tesseract_cube.nn   rus.traineddata
ceb.traineddata        hin.traineddata         san.traineddata
ces.traineddata        hrv.traineddata         sin.traineddata
chi_sim.traineddata   hun.traineddata         slk_frak.traineddata
chi_tra.traineddata    iku.traineddata         slk.traineddata
chr.traineddata        ind.traineddata         slv.traineddata
configs                isl.traineddata         spa.cube.bigrams
cym.traineddata        ita.cube.bigrams        spa.cube.fold
dan_frak.traineddata   ita.cube.fold           spa.cube.lm
dan.traineddata        ita.cube.lm             spa.cube.nn
deu_frak.traineddata   ita.cube.nn             spa.cube.params
deu.traineddata        ita.cube.params         spa.cube.size
dzo.traineddata        ita.cube.size           spa.cube.word-freq
ell.traineddata        ita.cube.word-freq      spa_old.traineddata
eng.cube.bigrams       ita_old.traineddata     spa.traineddata
eng.cube.fold          ita.tesseract_cube.nn   sqi.traineddata
eng.cube.lm            ita.traineddata         srp_latn.traineddata
eng.cube.nn            jav.traineddata         srp.traineddata
eng.cube.params        jpn.traineddata         swa.traineddata
eng.cube.size          kan.traineddata         swe.traineddata
eng.cube.word-freq     kat_old.traineddata     syr.traineddata
eng.tesseract_cube.nn  kat.traineddata         tam.traineddata
eng.traineddata        kaz.traineddata         tel.traineddata
enm.traineddata        khm.traineddata         tessconfigs
epo.traineddata        kir.traineddata         tgk.traineddata
equ.traineddata        kor.traineddata         tgl.traineddata
est.traineddata        kur.traineddata         tha.traineddata
eus.traineddata        lao.traineddata         tir.traineddata
fas.traineddata        lat.traineddata         tur.traineddata
fin.traineddata        lav.traineddata         uig.traineddata
fra.cube.bigrams       lit.traineddata         ukr.traineddata
fra.cube.fold          mal.traineddata         urd.traineddata
fra.cube.lm            mar.traineddata         uzb_cyrl.traineddata
fra.cube.nn            mkd.traineddata         uzb.traineddata
fra.cube.params        mlt.traineddata         vie.traineddata
fra.cube.size          msa.traineddata         yid.traineddata

BTW: i am using simplify chinese version dictionary of tesseract ,

Lios does not run on Ubuntu 22.04

I recently discovered your great app! Thanks for that.
I wanted to install Lios on Ubuntu on 22.04, but it will launch.
Here is the error I get:

$ lios
Traceback (most recent call last):
File "/usr/bin/lios", line 3, in
from lios.main import *
File "/usr/lib/python3/dist-packages/lios/main.py", line 27, in
from lios import scanner, editor, imageview, cam, ocr, preferences, speech, train_tesseract
File "/usr/lib/python3/dist-packages/lios/editor.py", line 20, in
from lios.ui.gtk import text_view, tree_view, widget, dialog, file_chooser, containers, window
File "/usr/lib/python3/dist-packages/lios/ui/gtk/text_view.py", line 21, in
from gi.repository import Gtk
File "/usr/lib/python3/dist-packages/gi/init.py", line 44, in
from gi.repository import _API
File "/usr/lib/python3/dist-packages/gi/repository/init.py", line 23, in
from ..importer import DynamicImporter
File "/usr/lib/python3/dist-packages/gi/importer.py", line 33, in
from .overrides import load_overrides
File "/usr/lib/python3/dist-packages/gi/overrides/init.py", line 8, in
from gi import PyGIDeprecationWarning
ImportError: cannot import name 'PyGIDeprecationWarning' from partially initialized module 'gi' (most likely due to a circular import) (/usr/lib/python3/dist-packages/gi/init.py)

Preferences dialog windows causes system freeze

Dear specialists,
I Am using Fedora 35 Mate Compiz spin. And I Am not able to use Lios effectively. Because when ever I choose one of The preferences dialog Tabs, system freeze. This was not happened on Fedora 30. Same issue exists for Arch Linux or latest stable Ubuntu. It is very sad situation, because Lios is The onlyone fully accessible app for performing OCR tasks. Please does somebody of you know The solution of this freeze?
Thank you very very much for your answer.

GitHub release

Could you release versioned tarballs here on GitHub and add link to website, as well as a short description? Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.