@@ -304,12 +304,13 @@ def validate_config(cls, config, fetch_only=False, **kwargs):
304
304
305
305
def configure (self ):
306
306
self .attributes_recognition_out = self .launcher_config .get ('attributes_recognition_out' , self .output_blob )
307
+ self .output_verified = False
307
308
308
309
def process (self , raw , identifiers = None , frame_meta = None ):
309
310
result = []
310
311
raw_output = self ._extract_predictions (raw , frame_meta )
311
- self .select_output_blob ( raw_output )
312
- self . attributes_recognition_out = self . attributes_recognition_out or self .output_blob
312
+ if not self .output_verified :
313
+ self .select_output_blob ( raw_output )
313
314
for identifier , multi_label in zip (identifiers , raw_output [self .attributes_recognition_out ]):
314
315
multi_label [multi_label > 0.5 ] = 1.
315
316
multi_label [multi_label <= 0.5 ] = 0.
@@ -318,6 +319,15 @@ def process(self, raw, identifiers=None, frame_meta=None):
318
319
319
320
return result
320
321
322
+ def select_output_blob (self , outputs ):
323
+ self .output_verified = True
324
+ if self .attributes_recognition_out :
325
+ self .attributes_recognition_out = self .check_output_name (self .attributes_recognition_out , outputs )
326
+ return
327
+ super ().select_output_blob (outputs )
328
+ self .attributes_recognition_out = self .output_blob
329
+ return
330
+
321
331
322
332
class GazeEstimationAdapter (Adapter ):
323
333
__provider__ = 'gaze_estimation'
0 commit comments