Skip to content

Commit f49a338

Browse files
authored
# Release 4.1.0 (#1)
## Release 4.1.0 ### New features - Added event based usage of the handleOnNewImageProcessingScores function ### Improvements - Merged function scope of 'processImageWithScoresNUM' into 'processImageNUM' (most contend was identical), please always use 'processImageNUM' - Check for device and firmware to prevent incompatibilities - Adapted level of log messages
1 parent f5afba2 commit f49a338

9 files changed

Lines changed: 637 additions & 331 deletions

File tree

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4+
## Release 4.1.0
5+
6+
### New features
7+
- Added event based usage of the handleOnNewImageProcessingScores function
8+
9+
### Improvements
10+
- Merged function scope of 'processImageWithScoresNUM' into 'processImageNUM' (most contend was identical), please always use 'processImageNUM'
11+
- Check for device and firmware to prevent incompatibilities
12+
- Adapted level of log messages
13+
414
## Release 4.0.0
515

616
### Improvements

CSK_Module_MultiDeepLearning/pages/pages/CSK_Module_MultiDeepLearning/CSK_Module_MultiDeepLearning.html

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@
6666
</davinci-text-field>
6767
</layout-column>
6868
</layout-row>
69+
<layout-row id="Placeholder0"
70+
class="myCustomSpacerVert10_CSK_Module_MultiDeepLearning">
71+
</layout-row>
6972
<layout-row id="RowLayout3"
7073
style="justify-content: space-between; align-items: center">
7174
<davinci-value-display id="VD_ViewerActive" label="Viewer active:">
@@ -81,7 +84,7 @@
8184
</crown-binding>
8285
</davinci-toggle-switch>
8386
</layout-row>
84-
<layout-row id="Placeholder"
87+
<layout-row id="Placeholder1"
8588
class="myCustomSpacerVert10_CSK_Module_MultiDeepLearning">
8689
</layout-row>
8790
<layout-row id="RowLayout8"
@@ -105,6 +108,62 @@
105108
<layout-row id="Placeholder2"
106109
class="myCustomSpacerVert10_CSK_Module_MultiDeepLearning">
107110
</layout-row>
111+
<stacked-view id="SV_Service" style="flex-grow: 1">
112+
<stacked-pane id="SP_ServiceOK" value="true" style="flex-grow: 1">
113+
<layout-column id="ColumnLayout14"
114+
style="align-items: stretch; align-self: flex-start">
115+
<layout-row id="RowLayout9"
116+
style="justify-content: space-between; align-items: center">
117+
<davinci-value-display id="VD_ProcessWithScores"
118+
label="Return scores for all classes"
119+
title="Use this to get the scores for all classes">
120+
</davinci-value-display>
121+
<davinci-toggle-switch id="TS_ProcessWithScores"
122+
title="Use this to return the scores for all classes">
123+
<crown-edpws-binding property="checked"
124+
name="CSK_MultiDeepLearning/OnNewStatusProcessWithScores"
125+
update-on-resume>
126+
</crown-edpws-binding>
127+
<crown-binding event="change"
128+
name="CSK_MultiDeepLearning/setProcessWithScores"
129+
path="param/args/status" auto-commit>
130+
</crown-binding>
131+
</davinci-toggle-switch>
132+
</layout-row>
133+
<layout-row id="Placeholder3"
134+
class="myCustomSpacerVert10_CSK_Module_MultiDeepLearning">
135+
</layout-row>
136+
<layout-row id="RowLayout10"
137+
style="justify-content: space-between; align-items: center">
138+
<davinci-value-display id="VD_SortResultByIndex"
139+
label="Sort results by class index"
140+
title="Use this to sort the results by class index instead of highest score">
141+
</davinci-value-display>
142+
<davinci-toggle-switch id="TS_SortResultByIndex"
143+
title="Use this to sort the results by class index instead of highest score">
144+
<crown-edpws-binding property="checked"
145+
name="CSK_MultiDeepLearning/OnNewStatusSortResultByIndex"
146+
update-on-resume>
147+
</crown-edpws-binding>
148+
<crown-binding event="change"
149+
name="CSK_MultiDeepLearning/setSortResultByIndex"
150+
path="param/args/status" auto-commit>
151+
</crown-binding>
152+
</davinci-toggle-switch>
153+
</layout-row>
154+
<layout-row id="Placeholder4"
155+
class="myCustomSpacerVert10_CSK_Module_MultiDeepLearning">
156+
</layout-row>
157+
</layout-column>
158+
</stacked-pane>
159+
<stacked-pane id="NoServiceLogin" value="false">
160+
</stacked-pane>
161+
<crown-edpws-binding property="value"
162+
name="CSK_MultiDeepLearning/OnUserLevelServiceActive"
163+
update-on-resume
164+
converter="function(value) {return value.toString();}">
165+
</crown-edpws-binding>
166+
</stacked-view>
108167
<davinci-value-display id="VD_SelectedModel" label="Selected model:">
109168
</davinci-value-display>
110169
<davinci-drop-down id="DD_SelectedModel">

CSK_Module_MultiDeepLearning/project.mf.xml

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,22 @@ INFO: Other modules can check via "Script.isServedAsEvent" if event of sepecific
152152
<event name="OnNewFullResultWithImageNUM">
153153
<desc>Example of dynamically created event to notify measured result incl. class name and score of instance incl. the image. +
154154
NUM will be replaced by the number of instance (e.g. "OnNewResultWithImage1"). +
155+
Check "setProcessWithScores" regarding result configuration (single or multiple result). +
155156
INFO: Other modules can check via "Script.isServedAsEvent" if event of sepecific instance exists.</desc>
156157
<param desc="Result" multiplicity="1" name="result" type="bool"/>
157-
<param desc="Class" multiplicity="1" name="class" type="string"/>
158-
<param desc="Score" multiplicity="1" name="score" type="float"/>
158+
<param desc="Class" multiplicity="[1+]" name="class" type="string"/>
159+
<param desc="Score" multiplicity="[1+]" name="score" type="float"/>
159160
<param alias="Image" desc="Image" multiplicity="1" name="img" type="object"/>
160161
</event>
162+
<event name="OnNewStatusProcessWithScores">
163+
<trait>released</trait>
164+
<desc>Notify if the scores for all classes should be returned in the processing result.</desc>
165+
<param desc="Status" multiplicity="1" name="status" type="bool"/>
166+
</event>
167+
<event name="OnNewStatusSortResultByIndex">
168+
<desc>Notify if the processing result should be sorted by class index instead of highest score.</desc>
169+
<param desc="Status" multiplicity="1" name="status" type="bool"/>
170+
</event>
161171
<function name="pageCalled">
162172
<desc>Function to register "OnResume" of the module UI (only as helper function).</desc>
163173
<return desc="Empty string (only needed to simplify binding)." multiplicity="1" name="empty" type="string"/>
@@ -189,8 +199,8 @@ INFO: Other modules can check via "Script.isServedAsFunction" if function of sep
189199
Needs then to be called via "Script.callFunction()" (INFO: By using this, the first return value is just the "success" of this callFunction(), see AppEngine docu) +</desc>
190200
<param alias="Image" desc="Image to process." multiplicity="1" name="image" type="object"/>
191201
<return desc="Result score acceptable." multiplicity="?" name="validScore" type="bool"/>
192-
<return desc="Score result." multiplicity="?" name="score" type="float"/>
193-
<return desc="Result class." multiplicity="?" name="class" type="string"/>
202+
<return desc="Score result." multiplicity="[?*]" name="score" type="float"/>
203+
<return desc="Result class." multiplicity="[?*]" name="class" type="string"/>
194204
</function>
195205
<function name="sendParameters">
196206
<desc>Send parameters to CSK_PersistentData module if possible to save them.</desc>
@@ -214,17 +224,6 @@ Needs then to be called via "Script.callFunction()" (INFO: By using this, the fi
214224
<desc>Get amount of created DeepLearning instances.</desc>
215225
<return desc="Amount" multiplicity="1" name="amount" type="int"/>
216226
</function>
217-
<function name="processImageWithScoresNUM">
218-
<desc>Example of dynamically served function to process DNN on an image and return the scores for each class. +
219-
NUM will be replaced by the number of instance (e.g. "processImageWithScores1"). +
220-
INFO: Other modules can check via "Script.isServedAsFunction" if function of sepecific instance exists. +
221-
Needs then to be called via "Script.callFunction()" (INFO: By using this, the first return value is just the "success" of this callFunction(), see AppEngine docu). +</desc>
222-
<param alias="Image" desc="Image to process." multiplicity="1" name="image" type="object"/>
223-
<param desc="Sort results by descending score instead of class number." multiplicity="1" name="sorted" type="bool"/>
224-
<return desc="Result score acceptable." multiplicity="[?*]" name="validScore" type="bool"/>
225-
<return desc="Scores for each class as array (sorted by class number per default)." multiplicity="[?*]" name="score" type="float"/>
226-
<return desc="Names of each class as a table (sorted by class number per default)." multiplicity="[?*]" name="class" type="string"/>
227-
</function>
228227
<function name="addInstance">
229228
<desc>Function to add an additional deepLearning instance.</desc>
230229
</function>
@@ -240,10 +239,19 @@ IMPORTANT: As instances start their own threads, the module needs to be restarte
240239
<desc>Functin to set if the image incl. result should be forwarded after processing.</desc>
241240
<param desc="Status" multiplicity="1" name="status" type="bool"/>
242241
</function>
242+
<function name="setProcessWithScores">
243+
<desc>Function to set if the scores for all classes should be returned in the processing result.</desc>
244+
<param desc="" multiplicity="1" name="status" type="bool"/>
245+
<return desc="Status if it was possible to configure." multiplicity="1" name="success" type="bool"/>
246+
</function>
247+
<function name="setSortResultByIndex">
248+
<desc>Function to set if the processing result should be sorted by class index instead of highest score.</desc>
249+
<param desc="" multiplicity="1" name="status" type="bool"/>
250+
</function>
243251
</serves>
244252
</crown>
245253
<meta key="author">SICK AG</meta>
246-
<meta key="version">4.0.0</meta>
254+
<meta key="version">4.1.0</meta>
247255
<meta key="priority">low</meta>
248256
<meta key="copy-protected">false</meta>
249257
<meta key="read-protected">false</meta>

0 commit comments

Comments
 (0)