4. Required API

Google vision API

1. Create a Google Service Account.

go to "console.cloud.google.com" and create Google Service Account.

2. Enable Google Vision API service.

click left menu then click APIs & Services then click Library.

Search "Vision API".

make "Cloud Vision API" enabled.

3. Download Token JSON file to your PC.

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.

6. Install Google Cloud Python libraries and Vision API library.

Install google-cloud-vision library in raspberry pi.

$ pip install google-cloud-vision

Telegram API

1. Install telegram APP in Google Play

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.

2. Create newbot

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

3. Get HTTP API

After that, you could get "HTTP API" right away. You will use this API later in main code. SO DON'T FORGET!

4. Get user number ID

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

5. Change variables in main code

Put "HTTP API" in token variable and "user number ID" to mc variable in main code.

Last updated

Was this helpful?