Label detection

We are going to start off with label detection. In the project folder that you downloaded along with this book (or you can download the same from https://github.com/PacktPublishing/Getting-Started-with-Google-Cloud-AI-Services) you will find a folder named Chapter 4 ; inside that folder you will find another folder named API, and inside that folder a folder named Videos. Inside the Videos folder, I have placed all the sample image files that I have used for testing, for your reference. You are free to use any videos. In the APIVideos folder, refer to the video called Label_Detection_Pexels_Video_699572008.webm. Here is a screenshot of one of the frames of the video, for your reference:

Source: https://videos.pexels.com/videos/close-up-video-of-a-woman-studying-855418.

This is a video of a girl reading a book. To work with any Video Intelligence API, we need to make two requests. Since video analysis cannot happen on the fly (at least not today), we need to first make a request, submitting the video and requesting a type of detection. This request will respond with a name to track the video analysis. Using another request, we periodically check whether processing is complete.

The two requests are:

  • The label detection request
  • The operation status request
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.147.77