Skip to content

Commit 6713f54

Browse files
Squashed 'tinyml-modelmaker/' changes from 5d7c775e..4c5a0163
4c5a0163 updated json REVERT: 5d7c775e updated git-subtree-dir: tinyml-modelmaker git-subtree-split: 4c5a0163bf49590282489979b5c259159f45bc32
1 parent 8655c36 commit 6713f54

20 files changed

Lines changed: 2808 additions & 154 deletions

File tree

data/descriptions/description_timeseries.json

Lines changed: 142 additions & 142 deletions
Large diffs are not rendered by default.

scripts/get_model_performance_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
valid_model_list = ['MotorFault_model_1_t', 'MotorFault_model_2_t', 'MotorFault_model_3_t',
77
'ArcFault_model_200_t', 'ArcFault_model_300_t', 'ArcFault_model_700_t', 'ArcFault_model_1400_t',
88
'TimeSeries_Generic_1k_t', 'TimeSeries_Generic_4k_t', 'TimeSeries_Generic_6k_t',
9-
'TimeSeries_Generic_13k_t', 'Lenet5', 'MobileNetV1_58k_NPU', 'PIRDetection_model_1_t']
9+
'TimeSeries_Generic_13k_t', 'Lenet5', 'MobileNetV1_58k_NPU', 'MobileNetV2_58k_NPU'. 'PIRDetection_model_1_t']
1010
soft_tinie_targets = ['c28_soft_int_in_int_out']
1111
hard_tinie_targets = ['c28_hard_int_in_int_out']
1212
valid_tinie_targets = soft_tinie_targets + hard_tinie_targets

tinyml_modelmaker/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,17 @@ def get_target_module_from_task_type(task_type):
6060
vision_task_types = [
6161
ai_modules.vision.constants.TASK_TYPE_IMAGE_CLASSIFICATION,
6262
]
63+
# Audio task types
64+
audio_task_types = [
65+
ai_modules.audio.constants.TASK_TYPE_AUDIO_CLASSIFICATION,
66+
]
6367

6468
if task_type in timeseries_task_types:
6569
return 'timeseries'
6670
elif task_type in vision_task_types:
6771
return 'vision'
72+
elif task_type in audio_task_types:
73+
return 'audio'
6874
else:
6975
return None
7076

@@ -81,5 +87,6 @@ def get_task_category_type_from_task_type(task_type):
8187
ai_modules.timeseries.constants.TASK_TYPE_GENERIC_TS_ANOMALYDETECTION: ai_modules.timeseries.constants.TASK_CATEGORY_TS_ANOMALYDETECTION,
8288
ai_modules.timeseries.constants.TASK_TYPE_GENERIC_TS_FORECASTING: ai_modules.timeseries.constants.TASK_CATEGORY_TS_FORECASTING,
8389
ai_modules.vision.constants.TASK_TYPE_IMAGE_CLASSIFICATION: ai_modules.vision.constants.TASK_CATEGORY_IMAGE_CLASSIFICATION,
90+
ai_modules.audio.constants.TASK_TYPE_AUDIO_CLASSIFICATION: ai_modules.audio.constants.TASK_CATEGORY_AUDIO_CLASSIFICATION,
8491
}
8592
return task_type_to_task_category_type_map.get(task_type)

tinyml_modelmaker/ai_modules/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import sys
3232
from . import timeseries
3333
from . import vision
34+
from . import audio
3435

3536
def get_target_module(backend_name):
3637
this_module = sys.modules[__name__]
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#################################################################################
2+
# Copyright (c) 2023-2026, Texas Instruments
3+
# All Rights Reserved.
4+
#
5+
# Redistribution and use in source and binary forms, with or without
6+
# modification, are permitted provided that the following conditions are met:
7+
#
8+
# * Redistributions of source code must retain the above copyright notice, this
9+
# list of conditions and the following disclaimer.
10+
#
11+
# * Redistributions in binary form must reproduce the above copyright notice,
12+
# this list of conditions and the following disclaimer in the documentation
13+
# and/or other materials provided with the distribution.
14+
#
15+
# * Neither the name of the copyright holder nor the names of its
16+
# contributors may be used to endorse or promote products derived from
17+
# this software without specific prior written permission.
18+
#
19+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23+
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24+
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25+
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26+
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27+
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
#################################################################################
30+
31+
from . import constants, datasets, runner, training
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from ...common.compilation import tinyml_benchmark
2+

0 commit comments

Comments
 (0)