NMS score threshold is set, but there is no NMS output in this model.
CHECK_SUCCESS failed with status=6
i have converted yolov8m model to .hef format successfully but i getting the above error
@OmerRe @omria @Omer @Nadav
NMS score threshold is set, but there is no NMS output in this model.
CHECK_SUCCESS failed with status=6
i have converted yolov8m model to .hef format successfully but i getting the above error
@OmerRe @omria @Omer @Nadav
The error message “NMS score threshold is set, but there is no NMS output in this model” along with “CHECK_SUCCESS failed with status=6” points to a problem in the Non-Maximum Suppression (NMS) stage of your object detection model’s post-processing.
This error suggests:
To troubleshoot this:
If you’re using a Hailo platform, make sure your post-processing pipeline is set up correctly and is compatible with the inference engine’s output format.
i have done steps has shown in hailo tutorial of hailo model zoo git repo and i am using yolov8m model for convertion
during converstion can i set nms related values and data
Is it possible to run the model via the command line interface (CLI)? You can attempt to execute it using the command Hailortcli run <.hef>
. This will allow you to verify if the .hef
file has been correctly compiled and also check the Frames Per Second (FPS).
@Nadav @omria @Omer how to find nms layer in yolov8 model architecture to resolve this error [info] Loading model script commands to customviolation_v53_1 from string
HailoNNException Traceback (most recent call last)
Cell In[16], line 23
17 runner.load_model_script(“”.join(model_script_commands))
19 # Load the model script to ClientRunner so it will be considered on optimization
20 #runner.load_model_script(alls)
21
22 # Call Optimize to perform the optimization process
—> 23 runner.optimize(calib_dataset)
25 # Save the result state to a Quantized HAR file
26 quantized_model_har_path = f"{model_name}_quantized_model.har"
File ~/anaconda3/envs/rpi5/lib/python3.10/site-packages/hailo_sdk_common/states/states.py:16, in allowed_states..wrap..wrapped_func(self, *args, **kwargs)
12 if self._state not in states:
13 raise InvalidStateException(
14 f"The execution of {func.name} is not available under the state: {self._state.value}",
15 )
—> 16 return func(self, *args, **kwargs)
File ~/anaconda3/envs/rpi5/lib/python3.10/site-packages/hailo_sdk_client/runner/client_runner.py:2093, in ClientRunner.optimize(self, calib_data, data_type, work_dir)
2061 @allowed_states(States.HAILO_MODEL, States.FP_OPTIMIZED_MODEL)
2062 def optimize(self, calib_data, data_type=CalibrationDataType.auto, work_dir=None):
2063 “”"
2064 Apply optimizations to the model:
2065
(…)
2091
2092 “”"
→ 2093 self._optimize(calib_data, data_type=data_type, work_dir=work_dir)
File ~/anaconda3/envs/rpi5/lib/python3.10/site-packages/hailo_sdk_common/states/states.py:16, in allowed_states..wrap..wrapped_func(self, *args, **kwargs)
12 if self._state not in states:
13 raise InvalidStateException(
14 f"The execution of {func.name} is not available under the state: {self._state.value}",
15 )
—> 16 return func(self, *args, **kwargs)
File ~/anaconda3/envs/rpi5/lib/python3.10/site-packages/hailo_sdk_client/runner/client_runner.py:1934, in ClientRunner._optimize(self, calib_data, data_type, work_dir)
1931 @allowed_states(States.HAILO_MODEL, States.FP_OPTIMIZED_MODEL, States.QUANTIZED_MODEL)
1932 def _optimize(self, calib_data, data_type=None, work_dir=None):
1933 if self._state == States.HAILO_MODEL:
→ 1934 self._optimize_full_precision(calib_data=calib_data, data_type=data_type)
1935 self._sdk_backend.full_quantization(calib_data, data_type=data_type, work_dir=work_dir)
1936 self._state = States.QUANTIZED_MODEL
File ~/anaconda3/envs/rpi5/lib/python3.10/site-packages/hailo_sdk_client/runner/client_runner.py:1999, in ClientRunner._optimize_full_precision(self, calib_data, data_type)
1998 def _optimize_full_precision(self, calib_data=None, data_type=None):
→ 1999 self._sdk_backend.optimize_full_precision(calib_data=calib_data, data_type=data_type)
2000 self._state = States.FP_OPTIMIZED_MODEL
File ~/anaconda3/envs/rpi5/lib/python3.10/site-packages/hailo_sdk_client/sdk_backend/sdk_backend.py:1483, in SDKBackendQuantization.optimize_full_precision(self, update_model_and_params, calib_data, data_type)
1480 params = ModelParams({})
1481 params.set_params_kind(ParamsKinds.FP_OPTIMIZED)
→ 1483 model, params = self._apply_model_modification_commands(model, params, update_model_and_params)
1484 if calib_data is None:
1485 self._logger.debug(“Use random calibration data for full precision optimization”)
File ~/anaconda3/envs/rpi5/lib/python3.10/site-packages/hailo_sdk_client/sdk_backend/sdk_backend.py:1374, in SDKBackendQuantization._apply_model_modification_commands(self, model, params, update_model_and_params)
1372 for command in model_modification_commands:
1373 command.validate_command([layer.name for layer in model])
→ 1374 model, params = command.apply(model, params, hw_consts=self.hw_arch.consts)
1375 if update_model_and_params:
1376 for layer_name in command.meta_data:
File ~/anaconda3/envs/rpi5/lib/python3.10/site-packages/hailo_sdk_client/sdk_backend/script_parser/nms_postprocess_command.py:379, in NMSPostprocessCommand.apply(self, hailo_nn, params, hw_consts)
373 if self.engine == PostprocessTarget.NN_CORE.value:
374 logger.warning(
375 “Currently nn-core
performs only score threshold. In the near future it will perform score”
376 " + IoU threshold. If you want to apply IoU threshold please use cpu
or auto
instead",
377 )
→ 379 self._update_config_file(hailo_nn)
380 self.validate_nms_config_json()
381 pp_creator = create_nms_postprocess(
382 hailo_nn,
383 params,
(…)
389 self.bbox_decoding_only,
390 )
File ~/anaconda3/envs/rpi5/lib/python3.10/site-packages/hailo_sdk_client/sdk_backend/script_parser/nms_postprocess_command.py:538, in NMSPostprocessCommand._update_config_file(self, hailo_nn)
536 self._update_config_file_by_engine()
537 self._update_command_args_in_config_file()
→ 538 self._layers_scope_addition(hailo_nn)
539 self._update_config_layers(hailo_nn)
File ~/anaconda3/envs/rpi5/lib/python3.10/site-packages/hailo_sdk_client/sdk_backend/script_parser/nms_postprocess_command.py:579, in NMSPostprocessCommand._layers_scope_addition(self, hailo_nn)
577 scope_addition_fields = [field for field in fields_with_layer_name if bbox_decoder.get(field.value)]
578 for field in scope_addition_fields:
→ 579 bbox_decoder[field.value] = hailo_nn.get_layer_by_name(bbox_decoder[field.value]).name
File ~/anaconda3/envs/rpi5/lib/python3.10/site-packages/hailo_sdk_common/hailo_nn/hailo_nn.py:524, in HailoNN.get_layer_by_name(self, layer_name)
519 if len(potential_matches) > 1:
520 raise HailoNNException(
521 f"The layer named {layer_name} exist under multiple scopes in the HN {[layer.scope for layer in potential_matches]}“,
522 )
→ 524 raise HailoNNException(f"The layer named {layer_name} doesn’t exist in the HN”)
HailoNNException: The layer named conv82 doesn’t exist in the HN
It looks like layer 82 is missing where it’s supposed to be. Try checking where it’s being used, and you might want to run the visualizer to see if it’s positioned correctly.
i have fixed but now it occurs the issue in class names so how can we define it