Bing Search Images, detect Emotions, Save with PowerShell & Azure
Bing Search Images using PowerShell Module for Azure Cognitive Services
In this demo, PowerShell Module for Azure Cognitive Service is utilized to programmatically Bing Search Images with a Keyword, then results are analyzed and filtered by emotion (happiness) scores and saved as local files.
Project Page – https://github.com/PrateekKumarSingh/PSCognitiveService
- Install the PSCognitiveService module from PowerShell Gallery and Import it in your current session
Create AzureRM Cognitive Service Accounts for subscription keys
- Configure the Subscription keys as $env variables locally in your session and add it to your $profile for later usage. Which will complete the setup and configuration.
- Search the web for a keyword to find Images and capture the Image URLs
- Detect emotion in each image using cmdlet: Get-Face and get the Happiness scores
- Use this happiness score filter out Images with a score above 90%.
- Analyze the Images with cmdlet: Get-ImageAnalysis to get caption text.
- Use the caption to locally save the image on your file system with a unique name that describes the Image.
- and you’re done! 🙂
If you like this video, please subscribe to my youtube channel here which is the motivation for me to create more such videos 🙂 thank you!