![]() ![]() If you have any question or doubt then feel free to post it in comment. If above command gives you error regarding some risk then execute following command sudo snap install google-cloud-sdk -clasic If you are facing any issue while installing the google-cloud-sdk then try using pip install snap !gcloud ml video detect-labels gs://YOUR_GOOGLE_BUCKET_VIDEO_PATH_HERE.mp4Ībove command gives you the same result as your python code. To check whether the Google bucket is working and the path you have given in code is correct, run the following command. !gsutil acl ch -u gs://PATH_TO_YOUR_VIDEO ![]() ![]() To change bucket permissions run the following command. If you are facing any issues than check whether your service account has access to the Google bucket and the project: If you have any question then post it in the comment. Hope this tutorial will help you to use the Video Intelligence API of Google Cloud with Python on Google Colab/Local Machine. Os.environ = "GOOGLE_DRIVE_PATH_TO_JSON_FILE"Ĭlient = videointelligence.VideoIntelligenceServiceClient()Īfter executing all command successfully, you will get some result in JSON format given below.įormat shows the entity ‘nature’ appeared at the start time 0s to end time of 142s. from lab import driveħ) Now copy and paste the code in file. !pip install google-cloud-videointelligenceĪnd then follow the steps prompted on screen after !gcloud init command.Ħ) To Mount your drive. ‘Service key JSON file’ is the one you have downloaded in step-4.Ĭreate a new Colab File and execute following commands !pip install google-cloud 5) Now for coding part open Google colab from īefore you start your coding part, please upload service key JSON file to your Google drive. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |