### Run Tokenizer Example Source: https://github.com/hailo-ai/hailo-camera-apps/blob/repo-is-archived/apps/h15/native/new_clip/utils/tokenizers/README.md Execute the provided example program. It can use the default tokenizer configuration or a custom path specified as a command-line argument. ```bash # Run with default tokenizer.json path ./builddir/tokenizer_example # Run with custom tokenizer path ./builddir/tokenizer_example /path/to/your/tokenizer.json ``` -------------------------------- ### Run the AI Example Application Source: https://github.com/hailo-ai/hailo-camera-apps/blob/repo-is-archived/apps/h15/native/ai_example_app/README.rst Execute this command on the Hailo15 platform to run the pre-compiled AI example application. This will display the video feed with inference overlays. ```bash $ ./apps/ai_example_app/ai_example_app ``` -------------------------------- ### Start Camera Viewer Server Source: https://github.com/hailo-ai/hailo-camera-apps/blob/repo-is-archived/README.rst SSH into the device and start the camera viewer server. Access the viewer via a web browser on the host machine. ```bash ssh root@10.0.0.1 camera-viewer-server ``` -------------------------------- ### Run AI Example App on Device Source: https://context7.com/hailo-ai/hailo-camera-apps/llms.txt Executes the pre-compiled AI example application on the Hailo-15 device via SSH. Various command-line arguments control its behavior, including timeout, FPS printing, configuration file, profile, overlay drawing, and host IP. ```bash ssh root@10.0.0.1 ./apps/ai_example_app/ai_example_app \ --timeout 120 \ --print-fps \ --config-file-path /etc/imaging/cfg/medialib_configs/ai_example_medialib_config.json \ --profile "Daylight" \ --draw-overlay "0,1" \ --host-ip 10.0.0.2 ``` -------------------------------- ### Install Dependencies Source: https://github.com/hailo-ai/hailo-camera-apps/blob/repo-is-archived/apps/h15/native/new_clip/utils/clip_encoder_onnx/README.md Install the necessary Python packages for ONNX export and Hailo binary generation. ```bash pip install torch torchvision clip-by-openai onnx onnxruntime numpy ``` -------------------------------- ### Get Help for File Source to UDP Case Study Source: https://github.com/hailo-ai/hailo-camera-apps/blob/repo-is-archived/apps/h15/native/case_studies/file_source_to_udp/README.rst Use this command to display all available command-line options and their descriptions for the file_source_to_udp_case_study executable. ```bash # Get help ./file_source_to_udp_case_study --help ``` -------------------------------- ### Install Optional GStreamer Plugins Source: https://github.com/hailo-ai/hailo-camera-apps/blob/repo-is-archived/tools/cross_compiler/README.rst Optionally, add Python support and GStreamer trace hooks for GStreamer plugins. ```sh # GStreamer plugins IMAGE_INSTALL_append += " \ gstreamer1.0-python \ gst-instruments \ " # Enable trace hooks for GStreamer PACKAGECONFIG_append_pn-gstreamer1.0 += " gst-tracer-hooks" ``` -------------------------------- ### Run Single Stream Application on Hailo15 Source: https://github.com/hailo-ai/hailo-camera-apps/blob/repo-is-archived/apps/h15/native/case_studies/single_stream/README.rst Execute this command on the Hailo15 platform to start the single stream application. ```bash $ ./apps/case_studies/single_stream/single_stream_case_study ``` -------------------------------- ### Stage Start Method Source: https://github.com/hailo-ai/hailo-camera-apps/blob/repo-is-archived/apps/h15/native/ai_example_app/docs/app_structure.rst Starts the stage by setting the end-of-stream flag to false and launching the main processing loop in a new thread. ```cpp AppStatus start() { m_end_of_stream = false; m_thread = std::thread(&Stage::loop, this); return AppStatus::SUCCESS; } ``` -------------------------------- ### Get WebRTC Offer Source: https://github.com/hailo-ai/hailo-camera-apps/blob/repo-is-archived/apps/h15/native/new_clip/resources/webfrontend/API.md Client requests an SDP offer from the server to initiate a connection. ```APIDOC ## POST /api/webrtc/offer ### Description Client requests an SDP offer from the server to initiate a connection. ### Method POST ### Endpoint /api/webrtc/offer ### Parameters #### Request Body - **session_id** (string) - Required - The session ID obtained from creating a WebRTC session. ### Request Example ```json { "session_id": "the-session-id-from-above" } ``` ### Success Response (200 OK) A standard WebRTC SDP offer. ```json { "type": "offer", "sdp": "v=0\r\no=- ...\r\n" } ``` ### Error Response - 500 Invalid: If request is invalid - 400 Internal Server Error: If internal extension module service is not found ``` -------------------------------- ### Complete CLIP Text Encoder Workflow Example Source: https://github.com/hailo-ai/hailo-camera-apps/blob/repo-is-archived/apps/h15/native/new_clip/utils/clip_encoder_onnx/README.md A three-step workflow to generate the ONNX model, create binary files, and validate the results for Hailo-accelerated CLIP text encoding. ```bash # Step 1: Generate ONNX model python clip_text_encode_onnx_export.py --model "ViT-B/32" ``` ```bash # Step 2: Create binary files python clip_text_hailo_binary_export.py \ --onnx-path clip_vit_b32_text_encoder_full.onnx \ --output-dir vit_b_32_binary ``` ```bash # Step 3: Validate results python clip_text_encoder_full_test.py \ --prompt "a photo of a dog playing in the park" \ --bin-folder ./vit_b_32_binary \ --hailo-onnx-path ./clip_vit_b32_text_encoder_full.onnx \ --model "ViT-B/32" \ --output-dir ./validation_results ``` -------------------------------- ### Run Detection Application on Hailo15 Platform Source: https://github.com/hailo-ai/hailo-camera-apps/blob/repo-is-archived/apps/h15/native/case_studies/detection/README.rst Execute the detection case study application on the Hailo15 platform after starting the host streaming pipeline. This will display the video feed with inference overlays. ```bash $ ./apps/case_studies/detection/detection_case_study ``` -------------------------------- ### Start AI Pipeline Source: https://github.com/hailo-ai/hailo-camera-apps/blob/repo-is-archived/apps/h15/native/ai_example_app/docs/app_structure.rst Initiates the execution of the configured AI pipeline. This is a crucial step before the application begins processing data. ```cpp // Start pipeline std::cout << "Starting." << std::endl; app_resources->pipeline->start_pipeline(); ``` -------------------------------- ### Start Pipeline Stages Source: https://github.com/hailo-ai/hailo-camera-apps/blob/repo-is-archived/apps/h15/native/ai_example_app/docs/app_structure.rst Starts all stages within the pipeline in a specific order: sink, general, and then source stages. This ensures data flows correctly through the processing chain. ```cpp void start_pipeline() { // Start the sink stages for (auto &stage : m_sink_stages) { stage->start(); } // Start the general stages for (auto &stage : m_gen_stages) { stage->start(); } // Start the source stages for (auto &stage : m_src_stages) { stage->start(); } } ``` -------------------------------- ### Run record_perf Script Source: https://github.com/hailo-ai/hailo-camera-apps/blob/repo-is-archived/scripts/misc/internals/record_perf/README.rst Execute the record_perf.sh script to start recording performance data. Specify the duration for which the recording should run. ```sh ./scripts/misc/internals/record_perf/record_perf.sh