🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Please tell me how to use ApiYolo Class with images from coreS3's camera.

    FAQS
    2
    2
    394
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      kan_tomo
      last edited by

      Please tell me how to connect M5Module-LLM to coreS3 and use ApiYolo Class with images from coreS3's camera.
      Developed using Arduino IDE

      1 Reply Last reply Reply Quote 0
      • U
        ulver
        last edited by

        You have to capture a jpeg from the camera buffer and pass it to the llm... An example could be:

        
              uint8_t* out_jpg = NULL;
              size_t out_jpg_len = 0;
              frame2jpg(CoreS3.Camera.fb, 255, &out_jpg, &out_jpg_len);
              CoreS3.Camera.free();
              module_llm.yolo.inferenceAndWaitResult(
                yolo_work_id, out_jpg, out_jpg_len, [](String& result) {
                   /* do something with result */
                  .... 
                }, 2000, "ID");
              free(out_jpg);
        
        

        the result will contain:

        {"bbox":["195.86","197.75","319.00","280.27"],"class":"keyboard","confidence":"0.69"}
        

        HTH

        1 Reply Last reply Reply Quote 0
        • First post
          Last post