|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef _EI_CLASSIFIER_MODEL_VARIABLES_H_ |
|
|
#define _EI_CLASSIFIER_MODEL_VARIABLES_H_ |
|
|
|
|
|
#include <stdint.h> |
|
|
#include "model_metadata.h" |
|
|
|
|
|
#include "tflite-model/tflite_learn_19.h" |
|
|
#include "edge-impulse-sdk/classifier/ei_model_types.h" |
|
|
#include "edge-impulse-sdk/classifier/inferencing_engines/engines.h" |
|
|
|
|
|
const char* ei_classifier_inferencing_categories[] = { "face" }; |
|
|
|
|
|
uint8_t ei_dsp_config_17_axes[] = { 0 }; |
|
|
const uint32_t ei_dsp_config_17_axes_size = 1; |
|
|
ei_dsp_config_image_t ei_dsp_config_17 = { |
|
|
17, |
|
|
1, |
|
|
1, |
|
|
"RGB" |
|
|
}; |
|
|
|
|
|
const size_t ei_dsp_blocks_size = 1; |
|
|
ei_model_dsp_t ei_dsp_blocks[ei_dsp_blocks_size] = { |
|
|
{ |
|
|
27648, |
|
|
&extract_image_features, |
|
|
(void*)&ei_dsp_config_17, |
|
|
ei_dsp_config_17_axes, |
|
|
ei_dsp_config_17_axes_size |
|
|
} |
|
|
}; |
|
|
const ei_config_tflite_graph_t ei_config_tflite_graph_19 = { |
|
|
.implementation_version = 1, |
|
|
.model = tflite_learn_19, |
|
|
.model_size = tflite_learn_19_len, |
|
|
.arena_size = tflite_learn_19_arena_size |
|
|
}; |
|
|
|
|
|
const ei_learning_block_config_tflite_graph_t ei_learning_block_config_19 = { |
|
|
.implementation_version = 1, |
|
|
.block_id = 19, |
|
|
.object_detection = 1, |
|
|
.object_detection_last_layer = EI_CLASSIFIER_LAST_LAYER_FOMO, |
|
|
.output_data_tensor = 0, |
|
|
.output_labels_tensor = 1, |
|
|
.output_score_tensor = 2, |
|
|
.quantized = 0, |
|
|
.compiled = 0, |
|
|
.graph_config = (void*)&ei_config_tflite_graph_19 |
|
|
}; |
|
|
|
|
|
const size_t ei_learning_blocks_size = 1; |
|
|
const ei_learning_block_t ei_learning_blocks[ei_learning_blocks_size] = { |
|
|
{ |
|
|
&run_nn_inference, |
|
|
(void*)&ei_learning_block_config_19, |
|
|
EI_CLASSIFIER_IMAGE_SCALING_NONE, |
|
|
}, |
|
|
}; |
|
|
|
|
|
const ei_model_performance_calibration_t ei_calibration = { |
|
|
1, |
|
|
false, |
|
|
(int32_t)(EI_CLASSIFIER_RAW_SAMPLE_COUNT / ((EI_CLASSIFIER_FREQUENCY > 0) ? EI_CLASSIFIER_FREQUENCY : 1)) * 1000, |
|
|
0.8f, |
|
|
(int32_t)(EI_CLASSIFIER_RAW_SAMPLE_COUNT / ((EI_CLASSIFIER_FREQUENCY > 0) ? EI_CLASSIFIER_FREQUENCY : 1)) * 500, |
|
|
0 |
|
|
}; |
|
|
|
|
|
const ei_impulse_t impulse_116394_106 = { |
|
|
.project_id = 116394, |
|
|
.project_owner = "Louis Moreau", |
|
|
.project_name = "Face detection - FOMO - bigger dataset", |
|
|
.deploy_version = 106, |
|
|
|
|
|
.nn_input_frame_size = 27648, |
|
|
.raw_sample_count = 9216, |
|
|
.raw_samples_per_frame = 1, |
|
|
.dsp_input_frame_size = 9216 * 1, |
|
|
.input_width = 96, |
|
|
.input_height = 96, |
|
|
.input_frames = 1, |
|
|
.interval_ms = 1, |
|
|
.frequency = 0, |
|
|
.dsp_blocks_size = ei_dsp_blocks_size, |
|
|
.dsp_blocks = ei_dsp_blocks, |
|
|
|
|
|
.object_detection = 1, |
|
|
.object_detection_count = 10, |
|
|
.object_detection_threshold = 0.5, |
|
|
.object_detection_last_layer = EI_CLASSIFIER_LAST_LAYER_FOMO, |
|
|
.fomo_output_size = 12, |
|
|
|
|
|
.tflite_output_features_count = 288, |
|
|
.learning_blocks_size = ei_learning_blocks_size, |
|
|
.learning_blocks = ei_learning_blocks, |
|
|
|
|
|
.inferencing_engine = EI_CLASSIFIER_TFLITE, |
|
|
|
|
|
.sensor = EI_CLASSIFIER_SENSOR_CAMERA, |
|
|
.fusion_string = "image", |
|
|
.slice_size = (9216/4), |
|
|
.slices_per_model_window = 4, |
|
|
|
|
|
.has_anomaly = 0, |
|
|
.label_count = 1, |
|
|
.calibration = ei_calibration, |
|
|
.categories = ei_classifier_inferencing_categories |
|
|
}; |
|
|
|
|
|
const ei_impulse_t ei_default_impulse = impulse_116394_106; |
|
|
|
|
|
#endif |
|
|
|