JeVoisBase  1.21
JeVois Smart Embedded Machine Vision Toolkit Base Modules
Share this page:
Loading...
Searching...
No Matches
PyCoralClassify.PyCoralClassify Class Reference

Object recognition using Coral Edge TPU. More...

Public Member Functions

 __init__ (self)
 Constructor.
 
 process (self, inframe, outframe)
 JeVois main processing function.
 
 processGUI (self, inframe, helper)
 Process function with GUI output.
 

Public Attributes

 threshold
 
 rgb
 
 model
 
 labels
 
 interpreter
 
 timer
 

Detailed Description

Object recognition using Coral Edge TPU.

This module runs an object classification deep neural network using the Coral TPU library. It only works on JeVois-Pro platform equipped with an Edge TPU add-on card. Classification (recognition) networks analyze a central portion of the whole scene and produce identity labels and confidence scores about what the object in the field of view might be.

This module supports networks implemented in TensorFlow-Lite and ported to Edge TPU/

Included with the standard JeVois distribution are:

  • MobileNetV3
  • more to come, please contribute!

See the module's constructor (init) code and select a value for model to switch network.

Object category names for models trained on ImageNet are at https://github.com/jevois/jevoisbase/blob/master/share/opencv-dnn/classification/synset_words.txt

Sometimes it will make mistakes! The performance of SqueezeNet v1.1 is about 56.1% correct (mean average precision, top-1) on the ImageNet test set.

This module is adapted from the sample code: https://github.com/google-coral/pycoral/blob/master/examples/classify_image.py

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 53 of file PyCoralClassify.py.

Constructor & Destructor Documentation

◆ __init__()

PyCoralClassify.PyCoralClassify.__init__ (   self)

Constructor.

Definition at line 56 of file PyCoralClassify.py.

References jevois.getNumInstalledTPUs().

Member Function Documentation

◆ process()

PyCoralClassify.PyCoralClassify.process (   self,
  inframe,
  outframe 
)

JeVois main processing function.

Definition at line 83 of file PyCoralClassify.py.

References TensorFlow.interpreter, PyCoralClassify.PyCoralClassify.interpreter, PyCoralDetect.PyCoralDetect.interpreter, PyCoralSegment.PyCoralSegment.interpreter, TensorFlow.labels, mobilenet_v1.MobileNetV1.labels, mobilenet_v2.MobileNetV2.labels, PyCoralClassify.PyCoralClassify.labels, PyCoralDetect.PyCoralDetect.labels, TensorFlow.model, mobilenet_v1.MobileNetV1.model, mobilenet_v2.MobileNetV2.model, lpd_yunet.LPD_YuNet.model, mp_palmdet.MPPalmDet.model, PyNetOpenCV.PyNetOpenCV.model, PyNetORT.PyNetORT.model, PyNetURetinex.PyNetURetinex.model, PyClassificationDNN.PyClassificationDNN.model, PyCoralClassify.PyCoralClassify.model, PyCoralDetect.PyCoralDetect.model, PyCoralSegment.PyCoralSegment.model, PyDetectionDNN.PyDetectionDNN.model, PyEmotion.PyEmotion.model, PyLicensePlate.PyLicensePlate.model, PyClassificationDNN.PyClassificationDNN.rgb, PyCoralClassify.PyCoralClassify.rgb, PyCoralDetect.PyCoralDetect.rgb, PyCoralSegment.PyCoralSegment.rgb, PyDetectionDNN.PyDetectionDNN.rgb, PyEmotion.PyEmotion.rgb, PyCoralClassify.PyCoralClassify.threshold, PyCoralDetect.PyCoralDetect.threshold, AprilTag.AprilTag.timer, FirstPython.FirstPython.timer, PyClassificationDNN.PyClassificationDNN.timer, PyCoralClassify.PyCoralClassify.timer, PyCoralDetect.PyCoralDetect.timer, PyCoralSegment.PyCoralSegment.timer, PyDetectionDNN.PyDetectionDNN.timer, PyDMTX.PyDMTX.timer, PyEmotion.PyEmotion.timer, PyFaceMesh.PyFaceMesh.timer, PyHandDetector.PyHandDetector.timer, PyLicensePlate.PyLicensePlate.timer, PyObjectron.PyObjectron.timer, PyPoseDetector.PyPoseDetector.timer, PySceneText.PySceneText.timer, PySelfie.PySelfie.timer, PythonObject6D.PythonObject6D.timer, PythonOpenCV.PythonOpenCV.timer, PythonParallel.PythonParallel.timer, PythonSandbox.PythonSandbox.timer, and PythonTest.PythonTest.timer.

◆ processGUI()

PyCoralClassify.PyCoralClassify.processGUI (   self,
  inframe,
  helper 
)

Process function with GUI output.

Definition at line 126 of file PyCoralClassify.py.

References TensorFlow.interpreter, PyCoralClassify.PyCoralClassify.interpreter, PyCoralDetect.PyCoralDetect.interpreter, PyCoralSegment.PyCoralSegment.interpreter, TensorFlow.labels, mobilenet_v1.MobileNetV1.labels, mobilenet_v2.MobileNetV2.labels, PyCoralClassify.PyCoralClassify.labels, PyCoralDetect.PyCoralDetect.labels, TensorFlow.model, mobilenet_v1.MobileNetV1.model, mobilenet_v2.MobileNetV2.model, lpd_yunet.LPD_YuNet.model, mp_palmdet.MPPalmDet.model, PyNetOpenCV.PyNetOpenCV.model, PyNetORT.PyNetORT.model, PyNetURetinex.PyNetURetinex.model, PyClassificationDNN.PyClassificationDNN.model, PyCoralClassify.PyCoralClassify.model, PyCoralDetect.PyCoralDetect.model, PyCoralSegment.PyCoralSegment.model, PyDetectionDNN.PyDetectionDNN.model, PyEmotion.PyEmotion.model, PyLicensePlate.PyLicensePlate.model, PyClassificationDNN.PyClassificationDNN.rgb, PyCoralClassify.PyCoralClassify.rgb, PyCoralDetect.PyCoralDetect.rgb, PyCoralSegment.PyCoralSegment.rgb, PyDetectionDNN.PyDetectionDNN.rgb, PyEmotion.PyEmotion.rgb, PyCoralClassify.PyCoralClassify.threshold, PyCoralDetect.PyCoralDetect.threshold, AprilTag.AprilTag.timer, FirstPython.FirstPython.timer, PyClassificationDNN.PyClassificationDNN.timer, PyCoralClassify.PyCoralClassify.timer, PyCoralDetect.PyCoralDetect.timer, PyCoralSegment.PyCoralSegment.timer, PyDetectionDNN.PyDetectionDNN.timer, PyDMTX.PyDMTX.timer, PyEmotion.PyEmotion.timer, PyFaceMesh.PyFaceMesh.timer, PyHandDetector.PyHandDetector.timer, PyLicensePlate.PyLicensePlate.timer, PyObjectron.PyObjectron.timer, PyPoseDetector.PyPoseDetector.timer, PySceneText.PySceneText.timer, PySelfie.PySelfie.timer, PythonObject6D.PythonObject6D.timer, PythonOpenCV.PythonOpenCV.timer, PythonParallel.PythonParallel.timer, PythonSandbox.PythonSandbox.timer, and PythonTest.PythonTest.timer.

Member Data Documentation

◆ interpreter

◆ labels

◆ model

◆ rgb

◆ threshold

◆ timer


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