Alejandro Sanchez
Published © MIT

Jetson Drowsiness Driving Monitor

Drowsiness and atention monitor for driving or handling heavy machinery. Also detects objects at the blind spot via CV and the Jetson Nano.

AdvancedFull instructions provided4 hours2,698

Things used in this project

Hardware components

NVIDIA Jetson Nano Developer Kit
NVIDIA Jetson Nano Developer Kit
×1
Power Inverter for car
×1
Adafruit HUZZAH32 – ESP32 Feather Board
Adafruit HUZZAH32 – ESP32 Feather Board
×1
0.96" OLED 64x128 Display Module
ElectroPeak 0.96" OLED 64x128 Display Module
×1
Speaker generic
×1
USB TP-Link USB Wifi Adapter TL-WN725N
×1
USB Audio Adapter Sound Card
×1
Logitech HD Laptop Webcam C615
×1
Generic HD Camera
×1
Flash Memory Card, MicroSD Card
Flash Memory Card, MicroSD Card
×1
5V-4A AC/DC
×1
Hub, USB 2.0
Hub, USB 2.0
×1
VMA204 3-axis digital accelerometer
×1

Software apps and online services

NVIDIA Jetpack 4.3
YOLOV3
OpenCV
OpenCV
SMS Messaging API
Twilio SMS Messaging API
Arduino IDE
Arduino IDE
Cloudmqtt

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Solder Wire, Lead Free
Solder Wire, Lead Free
PCB, For DMB-4775
PCB, For DMB-4775
Wire Stripper & Cutter, 18-10 AWG / 0.75-4mm² Capacity Wires
Wire Stripper & Cutter, 18-10 AWG / 0.75-4mm² Capacity Wires
Solder Paste, Tub
Solder Paste, Tub

Story

Read more

Schematics

Blind Spot

Oled ESP32

Camera AOV

System Diagram

Sheme Nvidia

I2C Jetson

Code

Yolo.py

Python
# -*- coding: utf-8 -*-
"""
@author: ALEX
"""
import numpy as np
import argparse
import time
import cv2
import os
import paho.mqtt.client as paho

# This function trigger if the client connected
def on_connect(client, userdata, flags, rc):
    print("Connection returned result: " + str(rc) )
    #client.subscribe("#" , 1 ) # Wild Card

# This function trigger every time we receive a message from the platform
def on_message(client, userdata, msg):
    print("topic: "+msg.topic)
    print("payload: "+str(msg.payload))
    
# This function trigger when we publish  
def on_publish(client, obj, mid):
    print("mid: " + str(mid))
    
# This function trigger when we subscribe to a new topic  
def on_subscribe(client, obj, mid, granted_qos):
    print("Subscribed: " + str(mid) + " " + str(granted_qos))

# load the COCO class labels our YOLO model was trained on
labelsPath = "yolo-coco/coco.names"
LABELS = open(labelsPath).read().strip().split("\n")

#objects=[70,200,120,50] #person:70, cars:220, motorcycle:120, dogs:50

# Approximate width of the objects to calculate the distance in centimeters.

objects=[70,220,120,50] #person:70, cars:220, motorcycle:120, dogs:50

# initialize a list of colors to represent each possible class label
np.random.seed(42)
COLORS = np.random.randint(0, 255, size=(len(LABELS), 3), dtype="uint8")

# derive the paths to the YOLO weights and model configuration
weightsPath = "yolo-coco/yolov3.weights"
configPath = "yolo-coco/yolov3.cfg"

# load our YOLO object detector trained on COCO dataset (80 classes)
print("[INFO] loading YOLO from disk...")
net = cv2.dnn.readNetFromDarknet(configPath, weightsPath)

# load our input image and grab its spatial dimensions
cap = cv2.VideoCapture(0)
cap.set(cv2.CAP_PROP_EXPOSURE,-10)

# MQTT Start

mqttc = paho.Client()
mqttc.on_connect = on_connect
mqttc.on_message = on_message
mqttc.on_publish = on_publish
mqttc.on_subscribe = on_subscribe
mqttc.username_pw_set("USER", "PASSWORD")
mqttc.connect("URL", PORT, keepalive=60)
rc = 0

while 1:
    # Mqtt Client loop
    mqttc.loop()
    # Take Image From Camera
    ret, image = cap.read()
    # Saving the image
    cv2.imwrite('image.jpg', image)
    # Open Again the image
    image = cv2.imread("image.jpg")
    # Obtaining the Height and Width 
    (H, W) = image.shape[:2]

    # determine only the *output* layer names that we need from YOLO
    ln = net.getLayerNames()
    ln = [ln[i[0] - 1] for i in net.getUnconnectedOutLayers()]

    # construct a blob from the input image and then perform a forward
    # pass of the YOLO object detector, giving us our bounding boxes and
    # associated probabilities
    blob = cv2.dnn.blobFromImage(image, 1 / 255.0, (416, 416),
     swapRB=True, crop=False)
    net.setInput(blob)
    start = time.time()
    layerOutputs = net.forward(ln)
    end = time.time()

    # show timing information on YOLO
    print("[INFO] YOLO took {:.6f} seconds".format(end - start))

    # initialize our lists of detected bounding boxes, confidences, and
    # class IDs, respectively
    boxes = []
    confidences = []
    classIDs = []

    # loop over each of the layer outputs
    for output in layerOutputs:
        # loop over each of the detections
        for detection in output:
            # extract the class ID and confidence (i.e., probability) of
            # the current object detection
            scores = detection[5:]
            classID = np.argmax(scores)
            confidence = scores[classID]

            # filter out weak predictions by ensuring the detected
            # probability is greater than the minimum probability
            if confidence > 0.5:
                # scale the bounding box coordinates back relative to the
                # size of the image, keeping in mind that YOLO actually
                # returns the center (x, y)-coordinates of the bounding
                # box followed by the boxes' width and height
                box = detection[0:4] * np.array([W, H, W, H])
                (centerX, centerY, width, height) = box.astype("int")

                # use the center (x, y)-coordinates to derive the top and
                # and left corner of the bounding box
                x = int(centerX - (width / 2))
                y = int(centerY - (height / 2))

                # update our list of bounding box coordinates, confidences,
                # and class IDs
                boxes.append([x, y, int(width), int(height)])
                confidences.append(float(confidence))
                classIDs.append(classID)

    # apply non-maxima suppression to suppress weak, overlapping bounding
    # boxes
    idxs = cv2.dnn.NMSBoxes(boxes, confidences, 0.5,
        0.3)

    ## suppressing the labels that don't interest us 
    distance=100000
    distancemem=100000
    labelmem=""
    labelmod=""
    pos=""

    # ensure at least one detection exists
    if len(idxs) > 0:
        # loop over the indexes we are keeping
        for i in idxs.flatten():
            # extract the bounding box coordinates
            (x, y) = (boxes[i][0], boxes[i][1])
            (w, h) = (boxes[i][2], boxes[i][3])
            # draw a bounding box rectangle and label on the image
            color = [int(c) for c in COLORS[classIDs[i]]]
            cv2.rectangle(image, (x, y), (x + w, y + h), color, 2)
            height, width, channels = image.shape

            # Calculating on which side of the screen the object is

            if((width/2)<(x+(w/2))):
                pos="1"
            else:
                pos="0"

            # Checking if the label that the model sees is one of those that interest us

            if(LABELS[classIDs[i]]=="motorbike"):
                check=objects[2]
                labelmem="m"+pos
            elif(LABELS[classIDs[i]]=="dog"):
                check=objects[3]
                labelmem="d"+pos
            elif(LABELS[classIDs[i]]=="person"):
                check=objects[0]
                labelmem="p"+pos
            elif(LABELS[classIDs[i]]=="car"):
                check=objects[1]
                labelmem="c"+pos
            else:
                check = 1000

            # Calculating the distance with the algorithm explaining in Hackster

            distance=(check*16)/(19*(w/width))
            if(distance<distancemem):
                # Checking if the object is less than 3 meters from our car.
                if(300>distance):
                    distancemem=distance
                    labelmod = labelmem
                    print(LABELS[classIDs[i]])
            text = "{}: {}: {:.4f}".format(LABELS[classIDs[i]],str(distance), confidences[i])
            cv2.putText(image, text, (x, y - 5), cv2.FONT_HERSHEY_SIMPLEX,
                0.5, color, 2)

    # Sending the object that is nearby or a blank screen

    mqttc.publish('inTopic', labelmod)

    # Saving the processed image
    cv2.imwrite('process.jpg', image)
    
cap.release()
cv2.destroyAllWindows()

Haarcascade Eye

XML
<?xml version="1.0"?>
<!--
    Stump-based 20x20 frontal eye detector.
    Created by Shameem Hameed (http://umich.edu/~shameem)

////////////////////////////////////////////////////////////////////////////////////////

  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.

  By downloading, copying, installing or using the software you agree to this license.
  If you do not agree to this license, do not download, install,
  copy or use the software.


                        Intel License Agreement
                For Open Source Computer Vision Library

 Copyright (C) 2000, Intel Corporation, all rights reserved.
 Third party copyrights are property of their respective owners.

 Redistribution and use in source and binary forms, with or without modification,
 are permitted provided that the following conditions are met:

   * Redistribution's of source code must retain the above copyright notice,
     this list of conditions and the following disclaimer.

   * Redistribution's in binary form must reproduce the above copyright notice,
     this list of conditions and the following disclaimer in the documentation
     and/or other materials provided with the distribution.

   * The name of Intel Corporation may not be used to endorse or promote products
     derived from this software without specific prior written permission.

 This software is provided by the copyright holders and contributors "as is" and
 any express or implied warranties, including, but not limited to, the implied
 warranties of merchantability and fitness for a particular purpose are disclaimed.
 In no event shall the Intel Corporation or contributors be liable for any direct,
 indirect, incidental, special, exemplary, or consequential damages
 (including, but not limited to, procurement of substitute goods or services;
 loss of use, data, or profits; or business interruption) however caused
 and on any theory of liability, whether in contract, strict liability,
 or tort (including negligence or otherwise) arising in any way out of
 the use of this software, even if advised of the possibility of such damage.
-->
<opencv_storage>
<cascade type_id="opencv-cascade-classifier"><stageType>BOOST</stageType>
  <featureType>HAAR</featureType>
  <height>20</height>
  <width>20</width>
  <stageParams>
    <maxWeakCount>93</maxWeakCount></stageParams>
  <featureParams>
    <maxCatCount>0</maxCatCount></featureParams>
  <stageNum>24</stageNum>
  <stages>
    <_>
      <maxWeakCount>6</maxWeakCount>
      <stageThreshold>-1.4562760591506958e+00</stageThreshold>
      <weakClassifiers>
        <_>
          <internalNodes>
            0 -1 0 1.2963959574699402e-01</internalNodes>
          <leafValues>
            -7.7304208278656006e-01 6.8350148200988770e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 1 -4.6326808631420135e-02</internalNodes>
          <leafValues>
            5.7352751493453979e-01 -4.9097689986228943e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 2 -1.6173090785741806e-02</internalNodes>
          <leafValues>
            6.0254341363906860e-01 -3.1610709428787231e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 3 -4.5828841626644135e-02</internalNodes>
          <leafValues>
            6.4177548885345459e-01 -1.5545040369033813e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 4 -5.3759619593620300e-02</internalNodes>
          <leafValues>
            5.4219317436218262e-01 -2.0480829477310181e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 5 3.4171190112829208e-02</internalNodes>
          <leafValues>
            -2.3388190567493439e-01 4.8410901427268982e-01</leafValues></_></weakClassifiers></_>
    <_>
      <maxWeakCount>12</maxWeakCount>
      <stageThreshold>-1.2550230026245117e+00</stageThreshold>
      <weakClassifiers>
        <_>
          <internalNodes>
            0 -1 6 -2.1727620065212250e-01</internalNodes>
          <leafValues>
            7.1098899841308594e-01 -5.9360730648040771e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 7 1.2071969918906689e-02</internalNodes>
          <leafValues>
            -2.8240481019020081e-01 5.9013551473617554e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 8 -1.7854139208793640e-02</internalNodes>
          <leafValues>
            5.3137522935867310e-01 -2.2758960723876953e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 9 2.2333610802888870e-02</internalNodes>
          <leafValues>
            -1.7556099593639374e-01 6.3356137275695801e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 10 -9.1420017182826996e-02</internalNodes>
          <leafValues>
            6.1563092470169067e-01 -1.6899530589580536e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 11 2.8973650187253952e-02</internalNodes>
          <leafValues>
            -1.2250079959630966e-01 7.4401170015335083e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 12 7.8203463926911354e-03</internalNodes>
          <leafValues>
            1.6974370181560516e-01 -6.5441650152206421e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 13 2.0340489223599434e-02</internalNodes>
          <leafValues>
            -1.2556649744510651e-01 8.2710450887680054e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 14 -1.1926149949431419e-02</internalNodes>
          <leafValues>
            3.8605681061744690e-01 -2.0992340147495270e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 15 -9.7281101625412703e-04</internalNodes>
          <leafValues>
            -6.3761192560195923e-01 1.2952390313148499e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 16 1.8322050891583785e-05</internalNodes>
          <leafValues>
            -3.4631478786468506e-01 2.2924269735813141e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 17 -8.0854417756199837e-03</internalNodes>
          <leafValues>
            -6.3665801286697388e-01 1.3078659772872925e-01</leafValues></_></weakClassifiers></_>
    <_>
      <maxWeakCount>9</maxWeakCount>
      <stageThreshold>-1.3728189468383789e+00</stageThreshold>
      <weakClassifiers>
        <_>
          <internalNodes>
            0 -1 18 -1.1812269687652588e-01</internalNodes>
          <leafValues>
            6.7844521999359131e-01 -5.0045782327651978e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 19 -3.4332759678363800e-02</internalNodes>
          <leafValues>
            6.7186361551284790e-01 -3.5744878649711609e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 20 -2.1530799567699432e-02</internalNodes>
          <leafValues>
            7.2220700979232788e-01 -1.8192419409751892e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 21 -2.1909970790147781e-02</internalNodes>
          <leafValues>
            6.6529387235641479e-01 -2.7510228753089905e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 22 -2.8713539242744446e-02</internalNodes>
          <leafValues>
            6.9955700635910034e-01 -1.9615580141544342e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 23 -1.1467480100691319e-02</internalNodes>
          <leafValues>
            5.9267348051071167e-01 -2.2097350656986237e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 24 -2.2611169144511223e-02</internalNodes>
          <leafValues>
            3.4483069181442261e-01 -3.8379558920860291e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 25 -1.9308089977130294e-03</internalNodes>
          <leafValues>
            -7.9445719718933105e-01 1.5628659725189209e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 26 5.6419910833938047e-05</internalNodes>
          <leafValues>
            -3.0896010994911194e-01 3.5431089997291565e-01</leafValues></_></weakClassifiers></_>
    <_>
      <maxWeakCount>16</maxWeakCount>
      <stageThreshold>-1.2879480123519897e+00</stageThreshold>
      <weakClassifiers>
        <_>
          <internalNodes>
            0 -1 27 1.9886520504951477e-01</internalNodes>
          <leafValues>
            -5.2860701084136963e-01 3.5536721348762512e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 28 -3.6008939146995544e-02</internalNodes>
          <leafValues>
            4.2109689116477966e-01 -3.9348980784416199e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 29 -7.7569849789142609e-02</internalNodes>
          <leafValues>
            4.7991541028022766e-01 -2.5122168660163879e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 30 8.2630853285081685e-05</internalNodes>
          <leafValues>
            -3.8475489616394043e-01 3.1849220395088196e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 31 3.2773229759186506e-04</internalNodes>
          <leafValues>
            -2.6427319645881653e-01 3.2547241449356079e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 32 -1.8574850633740425e-02</internalNodes>
          <leafValues>
            4.6736589074134827e-01 -1.5067270398139954e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 33 -7.0008762122597545e-05</internalNodes>
          <leafValues>
            2.9313150048255920e-01 -2.5365099310874939e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 34 -1.8552130088210106e-02</internalNodes>
          <leafValues>
            4.6273660659790039e-01 -1.3148050010204315e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 35 -1.3030420057475567e-02</internalNodes>
          <leafValues>
            4.1627219319343567e-01 -1.7751489579677582e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 36 6.5694141085259616e-05</internalNodes>
          <leafValues>
            -2.8035101294517517e-01 2.6680740714073181e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 37 1.7005260451696813e-04</internalNodes>
          <leafValues>
            -2.7027249336242676e-01 2.3981650173664093e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 38 -3.3129199873656034e-03</internalNodes>
          <leafValues>
            4.4411438703536987e-01 -1.4428889751434326e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 39 1.7583490116521716e-03</internalNodes>
          <leafValues>
            -1.6126190125942230e-01 4.2940768599510193e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 40 -2.5194749236106873e-02</internalNodes>
          <leafValues>
            4.0687298774719238e-01 -1.8202580511569977e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 41 1.4031709870323539e-03</internalNodes>
          <leafValues>
            8.4759786725044250e-02 -8.0018568038940430e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 42 -7.3991729877889156e-03</internalNodes>
          <leafValues>
            5.5766099691390991e-01 -1.1843159794807434e-01</leafValues></_></weakClassifiers></_>
    <_>
      <maxWeakCount>23</maxWeakCount>
      <stageThreshold>-1.2179850339889526e+00</stageThreshold>
      <weakClassifiers>
        <_>
          <internalNodes>
            0 -1 43 -2.9943080618977547e-02</internalNodes>
          <leafValues>
            3.5810810327529907e-01 -3.8487631082534790e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 44 -1.2567380070686340e-01</internalNodes>
          <leafValues>
            3.9316931366920471e-01 -3.0012258887290955e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 45 5.3635272197425365e-03</internalNodes>
          <leafValues>
            -4.3908619880676270e-01 1.9257010519504547e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 46 -8.0971820279955864e-03</internalNodes>
          <leafValues>
            3.9906668663024902e-01 -2.3407870531082153e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 47 -1.6597909852862358e-02</internalNodes>
          <leafValues>
            4.2095288634300232e-01 -2.2674840688705444e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 48 -2.0199299324303865e-03</internalNodes>
          <leafValues>
            -7.4156731367111206e-01 1.2601189315319061e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 49 -1.5202340437099338e-03</internalNodes>
          <leafValues>
            -7.6154601573944092e-01 8.6373612284660339e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 50 -4.9663940444588661e-03</internalNodes>
          <leafValues>
            4.2182239890098572e-01 -1.7904919385910034e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 51 -1.9207600504159927e-02</internalNodes>
          <leafValues>
            4.6894899010658264e-01 -1.4378750324249268e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 52 -1.2222680263221264e-02</internalNodes>
          <leafValues>
            3.2842078804969788e-01 -2.1802149713039398e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 53 5.7548668235540390e-02</internalNodes>
          <leafValues>
            -3.6768808960914612e-01 2.4357110261917114e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 54 -9.5794079825282097e-03</internalNodes>
          <leafValues>
            -7.2245067358016968e-01 6.3664563000202179e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 55 -2.9545740690082312e-03</internalNodes>
          <leafValues>
            3.5846439003944397e-01 -1.6696329414844513e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 56 -4.2017991654574871e-03</internalNodes>
          <leafValues>
            3.9094808697700500e-01 -1.2041790038347244e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 57 -1.3624990358948708e-02</internalNodes>
          <leafValues>
            -5.8767718076705933e-01 8.8404729962348938e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 58 6.2853112467564642e-05</internalNodes>
          <leafValues>
            -2.6348459720611572e-01 2.1419279277324677e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 59 -2.6782939676195383e-03</internalNodes>
          <leafValues>
            -7.8390169143676758e-01 8.0526962876319885e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 60 -7.0597179234027863e-02</internalNodes>
          <leafValues>
            4.1469261050224304e-01 -1.3989959657192230e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 61 9.2093646526336670e-02</internalNodes>
          <leafValues>
            -1.3055180013179779e-01 5.0435781478881836e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 62 -8.8004386052489281e-03</internalNodes>
          <leafValues>
            3.6609750986099243e-01 -1.4036649465560913e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 63 7.5080977694597095e-05</internalNodes>
          <leafValues>
            -2.9704439640045166e-01 2.0702940225601196e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 64 -2.9870450962334871e-03</internalNodes>
          <leafValues>
            3.5615700483322144e-01 -1.5445969998836517e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 65 -2.6441509835422039e-03</internalNodes>
          <leafValues>
            -5.4353517293930054e-01 1.0295110195875168e-01</leafValues></_></weakClassifiers></_>
    <_>
      <maxWeakCount>27</maxWeakCount>
      <stageThreshold>-1.2905240058898926e+00</stageThreshold>
      <weakClassifiers>
        <_>
          <internalNodes>
            0 -1 66 -4.7862470149993896e-02</internalNodes>
          <leafValues>
            4.1528239846229553e-01 -3.4185820817947388e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 67 8.7350532412528992e-02</internalNodes>
          <leafValues>
            -3.8749781250953674e-01 2.4204200506210327e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 68 -1.6849499195814133e-02</internalNodes>
          <leafValues>
            5.3082478046417236e-01 -1.7282910645008087e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 69 -2.8870029374957085e-02</internalNodes>
          <leafValues>
            3.5843509435653687e-01 -2.2402590513229370e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 70 2.5679389946162701e-03</internalNodes>
          <leafValues>
            1.4990499615669250e-01 -6.5609407424926758e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 71 -2.4116659536957741e-02</internalNodes>
          <leafValues>
            5.5889678001403809e-01 -1.4810280501842499e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 72 -3.2826658338308334e-02</internalNodes>
          <leafValues>
            4.6468681097030640e-01 -1.0785529762506485e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 73 -1.5233060345053673e-02</internalNodes>
          <leafValues>
            -7.3954427242279053e-01 5.6236881762742996e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 74 -3.0209511169232428e-04</internalNodes>
          <leafValues>
            -4.5548820495605469e-01 9.7069837152957916e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 75 7.5365108205005527e-04</internalNodes>
          <leafValues>
            9.5147296786308289e-02 -5.4895019531250000e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 76 -1.0638950392603874e-02</internalNodes>
          <leafValues>
            4.0912970900535583e-01 -1.2308409810066223e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 77 -7.5217830017209053e-03</internalNodes>
          <leafValues>
            4.0289148688316345e-01 -1.6048780083656311e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 78 -1.0677099972963333e-01</internalNodes>
          <leafValues>
            6.1759322881698608e-01 -7.3091186583042145e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 79 1.6256919130682945e-02</internalNodes>
          <leafValues>
            -1.3103680312633514e-01 3.7453651428222656e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 80 -2.0679360255599022e-02</internalNodes>
          <leafValues>
            -7.1402907371520996e-01 5.2390009164810181e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 81 1.7052369192242622e-02</internalNodes>
          <leafValues>
            1.2822860479354858e-01 -3.1080681085586548e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 82 -5.7122060097754002e-03</internalNodes>
          <leafValues>
            -6.0556507110595703e-01 8.1884756684303284e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 83 2.0851430235779844e-05</internalNodes>
          <leafValues>
            -2.6812988519668579e-01 1.4453840255737305e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 84 7.9284431412816048e-03</internalNodes>
          <leafValues>
            -7.8795351088047028e-02 5.6762582063674927e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 85 -2.5217379443347454e-03</internalNodes>
          <leafValues>
            3.7068629264831543e-01 -1.3620570302009583e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 86 -2.2426199167966843e-02</internalNodes>
          <leafValues>
            -6.8704998493194580e-01 5.1062859594821930e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 87 -7.6451441273093224e-03</internalNodes>
          <leafValues>
            2.3492220044136047e-01 -1.7905959486961365e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 88 -1.1175329564139247e-03</internalNodes>
          <leafValues>
            -5.9869050979614258e-01 7.4324436485767365e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 89 1.9212789833545685e-02</internalNodes>
          <leafValues>
            -1.5702550113201141e-01 2.9737469553947449e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 90 5.6293429806828499e-03</internalNodes>
          <leafValues>
            -9.9769018590450287e-02 4.2130270600318909e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 91 -9.5671862363815308e-03</internalNodes>
          <leafValues>
            -6.0858798027038574e-01 7.3506258428096771e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 92 1.1217960156500340e-02</internalNodes>
          <leafValues>
            -1.0320810228586197e-01 4.1909849643707275e-01</leafValues></_></weakClassifiers></_>
    <_>
      <maxWeakCount>28</maxWeakCount>
      <stageThreshold>-1.1600480079650879e+00</stageThreshold>
      <weakClassifiers>
        <_>
          <internalNodes>
            0 -1 93 -1.7486440017819405e-02</internalNodes>
          <leafValues>
            3.1307280063629150e-01 -3.3681181073188782e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 94 3.0714649707078934e-02</internalNodes>
          <leafValues>
            -1.8766190111637115e-01 5.3780800104141235e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 95 -2.2188719362020493e-02</internalNodes>
          <leafValues>
            3.6637881398200989e-01 -1.6124810278415680e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 96 -5.0700771680567414e-05</internalNodes>
          <leafValues>
            2.1245710551738739e-01 -2.8444620966911316e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 97 -7.0170420221984386e-03</internalNodes>
          <leafValues>
            3.9543110132217407e-01 -1.3173590600490570e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 98 -6.8563609384000301e-03</internalNodes>
          <leafValues>
            3.0373859405517578e-01 -2.0657819509506226e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 99 -1.4129259623587132e-02</internalNodes>
          <leafValues>
            -7.6503008604049683e-01 9.8213188350200653e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 100 -4.7915481030941010e-02</internalNodes>
          <leafValues>
            4.8307389020919800e-01 -1.3006809353828430e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 101 4.7032979637151584e-05</internalNodes>
          <leafValues>
            -2.5216570496559143e-01 2.4386680126190186e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 102 1.0221180273219943e-03</internalNodes>
          <leafValues>
            6.8857602775096893e-02 -6.5861141681671143e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 103 -2.6056109927594662e-03</internalNodes>
          <leafValues>
            4.2942029237747192e-01 -1.3022460043430328e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 104 5.4505340813193470e-05</internalNodes>
          <leafValues>
            -1.9288620352745056e-01 2.8958499431610107e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 105 -6.6721157054416835e-05</internalNodes>
          <leafValues>
            3.0290710926055908e-01 -1.9854369759559631e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 106 2.6281431317329407e-01</internalNodes>
          <leafValues>
            -2.3293940722942352e-01 2.3692460358142853e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 107 -2.3569669574499130e-02</internalNodes>
          <leafValues>
            1.9401040673255920e-01 -2.8484618663787842e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 108 -3.9120172150433064e-03</internalNodes>
          <leafValues>
            5.5378979444503784e-01 -9.5665678381919861e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 109 5.0788799853762612e-05</internalNodes>
          <leafValues>
            -2.3912659287452698e-01 2.1799489855766296e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 110 -7.8732017427682877e-03</internalNodes>
          <leafValues>
            4.0697428584098816e-01 -1.2768040597438812e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 111 -1.6778609715402126e-03</internalNodes>
          <leafValues>
            -5.7744657993316650e-01 9.7324788570404053e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 112 -2.6832430739887059e-04</internalNodes>
          <leafValues>
            2.9021880030632019e-01 -1.6831269860267639e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 113 7.8687182394787669e-05</internalNodes>
          <leafValues>
            -1.9551570713520050e-01 2.7720969915390015e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 114 1.2953500263392925e-02</internalNodes>
          <leafValues>
            -9.6838317811489105e-02 4.0323871374130249e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 115 -1.3043959625065327e-02</internalNodes>
          <leafValues>
            4.7198569774627686e-01 -8.9287549257278442e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 116 3.0261781066656113e-03</internalNodes>
          <leafValues>
            -1.3623380661010742e-01 3.0686271190643311e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 117 -6.0438038781285286e-03</internalNodes>
          <leafValues>
            -7.7954101562500000e-01 5.7316310703754425e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 118 -2.2507249377667904e-03</internalNodes>
          <leafValues>
            3.0877059698104858e-01 -1.5006309747695923e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 119 1.5826810151338577e-02</internalNodes>
          <leafValues>
            6.4551889896392822e-02 -7.2455567121505737e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 120 6.5864507632795721e-05</internalNodes>
          <leafValues>
            -1.7598840594291687e-01 2.3210389912128448e-01</leafValues></_></weakClassifiers></_>
    <_>
      <maxWeakCount>36</maxWeakCount>
      <stageThreshold>-1.2257250547409058e+00</stageThreshold>
      <weakClassifiers>
        <_>
          <internalNodes>
            0 -1 121 -2.7854869142174721e-02</internalNodes>
          <leafValues>
            4.5518448948860168e-01 -1.8099910020828247e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 122 1.2895040214061737e-01</internalNodes>
          <leafValues>
            -5.2565532922744751e-01 1.6188900172710419e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 123 2.4403180927038193e-02</internalNodes>
          <leafValues>
            -1.4974960684776306e-01 4.2357379198074341e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 124 -2.4458570405840874e-03</internalNodes>
          <leafValues>
            3.2948669791221619e-01 -1.7447690665721893e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 125 -3.5336529836058617e-03</internalNodes>
          <leafValues>
            4.7426640987396240e-01 -7.3618359863758087e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 126 5.1358150813030079e-05</internalNodes>
          <leafValues>
            -3.0421930551528931e-01 1.5633270144462585e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 127 -1.6225680708885193e-02</internalNodes>
          <leafValues>
            2.3002180457115173e-01 -2.0359820127487183e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 128 -4.6007009223103523e-03</internalNodes>
          <leafValues>
            4.0459269285202026e-01 -1.3485440611839294e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 129 -2.1928999572992325e-02</internalNodes>
          <leafValues>
            -6.8724489212036133e-01 8.0684266984462738e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 130 -2.8971210122108459e-03</internalNodes>
          <leafValues>
            -6.9619607925415039e-01 4.8545219004154205e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 131 -4.4074649922549725e-03</internalNodes>
          <leafValues>
            2.5166261196136475e-01 -1.6236649453639984e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 132 2.8437169268727303e-02</internalNodes>
          <leafValues>
            6.0394261032342911e-02 -6.6744458675384521e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 133 8.3212882280349731e-02</internalNodes>
          <leafValues>
            6.4357921481132507e-02 -5.3626042604446411e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 134 -1.2419329956173897e-02</internalNodes>
          <leafValues>
            -7.0816862583160400e-01 5.7526610791683197e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 135 -4.6992599964141846e-03</internalNodes>
          <leafValues>
            5.1254332065582275e-01 -8.7350800633430481e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 136 -7.8025809489190578e-04</internalNodes>
          <leafValues>
            2.6687660813331604e-01 -1.7961509525775909e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 137 -1.9724339246749878e-02</internalNodes>
          <leafValues>
            -6.7563730478286743e-01 7.2941906750202179e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 138 1.0269250487908721e-03</internalNodes>
          <leafValues>
            5.3919319063425064e-02 -5.5540180206298828e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 139 -2.5957189500331879e-02</internalNodes>
          <leafValues>
            5.6362527608871460e-01 -7.1898393332958221e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 140 -1.2552699772641063e-03</internalNodes>
          <leafValues>
            -5.0346630811691284e-01 8.9691452682018280e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 141 -4.9970578402280807e-02</internalNodes>
          <leafValues>
            1.7685119807720184e-01 -2.2301959991455078e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 142 -2.9899610672146082e-03</internalNodes>
          <leafValues>
            3.9122420549392700e-01 -1.0149750113487244e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 143 4.8546842299401760e-03</internalNodes>
          <leafValues>
            -1.1770179867744446e-01 4.2190939188003540e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 144 1.0448860120959580e-04</internalNodes>
          <leafValues>
            -1.7333979904651642e-01 2.2344440221786499e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 145 5.9689260524464771e-05</internalNodes>
          <leafValues>
            -2.3409630358219147e-01 1.6558240354061127e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 146 -1.3423919677734375e-02</internalNodes>
          <leafValues>
            4.3023818731307983e-01 -9.9723652005195618e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 147 2.2581999655812979e-03</internalNodes>
          <leafValues>
            7.2720989584922791e-02 -5.7501018047332764e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 148 -1.2546280398964882e-02</internalNodes>
          <leafValues>
            3.6184579133987427e-01 -1.1457010358572006e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 149 -2.8705769218504429e-03</internalNodes>
          <leafValues>
            2.8210538625717163e-01 -1.2367550283670425e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 150 1.9785640761256218e-02</internalNodes>
          <leafValues>
            4.7876749187707901e-02 -8.0666238069534302e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 151 4.7588930465281010e-03</internalNodes>
          <leafValues>
            -1.0925389826297760e-01 3.3746978640556335e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 152 -6.9974269717931747e-03</internalNodes>
          <leafValues>
            -8.0295938253402710e-01 4.5706700533628464e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 153 -1.3033480383455753e-02</internalNodes>
          <leafValues>
            1.8680439889431000e-01 -1.7688910663127899e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 154 -1.3742579612880945e-03</internalNodes>
          <leafValues>
            2.7725479006767273e-01 -1.2809009850025177e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 155 2.7657810132950544e-03</internalNodes>
          <leafValues>
            9.0758942067623138e-02 -4.2594739794731140e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 156 2.8941841446794569e-04</internalNodes>
          <leafValues>
            -3.8816329836845398e-01 8.9267797768115997e-02</leafValues></_></weakClassifiers></_>
    <_>
      <maxWeakCount>47</maxWeakCount>
      <stageThreshold>-1.2863140106201172e+00</stageThreshold>
      <weakClassifiers>
        <_>
          <internalNodes>
            0 -1 157 -1.4469229616224766e-02</internalNodes>
          <leafValues>
            3.7507829070091248e-01 -2.4928289651870728e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 158 -1.3317629694938660e-01</internalNodes>
          <leafValues>
            3.0166378617286682e-01 -2.2414070367813110e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 159 -1.0132160037755966e-02</internalNodes>
          <leafValues>
            3.6985591053962708e-01 -1.7850010097026825e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 160 -7.8511182218790054e-03</internalNodes>
          <leafValues>
            4.6086761355400085e-01 -1.2931390106678009e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 161 -1.4295839704573154e-02</internalNodes>
          <leafValues>
            4.4841429591178894e-01 -1.0226240009069443e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 162 -5.9606940485537052e-03</internalNodes>
          <leafValues>
            2.7927988767623901e-01 -1.5323829650878906e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 163 1.0932769626379013e-02</internalNodes>
          <leafValues>
            -1.5141740441322327e-01 3.9889648556709290e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 164 5.0430990086169913e-05</internalNodes>
          <leafValues>
            -2.2681570053100586e-01 2.1644389629364014e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 165 -5.8431681245565414e-03</internalNodes>
          <leafValues>
            4.5420148968696594e-01 -1.2587159872055054e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 166 -2.2346209734678268e-02</internalNodes>
          <leafValues>
            -6.2690192461013794e-01 8.2403123378753662e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 167 -4.8836669884622097e-03</internalNodes>
          <leafValues>
            2.6359251141548157e-01 -1.4686630666255951e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 168 7.5506002758629620e-05</internalNodes>
          <leafValues>
            -2.4507020413875580e-01 1.6678880155086517e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 169 -4.9026997294276953e-04</internalNodes>
          <leafValues>
            -4.2649960517883301e-01 8.9973561465740204e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 170 1.4861579984426498e-03</internalNodes>
          <leafValues>
            -1.2040250003337860e-01 3.0097651481628418e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 171 -1.1988339945673943e-02</internalNodes>
          <leafValues>
            2.7852478623390198e-01 -1.2244340032339096e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 172 1.0502239689230919e-02</internalNodes>
          <leafValues>
            4.0452759712934494e-02 -7.4050408601760864e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 173 -3.0963009223341942e-02</internalNodes>
          <leafValues>
            -6.2842690944671631e-01 4.8013761639595032e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 174 1.1414520442485809e-02</internalNodes>
          <leafValues>
            3.9405211806297302e-02 -7.1674120426177979e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 175 -1.2337000109255314e-02</internalNodes>
          <leafValues>
            1.9941329956054688e-01 -1.9274300336837769e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 176 -5.9942267835140228e-03</internalNodes>
          <leafValues>
            5.1318162679672241e-01 -6.1658058315515518e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 177 -1.1923230485990644e-03</internalNodes>
          <leafValues>
            -7.2605299949645996e-01 5.0652720034122467e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 178 -7.4582789093255997e-03</internalNodes>
          <leafValues>
            2.9603078961372375e-01 -1.1754789948463440e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 179 2.7877509128302336e-03</internalNodes>
          <leafValues>
            4.5068711042404175e-02 -6.9535410404205322e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 180 -2.2503209766000509e-04</internalNodes>
          <leafValues>
            2.0047250390052795e-01 -1.5775249898433685e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 181 -5.0367889925837517e-03</internalNodes>
          <leafValues>
...

This file has been truncated, please download it to see its full contents.

Haarcascade Face

XML
<?xml version="1.0"?>
<!--
    Stump-based 24x24 discrete(?) adaboost frontal face detector.
    Created by Rainer Lienhart.

////////////////////////////////////////////////////////////////////////////////////////

  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.

  By downloading, copying, installing or using the software you agree to this license.
  If you do not agree to this license, do not download, install,
  copy or use the software.


                        Intel License Agreement
                For Open Source Computer Vision Library

 Copyright (C) 2000, Intel Corporation, all rights reserved.
 Third party copyrights are property of their respective owners.

 Redistribution and use in source and binary forms, with or without modification,
 are permitted provided that the following conditions are met:

   * Redistribution's of source code must retain the above copyright notice,
     this list of conditions and the following disclaimer.

   * Redistribution's in binary form must reproduce the above copyright notice,
     this list of conditions and the following disclaimer in the documentation
     and/or other materials provided with the distribution.

   * The name of Intel Corporation may not be used to endorse or promote products
     derived from this software without specific prior written permission.

 This software is provided by the copyright holders and contributors "as is" and
 any express or implied warranties, including, but not limited to, the implied
 warranties of merchantability and fitness for a particular purpose are disclaimed.
 In no event shall the Intel Corporation or contributors be liable for any direct,
 indirect, incidental, special, exemplary, or consequential damages
 (including, but not limited to, procurement of substitute goods or services;
 loss of use, data, or profits; or business interruption) however caused
 and on any theory of liability, whether in contract, strict liability,
 or tort (including negligence or otherwise) arising in any way out of
 the use of this software, even if advised of the possibility of such damage.
-->
<opencv_storage>
<cascade type_id="opencv-cascade-classifier"><stageType>BOOST</stageType>
  <featureType>HAAR</featureType>
  <height>24</height>
  <width>24</width>
  <stageParams>
    <maxWeakCount>211</maxWeakCount></stageParams>
  <featureParams>
    <maxCatCount>0</maxCatCount></featureParams>
  <stageNum>25</stageNum>
  <stages>
    <_>
      <maxWeakCount>9</maxWeakCount>
      <stageThreshold>-5.0425500869750977e+00</stageThreshold>
      <weakClassifiers>
        <_>
          <internalNodes>
            0 -1 0 -3.1511999666690826e-02</internalNodes>
          <leafValues>
            2.0875380039215088e+00 -2.2172100543975830e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 1 1.2396000325679779e-02</internalNodes>
          <leafValues>
            -1.8633940219879150e+00 1.3272049427032471e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 2 2.1927999332547188e-02</internalNodes>
          <leafValues>
            -1.5105249881744385e+00 1.0625729560852051e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 3 5.7529998011887074e-03</internalNodes>
          <leafValues>
            -8.7463897466659546e-01 1.1760339736938477e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 4 1.5014000236988068e-02</internalNodes>
          <leafValues>
            -7.7945697307586670e-01 1.2608419656753540e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 5 9.9371001124382019e-02</internalNodes>
          <leafValues>
            5.5751299858093262e-01 -1.8743000030517578e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 6 2.7340000960975885e-03</internalNodes>
          <leafValues>
            -1.6911929845809937e+00 4.4009700417518616e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 7 -1.8859000876545906e-02</internalNodes>
          <leafValues>
            -1.4769539833068848e+00 4.4350099563598633e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 8 5.9739998541772366e-03</internalNodes>
          <leafValues>
            -8.5909199714660645e-01 8.5255599021911621e-01</leafValues></_></weakClassifiers></_>
    <_>
      <maxWeakCount>16</maxWeakCount>
      <stageThreshold>-4.9842400550842285e+00</stageThreshold>
      <weakClassifiers>
        <_>
          <internalNodes>
            0 -1 9 -2.1110000088810921e-02</internalNodes>
          <leafValues>
            1.2435649633407593e+00 -1.5713009834289551e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 10 2.0355999469757080e-02</internalNodes>
          <leafValues>
            -1.6204780340194702e+00 1.1817760467529297e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 11 2.1308999508619308e-02</internalNodes>
          <leafValues>
            -1.9415930509567261e+00 7.0069098472595215e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 12 9.1660000383853912e-02</internalNodes>
          <leafValues>
            -5.5670100450515747e-01 1.7284419536590576e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 13 3.6288000643253326e-02</internalNodes>
          <leafValues>
            2.6763799786567688e-01 -2.1831810474395752e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 14 -1.9109999760985374e-02</internalNodes>
          <leafValues>
            -2.6730210781097412e+00 4.5670801401138306e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 15 8.2539999857544899e-03</internalNodes>
          <leafValues>
            -1.0852910280227661e+00 5.3564202785491943e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 16 1.8355000764131546e-02</internalNodes>
          <leafValues>
            -3.5200199484825134e-01 9.3339198827743530e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 17 -7.0569999516010284e-03</internalNodes>
          <leafValues>
            9.2782098054885864e-01 -6.6349899768829346e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 18 -9.8770000040531158e-03</internalNodes>
          <leafValues>
            1.1577470302581787e+00 -2.9774799942970276e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 19 1.5814000740647316e-02</internalNodes>
          <leafValues>
            -4.1960600018501282e-01 1.3576040267944336e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 20 -2.0700000226497650e-02</internalNodes>
          <leafValues>
            1.4590020179748535e+00 -1.9739399850368500e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 21 -1.3760800659656525e-01</internalNodes>
          <leafValues>
            1.1186759471893311e+00 -5.2915501594543457e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 22 1.4318999834358692e-02</internalNodes>
          <leafValues>
            -3.5127198696136475e-01 1.1440860033035278e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 23 1.0253000073134899e-02</internalNodes>
          <leafValues>
            -6.0850602388381958e-01 7.7098500728607178e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 24 9.1508001089096069e-02</internalNodes>
          <leafValues>
            3.8817799091339111e-01 -1.5122940540313721e+00</leafValues></_></weakClassifiers></_>
    <_>
      <maxWeakCount>27</maxWeakCount>
      <stageThreshold>-4.6551899909973145e+00</stageThreshold>
      <weakClassifiers>
        <_>
          <internalNodes>
            0 -1 25 6.9747000932693481e-02</internalNodes>
          <leafValues>
            -1.0130879878997803e+00 1.4687349796295166e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 26 3.1502999365329742e-02</internalNodes>
          <leafValues>
            -1.6463639736175537e+00 1.0000629425048828e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 27 1.4260999858379364e-02</internalNodes>
          <leafValues>
            4.6480301022529602e-01 -1.5959889888763428e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 28 1.4453000389039516e-02</internalNodes>
          <leafValues>
            -6.5511900186538696e-01 8.3021801710128784e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 29 -3.0509999487549067e-03</internalNodes>
          <leafValues>
            -1.3982310295104980e+00 4.2550599575042725e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 30 3.2722998410463333e-02</internalNodes>
          <leafValues>
            -5.0702601671218872e-01 1.0526109933853149e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 31 -7.2960001416504383e-03</internalNodes>
          <leafValues>
            3.6356899142265320e-01 -1.3464889526367188e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 32 5.0425000488758087e-02</internalNodes>
          <leafValues>
            -3.0461400747299194e-01 1.4504129886627197e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 33 4.6879000961780548e-02</internalNodes>
          <leafValues>
            -4.0286201238632202e-01 1.2145609855651855e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 34 -6.9358997046947479e-02</internalNodes>
          <leafValues>
            1.0539360046386719e+00 -4.5719701051712036e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 35 -4.9033999443054199e-02</internalNodes>
          <leafValues>
            -1.6253089904785156e+00 1.5378999710083008e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 36 8.4827996790409088e-02</internalNodes>
          <leafValues>
            2.8402999043464661e-01 -1.5662059783935547e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 37 -1.7229999648407102e-03</internalNodes>
          <leafValues>
            -1.0147459506988525e+00 2.3294800519943237e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 38 1.1562199890613556e-01</internalNodes>
          <leafValues>
            -1.6732899844646454e-01 1.2804069519042969e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 39 -5.1279999315738678e-02</internalNodes>
          <leafValues>
            1.5162390470504761e+00 -3.0271100997924805e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 40 -4.2706999927759171e-02</internalNodes>
          <leafValues>
            1.7631920576095581e+00 -5.1832001656293869e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 41 3.7178099155426025e-01</internalNodes>
          <leafValues>
            -3.1389200687408447e-01 1.5357979536056519e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 42 1.9412999972701073e-02</internalNodes>
          <leafValues>
            -1.0017599910497665e-01 9.3655401468276978e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 43 1.7439000308513641e-02</internalNodes>
          <leafValues>
            -4.0379899740219116e-01 9.6293002367019653e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 44 3.9638999849557877e-02</internalNodes>
          <leafValues>
            1.7039099335670471e-01 -2.9602990150451660e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 45 -9.1469995677471161e-03</internalNodes>
          <leafValues>
            8.8786798715591431e-01 -4.3818700313568115e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 46 1.7219999572262168e-03</internalNodes>
          <leafValues>
            -3.7218600511550903e-01 4.0018901228904724e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 47 3.0231000855565071e-02</internalNodes>
          <leafValues>
            6.5924003720283508e-02 -2.6469180583953857e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 48 -7.8795999288558960e-02</internalNodes>
          <leafValues>
            -1.7491459846496582e+00 2.8475299477577209e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 49 2.1110000088810921e-03</internalNodes>
          <leafValues>
            -9.3908101320266724e-01 2.3205199837684631e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 50 2.7091000229120255e-02</internalNodes>
          <leafValues>
            -5.2664000540971756e-02 1.0756820440292358e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 51 -4.4964998960494995e-02</internalNodes>
          <leafValues>
            -1.8294479846954346e+00 9.9561996757984161e-02</leafValues></_></weakClassifiers></_>
    <_>
      <maxWeakCount>32</maxWeakCount>
      <stageThreshold>-4.4531588554382324e+00</stageThreshold>
      <weakClassifiers>
        <_>
          <internalNodes>
            0 -1 52 -6.5701000392436981e-02</internalNodes>
          <leafValues>
            1.1558510065078735e+00 -1.0716359615325928e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 53 1.5839999541640282e-02</internalNodes>
          <leafValues>
            -1.5634720325469971e+00 7.6877099275588989e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 54 1.4570899307727814e-01</internalNodes>
          <leafValues>
            -5.7450097799301147e-01 1.3808720111846924e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 55 6.1389999464154243e-03</internalNodes>
          <leafValues>
            -1.4570560455322266e+00 5.1610302925109863e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 56 6.7179999314248562e-03</internalNodes>
          <leafValues>
            -8.3533602952957153e-01 5.8522200584411621e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 57 1.8518000841140747e-02</internalNodes>
          <leafValues>
            -3.1312099099159241e-01 1.1696679592132568e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 58 1.9958000630140305e-02</internalNodes>
          <leafValues>
            -4.3442600965499878e-01 9.5446902513504028e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 59 -2.7755001187324524e-01</internalNodes>
          <leafValues>
            1.4906179904937744e+00 -1.3815900683403015e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 60 9.1859996318817139e-03</internalNodes>
          <leafValues>
            -9.6361500024795532e-01 2.7665498852729797e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 61 -3.7737999111413956e-02</internalNodes>
          <leafValues>
            -2.4464108943939209e+00 2.3619599640369415e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 62 1.8463000655174255e-02</internalNodes>
          <leafValues>
            1.7539200186729431e-01 -1.3423130512237549e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 63 -1.1114999651908875e-02</internalNodes>
          <leafValues>
            4.8710799217224121e-01 -8.9851897954940796e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 64 3.3927999436855316e-02</internalNodes>
          <leafValues>
            1.7874200642108917e-01 -1.6342279911041260e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 65 -3.5649001598358154e-02</internalNodes>
          <leafValues>
            -1.9607399702072144e+00 1.8102499842643738e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 66 -1.1438000015914440e-02</internalNodes>
          <leafValues>
            9.9010699987411499e-01 -3.8103199005126953e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 67 -6.5236002206802368e-02</internalNodes>
          <leafValues>
            -2.5794160366058350e+00 2.4753600358963013e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 68 -4.2272001504898071e-02</internalNodes>
          <leafValues>
            1.4411840438842773e+00 -2.9508298635482788e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 69 1.9219999667257071e-03</internalNodes>
          <leafValues>
            -4.9608600139617920e-01 6.3173598051071167e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 70 -1.2921799719333649e-01</internalNodes>
          <leafValues>
            -2.3314270973205566e+00 5.4496999830007553e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 71 2.2931000217795372e-02</internalNodes>
          <leafValues>
            -8.4447097778320312e-01 3.8738098740577698e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 72 -3.4120000898838043e-02</internalNodes>
          <leafValues>
            -1.4431500434875488e+00 9.8422996699810028e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 73 2.6223000138998032e-02</internalNodes>
          <leafValues>
            1.8223099410533905e-01 -1.2586519718170166e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 74 2.2236999124288559e-02</internalNodes>
          <leafValues>
            6.9807998836040497e-02 -2.3820950984954834e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 75 -5.8240001089870930e-03</internalNodes>
          <leafValues>
            3.9332500100135803e-01 -2.7542799711227417e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 76 4.3653000146150589e-02</internalNodes>
          <leafValues>
            1.4832699298858643e-01 -1.1368780136108398e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 77 5.7266999036073685e-02</internalNodes>
          <leafValues>
            2.4628099799156189e-01 -1.2687400579452515e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 78 2.3409998975694180e-03</internalNodes>
          <leafValues>
            -7.5448900461196899e-01 2.7163800597190857e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 79 1.2996000237762928e-02</internalNodes>
          <leafValues>
            -3.6394900083541870e-01 7.0959198474884033e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 80 -2.6517000049352646e-02</internalNodes>
          <leafValues>
            -2.3221859931945801e+00 3.5744000226259232e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 81 -5.8400002308189869e-03</internalNodes>
          <leafValues>
            4.2194300889968872e-01 -4.8184998333454132e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 82 -1.6568999737501144e-02</internalNodes>
          <leafValues>
            1.1099940538406372e+00 -3.4849700331687927e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 83 -6.8157002329826355e-02</internalNodes>
          <leafValues>
            -3.3269989490509033e+00 2.1299000084400177e-01</leafValues></_></weakClassifiers></_>
    <_>
      <maxWeakCount>52</maxWeakCount>
      <stageThreshold>-4.3864588737487793e+00</stageThreshold>
      <weakClassifiers>
        <_>
          <internalNodes>
            0 -1 84 3.9974000304937363e-02</internalNodes>
          <leafValues>
            -1.2173449993133545e+00 1.0826710462570190e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 85 1.8819500505924225e-01</internalNodes>
          <leafValues>
            -4.8289400339126587e-01 1.4045250415802002e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 86 7.8027002513408661e-02</internalNodes>
          <leafValues>
            -1.0782150030136108e+00 7.4040299654006958e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 87 1.1899999663000926e-04</internalNodes>
          <leafValues>
            -1.2019979953765869e+00 3.7749201059341431e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 88 8.5056997835636139e-02</internalNodes>
          <leafValues>
            -4.3939098715782166e-01 1.2647340297698975e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 89 8.9720003306865692e-03</internalNodes>
          <leafValues>
            -1.8440499901771545e-01 4.5726400613784790e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 90 8.8120000436902046e-03</internalNodes>
          <leafValues>
            3.0396699905395508e-01 -9.5991098880767822e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 91 -2.3507999256253242e-02</internalNodes>
          <leafValues>
            1.2487529516220093e+00 4.6227999031543732e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 92 7.0039997808635235e-03</internalNodes>
          <leafValues>
            -5.9442102909088135e-01 5.3963297605514526e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 93 3.3851999789476395e-02</internalNodes>
          <leafValues>
            2.8496098518371582e-01 -1.4895249605178833e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 94 -3.2530000898987055e-03</internalNodes>
          <leafValues>
            4.8120799660682678e-01 -5.2712398767471313e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 95 2.9097000136971474e-02</internalNodes>
          <leafValues>
            2.6743900775909424e-01 -1.6007850170135498e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 96 -8.4790000692009926e-03</internalNodes>
          <leafValues>
            -1.3107639551162720e+00 1.5243099629878998e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 97 -1.0795000009238720e-02</internalNodes>
          <leafValues>
            4.5613598823547363e-01 -7.2050899267196655e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 98 -2.4620000272989273e-02</internalNodes>
          <leafValues>
            -1.7320619821548462e+00 6.8363003432750702e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 99 3.7380000576376915e-03</internalNodes>
          <leafValues>
            -1.9303299486637115e-01 6.8243497610092163e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 100 -1.2264000251889229e-02</internalNodes>
          <leafValues>
            -1.6095290184020996e+00 7.5268000364303589e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 101 -4.8670000396668911e-03</internalNodes>
          <leafValues>
            7.4286502599716187e-01 -2.1510200202465057e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 102 7.6725997030735016e-02</internalNodes>
          <leafValues>
            -2.6835098862648010e-01 1.3094140291213989e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 103 2.8578000143170357e-02</internalNodes>
          <leafValues>
            -5.8793000876903534e-02 1.2196329832077026e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 104 1.9694000482559204e-02</internalNodes>
          <leafValues>
            -3.5142898559570312e-01 8.4926998615264893e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 105 -2.9093999415636063e-02</internalNodes>
          <leafValues>
            -1.0507299900054932e+00 2.9806300997734070e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 106 -2.9144000262022018e-02</internalNodes>
          <leafValues>
            8.2547801733016968e-01 -3.2687199115753174e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 107 1.9741000607609749e-02</internalNodes>
          <leafValues>
            2.0452600717544556e-01 -8.3760201930999756e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 108 4.3299999088048935e-03</internalNodes>
          <leafValues>
            2.0577900111675262e-01 -6.6829800605773926e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 109 -3.5500999540090561e-02</internalNodes>
          <leafValues>
            -1.2969900369644165e+00 1.3897499442100525e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 110 -1.6172999516129494e-02</internalNodes>
          <leafValues>
            -1.3110569715499878e+00 7.5751997530460358e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 111 -2.2151000797748566e-02</internalNodes>
          <leafValues>
            -1.0524389743804932e+00 1.9241100549697876e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 112 -2.2707000374794006e-02</internalNodes>
          <leafValues>
            -1.3735309839248657e+00 6.6780999302864075e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 113 1.6607999801635742e-02</internalNodes>
          <leafValues>
            -3.7135999649763107e-02 7.7846401929855347e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 114 -1.3309000059962273e-02</internalNodes>
          <leafValues>
            -9.9850702285766602e-01 1.2248100340366364e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 115 -3.3732000738382339e-02</internalNodes>
          <leafValues>
            1.4461359977722168e+00 1.3151999562978745e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 116 1.6935000196099281e-02</internalNodes>
          <leafValues>
            -3.7121298909187317e-01 5.2842199802398682e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 117 3.3259999472647905e-03</internalNodes>
          <leafValues>
            -5.7568502426147461e-01 3.9261901378631592e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 118 8.3644002676010132e-02</internalNodes>
          <leafValues>
            1.6116000711917877e-02 -2.1173279285430908e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 119 2.5785198807716370e-01</internalNodes>
          <leafValues>
            -8.1609003245830536e-02 9.8782497644424438e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 120 -3.6566998809576035e-02</internalNodes>
          <leafValues>
            -1.1512110233306885e+00 9.6459001302719116e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 121 -1.6445999965071678e-02</internalNodes>
          <leafValues>
            3.7315499782562256e-01 -1.4585399627685547e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 122 -3.7519999314099550e-03</internalNodes>
          <leafValues>
            2.6179298758506775e-01 -5.8156698942184448e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 123 -6.3660000450909138e-03</internalNodes>
          <leafValues>
            7.5477397441864014e-01 -1.7055200040340424e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 124 -3.8499999791383743e-03</internalNodes>
          <leafValues>
            2.2653999924659729e-01 -6.3876402378082275e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 125 -4.5494001358747482e-02</internalNodes>
          <leafValues>
            -1.2640299797058105e+00 2.5260698795318604e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 126 -2.3941000923514366e-02</internalNodes>
          <leafValues>
            8.7068402767181396e-01 -2.7104699611663818e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 127 -7.7558003365993500e-02</internalNodes>
          <leafValues>
            -1.3901610374450684e+00 2.3612299561500549e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 128 2.3614000529050827e-02</internalNodes>
          <leafValues>
            6.6140003502368927e-02 -1.2645419836044312e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 129 -2.5750000495463610e-03</internalNodes>
          <leafValues>
            -5.3841698169708252e-01 3.0379098653793335e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 130 1.2010800093412399e-01</internalNodes>
          <leafValues>
            -3.5343000292778015e-01 5.2866202592849731e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 131 2.2899999748915434e-03</internalNodes>
          <leafValues>
            -5.8701997995376587e-01 2.4061000347137451e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 132 6.9716997444629669e-02</internalNodes>
          <leafValues>
            -3.3348900079727173e-01 5.1916301250457764e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 133 -4.6670001000165939e-02</internalNodes>
          <leafValues>
            6.9795399904251099e-01 -1.4895999804139137e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 134 -5.0129000097513199e-02</internalNodes>
          <leafValues>
            8.6146199703216553e-01 -2.5986000895500183e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 135 3.0147999525070190e-02</internalNodes>
          <leafValues>
            1.9332799315452576e-01 -5.9131097793579102e-01</leafValues></_></weakClassifiers></_>
    <_>
      <maxWeakCount>53</maxWeakCount>
      <stageThreshold>-4.1299300193786621e+00</stageThreshold>
      <weakClassifiers>
        <_>
          <internalNodes>
            0 -1 136 9.1085001826286316e-02</internalNodes>
          <leafValues>
            -8.9233100414276123e-01 1.0434230566024780e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 137 1.2818999588489532e-02</internalNodes>
          <leafValues>
            -1.2597670555114746e+00 5.5317097902297974e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 138 1.5931999310851097e-02</internalNodes>
          <leafValues>
            -8.6254400014877319e-01 6.3731801509857178e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 139 2.2780001163482666e-03</internalNodes>
          <leafValues>
            -7.4639201164245605e-01 5.3155601024627686e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 140 3.1840998679399490e-02</internalNodes>
          <leafValues>
            -1.2650489807128906e+00 3.6153900623321533e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 141 2.6960000395774841e-03</internalNodes>
          <leafValues>
            -9.8290401697158813e-01 3.6013001203536987e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 142 -1.2055000290274620e-02</internalNodes>
          <leafValues>
            6.4068400859832764e-01 -5.0125002861022949e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 143 2.1324999630451202e-02</internalNodes>
          <leafValues>
            -2.4034999310970306e-01 8.5448002815246582e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 144 3.0486000701785088e-02</internalNodes>
          <leafValues>
            -3.4273600578308105e-01 1.1428849697113037e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 145 -4.5079998672008514e-02</internalNodes>
          <leafValues>
            1.0976949930191040e+00 -1.7974600195884705e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 146 -7.1700997650623322e-02</internalNodes>
          <leafValues>
            1.5735000371932983e+00 -3.1433498859405518e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 147 5.9218000620603561e-02</internalNodes>
          <leafValues>
            -2.7582401037216187e-01 1.0448570251464844e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 148 6.7010000348091125e-03</internalNodes>
          <leafValues>
            -1.0974019765853882e+00 1.9801199436187744e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 149 4.1046999394893646e-02</internalNodes>
          <leafValues>
            3.0547699332237244e-01 -1.3287999629974365e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 150 -8.5499999113380909e-04</internalNodes>
          <leafValues>
            2.5807100534439087e-01 -7.0052897930145264e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 151 -3.0360000208020210e-02</internalNodes>
          <leafValues>
            -1.2306419610977173e+00 2.2609399259090424e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 152 -1.2930000200867653e-02</internalNodes>
          <leafValues>
            4.0758600831031799e-01 -5.1234501600265503e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 153 3.7367999553680420e-02</internalNodes>
          <leafValues>
            -9.4755001366138458e-02 6.1765098571777344e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 154 2.4434000253677368e-02</internalNodes>
          <leafValues>
            -4.1100600361824036e-01 4.7630500793457031e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 155 5.7007998228073120e-02</internalNodes>
          <leafValues>
            2.5249299407005310e-01 -6.8669801950454712e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 156 -1.6313999891281128e-02</internalNodes>
          <leafValues>
            -9.3928402662277222e-01 1.1448100209236145e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 157 -1.7648899555206299e-01</internalNodes>
          <leafValues>
            1.2451089620590210e+00 -5.6519001722335815e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 158 1.7614600062370300e-01</internalNodes>
          <leafValues>
            -3.2528200745582581e-01 8.2791501283645630e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 159 -7.3910001665353775e-03</internalNodes>
          <leafValues>
            3.4783700108528137e-01 -1.7929099500179291e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 160 6.0890998691320419e-02</internalNodes>
          <leafValues>
            5.5098000913858414e-02 -1.5480779409408569e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 161 -2.9123000800609589e-02</internalNodes>
          <leafValues>
            -1.0255639553070068e+00 2.4106900393962860e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 162 -4.5648999512195587e-02</internalNodes>
          <leafValues>
            1.0301599502563477e+00 -3.1672099232673645e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 163 3.7333000451326370e-02</internalNodes>
          <leafValues>
            2.1620599925518036e-01 -8.2589900493621826e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 164 -2.4411000311374664e-02</internalNodes>
          <leafValues>
            -1.5957959890365601e+00 5.1139000803232193e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 165 -5.9806998819112778e-02</internalNodes>
          <leafValues>
            -1.0312290191650391e+00 1.3092300295829773e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 166 -3.0106000602245331e-02</internalNodes>
          <leafValues>
            -1.4781630039215088e+00 3.7211999297142029e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 167 7.4209999293088913e-03</internalNodes>
          <leafValues>
            -2.4024100601673126e-01 4.9333998560905457e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 168 -2.1909999195486307e-03</internalNodes>
          <leafValues>
            2.8941500186920166e-01 -5.7259601354598999e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 169 2.0860999822616577e-02</internalNodes>
          <leafValues>
            -2.3148399591445923e-01 6.3765901327133179e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 170 -6.6990000195801258e-03</internalNodes>
          <leafValues>
            -1.2107750177383423e+00 6.4018003642559052e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 171 1.8758000805974007e-02</internalNodes>
          <leafValues>
            2.4461300671100616e-01 -9.9786698818206787e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 172 -4.4323001056909561e-02</internalNodes>
          <leafValues>
            -1.3699189424514771e+00 3.6051999777555466e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 173 2.2859999909996986e-02</internalNodes>
          <leafValues>
            2.1288399398326874e-01 -1.0397620201110840e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 174 -9.8600005730986595e-04</internalNodes>
          <leafValues>
            3.2443600893020630e-01 -5.4291802644729614e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 175 1.7239000648260117e-02</internalNodes>
          <leafValues>
            -2.8323900699615479e-01 4.4468200206756592e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 176 -3.4531001001596451e-02</internalNodes>
          <leafValues>
            -2.3107020854949951e+00 -3.1399999279528856e-03</leafValues></_>
        <_>
          <internalNodes>
            0 -1 177 6.7006997764110565e-02</internalNodes>
          <leafValues>
            2.8715699911117554e-01 -6.4481002092361450e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 178 2.3776899278163910e-01</internalNodes>
          <leafValues>
            -2.7174800634384155e-01 8.0219101905822754e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 179 -1.2903000228106976e-02</internalNodes>
          <leafValues>
            -1.5317620038986206e+00 2.1423600614070892e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 180 1.0514999739825726e-02</internalNodes>
          <leafValues>
            7.7037997543811798e-02 -1.0581140518188477e+00</leafValues></_>
        <_>
          <internalNodes>
            0 -1 181 1.6969000920653343e-02</internalNodes>
          <leafValues>
            1.4306700229644775e-01 -8.5828399658203125e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 182 -7.2460002265870571e-03</internalNodes>
          <leafValues>
            -1.1020129919052124e+00 6.4906999468803406e-02</leafValues></_>
        <_>
          <internalNodes>
            0 -1 183 1.0556999593973160e-02</internalNodes>
          <leafValues>
            1.3964000158011913e-02 6.3601499795913696e-01</leafValues></_>
        <_>
...

This file has been truncated, please download it to see its full contents.

coco.names

Typescript
person
bicycle
car
motorbike
aeroplane
bus
train
truck
boat
traffic light
fire hydrant
stop sign
parking meter
bench
bird
cat
dog
horse
sheep
cow
elephant
bear
zebra
giraffe
backpack
umbrella
handbag
tie
suitcase
frisbee
skis
snowboard
sports ball
kite
baseball bat
baseball glove
skateboard
surfboard
tennis racket
bottle
wine glass
cup
fork
knife
spoon
bowl
banana
apple
sandwich
orange
broccoli
carrot
hot dog
pizza
donut
cake
chair
sofa
pottedplant
bed
diningtable
toilet
tvmonitor
laptop
mouse
remote
keyboard
cell phone
microwave
oven
toaster
sink
refrigerator
book
clock
vase
scissors
teddy bear
hair drier
toothbrush

yolov3.cfg

Typescript
[net]
# Testing
# batch=1
# subdivisions=1
# Training
batch=64
subdivisions=16
width=608
height=608
channels=3
momentum=0.9
decay=0.0005
angle=0
saturation = 1.5
exposure = 1.5
hue=.1

learning_rate=0.001
burn_in=1000
max_batches = 500200
policy=steps
steps=400000,450000
scales=.1,.1

[convolutional]
batch_normalize=1
filters=32
size=3
stride=1
pad=1
activation=leaky

# Downsample

[convolutional]
batch_normalize=1
filters=64
size=3
stride=2
pad=1
activation=leaky

[convolutional]
batch_normalize=1
filters=32
size=1
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
filters=64
size=3
stride=1
pad=1
activation=leaky

[shortcut]
from=-3
activation=linear

# Downsample

[convolutional]
batch_normalize=1
filters=128
size=3
stride=2
pad=1
activation=leaky

[convolutional]
batch_normalize=1
filters=64
size=1
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
filters=128
size=3
stride=1
pad=1
activation=leaky

[shortcut]
from=-3
activation=linear

[convolutional]
batch_normalize=1
filters=64
size=1
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
filters=128
size=3
stride=1
pad=1
activation=leaky

[shortcut]
from=-3
activation=linear

# Downsample

[convolutional]
batch_normalize=1
filters=256
size=3
stride=2
pad=1
activation=leaky

[convolutional]
batch_normalize=1
filters=128
size=1
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
filters=256
size=3
stride=1
pad=1
activation=leaky

[shortcut]
from=-3
activation=linear

[convolutional]
batch_normalize=1
filters=128
size=1
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
filters=256
size=3
stride=1
pad=1
activation=leaky

[shortcut]
from=-3
activation=linear

[convolutional]
batch_normalize=1
filters=128
size=1
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
filters=256
size=3
stride=1
pad=1
activation=leaky

[shortcut]
from=-3
activation=linear

[convolutional]
batch_normalize=1
filters=128
size=1
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
filters=256
size=3
stride=1
pad=1
activation=leaky

[shortcut]
from=-3
activation=linear


[convolutional]
batch_normalize=1
filters=128
size=1
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
filters=256
size=3
stride=1
pad=1
activation=leaky

[shortcut]
from=-3
activation=linear

[convolutional]
batch_normalize=1
filters=128
size=1
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
filters=256
size=3
stride=1
pad=1
activation=leaky

[shortcut]
from=-3
activation=linear

[convolutional]
batch_normalize=1
filters=128
size=1
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
filters=256
size=3
stride=1
pad=1
activation=leaky

[shortcut]
from=-3
activation=linear

[convolutional]
batch_normalize=1
filters=128
size=1
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
filters=256
size=3
stride=1
pad=1
activation=leaky

[shortcut]
from=-3
activation=linear

# Downsample

[convolutional]
batch_normalize=1
filters=512
size=3
stride=2
pad=1
activation=leaky

[convolutional]
batch_normalize=1
filters=256
size=1
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
filters=512
size=3
stride=1
pad=1
activation=leaky

[shortcut]
from=-3
activation=linear


[convolutional]
batch_normalize=1
filters=256
size=1
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
filters=512
size=3
stride=1
pad=1
activation=leaky

[shortcut]
from=-3
activation=linear


[convolutional]
batch_normalize=1
filters=256
size=1
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
filters=512
size=3
stride=1
pad=1
activation=leaky

[shortcut]
from=-3
activation=linear


[convolutional]
batch_normalize=1
filters=256
size=1
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
filters=512
size=3
stride=1
pad=1
activation=leaky

[shortcut]
from=-3
activation=linear

[convolutional]
batch_normalize=1
filters=256
size=1
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
filters=512
size=3
stride=1
pad=1
activation=leaky

[shortcut]
from=-3
activation=linear


[convolutional]
batch_normalize=1
filters=256
size=1
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
filters=512
size=3
stride=1
pad=1
activation=leaky

[shortcut]
from=-3
activation=linear


[convolutional]
batch_normalize=1
filters=256
size=1
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
filters=512
size=3
stride=1
pad=1
activation=leaky

[shortcut]
from=-3
activation=linear

[convolutional]
batch_normalize=1
filters=256
size=1
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
filters=512
size=3
stride=1
pad=1
activation=leaky

[shortcut]
from=-3
activation=linear

# Downsample

[convolutional]
batch_normalize=1
filters=1024
size=3
stride=2
pad=1
activation=leaky

[convolutional]
batch_normalize=1
filters=512
size=1
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
filters=1024
size=3
stride=1
pad=1
activation=leaky

[shortcut]
from=-3
activation=linear

[convolutional]
batch_normalize=1
filters=512
size=1
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
filters=1024
size=3
stride=1
pad=1
activation=leaky

[shortcut]
from=-3
activation=linear

[convolutional]
batch_normalize=1
filters=512
size=1
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
filters=1024
size=3
stride=1
pad=1
activation=leaky

[shortcut]
from=-3
activation=linear

[convolutional]
batch_normalize=1
filters=512
size=1
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
filters=1024
size=3
stride=1
pad=1
activation=leaky

[shortcut]
from=-3
activation=linear

######################

[convolutional]
batch_normalize=1
filters=512
size=1
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
size=3
stride=1
pad=1
filters=1024
activation=leaky

[convolutional]
batch_normalize=1
filters=512
size=1
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
size=3
stride=1
pad=1
filters=1024
activation=leaky

[convolutional]
batch_normalize=1
filters=512
size=1
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
size=3
stride=1
pad=1
filters=1024
activation=leaky

[convolutional]
size=1
stride=1
pad=1
filters=255
activation=linear


[yolo]
mask = 6,7,8
anchors = 10,13,  16,30,  33,23,  30,61,  62,45,  59,119,  116,90,  156,198,  373,326
classes=80
num=9
jitter=.3
ignore_thresh = .7
truth_thresh = 1
random=1


[route]
layers = -4

[convolutional]
batch_normalize=1
filters=256
size=1
stride=1
pad=1
activation=leaky

[upsample]
stride=2

[route]
layers = -1, 61



[convolutional]
batch_normalize=1
filters=256
size=1
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
size=3
stride=1
pad=1
filters=512
activation=leaky

[convolutional]
batch_normalize=1
filters=256
size=1
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
size=3
stride=1
pad=1
filters=512
activation=leaky

[convolutional]
batch_normalize=1
filters=256
size=1
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
size=3
stride=1
pad=1
filters=512
activation=leaky

[convolutional]
size=1
stride=1
pad=1
filters=255
activation=linear


[yolo]
mask = 3,4,5
anchors = 10,13,  16,30,  33,23,  30,61,  62,45,  59,119,  116,90,  156,198,  373,326
classes=80
num=9
jitter=.3
ignore_thresh = .7
truth_thresh = 1
random=1



[route]
layers = -4

[convolutional]
batch_normalize=1
filters=128
size=1
stride=1
pad=1
activation=leaky

[upsample]
stride=2

[route]
layers = -1, 36



[convolutional]
batch_normalize=1
filters=128
size=1
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
size=3
stride=1
pad=1
filters=256
activation=leaky

[convolutional]
batch_normalize=1
filters=128
size=1
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
size=3
stride=1
pad=1
filters=256
activation=leaky

[convolutional]
batch_normalize=1
filters=128
size=1
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
size=3
stride=1
pad=1
filters=256
activation=leaky

[convolutional]
size=1
stride=1
pad=1
filters=255
activation=linear


[yolo]
mask = 0,1,2
anchors = 10,13,  16,30,  33,23,  30,61,  62,45,  59,119,  116,90,  156,198,  373,326
classes=80
num=9
jitter=.3
ignore_thresh = .7
truth_thresh = 1
random=1

Arduino

Arduino
// Libraries

#include <WiFi.h> 
#include <PubSubClient.h> 
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

// Constant Definitions

#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 32 // OLED display height, in pixels
#define r 32             // Right LED
#define l 14             // Left LED

// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)
#define OLED_RESET    -1  // Reset pin # (or -1 if sharing Arduino reset pin)
#define LOGO_HEIGHT   32  // LOGO height, in pixels
#define LOGO_WIDTH    128 // LOGO width, in pixels

// WiFi Credentials
const char* ssid = "YOURSSID";
const char* password = "YOURSSIDPASS";
// MQTT Credentials
const char* mqttServer = "YOURSERVER";
const int mqttPort = YOURPORT; //Your port number
const char* mqttUser = "YOURUSER";
const char* mqttPassword = "YOURPASS";

// Vars

char payload[512]; 

// Symbols

// White Screen
const unsigned char w [] PROGMEM = { 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
};

// Car Symbol
const unsigned char car [] PROGMEM = {
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x0f, 0xfc, 0x3f, 0xfe, 0x00, 0x3f, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x03, 0xff, 0xfc, 0x3f, 0xff, 0xc0, 0x01, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x3f, 0xff, 0xfc, 0x7f, 0xff, 0xe7, 0x80, 0x0f, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xfe, 0x01, 0xff, 0xff, 0xf8, 0x7f, 0xff, 0xf3, 0xf0, 0x00, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xe0, 0x01, 0xff, 0xff, 0xf8, 0x7f, 0xff, 0xf0, 0xfc, 0x00, 0x00, 0x7f, 
  0xff, 0xff, 0xff, 0xfe, 0x00, 0x01, 0xff, 0xff, 0xf0, 0x7f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x1f, 
  0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 
  0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 
  0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 
  0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 
  0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 
  0xe0, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x07, 
  0xc0, 0x00, 0x78, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xc1, 0xe0, 0x00, 0x07, 
  0xc0, 0x01, 0xc0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x18, 0x00, 0x07, 
  0xc0, 0x03, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x02, 0x0c, 0x00, 0x07, 
  0xc0, 0x06, 0x06, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x32, 0x06, 0x00, 0x0f, 
  0xe0, 0x0c, 0x30, 0x18, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0xc0, 0xc3, 0x00, 0x3f, 
  0xf0, 0x0c, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x03, 0xff, 0xff, 
  0xff, 0x8c, 0x30, 0x38, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0xc0, 0xc3, 0xff, 0xff, 
  0xff, 0xfe, 0x06, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x12, 0x07, 0xff, 0xff, 
  0xff, 0xff, 0x06, 0xc1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x33, 0x07, 0xff, 0xff, 
  0xff, 0xff, 0x80, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x1f, 0xff, 0xff, 
  0xff, 0xff, 0xf0, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
};

// Dog Symbol
const unsigned char dog [] PROGMEM = {
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xe3, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xf0, 0x7f, 0xff, 0xff, 0xff, 0x80, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0xff, 0xe0, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x03, 0xff, 0xff, 0xe0, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x1f, 0xff, 0xff, 0xe0, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x7f, 0xff, 0xff, 0xf0, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xfe, 0x01, 0xff, 0xff, 0xff, 0xf0, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xf0, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xf0, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xff, 0xff, 0xff, 0xf8, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xff, 0xff, 0xff, 0xf8, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xff, 0xff, 0xff, 0xfc, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
};

// Motorcycle Symbol
const unsigned char moto [] PROGMEM = {
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x03, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x33, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x31, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x10, 0x7f, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x1f, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x0f, 0xff, 0xff, 0xff, 
  0xff, 0xf0, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x04, 0x00, 0x07, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xc0, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x80, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 
  0xff, 0xfc, 0x07, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 
  0xff, 0xfc, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xfe, 0x00, 0x1e, 0x1f, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc0, 0xff, 0x00, 0x0f, 0xff, 0xff, 
  0xff, 0xff, 0xe0, 0xff, 0x00, 0x00, 0x00, 0x07, 0xff, 0xff, 0xc3, 0xf8, 0x00, 0x00, 0x1f, 0xff, 
  0xff, 0xf0, 0x00, 0x00, 0xff, 0x80, 0x00, 0x0c, 0x00, 0x00, 0xc3, 0xc0, 0x00, 0xc0, 0x01, 0xff, 
  0xff, 0x00, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x18, 0x00, 0x01, 0x87, 0x00, 0xe1, 0xff, 0x80, 0x7f, 
  0xfc, 0x03, 0xff, 0xfc, 0x03, 0xf0, 0x00, 0x38, 0x00, 0x06, 0x0c, 0x07, 0xe0, 0xff, 0xe0, 0x3f, 
  0xf0, 0x1f, 0xff, 0xff, 0x80, 0xe0, 0x00, 0x70, 0x00, 0x38, 0x18, 0x0f, 0xf0, 0x7f, 0xf8, 0x1f, 
  0xe0, 0x7f, 0xff, 0xff, 0x80, 0x00, 0x00, 0x7f, 0xff, 0xc0, 0xf8, 0x1f, 0xfc, 0x3f, 0xfc, 0x0f, 
  0xc0, 0x7f, 0xfe, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0x07, 0xf8, 0x1f, 0xfe, 0x3f, 0xfc, 0x0f, 
  0xc0, 0xff, 0xf0, 0x1f, 0xe0, 0x7f, 0xff, 0xf8, 0x07, 0xff, 0xf8, 0x1f, 0xff, 0xff, 0xf8, 0x1f, 
  0xc0, 0x7f, 0xff, 0xff, 0xe0, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x0f, 0xff, 0xff, 0xf0, 0x1f, 
  0xe0, 0x3f, 0xff, 0xff, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x01, 0xff, 0xff, 0xc0, 0x3f, 
  0xf0, 0x0f, 0xff, 0xff, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x3f, 0xfc, 0x00, 0xff, 
  0xfc, 0x01, 0xff, 0xf8, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x07, 0xff, 
  0xff, 0x80, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 
  0xff, 0xf8, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
};

// People Symbol
const unsigned char peo [] PROGMEM = {
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xf8, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x1f, 0xff, 0xff, 
  0xff, 0xff, 0x80, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x01, 0xff, 0xff, 
  0xff, 0xfe, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x7f, 0xff, 
  0xff, 0xfc, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xc0, 0x03, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x3f, 0xff, 
  0xff, 0xf8, 0x00, 0x00, 0x00, 0x3f, 0xf8, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, 0x00, 0x1f, 0xff, 
  0xff, 0xf8, 0x00, 0x00, 0x00, 0x3f, 0xc0, 0x00, 0x00, 0x03, 0xfc, 0x00, 0x00, 0x00, 0x1f, 0xff, 
  0xff, 0xfc, 0x00, 0x00, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x01, 0xfe, 0x00, 0x00, 0x00, 0x3f, 0xff, 
  0xff, 0xfe, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x7f, 0xff, 
  0xff, 0xff, 0xc0, 0x00, 0x07, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xe0, 0x00, 0x03, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0x01, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0x80, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0x80, 0x00, 0x03, 0xff, 0xf0, 0x00, 0x00, 0x0f, 0xff, 0xc0, 0x00, 0x01, 0xff, 0xff, 
  0xff, 0xf0, 0x00, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 0x7f, 0xf8, 0x00, 0x00, 0x00, 0x0f, 0xff, 
  0xff, 0x80, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x01, 0xff, 
  0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 
  0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 
  0xf8, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, 0x07, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x1f, 
  0xf8, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x1f, 
  0xf0, 0x00, 0x00, 0x00, 0x03, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0x00, 0x0f, 
  0xf8, 0x00, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, 0xf0, 0x00, 0x00, 0x00, 0x1f, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
};


// Module Declaration

WiFiClient ESPClient;
PubSubClient client(ESPClient);
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);

// MQTT Callback

void callback(char* topic, byte* payload, unsigned int length) {
  Serial.print("Message arrived [");
  Serial.print(topic);
  Serial.print("] ");
  String inVal="";

// Save the payload in variable
  for (int i=0;i<length;i++) {
    inVal.concat((char)payload[i]);
  }


// Show symbols depends on payload
  if (inVal == "m0") {
    testdrawbitmap(moto);
  digitalWrite(r,HIGH);
  digitalWrite(l,LOW);
  } 
  else if (inVal == "m1") {
    testdrawbitmap(moto);
              digitalWrite(r,LOW);
  digitalWrite(l,HIGH);
  } 
  else if (inVal == "c0") {
      digitalWrite(r,HIGH);
  digitalWrite(l,LOW);
    testdrawbitmap(car);
  } 
  else if (inVal == "c1") {
    testdrawbitmap(car);
              digitalWrite(r,LOW);
  digitalWrite(l,HIGH);
  } 
  else if (inVal == "p0") {
      digitalWrite(r,HIGH);
  digitalWrite(l,LOW);
    testdrawbitmap(peo);
  } 
  else if (inVal == "p1") {
    testdrawbitmap(peo);
              digitalWrite(r,LOW);
  digitalWrite(l,HIGH);
  } 
    else if (inVal == "d0") {
        digitalWrite(r,HIGH);
  digitalWrite(l,LOW);
    testdrawbitmap(dog);
  } 
    else if (inVal == "d1") {
    testdrawbitmap(dog);
          digitalWrite(r,LOW);
  digitalWrite(l,HIGH);
  } 
  else
  {
    testdrawbitmap(w);
              digitalWrite(r,LOW);
  digitalWrite(l,LOW);
  }
  Serial.println(inVal);
  
}

// Reconnect algorithm

void reconnect() {
  // Loop until we're reconnected
  Serial.println("ESP > Connected to WiFi");
  client.setServer(mqttServer, mqttPort);
  client.setCallback(callback);
 
  while (!client.connected()) {
    Serial.println("ESP > Connecting to MQTT...");
 
    if (client.connect("ESP32Client", mqttUser, mqttPassword )) {
 
      Serial.println("connected to CloudMQTT");
 
    } else {
 
      Serial.print("ERROR > failed with state ");
      Serial.print(client.state());
      delay(2000);
 
    }
  }  
  client.publish("ESP32", "Reconnect OK");
  client.subscribe("inTopic");
}

char* string2char(String command){
    if(command.length()!=0){
        char *p = const_cast<char*>(command.c_str());
        return p;
    }
}
 
void setup() {
  // Setup Leds
  pinMode(r,OUTPUT);
  pinMode(l,OUTPUT);
  digitalWrite(r,LOW);
  digitalWrite(l,LOW);
  
  Serial.begin(9600);
    if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { // Address 0x3C for 128x32
    Serial.println(F("SSD1306 allocation failed"));
    for(;;); // Don't proceed, loop forever
  }

  // SSD1306_SWITCHCAPVCC = generate display voltage from 3.3V internally

  testdrawbitmap(c);

  // Show initial display buffer contents on the screen --
  display.display();
  

// Wifi Start

  WiFi.begin(ssid, password);
 
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.println("Please wait while connecting to WiFi");
  }
 
  Serial.println("ESP > Connected to WiFi");
  client.setServer(mqttServer, mqttPort);
  client.setCallback(callback);
 
  while (!client.connected()) {
    Serial.println("ESP > Connecting to MQTT...");
 
    if (client.connect("ESP32Client", mqttUser, mqttPassword )) {
 
      Serial.println("connected to CloudMQTT");
 
    } else {
 
      Serial.print("ERROR > failed with state ");
      Serial.print(client.state());
      delay(2000);
 
    }
  }  
  client.publish("ESP32", "Start OK");
  client.subscribe("inTopic");
  
}

// Client Loop

void loop() { 
  if (!client.connected()) {
    reconnect();
  }
  client.loop();
}


// Display in Screen
void testdrawbitmap(const unsigned char draw[]) {
  display.clearDisplay();

  display.drawBitmap(
    (display.width()  - LOGO_WIDTH ) / 2,
    (display.height() - LOGO_HEIGHT) / 2,
    draw, LOGO_WIDTH, LOGO_HEIGHT, 1);
  display.display();
}

Drowsiness

Python
# -*- coding: utf-8 -*-
"""
@author: ALEX
"""
import smbus
import numpy as np
import urllib.request
import cv2
import pygame
import time
import os
import math
import requests
from twilio.rest import Client
import requests
import json

# Setup the class of VMA accelerometer 

class MMA7455():
    bus = smbus.SMBus(1)
    def __init__(self):
        self.bus.write_byte_data(0x1D, 0x16, 0x55) # Setup the Mode
        self.bus.write_byte_data(0x1D, 0x10, 0) # Calibrate
        self.bus.write_byte_data(0x1D, 0x11, 0) # Calibrate
        self.bus.write_byte_data(0x1D, 0x12, 0) # Calibrate
        self.bus.write_byte_data(0x1D, 0x13, 0) # Calibrate
        self.bus.write_byte_data(0x1D, 0x14, 0) # Calibrate
        self.bus.write_byte_data(0x1D, 0x15, 0) # Calibrate
    def getValueX(self):
        return self.bus.read_byte_data(0x1D, 0x06)
    def getValueY(self):
        return self.bus.read_byte_data(0x1D, 0x07)
    def getValueZ(self):
        return self.bus.read_byte_data(0x1D, 0x08)

# Alarm sound file
file = 'alarm.mp3'
# Sound player start
pygame.init()
pygame.mixer.init()

# multiple cascades: https://github.com/Itseez/opencv/tree/master/data/haarcascade

#https://github.com/Itseez/opencv/blob/master/data/haarcascades/haarcascade_frontalface_default.xml
face_cascade = cv2.CascadeClassifier('haarcascade/haarcascade_frontalface_default.xml')
#https://github.com/Itseez/opencv/blob/master/data/haarcascades/haarcascade_eye.xml
eye_cascade = cv2.CascadeClassifier('haarcascade/haarcascade_eye.xml')

# Cam image input 
cap = cv2.VideoCapture(0)

# Vars
nf=1
ne=1
count=0

# Accelerometer Declaration
mma = MMA7455()

# Obtaining the X, Y and Z values.

xmem=mma.getValueX()
ymem=mma.getValueY()
zmem=mma.getValueZ()

# Creating the base accelerometer values.

if(xmem > 127):
    xmem=xmem-255
if(ymem > 127):
    ymem=ymem-255
if(zmem > 127):
    zmem=zmem-255

# Vars to get blinking frequency
    
time1=time.time()
time2=time.time()

# Crash Sensibility
sens=30

# Sending SMS if Crash Detected

def send():
    # Your Account SID from twilio.com/console
    account_sid = "Twilio SID"
    # Your Auth Token from twilio.com/console
    auth_token  = "Twilio Token"
    client = Client(account_sid, auth_token)
    phone = "Registered Number"
    print('crash')
    send_url = 'http://ip-api.com/json'
    r = requests.get(send_url)
    j = json.loads(r.text)
    text="Alejandro Sanchez Crash Here: "
    text+="http://maps.google.com/maps?q=loc:{},{}".format(j['lat'],j['lon'])
    print(text)
    message = client.messages.create(to=phone, from_="Twilio Number",body=text)
    print(message.sid)
    time.sleep(10)
    stop()

# Script Loop
    
try:
    while 1:
        # Check if we have a crash with the acceleration samples
        x = mma.getValueX()
        y = mma.getValueY()
        z = mma.getValueZ()
        if(x > 127):
            x=x-255
        if(y > 127):
            y=y-255
        if(z > 127):
            z=z-255
        # Send sms if crash
        if(abs(xmem-x)>sens):
            send()
        if(abs(ymem-y)>sens):
            send()
        if(abs(zmem-z)>sens):
            send()
        # Take Image From Camera
        ret, img = cap.read()
        # Gray scale convertion 
        gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
        # Obtaining the faces in the image
        faces = face_cascade.detectMultiScale(gray, 1.3, 5)

        for (x,y,w,h) in faces:
            cv2.rectangle(img,(x,y),(x+w,y+h),(255,0,0),2)
            roi_gray = gray[y:y+h, x:x+w]
            roi_color = img[y:y+h, x:x+w]
            # If there is a face check that we can detect the eyes
            eyes = eye_cascade.detectMultiScale(roi_gray,1.3, 40)
            ne=len(eyes)
            for (ex,ey,ew,eh) in eyes:
                cv2.rectangle(roi_color,(ex,ey),(ex+ew,ey+eh),(0,255,0),2)    
        # Con esta configuracin si cerramos los ojos el sistema no detecta los ojos
        nf=len(faces)
        # If we can see a face but cannot detect its eyes then start a counter.
        if(nf>0 and ne<1):
            time1=time.time()
            print(time1-time2)
            # If we cannot detect the eyes for more than 2 seconds the alarm will sound.
            if((time1-time2)>=2):
                pygame.mixer.music.load(file)
                pygame.mixer.music.play()
        else:
            # If we detect the eyes again, we stop the alarm and reset the counters.
            pygame.mixer.music.stop()
            time1=time.time()
            time2=time1
# "Stop" Function
except NameError:
    print("Crash Exception")

Jetson-Drowsiness-Driving-Monitor

All Code Here

Credits

Alejandro Sanchez

Alejandro Sanchez

9 projects • 19 followers
I am a biomedical engineer working at Boston Scientific as a service engineer

Comments