4. Required API
Last updated
Last updated
go to "console.cloud.google.com" and create Google Service Account.
click left menu then click APIs & Services then click Library.
Search "Vision API".
make "Cloud Vision API" enabled.
After making it enabled click "manage" to move to dash board. click "Credentials" on the left menu then click "CREATE CREDENTIALS". Next, click "Service account key".
For Service account, check "New service account". For Service account name type "VisionAPI_Service_Account". For Role click Project then click "Owner". Service account ID is automatically changes to "visionapi-service-account". Then make Key Type to "JSON" format. Next, click Create.
Name the file "ServiceAccountToken.json" and save it to git clone folder. Also, if your using the code in "HOW TO USE" make sure your putting this file in the same file location as main python code.
Install google-cloud-vision library in raspberry pi.
If you want to get images and messages from mask-less wearer or person over 37.5 Celsius IN REAL-TIME!, you need to install telegram in Google Play.
Go to telegram APP and go to BotFather's chat room.
Push "start" button and then type "/newbot".
Make bot name and username. Username must end with word "bot". ex) bot = Vision_bot, username = Vision_bot
After that, you could get "HTTP API" right away. You will use this API later in main code. SO DON'T FORGET!
Type "userinfobot" and go to chat room. Type "/start" to initialize bot. You will use this Id number later in main code. SO DON'T FORGET!.
Put "HTTP API" in token variable and "user number ID" to mc variable in main code.