Skip to content

Latest commit

 

History

History
836 lines (654 loc) · 18.4 KB

slides.md

File metadata and controls

836 lines (654 loc) · 18.4 KB
theme background class highlighter lineNumbers persist defaults transition title mdc
seriph
./images/background.jpg
text-center
shiki
false
false
foo
true
slide-left
Introduction to Artificial Intelligence and Computer Vision
true

Artificial Intelligence and Computer Vision

<style> h1 { color: white !important; @apply !text-shadow-lg; @apply !text-center; } </style>

Workshop


transition: slide-left

Notices & Disclaimers


Notices & Disclaimers

Intel technologies may require enabled hardware, software or service activation.

No product or component can be absolutely secure.

Your costs and results may vary.

Intel does not control or audit third-party data. You should consult other sources to evaluate accuracy.

© Intel Corporation. Intel, the Intel logo, and other Intel marks are trademarks of Intel Corporation or its subsidiaries. Other names and brands may be claimed as the property of others.

Logo

transition: slide-left

Outline

  1. Introduction to AI and CV
  2. AI and CV Basics
  3. Intel SW and HW
  4. Hands-on with OpenVINO
  5. Questions
Logo
--- layout: cover transition: slide-left background: ./images/background.jpg --- # Introduction to AI and CV <style> h1 { color: white !important; @apply !text-shadow-lg; @apply !text-center; } </style>

transition: slide-left

Use case: Intelligence queue management


Logo

transition: slide-left level: 2

Use case: Intelligence queue management


Logo

transition: slide-left level: 2

Use case: Automated self checkout

Logo

layout: image-right image: ./images/ai-graphics.jpg transition: slide-left

Definitions

  • AI involves teaching computers to process data in a way that mimics the human brain
  • Computer Vision is a field of AI that focuses on enabling computers to interpret visual data
  • AI and CV are important in our lives for several reasons:
    • Automation
    • Medicine
    • Safety
    • Customer experience

transition: slide-left

Computer Vision Use Cases

  • Robotics
  • Retail
  • Surveillance and Security
  • Medical Imaging
Logo

transition: slide-left

Robotics Use Cases

  • Self-driving Cars
    • Commercial vehicles
    • Delivery robots
  • Surveillance robots
  • Drones
<iframe width="450" height="250" src="https://www.youtube.com/embed/kN0MLclnWa0?si=w1yJBFJ_IS81y-eo" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
Logo

transition: slide-left

Retail Use Cases

  • Grocery stores:
    • Automated Self Checkout
    • Inventory Magagement
  • Retail stores:
    • Customer Experience
<iframe width="350" height="200" src="https://www.youtube.com/embed/lEWFmKI5RYY?si=bsUWXxiUOfh4KId3" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
<iframe width="350" height="200" src="https://www.youtube.com/embed/3B8369neIHI?si=dpDsaq8x1yyDsv41" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
Logo

transition: slide-left

Surveillance and Security Use Cases

  • Facial Authentication
    • Buildings
    • Phones
  • Person of interest detection
    • Airports
    • Stores
<iframe width="450" height="250" src="https://www.youtube.com/embed/SnH5qe8_rps?si=ym6M0GQGbs73GCzK" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
Logo

layout: cover transition: slide-left background: ./images/background.jpg

AI and CV Basics

<style> h1 { color: white !important; @apply !text-shadow-lg; @apply !text-center; } </style>

transition: slide-left

How does AI/CV work?






```mermaid {theme: 'default',scale: 1, alt: 'A simple sequence diagram'} flowchart LR data["Data Collection"] model["Model Creation"] inference["Inferencing Application"] data --> Annotation --> Training --> model --> inference --> data ```
Logo
--- transition: slide-left --- # Type of CV Models
  • Classification
  • Detection
  • Semantic Segmentation
  • Instance segmentation
Logo

layout: image-right image: ./images/dogs.jpg transition: slide-left

Data Collection

  • Collect-Create hundreds or thousands of images for the desire output.

Annotation

  • Manually indentify desired object on each image. (object detection)
  • Manually name each image (classification)

Training

  • Tensorflow
  • Pytorch

Model & Inferencing

  • Use your model with your application

layout: cover transition: slide-left background: ./images/background.jpg

Intel Software and Hardware on AI

<style> h1 { color: white !important; @apply !text-shadow-lg; @apply !text-center; } </style>

transition: slide-left

Intel GETi

  • Train models for classification, object detection, segmentation or anomaly detection
  • Annotation tools
  • Optimized models for Intel architecture (CPU,GPUS)
geti.intel.com
Logo

transition: slide-left

Intel OpenVINO

  • Opensource toolkit that accelerates AI inference.
  • Used for AI development and integration of deep learning in domains like computer vision, LLM and genAI.
Logo

transition: slide-left

Intel OpenVINO Model Server

  • A scalable inference server for models opmitized with OpenVINO.
Logo

transition: slide-left

Intel DLStreamer

  • Streaming media analytics framework, based on Gstreamer.
  • Enables developers to create deep learning pipelines across Intel architecture.
Logo

transition: slide-left

Intel Open-Source Contributions

  • Pytorch
  • TensorFlow
  • openCV
  • Python
  • Scikit-learn
Logo

transition: side-left

Intel Hardware in AI

  • CPU
    • Atom
    • Core 5,7,9
    • Xeon
  • GPU
    • iGPU
    • Flex GPU
    • Arc GPU
  • VPU
  • NPU
Logo
--- transition: side-left layout: cover background: ./images/background.jpg ---

Hands-on with OpenVINO

<style> h1 { color: white !important; @apply !text-shadow-lg; @apply !text-center; } </style>

transition: side-left

Intel DLStreamer

Logo

transition: side-left layout: full


transition: side-left

DLStreamer on Windows using docker

Prerequisites:

Install Docker on Windows

Step 1 Download Moba Xterm

MobaXterm

Step 2 Run DLstreamer docker container

docker run -it --rm --network=host --entrypoint /bin/bash --name dlstreamer_test --privileged --user root openvino/ubuntu18_data_dev

Step 3 Download Models

cd /opt/intel/openvino/data_processing/dl_streamer/samples
./download_models.sh
Logo

transition: side-left

Step 4 Run Face Detection/Age-Gender/Emotions pipeline


gst-launch-1.0 urisourcebin buffer-size=4096 uri=https://github.com/intel-iot-devkit/sample-videos/raw/master/head-pose-face-detection-female-and-male.mp4 !
 decodebin ! videoconvert ! video/x-raw,format=BGRx ! gvadetect model=/root/intel/dl_streamer/models/intel/face-detection-adas-0001/FP32/face-detection-adas-0001.xml 
 device=CPU ! queue ! gvaclassify model=/root/intel/dl_streamer/models/intel/age-gender-recognition-retail-0013/FP32/age-gender-recognition-retail-0013.xml model-proc=/opt/intel/openvino/data_processing/dl_streamer/samples/gst_launch/face_detection_and_classification/model_proc/age-gender-recognition-retail-0013.json 
 device=CPU ! queue ! gvaclassify model=/root/intel/dl_streamer/models/intel/emotions-recognition-retail-0003/FP32/emotions-recognition-retail-0003.xml model-proc=/opt/intel/openvino/data_processing/dl_streamer/samples/gst_launch/face_detection_and_classification/model_proc/emotions-recognition-retail-0003.json 
 device=CPU ! queue ! gvaclassify model=/root/intel/dl_streamer/models/intel/landmarks-regression-retail-0009/FP32/landmarks-regression-retail-0009.xml model-proc=/opt/intel/openvino/data_processing/dl_streamer/samples/gst_launch/face_detection_and_classification/model_proc/landmarks-regression-retail-0009.json 
 device=CPU ! queue ! gvawatermark ! videoconvert ! fpsdisplaysink video-sink=ximagesink sync=false
Logo

transition: side-left layout: full


transition: side-left

OpenVINO Runtime

Install OpenVINO python runtime

pip install -q "openvino>=2023.1.0"

Initialize OpenVINO runtime

import openvino as ov
core = ov.Core()

Loading a model

classification_model_xml = "model/classification.xml"
model = core.read_model(model=classification_model_xml)
compiled_model = core.compile_model(model=model, device_name="CPU") # Compile model to a specific device

Analyze the input

model.inputs # [<Output: names[input, input:0] shape[1,3,224,224] type: f32>]
  • model expects one input and input data with the batch size of 1 (N), 3 channels ( C) , and images with a height (H) and width (W) equal to 224.
Logo

transition: side-left layout: two-cols

Analyze the output

model.outputs # [<Output: names[MobilenetV3/Predictions/Softmax] shape[1,1001] type: f32>]
  • shape of [1, 1001] where 1001 is the number of classes

Load an Image

image = cv2.cvtColor(cv2.imread(filename=str("image.jpg")), code=cv2.COLOR_BGR2RGB) # RBG Format  
input_image = cv2.resize(src=image, dsize=(224, 224)) # Resize image
input_image = np.expand_dims(input_image, 0) # Reshape image
input_image.shape # (1, 3, 224, 224)

Do Inference

output_layer = compiled_model.output(0)
result_infer = compiled_model([input_image])[output_layer]
result_index = np.argmax(result_infer)
imagenet_classes[result_index] # n02099267 flat-coated retriever

::right::

Logo

transition: side-left

OpenVINO Jupyter notebooks

https://github.com/openvinotoolkit/openvino_notebooks

Logo

transition: side-left layout: two-cols

AI popular trends (genAI)

  • Text to Video/Image generation
  • Large Language Models (LLM)
  • Natural Language procesing (NLP)
  • Sound generators

::right::

Darth Vader is surfing on waves
a beautiful pink unicorn
Logo

transition: side-left

How to start developing AI/CV applications

  • Install an IDE (vscode)
  • Install python or c++, OpenVINO and Docker
  • Demos from OpenVINO model zoo repo
  • Retail use cases using OpenVINO model server gRPC or cAPI and docker containers (link)
Logo

layout: cover background: ./images/background.jpg

Questions

<style> h1 { color: white !important; @apply !text-shadow-lg; @apply !text-center; } </style>