Comments (2)
Hi @chrisnurse, thanks for the feature request. It's unknown if this will be implemented in the future at this time, but I wanted to point out that there is another way of finding out the position of a person in an image. Sometimes in a description, it will say what the person is doing.
For instance, if you send this image to the API, it will say:
a man sitting in front of a window with confidence 0.5809454581580495
This image also gives a description:
a young man lying on the grass with confidence 0.792376616131881
In this image, there is a description of standing:
a man standing on a sidewalk with confidence 0.9378039677317365
So if you parsed the description string, you'd be able to identify these actions in a photo.
I hope this helps.
from cognitive-services-rest-api-samples.
@chrisnurse, upon further inquiry into the Computer Vision SDK, I see they actually still have these tags in there. As a whole, the newer SDK has tried to take a lot of properties out of the AnalyzeImage() API call, and create separate functions for them. For instance, I see that in DescribeImageAsync(), there are properties Captions, Metadata, and Tags.
I ran some image URLs in a sample and I got some actions in the tags that a person was doing. For instance with the person standing, I got these person-related tags: standing, holding, walking. Below is a code sample if you wanted to run it.
using System;
using Microsoft.Azure.CognitiveServices.Vision.ComputerVision;
using Microsoft.Azure.CognitiveServices.Vision.ComputerVision.Models;
using System.Threading.Tasks;
namespace DescribeImageAsync
{
class Program
{
static string personStanding = "https://get.pxhere.com/photo/back-view-black-and-white-buildings-city-cityscape-coat-downtown-guy-male-man-monochrome-outdoors-person-perspective-skyscrapers-standing-trench-coat-urban-wear-1549999.jpg";
static string personLaying = "https://il8.picdn.net/shutterstock/videos/16689553/thumb/7.jpg";
static string personSitting = "https://i.pinimg.com/736x/62/ae/d3/62aed3bde181347daca11e1d768a8957--photoshop-images-cut-out-people.jpg";
static string SubscriptionKey = Environment.GetEnvironmentVariable("COMPUTER_VISION_SUBSCRIPTION_KEY");
static string Endpoint = Environment.GetEnvironmentVariable("COMPUTER_VISION_ENDPOINT");
static void Main(string[] args)
{
ComputerVisionClient client = Authenticate(Endpoint, SubscriptionKey);
DescribeImage(client, personStanding).Wait();
DescribeImage(client, personLaying).Wait();
DescribeImage(client, personSitting).Wait();
}
public static ComputerVisionClient Authenticate(string endpoint, string key)
{
ComputerVisionClient client =
new ComputerVisionClient(new ApiKeyServiceClientCredentials(key))
{ Endpoint = endpoint };
return client;
}
public static async Task DescribeImage(ComputerVisionClient client, string url)
{
ImageDescription results = await client.DescribeImageAsync(url);
Console.WriteLine();
Console.WriteLine("Captions:");
foreach (var caption in results.Captions)
{
Console.WriteLine(caption.Text);
}
Console.WriteLine();
Console.WriteLine("Metadata:");
Console.WriteLine("Format" + results.Metadata.Format);
Console.WriteLine("Height" + results.Metadata.Height);
Console.WriteLine("Width" + results.Metadata.Width);
Console.WriteLine();
Console.WriteLine("Tags:");
foreach (var tag in results.Tags)
{
Console.WriteLine(tag);
}
}
}
}
from cognitive-services-rest-api-samples.
Related Issues (19)
- OCR API Send Bounding Box to Search? HOT 17
- Output searchable PDF or hOCR HOT 4
- python example is not working HOT 1
- Error shown in Ink recogniser java app HOT 1
- Getting error message "3001- Preprocessing failed" and additional "Unable to download blob" HOT 1
- Speech Translation with REST API
- Can we add Cognitive Services Topic to repio
- Incorrect endpoint in Bing Image Search Tutorial
- Required minimum Node.js bump for Azure SDK
- Required minimum Node.js bump for Azure SDK
- BingWebSearchv7.java API Error
- Invalid url, should not contain bing/
- Request to update guide on how to export/download Custom QA knowledge bases via REST API.
- SearchResults not found anywhere HOT 2
- endpoint is changed from "api.cognitive.microsoft.com/bing to "api.bing.microsoft.com
- Update endpoint for Bing Search HOT 1
- Sending Batch request to azure cognitive API for TEXT-OCR HOT 2
- Train request- Error 1002 HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cognitive-services-rest-api-samples.