# ImageAI
**Repository Path**: ieyer/ImageAI
## Basic Information
- **Project Name**: ImageAI
- **Description**: A python library built to empower developers to build applications and systems with self-contained Computer Vision capabilities
- **Primary Language**: Python
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-09-13
- **Last Updated**: 2021-01-28
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# ImageAI
A python library built to empower developers to build applications and systems with self-contained Deep Learning and Computer Vision capabilities using simple
and few lines of code.
An AI Commons project https://aicommons.science
Developed and Maintained by [Moses Olafenwa](https://twitter.com/OlafenwaMoses) and [John Olafenwa](https://twitter.com/johnolafenwa), brothers, creators of [TorchFusion](https://github.com/johnolafenwa/TorchFusion)
and Authors of [Introduction to Deep Computer Vision](https://john.aicommons.science/deepvision)
Built with simplicity in mind, ImageAI
supports a list of state-of-the-art Machine Learning algorithms for image prediction, custom image prediction, object detection, video detection, video object tracking
and image predictions trainings. ImageAI currently supports image prediction and training using 4 different Machine Learning algorithms
trained on the ImageNet-1000 dataset. ImageAI also supports object detection, video detection and object tracking using RetinaNet, YOLOv3 and TinyYOLOv3 trained on COCO dataset.
Eventually, ImageAI will provide support for a wider
and more specialized aspects of Computer Vision including and not limited to image
recognition in special environments and special fields.
New Release : ImageAI 2.0.2 What's new:
- Option to state image size during custom image prediction model trainings
- Object Detection and Video Object detection now returns bounding box coordinates **('box points')** (x1,y1,x2, y2) for each object detected in addition to object's 'name' and 'percentage probability'
- Options to hide 'percentage probability' and/or object 'name' from being shown in detected image or video
- Support for video object detection on video live stream from device camera, connected camera and IP camera
- Support for **YOLOv3** and **TinyYOLOv3** for all object detection and video object detection tasks.
- Video object detection for all input types (video file and camera) now allows defining custom functions to execute after each frame, each second and each minute of the video is detected and processed. Also include option to specify custom function at once video is fully detected and processed
- For each custom function specified, **ImageAI** returns the **frame**/**seconds**/**minute**/**full video analysis** of the detections that include the objects' details ( **name** , **percentage** **probability**, **box_points**), number of instance of each unique object detected (counts) and overall average count of the number of instance of each unique object detected in the case of **second** / **minute** / **full video analysis**
- Options to return detected frame at every frame, second or minute processed as a **Numpy array**.
or download the Python Wheel
imageai-2.0.2-py3-none-any.whl and run the python installation instruction in the command line
to the path of the file like the one below:
ImageAI provides 4 different algorithms and model types to perform image prediction, trained on the ImageNet-1000 dataset.
The 4 algorithms provided for image prediction include SqueezeNet, ResNet, InceptionV3 and DenseNet.
Click the link below to see the full sample codes, explanations and best practices guide.
Object Detection
Input Image
Output Image
person : 91.946941614151
--------------------------------
person : 73.61021637916565
--------------------------------
laptop : 90.24320840835571
--------------------------------
laptop : 73.6881673336029
--------------------------------
laptop : 95.16398310661316
--------------------------------
person : 87.10319399833679
--------------------------------
ImageAI provides very convenient and powerful methods
to perform object detection on images and extract each object from the image. The object detection class provides support for RetinaNet, YOLOv3 and TinyYOLOv3, with options to adjust for state of the art performance or real time processing.
Click the link below to see the full sample codes, explanations and best practices guide.
Video Object Detection and Tracking
Video Object Detection & Analysis
Below is a snapshot of a video with objects detected.
Video Custom Object Detection (Object Tracking)
Below is a snapshot of a video with only person, bicycle and motorcyle detected.
Video Analysis Visualization
Below is a visualization of video analysis returned by **ImageAI** into a 'per_second' function.
ImageAI provides very convenient and powerful methods
to perform object detection in videos and track specific object(s). The video object detection class provided only supports
the current state-of-the-art RetinaNet, but with options to adjust for state of the art performance or real time processing.
Click the link to see the full videos, sample codes, explanations and best practices guide.
Custom Model Training
A sample from the IdenProf Dataset used to train a Model for predicting professionals.
ImageAI provides classes and methods for you to train a new model that can be used to perform prediction on your own custom objects.
You can train your custom models using SqueezeNet, ResNet50, InceptionV3 and DenseNet in 5 lines of code.
Click the link below to see the guide to preparing training images, sample training codes, explanations and best practices.
Custom Image Prediction
Prediction from a sample model trained on IdenProf, for predicting professionals
mechanic : 76.82620286941528
chef : 10.106072574853897
waiter : 4.036874696612358
police : 2.6663416996598244
pilot : 2.239348366856575
ImageAI provides classes and methods for you to run image prediction your own custom objects using your own model trained with ImageAI Model Training class.
You can use your custom models trained with SqueezeNet, ResNet50, InceptionV3 and DenseNet and the JSON file containing the mapping of the custom object names.
Click the link below to see the guide to sample training codes, explanations, and best practices guide.
Documentation
We have provided full documentation for all ImageAI classes and functions in 2 major languages. Find links below: >> Documentation - English Version [https://imageai.readthedocs.io](https://imageai.readthedocs.io) >> Documentation - Chinese Version [https://imageai-cn.readthedocs.io](https://imageai-cn.readthedocs.io) >> Documentation - French Version [https://imageai-fr.readthedocs.io](https://imageai-fr.readthedocs.io)
Real-Time and High Performance Implementation
ImageAI provides abstracted and convenient implementations of state-of-the-art Computer Vision technologies. All of ImageAI implementations and code can work on any computer system with moderate CPU capacity. However, the speed of processing for operations like image prediction, object detection and others on CPU is slow and not suitable for real-time applications. To perform real-time Computer Vision operations with high performance, you need to use GPU enabled technologies.
ImageAI uses the Tensorflow backbone for it's Computer Vision operations. Tensorflow supports both CPUs and GPUs ( Specifically NVIDIA GPUs. You can get one for your PC or get a PC that has one) for machine learning and artificial intelligence algorithms' implementations. To use Tensorflow that supports the use of GPUs, follow the link below :
As a demonstration of what you can do with ImageAI, we have
built a complete AI powered Photo gallery for Windows called IntelliP , using ImageAI and UI framework Kivy. Follow this
link to download page of the application and its source code.
We also welcome submissions of applications and systems built by you and powered by ImageAI for listings here. Should you want your ImageAI powered
developments listed here, you can reach to us via our Contacts below.
AI Practice Recommendations
For anyone interested in building AI systems and using them for business, economic, social and research purposes, it is critical that the person knows the likely positive, negative and unprecedented impacts the use of such technologies will have. They must also be aware of approaches and practices recommended by experienced industry experts to ensure every use of AI brings overall benefit to mankind. We therefore recommend to everyone that wishes to use ImageAI and other AI tools and resources to read Microsoft's January 2018 publication on AI titled "The Future Computed : Artificial Intelligence and its role in society ".
Kindly follow the link below to download the publication.
We are inviting anyone who wishes to contribute to the ImageAI project to reach to us. We primarily need contributions in translating the documentation of the project's code to major languages that includes but not limited to French, Spanish, Portuguese, Arabian and more. We want every developer and researcher around the world to benefit from this project irrespective of their native languages.
We give special thanks to [Kang vcar](https://github.com/kangvcar/) for his incredible and excellent work in translating ImageAI's documentation to the Chinese language. Find below the contact details of those who have contributed immensely to the ImageAI project.