All Projects → intel-iot-devkit → object-size-detector-python

intel-iot-devkit / object-size-detector-python

Licence: BSD-3-Clause license
Monitor mechanical bolts as they move down a conveyor belt. When a bolt of an irregular size is detected, this solution emits an alert.

Programming Languages

python
139335 projects - #7 most used programming language
Jupyter Notebook
11667 projects
shell
77523 projects

Projects that are alternatives of or similar to object-size-detector-python

intruder-detector-python
Build an application that alerts you when someone enters a restricted area. Learn how to use models for multiclass object detection.
Stars: ✭ 16 (-38.46%)
Mutual labels:  intel, inference, edge, image-recognition, pretrained-models, reference-implementation, live-demo, edge-computing, openvino, edge-ai
object-flaw-detector-python
Detect various irregularities of a product as it moves along a conveyor belt.
Stars: ✭ 17 (-34.62%)
Mutual labels:  intel, inference, edge, image-recognition, pretrained-models, reference-implementation, live-demo, edge-computing, openvino, edge-ai
concurrent-video-analytic-pipeline-optimization-sample-l
Create a concurrent video analysis pipeline featuring multistream face and human pose detection, vehicle attribute detection, and the ability to encode multiple videos to local storage in a single stream.
Stars: ✭ 39 (+50%)
Mutual labels:  intel, inference, edge, image-recognition, pretrained-models, reference-implementation, live-demo, edge-computing, openvino, edge-ai
object-flaw-detector-cpp
Detect various irregularities of a product as it moves along a conveyor belt.
Stars: ✭ 19 (-26.92%)
Mutual labels:  intel, inference, edge, image-recognition, pretrained-models, reference-implementation, live-demo, edge-computing, openvino, edge-ai
safety-gear-detector-python
Observe workers as they pass in front of a camera to determine if they have adequate safety protection.
Stars: ✭ 54 (+107.69%)
Mutual labels:  intel, inference, edge, image-recognition, pretrained-models, reference-implementation, live-demo, edge-computing, openvino, edge-ai
motor-defect-detector-python
Predict performance issues with manufacturing equipment motors. Perform local or cloud analytics of the issues found, and then display the data on a user interface to determine when failures might arise.
Stars: ✭ 24 (-7.69%)
Mutual labels:  intel, inference, edge, image-recognition, pretrained-models, reference-implementation, live-demo, edge-computing, openvino, edge-ai
People Counter Python
Create a smart video application using the Intel Distribution of OpenVINO toolkit. The toolkit uses models and inference to run single-class object detection.
Stars: ✭ 62 (+138.46%)
Mutual labels:  intel, inference, edge, image-recognition, pretrained-models, edge-computing
Berrynet
Deep learning gateway on Raspberry Pi and other edge devices
Stars: ✭ 1,529 (+5780.77%)
Mutual labels:  edge-computing, openvino, edge-ai
nn-Meter
A DNN inference latency prediction toolkit for accurately modeling and predicting the latency on diverse edge devices.
Stars: ✭ 211 (+711.54%)
Mutual labels:  inference, edge-computing, edge-ai
gaze-estimation-with-laser-sparking
Deep learning based gaze estimation demo with a fun feature :-)
Stars: ✭ 32 (+23.08%)
Mutual labels:  intel, inference, openvino
Openvino
OpenVINO™ Toolkit repository
Stars: ✭ 2,858 (+10892.31%)
Mutual labels:  inference, openvino
Server
The Triton Inference Server provides an optimized cloud and edge inferencing solution.
Stars: ✭ 2,994 (+11415.38%)
Mutual labels:  inference, edge
Bert Ner Tf
Named Entity Recognition with BERT using TensorFlow 2.0
Stars: ✭ 155 (+496.15%)
Mutual labels:  inference, pretrained-models
openncc
OpenNCC Kit
Stars: ✭ 23 (-11.54%)
Mutual labels:  intel, openvino
optimum
🏎️ Accelerate training and inference of 🤗 Transformers with easy to use hardware optimization tools
Stars: ✭ 567 (+2080.77%)
Mutual labels:  intel, inference
openvino pytorch layers
How to export PyTorch models with unsupported layers to ONNX and then to Intel OpenVINO
Stars: ✭ 17 (-34.62%)
Mutual labels:  intel, openvino
MobileNetV2-PoseEstimation
Tensorflow based Fast Pose estimation. OpenVINO, Tensorflow Lite, NCS, NCS2 + Python.
Stars: ✭ 99 (+280.77%)
Mutual labels:  intel, openvino
Awesome System For Machine Learning
A curated list of research in machine learning system. I also summarize some papers if I think they are really interesting.
Stars: ✭ 1,185 (+4457.69%)
Mutual labels:  inference, edge-computing
ekuiper
Lightweight data stream processing engine for IoT edge
Stars: ✭ 975 (+3650%)
Mutual labels:  edge, edge-computing
Jetson Inference
Hello AI World guide to deploying deep-learning inference networks and deep vision primitives with TensorRT and NVIDIA Jetson.
Stars: ✭ 5,191 (+19865.38%)
Mutual labels:  inference, image-recognition

Object Size Detector

Details
Target OS: Ubuntu* 18.04 LTS
Programming Language: Python* 3.6
Time to Complete: 45 min

Defect

What it does

This application demonstrates how to use CV to detect and measure the approximate size of assembly line parts. It is designed to work with an assembly line camera mounted above the assembly line belt. The application monitors mechanical parts as they are moving down the assembly line and raises an alert if it detects a part on the belt outside a specified size range.

Requirements

Hardware

  • 6th to 8th generation Intel® Core™ processor with Iris® Pro graphics or Intel® HD Graphics

Software

  • Ubuntu* 18.04 LTS
    NOTE: Use kernel versions 4.14+ with this software.
    Determine the kernel version with the below uname command.

    uname -a
    
  • Intel® Distribution of OpenVINO™ toolkit 2020 R3 release toolkit

How It works

This object size detector works with a video source, such as a camera. The application captures video frames and processes the frame data with OpenCV algorithms. It detects objects on the assembly line and calculates the length and width of the objects. If the calculated length and width is not within a predefined range, the application raises an alert to notify the assembly line operator. Optionally, the application sends data to a message queuing telemetry transport (MQTT) machine, or machine messaging server, as a part of an assembly line data analytics system.

app image Architectural Diagram

Setup

Get the code

Steps to clone the reference implementation: (object-size-detector-python)

sudo apt-get update && sudo apt-get install git
git clone https://github.com/intel-iot-devkit/object-size-detector-python.git

Install Intel® Distribution of OpenVINO™ toolkit

Before running the application, install the Intel® Distribution of OpenVINO™ toolkit. For details, see Installing the Intel® Distribution of OpenVINO™ toolkit for Linux*

Other dependencies

Mosquitto*

Mosquitto is an open source message broker that implements the MQTT protocol. The MQTT protocol provides a lightweight method of carrying out messaging using a publish/subscribe model.

To install the dependencies of the RI, run the below command:

cd <path_to_the_object-size-detector-python_directory>
./setup.sh

The Config File

The resources/config.json contains the path to the videos that will be used by the application. The config.json file is of the form name/value pair, video: <path/to/video>

Example of the config.json file:

{

    "inputs": [
	    {
            "video": "videos/video1.mp4"
        }
    ]
}

Which Input video to use

The application works with any input video. Find sample videos for object detection here.

For first-use, we recommend using the bolt-multi-size-detection video.The video is automatically downloaded to the resources/ folder. For example:
The config.json would be:

{

    "inputs": [
	    {
            "video": "sample-videos/bolt-multi-size-detection.mp4"
        }
    ]
}

To use any other video, specify the path in config.json file

Using the Camera instead of video

Replace the path/to/video in the resources/config.json file with the camera ID, where the ID is taken from the video device (the number X in /dev/videoX).

On Ubuntu, list all available video devices with the following command:

ls /dev/video*

For example, if the output of above command is /dev/video0, then config.json would be::

{

    "inputs": [
	    {
            "video": "0"
        }
    ]
}

Setup the Environment

Configure the environment to use the Intel® Distribution of OpenVINO™ toolkit once per session by running the source command on the command line:

source /opt/intel/openvino/bin/setupvars.sh

Note: This command needs to be executed only once in the terminal where the application will be executed. If the terminal is closed, the command needs to be executed again.

Run the Application

Change the current directory to the git-cloned application code location on your system:

cd <path-to-object-size-detector-python>/application

To see a list of the various options, invoke the help output of this application with the help parameter:

python3 object_size_detector.py -h

Run the application using the below command if field of view and distance between the object and camera in millimeters are not known.

Using input as videofile:

python3 object_size_detector.py -minl=228 -minw=28 -maxl=250 -maxw=45

Run the application using the below command if field of view and distance between the object and camera in millimeters are known.

Using input as videofile:

python3 object_size_detector.py -minl=228 -minw=28 -maxl=250 -maxw=45 -fv=60 -d=370

Note:
User can get field of view from camera specifications. The minl, minw, maxl and maxw parameters set the values for the minimum and maximum values for length and width. If a part’s length and width is not within this range, the application issues an alert.

Subscribe the data

Open a new terminal and execute the below commands:

To run the mosquitto server

mosquitto

Note: If the output of the above command is

1543918812: mosquitto version 1.4.8 (build date Wed, 05 Sep 2018 15:51:27 -0300) starting
1543918812: Using default config.
1543918812: Opening ipv4 listen socket on port 1883.
1543918812: Error: Address already in use

It means mosquitto server is already running in the background.

To Subscribe the data

mosquitto_sub -h localhost -t defects/counter
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].