🤖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.

    Scheduled Pinned Locked Moved FAQS
    2 Posts 2 Posters 2.2k Views
    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 Offline
      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 Offline
        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

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post