JeVoisBase  1.20
JeVois Smart Embedded Machine Vision Toolkit Base Modules
Share this page:
PyCoralDetect.PyCoralDetect Class Reference

Object detection using Coral Edge TPU. More...

Public Member Functions

def __init__ (self)
 Constructor. More...
 
def stringToRGBA (self, str)
 
def draw_objects (self, draw, objs, labels)
 
def process (self, inframe, outframe)
 JeVois main processing function. More...
 
def processGUI (self, inframe, helper)
 Process function with GUI output. More...
 
def get_objects (self, interpreter, score_threshold=-float('inf'), image_scale=(1.0, 1.0))
 Modified from https://github.com/google-coral/pycoral/blob/master/pycoral/adapters/detect.py to avoid calling interpreter._get_full_signature_list() which does not seem to exist anymore... More...
 

Public Attributes

 threshold
 
 rgb
 
 model
 
 labels
 
 interpreter
 
 timer
 

Detailed Description

Object detection using Coral Edge TPU.

More pre-trained models are available at https://coral.ai/models/

Author
Laurent Itti
Videomapping:
YUYV 320 264 30.0 YUYV 320 240 30.0 JeVois PyClassificationDNN
Email:
itti@.nosp@m.usc..nosp@m.edu
Address:
880 W 1st St Suite 807, Los Angeles CA 90012, USA
Main URL:
http://jevois.org
Support URL:
http://jevois.org
Other URL:
http://jevois.org
License:
GPL v3
Distribution:
Unrestricted
Restrictions:
None

Definition at line 32 of file PyCoralDetect.py.

Constructor & Destructor Documentation

◆ __init__()

def PyCoralDetect.PyCoralDetect.__init__ (   self)

Constructor.

Definition at line 35 of file PyCoralDetect.py.

References jevois.getNumInstalledTPUs().

Member Function Documentation

◆ draw_objects()

def PyCoralDetect.PyCoralDetect.draw_objects (   self,
  draw,
  objs,
  labels 
)
Draws the bounding box and label for each object.

Definition at line 69 of file PyCoralDetect.py.

Referenced by PyCoralDetect.PyCoralDetect.process().

◆ get_objects()

def PyCoralDetect.PyCoralDetect.get_objects (   self,
  interpreter,
  score_threshold = -float('inf'),
  image_scale = (1.0, 1.0) 
)

Modified from https://github.com/google-coral/pycoral/blob/master/pycoral/adapters/detect.py to avoid calling interpreter._get_full_signature_list() which does not seem to exist anymore...

Gets results from a detection model as a list of detected objects.

Args:
  interpreter: The ``tf.lite.Interpreter`` to query for results.
  score_threshold (float): The score threshold for results. All returned
  results have a score greater-than-or-equal-to this value.
  image_scale (float, float): Scaling factor to apply to the bounding boxes as
  (x-scale-factor, y-scale-factor), where each factor is from 0 to 1.0.

Returns:
  A list of :obj:`Object` objects, which each contains the detected object's
  id, score, and bounding box as :obj:`BBox`.

Definition at line 188 of file PyCoralDetect.py.

References demo.float, and demo.int.

Referenced by PyCoralDetect.PyCoralDetect.process(), and PyCoralDetect.PyCoralDetect.processGUI().

◆ process()

◆ processGUI()

◆ stringToRGBA()

def PyCoralDetect.PyCoralDetect.stringToRGBA (   self,
  str 
)

Definition at line 61 of file PyCoralDetect.py.

Referenced by PyCoralDetect.PyCoralDetect.processGUI().

Member Data Documentation

◆ interpreter

◆ labels

PyCoralDetect.PyCoralDetect.labels

◆ model

◆ rgb

◆ threshold

PyCoralDetect.PyCoralDetect.threshold

◆ timer


The documentation for this class was generated from the following file: