JeVoisBase  1.22
JeVois Smart Embedded Machine Vision Toolkit Base Modules
Share this page:
Loading...
Searching...
No Matches
quantize-ort.Quantize Class Reference

Public Member Functions

 __init__ (self, model_path, calibration_image_dir, transforms=Compose(), per_channel=False, act_type='int8', wt_type='int8')
 
 check_opset (self, convert=True)
 
 run (self)
 

Public Attributes

 type_dict
 
 model_path
 
 calibration_image_dir
 
 transforms
 
 per_channel
 
 act_type
 
 wt_type
 
 dr
 

Static Public Attributes

 models
 

Detailed Description

Definition at line 42 of file quantize-ort.py.

Constructor & Destructor Documentation

◆ __init__()

quantize-ort.Quantize.__init__ (   self,
  model_path,
  calibration_image_dir,
  transforms = Compose(),
  per_channel = False,
  act_type = 'int8',
  wt_type = 'int8' 
)

Definition at line 43 of file quantize-ort.py.

Member Function Documentation

◆ check_opset()

◆ run()

Member Data Documentation

◆ act_type

quantize-ort.Quantize.act_type

Definition at line 50 of file quantize-ort.py.

Referenced by quantize-ort.Quantize.run().

◆ calibration_image_dir

quantize-ort.Quantize.calibration_image_dir

Definition at line 47 of file quantize-ort.py.

◆ dr

quantize-ort.Quantize.dr

Definition at line 54 of file quantize-ort.py.

Referenced by quantize-ort.Quantize.run().

◆ model_path

◆ models

quantize-ort.Quantize.models
static
Initial value:
= dict(
yunet=Quantize(model_path='../../models/face_detection_yunet/face_detection_yunet_2022mar.onnx',
calibration_image_dir='../../benchmark/data/face_detection',
transforms=Compose([Resize(size=(160, 120))])),
sface=Quantize(model_path='../../models/face_recognition_sface/face_recognition_sface_2021dec.onnx',
calibration_image_dir='../../benchmark/data/face_recognition',
transforms=Compose([Resize(size=(112, 112))])),
pphumenseg=Quantize(model_path='../../models/human_segmentation_pphumanseg/human_segmentation_pphumanseg_2021oct.onnx',
calibration_image_dir='../../benchmark/data/human_segmentation',
transforms=Compose([Resize(size=(192, 192))])),
ppresnet50=Quantize(model_path='../../models/image_classification_ppresnet/image_classification_ppresnet50_2022jan.onnx',
calibration_image_dir='../../benchmark/data/image_classification',
transforms=Compose([Resize(size=(224, 224))])),
# TBD: DaSiamRPN
youtureid=Quantize(model_path='../../models/person_reid_youtureid/person_reid_youtu_2021nov.onnx',
calibration_image_dir='../../benchmark/data/person_reid',
transforms=Compose([Resize(size=(128, 256))])),
# TBD: DB-EN & DB-CN
crnn_en=Quantize(model_path='../../models/text_recognition_crnn/text_recognition_CRNN_EN_2021sep.onnx',
calibration_image_dir='../../benchmark/data/text',
transforms=Compose([Resize(size=(100, 32)), ColorConvert(ctype=cv.COLOR_BGR2GRAY)])),
crnn_cn=Quantize(model_path='../../models/text_recognition_crnn/text_recognition_CRNN_CN_2021nov.onnx',
calibration_image_dir='../../benchmark/data/text',
transforms=Compose([Resize(size=(100, 32))]))
)

Definition at line 80 of file quantize-ort.py.

◆ per_channel

quantize-ort.Quantize.per_channel

Definition at line 49 of file quantize-ort.py.

Referenced by quantize-ort.Quantize.run().

◆ transforms

quantize-ort.Quantize.transforms

◆ type_dict

quantize-ort.Quantize.type_dict

Definition at line 44 of file quantize-ort.py.

Referenced by quantize-ort.Quantize.run().

◆ wt_type

quantize-ort.Quantize.wt_type

Definition at line 51 of file quantize-ort.py.

Referenced by quantize-ort.Quantize.run().


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