Code Monkey home page Code Monkey logo

zai's Introduction

zAI

zAI (zero-effort Artificial Intelligence) is a Python library that allows any developer to perform high-level artificial intelligence tasks with easy-to-use commands, such that users do not need to have any knowledge about the underlying machine learning models or any of the technicalities involved. If we want to find all the faces in an image, we just need to type:

myImage.find_faces()

zAI automatically detects all faces present in myImage and returns face locations, facial landmarks, etc. No need of any knowledge about computer vision or machine learning. In the same way, we can translate text into a different language using myText.translate() or perform Optical Character Recognition (OCR) on an image using myImage.ocr().

zAI uses local pre-trained tensorflow models and/or cloud services provided by Google or Microsoft. In this initial release, there is a limited number of tasks that can be performed locally. As we further develop zAI, our focus will be in expanding this number.

zAI is a side project of the R&D Team at Biometric Vox. We were inspired by this talk from Peter Norvig. We see zAI as a vision of how things should be in the near future.

zAI is compatible with both Python 2 and 3.

Basic usage

Currently, zAI provides classes to work with text and images. In the future, we plan to include new types of high-level data, such as sound or video. You can find some Jupyter notebooks with tutorials on the examples folder.

Here, we will illustrate how to use zAI to:

  • Extract the text from an image using OCR
  • Translate the text to a different language
  • Convert the translated text to voice using speech synthesis

(Note that in this example we have skipped the configuration steps. See examples/Basics.ipynb for a step-by-step tutorial.)

Let's first import the modules to work with image and text data and create a zImage instance from an image file:

from zAI import zImage
myImage = zImage('samples/text_over_landscape.png')
myImage.display()

To extract the text, we simply use the method ocr. This method will return a zText object with the extracted text:

originalText = myImage.ocr()
originalText.display()

LA INTELIGENCIA ARTIFICIAL DEBERÍA SER FÁCIL

Now we will translate this text to English. To do this, we use the method translate specifying the desired target language.

translatedText = originalText.translate(targetLang='en')
translatedText.display()

ARTIFICIAL INTELLIGENCE SHOULD BE EASY

Now that we have our text translated to English, we will convert it into speech:

translatedText.to_voice(backend='Microsoft',outputFile='output/speech.wav')

Installation

Dependencies:

  • Opencv
  • Scipy
  • Matplotlib
  • Tensorflow
  • Requests

To install, do:

git clone https://github.com/BiometricVox/zAI
cd zAI
python setup.py install

Development

Any contribution to zAI is very welcome. In particular, as we are not software developers, we will appreciate any help in improving the code quality or the project organization.

zAI is a side project of the R&D Team at Biometric Vox and is not an official Biometric Vox product.

Face detection and comparison uses code from: davidsandberg

Image neural style uses code from: cysmith

zai's People

Contributors

robertofont avatar

Stargazers

Jung Yeon Lee avatar  avatar Park Noyeon avatar Esqueletor avatar Aaron LEE K.S. avatar  avatar KyuJoo Han avatar odile avatar JeongHoon Baek avatar MA Jianjun avatar Shayaan Syed Ali avatar David Daugela avatar Ted Dowd avatar  avatar Dmitry Kulikov avatar Travis Palmer avatar Alihan avatar Sebastian Suchanowski avatar Jürgen Hermann avatar RajaniKanth Reddy avatar José Carlos García avatar  avatar  avatar Zerui Cai avatar Mauricio Uribe avatar  avatar Evgeny Shcherbinin avatar Cai avatar Ertuğrul avatar Antoni Aloy avatar Pawel Cwiek avatar Ho Tsung-Chien avatar  avatar wongfree avatar Rogerio Marques avatar  avatar JC avatar  avatar Saurabh Chaturvedi avatar Gianni Di Noia avatar Ben Strahan avatar  avatar Rodolfo Ferro avatar Daniele Parmeggiani avatar Christian Fässler avatar Art Peel avatar Andrey O avatar Hildeberto avatar Amanda Shih avatar Tobias Macey avatar  avatar Frank Müller avatar Felippe da Motta Raposo avatar Alex Lebedev avatar Jaivarsan avatar Stoyan Shopov avatar Raunaq avatar  avatar Juan M. Espín López avatar

Watchers

Medhat Assaad avatar James Cloos avatar Christian Fässler avatar  avatar  avatar Esqueletor avatar Zerui Cai avatar  avatar Park Noyeon avatar Juan M. Espín López avatar

zai's Issues

there is an error : 'myImage.ocr()'

originalText = myImage.ocr() has an error
when I use backend="Google"

GOOGLE_CLOUD_API_KEY is empty. Using local.
Traceback (most recent call last):
File "", line 1, in
File "/Users/choeyujin/Project/Purdue_Proejct/UAV-Aerial-Mapping-and-Survey/DroneMosaic/zAI/zAI/zimage.py", line 304, in ocr

and local , Microsoft also have same error.
So I found that I have to use zAI.utils.set_backend_key() below,
zAI.utils.set_backend_key(key_name='GOOGLE_CLOUD_API_KEY',key_value='(자신의 API키를 넣는다)',save=True)
If so, what is the key_value?

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.