Friday 29 May 2020

Videos based solutions

City / Traffic Surveillance

Target Sectors
Government Sectors
  • Traffic Surveillance
  • Highway and State Road Surveillance
  • Defense
  • Airports, railway stations etc
  • Critical Infrastructure
Commercial Sectors
  • Industrial areas
  • Toll gates
  • Gated communities
  • Residential enclaves etc.

Boundary Crossing
Trespass
Tailgating
Wrong Way Detection
Illegal Parking
Left Out Baggage Detection
Crowd Detection
Vehicle Counting
Speeding Detection
Missing Object Detection
Smart Auto PTZ Control
Object Classification
PTZ Handoff
Video Smoke Detection
Multi Camera Tracking
RLVD
License Plate Recognition

Solutions:

Effective traffic control at intersections
Detection of illegal traffic behavior
Unauthorized crowding detection
Suspicious object detection
Suspicious behavior detection in public places
Toll evasion detection at tollbooths
Unauthorized entry detection
Detection of unauthorized parking

Building Surveillance


Target Sectors
  • Transportation(Airport \ Railways \ Sea Ports)
  • Oil & Gas
  • Enterprise(IT Parks \ Infrastructure \ Office Premises \ Financial Institutes)
  • Critical Infrastructure(Building of National Importance)
  • Power
  • Education
  • Banking
  • Religious Places
  • HealthCare

Boundary Crossing
Trespass
Tailgating
Left Out Baggage
Parking Control
Loitering
Crowd Detection
Missing Object Detection
Video Smoke Detection
Face Capture
PTZ Handoff
Multi Camera Tracking
Face Recognition
License Plate Recognition

Monitoring of entry points
Violation of access control detection
Monitoring of specific areas for abnormal behaviour
Parking management at parking areas
Unidentified potential threat object detection
Overcrowding detection at designated areas
Detection of unauthorized crossing of Railway lines
Monitoring historical or important monuments for vandals


Business Intelligence

Target Sectors
Target Sectors
  • Malls
  • Departmental Stores
  • Exhibition Centers
  • Food & Beverage

People Counting and Reporting
Virtual Area Entry Monitoring
Cup Counting Solution
Reporting
Heat Map
Queue Management
Face Capture
Face Recognition

Foot Fall statistics gathering for Business optimization
Queue monitoring to improve queuing time for consumers
Reduce Shrinkage
New feature to count beverages and other items served over the counter/shelf at  various food joint.

Tuesday 26 May 2020

Video Analytics: Applications and Opportunities

Introduction

In the past few years, video analytics, also known as video content analysis or intelligent video analytics, has attracted increasing interest from both industry and the academic world. Thanks to the enormous advances made in deep learning, video analytics has introduced the automation of tasks that were once the exclusive purview of humans.
Recent improvements in video analytics have been a game-changer, ranging from applications that count people at events, to automatic license plate recognition, along with other more well-known scenarios such as facial recognition or smart parking.

Real-time vehicle detection

CCTV surveillance camera detecting vehicles in real-time in order to recognize specific events, such as car accidents, and trigger alerts accordingly.

Image source

This kind of technology looks great, but how does it work and how can it benefit your business?
In this guide, you’ll discover the basic concept of video analytics, how it’s used in the real world to automate processes and gain valuable insights, and what you should consider when implementing an intelligent video analytics solutions in your organization.

What is intelligent video analytics?

The main goal of video analytics is to automatically recognize temporal and spatial events in videos. A person who moves suspiciously, traffic signs that are not obeyed, the sudden appearance of flames and smoke; these are just a few examples of what a video analytics solution can detect.

Real-time video analytics and video mining

Usually, these systems perform real-time monitoring in which objects, object attributes, movement patterns, or behavior related to the monitored environment are detected. However, video analytics can also be used to analyze historical data to mine insights. This forensic analysis task can detect trends and patterns that answer business questions such as:
  • When is customer presence at its peak in my store and what is their age distribution?
  • How many times is a red light run, and what are the specific license plates of the vehicles doing it?

Some known applications

Some applications in the field of video analytics are widely known to the general public. One such example is video surveillance, a task that has existed for approximately 50 years. In principle, the idea is simple: install cameras strategically to allow human operators to control what happens in a room, area, or public space.
In practice, however, it is a task that is far from simple. An operator is usually responsible for more than one camera and, as several studies have shown, upping the number of cameras to be monitored adversely affects the operator’s performance. In other words, even if a large amount of hardware is available and generating signals, a bottleneck is formed when it is time to process those signals due to human limitations.
Video analysis software can contribute in a major way by providing a means of accurately dealing with volumes of information.

Video analytics with deep learning

Machine learning and, in particular, the spectacular development of deep learning approaches, has revolutionized video analytics.
The use of Deep Neural Networks (DNNs) has made it possible to train video analysis systems that mimic human behavior, resulting in a paradigm shift. It started with systems based on classic computer vision techniques (e.g. triggering an alert if the camera image gets too dark or changes drastically) and moved to systems capable of identifying specific objects in an image and tracking their path.

Bicycles detection

Bicylce detection with the deep learning toolkit Luminoth.

Image source

For example, Optical Character Recognition (OCR) has been used for decades to extract text from images. In principle, it could suffice to apply OCR algorithms directly to an image of a license plate to discern its number. In the previous paradigm, this might work if the camera was positioned in such a way that, at the time of executing the OCR, we were certain that we were filming a license plate.
A real-world application of this would be the recognition of license plates at parking facilities, where the camera is located near the gates and could film the license plate when the car stops. However, running OCR constantly on images from a traffic camera is not reliable: if the OCR returns a result, how can we be sure that it really corresponds to a license plate?
In the new paradigm, models based on deep learning are able to identify the exact area of an image in which license plates appear. With this information, OCR is applied only to the exact region in question, leading to reliable results.

Industry applications

Healthcare

Historically, healthcare institutions have invested large amounts of money in video surveillance solutions to ensure the safety of their patients, staff, and visitors, at levels that are often regulated by strict legislation. Theft, infant abduction, and drug diversion are some of the most common problems addressed by surveillance systems.
In addition to facilitating surveillance tasks, video analytics allows us to go further, by exploiting the data collected in order to achieve business goals. For example, a video analytics solution could detect when a patient has not been checked on according to their needs and alert the staff. Analysis of patient and visitor traffic can be extremely valuable in determining ways to shorten wait times, while ensuring clear access to the emergency area.
At-home monitoring of older adults or people with health issues is another example of an application that provides great value. For instance, falls are a major cause of injury and death in older persons. Although personal medical devices can detect falls, they must be worn and are frequently disregarded by the consumer. A video analytics solution can process the signals of home cameras to detect in real time if a person has fallen. With proper setup, such a system could also determine if a person took a given medication when they were supposed to, for instance.
Mental healthcare is another area in which video analytics can make significant contributions. Systems that analyze facial expressions, body posture, and gaze can be developed to assist clinicians in the evaluation of patients. Such a system is able to detect emotions from body language and micro-expressions, offering clinicians objective information that can confirm their hypotheses or give them new clues.

Real-world example

The University at Buffalo developed a smartphone application designed to help detect autism spectrum disorder (ASD) in children. Using only the smartphone camera, the app tracks facial expression and gaze attention of a child looking at pictures of social scenes (showing multiple people). The app monitors the eye movements and can accurately detect children with ASD since their eye movements are different from those of a person without autism.

Smart cities / Transportation

Video analytics has proven to be a tremendous help in the area of transport, aiding in the development of smart cities.
An increase in traffic, especially in urban areas, can result in an increase in accidents and traffic jams if adequate traffic management measures are not taken. Intelligent video analysis solutions can play a key role in this scenario.
Traffic analysis can be used to dynamically adjust traffic light control systems and to monitor traffic jams. It can also be useful in detecting dangerous situations in real time, such as a vehicle stopped in an unauthorized space on the highway, someone driving in the wrong direction, a vehicle moving erratically, or vehicles that have been in an accident. In the case of an accident, these systems are helpful in collecting evidence in case of litigation.
Vehicle counting, or differentiating between cars, trucks, buses, taxis, and so on, generates high-value statistics used to obtain insights about traffic. Installing speed cameras allows for precise control of drivers en masse. Automatic license plate recognition identifies cars that commit an infraction or, thanks to real-time searching, spots a vehicle that has been stolen or used in a crime.

Real-time parking spot detection

Real-time parking spot detection.


Instead of using sensors in each parking space, a smart parking system based on video analytics helps drivers find a vacant spot by analyzing images from security cameras.
These are just some examples of the contributions that video analysis technology can make to build safer cities that are more pleasant to live in.

Real-world example

A great example of video analytics used to solve real-world problems is the one of the city of New York. In order to better understand major traffic events, the New York City Department of Transportation used video analytics and machine learning to detect traffic jams, weather patterns, parking violations and more. The cameras capture the activities, process them and send real-time alerts to city officials.

Retail

The use of machine learning, and video analytics in particular, in the retail sector has been one of the most important technological trends in recent years.
Brick and mortar retailers can use video analytics to understand who their customers are and how they behave.
State-of-the-art algorithms are able to recognize faces and determine people’s key characteristics such as gender and age. These algorithms can also track customers’ journeys through stores and analyze navigational routes to detect walking patterns. Adding in the detection of direction of gaze, retailers can identify how long a customer looks at a certain product and finally answer a crucial question: where is the best place to put items in order to maximize sales and improve customer experience?

Demo of storefront attention time.


A lot of actionable information can be gathered with a video analytics solution, such as: number of customers, customer’s characteristics, duration of visit, and walking patterns. All of this data can be analyzed while taking into account its temporal nature, in order to optimize the organization of the store according to the day of the week, the seasons of the year, or holidays . In this way, a retailer can get an extremely accurate sense of who their customers are, when they visit their store, and how they behave once inside.
Video analytics is also great for developing anti-theft mechanisms. For instance, face recognition algorithms can be trained to spot known shoplifters or spot in real-time a person hiding an item in their backpack.
What is more, information extracted from video analytics can serve as input data for training machine learning models, which aim to solve larger challenges. As an example, walking patterns and the number of people in the store, can be useful information to add to machine learning powered solutions for demand forecasting, price optimization and inventory forecasting.

Real-world example

Marine Layer is a clothing retailer headquartered in San Francisco that deployed an intelligent video analytics solution to gain insights about customer traffic in their stores. The system they implemented automatically counts store visitors and reveals evidence about the traffic per hour or a certain day. While the company was estimating these numbers prior to the implementation of the video analytics solution, it now has 100% certainty about the them and saves time in analyzing traffic manually.

Security

Video surveillance is an old task of the security domain. However, from the time that systems were monitored exclusively by humans to current solutions based on video analytics, much water has passed under the bridge.
Facial and license plate recognition (LPR) techniques can be used to identify people and vehicles in real-time and make appropriate decisions. For instance, it’s possible to search for a suspect both in real-time and in stored video footage, or to recognize authorized personnel and grant access to a secured facility.
Crowd management is another key function of security systems. Cutting edge video analysis tools can make a big difference in places such as shopping malls, hospitals, stadiums, and airports. These tools can provide an estimated crowd count in real time and trigger alerts when a threshold is reached or surpassed. They can also analyze crowd flow to detect movement in unwanted or prohibited directions.

Real-time people detection

Real-time people detection.


In the video above, a surveillance system was trained to recognize people in real-time. This lays the groundwork for obtaining other results. The most immediate: a count of the number of people passing by daily. More advanced goals, based on historical data, might be to determine the “normal” flow of people according to the day of the week and time of day, and generate alerts in case of unusual traffic. If the monitored area is pedestrian-only, the system could be trained to detect unauthorized objects such as motorcycles or cars and, again, trigger some kind of alert.
This is one of the great advantages of these approaches: video content analysis systems can be trained to detect specific events, sometimes with a high degree of sophistication. One such example is to detect fires as soon as possible. Or, in the case of airports, to raise an alert when someone enters a forbidden area or walks against the direction intended for passengers. Another great use case is the real-time detection of unattended baggage in a public space.
As for classic tasks such as intruder detection, they can be performed robustly, thanks to algorithms that can filter out motion caused by wind, rain, snow, or animals.
The functionality offered by intelligent video analysis grows day by day in the security domain, and this is a trend that will continue in the future.

Real-world example

The Danish football club Brondby was the first soccer club to officially introduce facial recognition technology in 2019 to improve safety on matchdays at its stadium. The system identifies banned people from attending games and enables staff to prevent them from entering the stadium.

How does video analytics work?

Let’s take a look at a general scheme of how a video analytics solution works. Depending on the particular use case, the architecture of a solution may vary, but the scheme remains the same.
Video content analysis can be done in two different ways: in real time, by configuring the system to trigger alerts for specific events and incidents that unfold in the moment, or in post processing, by performing advanced searches to facilitate forensic analysis tasks.

Feeding the system

The data being analyzed can come from various streaming video sources. The most common are CCTV camerastraffic cameras and online video feeds. However, any video source that uses the appropriate protocol (e.g. RTSP: real-time streaming protocol or HTTP) can generally be integrated into the solution.
A key goal is coverage: we need to have a clear view of the entire area, and from various angles, where the events being monitored might occur. Remember, more data is better, given that it can be processed.

Central processing vs edge processing

Video analysis software can be run centrally on servers that are generally located in the monitoring station, which is known as central processing. Or, it can be embedded in the cameras themselves, a strategy known as edge processing.
The choice of cameras should be carefully considered when designing a solution. A lot of legacy software was developed with central processing capabilities only. In recent years, though, it is not uncommon to come across hybrid solutions. In fact, a good practice is to concentrate, whenever possible, real-time processing on cameras and forensic analysis functionalities on the central server.
With a hybrid approach, the processing performed by the cameras reduces the data being processed by the central servers, which otherwise could require extensive processing capabilities and bandwidth as the number of cameras increases. In addition, it is possible to configure the software to only send data about suspicious events to the server over the network, reducing network traffic and the need for storage.
Meanwhile, centralizing the data for forensic analysis allows for multiple search and analysis tools to be used, from general algorithms to ad-hoc implementations, all utilizing different sets of parameters that help to balance the noise and silence in the results obtained. Essentially, you can enter in your own algorithms to get the desired results, which is a particularly flexible and attractive scheme.

Defining scenarios and training models

Once the physical architecture is planned for and installed, it is necessary to define the scenarios on which you want to focus and then train the models that are going to detect the target events.
Vehicle crashes? Crowd flow? Facial recognition at a retail store to recognize known shoplifters? Each scenario leads to a series of basic tasks that the system must know how to perform.
An example: detect vehicles, eventually recognize their type (e.g. motorcycle, car, truck), track their trajectory frame by frame, and then study the evolution of those paths to detect a possible crash.
The most frequent, basic tasks in video analytics are:
  • Image classification: select the category of an image from among a set of predetermined categories (e.g. car, person, horse, scissors, statue).
  • Localization: locate an object in an image (generally involves drawing a bounding box around the object).
  • Object detection: locate and categorize an object in an image.
  • Object identification: given a target object, identify all of its instances in an image (e.g. find all soccer players in the image).
  • Object tracking: track an object that moves over time in a video.
To know more about the basic tasks performed and the types of algorithms that are used to develop video analysis software, we recommend you read this introductory guide to computer vision.

Example of image classification

Example of image classification.


Training models from scratch requires considerable effort. Luckily, there are a fair amount of resources available that make this a less burdensome task.
Image datasets such as ImageNet or Microsoft Common Objects in Context (COCO) are key resources that simplify the training of new models.
There are several pre-trained models available for tasks such as image classification, object detection, and facial recognition, which, thanks to transfer learning techniques, allow for the adaptation (fine tuning) of a model for a given use case. This is much less expensive than a complete training.
Finally, open source projects have been increasingly published in recent years by the community to facilitate the building of custom video analysis systems. Relying on computer vision libraries, such as the ones presented in the following paragraph, greatly helps build solutions faster and with more accuracy.

Human review

In virtually all cases, a human is needed to monitor the alerts generated by a video analysis system and decide what should be done, if anything. In this sense, these systems act as valuable support for operators, helping them to detect events that might otherwise be overlooked or take a long time to detect manually.

Deep Learning Technology Video Analytics Solutions

The deep learning technology layer ensures that  intelligent video analytics services become smarter with time and deliver even better results. 
  1. Video Analytics Software for Security and Surveillance

    Video Analytics Software for Security and Surveillance
    Video analytics is probably used the most for security management and surveillance. It is impossible for humans to continuously watch the streaming videos from different angles and ensure that there are no security breaches. With video analytics, the task can be automated, and the right people can be alerted in case of any deviations. Video analytics software has transformed the surveillance domain with features like:
    • Live/streaming video analysis
    • Motion detection
    • Identity recognition
    • Intrusion detection
    • Biometric-based access
    • License plate recognition
    • People/vehicle counting
    • Pattern detection
    • Heatmaps
    • Abandoned object tracking
  2. Video Analytics Software for Smart Homes

    Video Analytics Software for Smart Homes
    Up until a few years back, only a few portions of a home were technologically ahead, but today smart homes have come a long way in enabling overall intelligence and efficiency. Video analytics software to incorporate the following features:
    • Intrusion detection
    • Facial recognition
    • Alarms and alerts
    • Pet watching
    • Baby watching
    • Object detection
    • Human detection
    • Power management
    • Movement detection
    • Home assets management
    • Video summary creation
  3. Video Analytics Software for Retail Business

    Video Analytics Software for Retail Business
    Video analytics in retail is changing the way brick-and-mortar stores operate and engage with customers. Video analytics software for retail domain can help you with:
    • Facial recognition
    • Footfalls analysis/person counting
    • In-store pattern recognition
    • Shop-lifting monitoring and alerts
    • Product merchandising analytics
    • Heatmaps
    • Event-based analysis
    • Queue management
    • Customer journey mapping
    • Real-time customer behavior analysis
    • Customer sentiment analysis including eyeball detection, smile detection
  4. Video Analytics Software for Autonomous Cars

    Video Analytics Software for Autonomous Cars
    There's no doubt that smart cars and driver-less cars will dominate the future roads.Video analytics software can help you with:
    • Collision detection
    • Traffic detection
    • Lane deviation detection
    • Road signs detection
    • Pedestrian crossing/intersections detection
    • Augmented reality windscreen/smart mirrors
    • Warning and alerts for any deviations
  5. Video Analytics Software for Smart Cities

    Video Analytics Software for Smart Cities
    Human operators have to deal with thousands of streaming video channels while managing a city. This is an impossible task that cannot be done without the use of modern technologies. We are making our cities work more efficiently and smoothly by intelligently managing all aspects of its functioning. Video analytics software is helping government agencies in:
    • City-wide surveillance
    • People and vehicle management
    • Pattern analysis
    • Crowd and traffic analysis
    • Accident prediction and management
    • Trespassing detection
    • Missing object detection
    • Camera tampering detection
    • Behavior analytics
    • People search based on gender, ethnicity, height, hair color, etc.
    • Traffic management - License plate detection, speed monitoring, vehicle counting, parking management
  6. Video Analytics Software for Media Companies

    Video Analytics Software for Media Companies
    Media agencies usually have a vast repository of videos in various formats. Video analytics software can help them with:
    • Video categorization
    • Automated subtitling
    • Video summary creation
    • Video content analysis
    • Social media video analytics

Saturday 16 May 2020

Resolution DB password issue

First, connect in sudo mysql

sudo mysql -u root

Check list of DB users  present 

SELECT User,Host FROM mysql.user;
+------------------+-----------+
| User             | Host      |
+------------------+-----------+
| admin            | localhost |
| debian-sys-maint | localhost |
| magento_user     | localhost |
| mysql.sys        | localhost |
| root             | localhost |

Delete current root@localhost account

mysql> DROP USER 'root'@'localhost';
Query OK, 0 rows affected (0,00 sec)
Recreate your user

mysql>uninstall plugin validate_password;

mysql> CREATE USER 'root'@'%' IDENTIFIED BY '';
Query OK, 0 rows affected (0,00 sec)
Give permissions to your user (don't forget to flush privileges)

mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
Query OK, 0 rows affected (0,00 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0,01 sec)
Exit MySQL and try to reconnect without sudo.

CREATE USER 'db_user'@'%' IDENTIFIED BY '';



How to import database via command line


  • Open the MySQL command line
  • Type the path of your mysql bin directory and press Enter
  • Paste your SQL file inside the bin folder of mysql server.
  • Create a database in MySQL.
  • Use that particular database where you want to import the SQL file.
  • Type source databasefilename.sql and Enter
  • Your SQL file upload successfully.


db - db_mapper
u - db_user
p - password123

CREATE DATABASE db_mapper;
use db_mapper;
CREATE USER 'db_user'@'localhost' IDENTIFIED BY 'password123';
GRANT ALL PRIVILEGES ON db_mapper.* TO 'db_user'@'localhost';


CREATE USER 'db_user'@'localhost' IDENTIFIED BY 'password123';
GRANT ALL PRIVILEGES ON db_mapper.* TO 'wordpress_user'@'localhost';

Pre- requisite for Mysql-client using python

sudo apt-get install libmysqlclient-dev
sudo apt-get install python3-pymysql
sudo apt-get install python3.6-dev

Videos based solutions

City / Traffic Surveillance Target Sectors Government Sectors Traffic Surveillance Highway and State Road Surveillance Defense Ai...