I have a couple of questions regarding ai accelerator, just for you info I have 0 experience with hailo software and hardware.
Questions:
is it possible to convert mobilenet ssd models to hailo .hef format?
I tried to look it up in google, but seems there’s no much info about it. Almost like it’s not possible, and I should use YOLO family models…
can someone pinpoint lines of code where I basically delegating object detection functionality to hailo? I.e passing live video frame from rpbi camera to object detection function and further lines of code where hailo performing its analysis.
Once again, I also tried to understand it by myself, by looking on object detection examples from GitHub, but seems due to my level of expertise, I was completely lost.
If someone could help me (a new guy in the world of hailo) I would be more than appreciated
MobileNet SSD Models
Hailo provides ready-to-use MobileNet SSD models in the Hailo Model Zoo. You can check out the available options here: MobileNet SSD Models in Model Zoo.
Full Example Code for Object Detection
Hailo’s GitHub has comprehensive example code, which includes scripts demonstrating how to implement object detection with Hailo. You can find it here: Hailo Application Code Examples.
Here’s a basic function (from utils.py) showing how inference is handled:
def run(self) -> None:
with self.infer_model.configure() as configured_infer_model:
while True:
batch_data = self.input_queue.get()
if batch_data is None:
break # Sentinel value to stop the inference loop
if self.send_original_frame:
original_batch, preprocessed_batch = batch_data
else:
preprocessed_batch = batch_data
bindings_list = []
for frame in preprocessed_batch:
bindings = self._create_bindings(configured_infer_model)
bindings.input().set_buffer(np.array(frame))
bindings_list.append(bindings)
configured_infer_model.wait_for_async_ready(timeout_ms=10000)
job = configured_infer_model.run_async(
bindings_list, partial(
self.callback,
input_batch=original_batch if self.send_original_frame else preprocessed_batch,
bindings_list=bindings_list
)
)
job.wait(10000) # Wait for the last job
Let me know if you have questions on any of these steps, or if you’d like further clarification on the code structure!
am I understanding correctly, that I will have no problem with custom mobile net ssd model to convert it into hailo format?
please don’t kill me but can you comment every part of code in super easy to understand language for newbies, where you basically pinpointing where live video frame is passing to a function, and where object detection with mobile net magic happens?
I assume the key functionality to my question above here: