Azure Custom Vision: Is it possible to store image metadata (NOT tags) in the Custom Vision environment? - azure

I have images with important file metadata (e.g. provenance and processing history) stored locally or in Azure blob storage.
I would like to import (POST) these to the Azure Custom Vision environment (via the API or GUI) (see e.g. https://southcentralus.dev.cognitive.microsoft.com/docs/services/Custom_Vision_Training_3.0) for training while (i) retaining those image metadata and (ii) being able to retrieve them via (a) the Custom Vision API and (b) the Custom Vision GUI.
An example use case would be to purge images of a certain provenance from the Custom Vision store because of a GDPR-related customer request [Aside: I appreciate that Azure Cognitive Services can anyway use the data for improving their models etc.].
As far as I can tell the only way to reference an image POSTed to Custom Vision is via its UUID. Is there any other way to reference metadata stored with that image or:
Would that constitute a feature request?
Could the image metadata be stored inside the image (e.g. JPEG EXIF) (assuming it is possible to retrieve the image itself from the Custom Vision "environment", which it may not be)?
Otherwise, is the only solution to store the returned Custom Vision image UUID in a database elsewhere alongside the required metadata?
NB In the above, by metadata I do not mean tags/labels in the image model-side sense, but rather data-side file metadata.
[Note that Azure Cognitive Services is using stackoverflow for Q&A, so this question is I believe appropriate for stackoverflow.]
Thanks as ever!

I am not part of Microsoft, so it is only my opinion based on my usage of Custom Vision.
I understand your use-case, especially regarding GDPR as you mentioned, but currently adding metadata is not a feature, whether through the API or the GUI.
To answer your questions:
Would that constitute a feature request?
Definitely. You can create an item on UserVoice for this feature (but 1st check if there is not another related existing item): https://cognitive.uservoice.com/forums/598141-custom-vision-service
Could the image metadata be stored inside the image (e.g. JPEG EXIF)
(assuming it is possible to retrieve the image itself from the Custom
Vision "environment", which it may not be)?
You can get the images your previously posted using GetImagesByIds method from the API for example (or GetTaggedImages / GetUntaggedImages). Remember that the images you post are treated: thumbnail images, resized images are generated based on what you posted. These methods provides the links to the images.
I made a quick try by:
- Uploading an image to CustomVision and adding a tag
- Getting its id
- Getting the image through the API
Good news: on the image downloaded with the "originalImageUri" link, I still have some EXIF available (just needed to rename the file as ".jpg" after download):
Otherwise, is the only solution to store the returned Custom Vision
image UUID in a database elsewhere alongside the required metadata?
Right now it is clearly the best solution in my opinion

Related

Exporting tags from Custom Vision

I am using the Azure Custom Vision service (customvision.ai) for data labelling. It works well for automatically labelling data.
I want to use this data for a custom neural network, so I want to download the tags. Is there a way to download the tags, either from the GUI or API?
The closest thing I have found is the GetTaggedImages API request (https://southcentralus.dev.cognitive.microsoft.com/docs/services/Custom_Vision_Training_3.2/operations/5dddfe4dc8d30b100855c60c).
Thanks!
If you want to get all tags for a given project and iteration., I would recommend you use API directly. There is a GetTags API can help with this, pleae check the following API reference:
https://southcentralus.dev.cognitive.microsoft.com/docs/services/Custom_Vision_Training_3.2/operations/5dddfe4ec8d30b100855c626

how to upload image in mongodb using node js under a specific model

I am working on a project (Something like a shopping website) and I want to upload a product describing its name, price and image. It's pretty simple to add name, price in a database, but not finding a proper way to have all those information along with a product Image as there is no specific way to store image like we store Strings and Numbers etc. I do not want to upload a file locally with a package called multer. I have tried using Grid FS storage, but I do not how to make it keep all three information together as a single package. I am looking for a better way so I could use it when I will make my website live.
You can convert an image to a base64 encoded string. See this question for more information. Also see this npm package.
But be careful! As far as I know MongoDB has a maximum storage size for a document. If you plan to save a couple high-res images in that document you will go better with a file storage.

Azure Read API for Vector PDFs

I am working on the solution for OCR using Azure Read API, and it provides out of box solution for raster PDFs
https://learn.microsoft.com/en-us/azure/cognitive-services/computer-vision/concept-recognizing-text#read-api
but I don't see if it can support vector based PDFs. I have other solution by using some third party libraries such as Aspose and PDFxStream, but prefer if I can stay within just Azure Vision API ecosystem.
So my question is is it possible to use Read API for vector PDF, and if not what is best practical approach I could use?
To answer my question: yes, it supports Vector based PDFs, although it is not explicitly mentioned in API documentation. We checked both through Azure portal and through API code and it works. No problem with mixing raster and vector based PDFs.

Is it possible to get a resized version of an image stored on Google Cloud Storage?

I'm using GCS to store my user's images in our react-native app. I need a small version of images so I can implement progressive loading. Is there any way to get a resized image from the GCS url or using any other method?
I'd like to avoid having multiple instances of the same image in our storage.
I know you can do something like:
http://lh3.googleusercontent.com/93uhV8K2yHkRuD63KJxlTi7SxjHS8my2emuHmGLZxEmX99_XAjTN3c_2zmKVb3XQ5d8FEkwtgbGjyYpaDQg=s250
with google photos, where the =sXX at the end (xx being any number between 0 and ~2500) is the size that returned image will be.
is it possible to do something similar using GCS?
this is what a url to an image looks like with respect to our app:
https://storage.googleapis.com/appName.appspot.com/1513912717946-Image_1513912675892.jpg
You need App Engine to generate those URLs, and this is only available in the standard environment.
Relevant docs are: Python, Java, PHP, and Go.
The API allows you to generate (and delete) those URLs. The generated URLs support the =sXX parameter. XX is an integer from 0–2560 representing the length, in pixels, of the image's longest side. It also supports cropping the image into a square with =sXX-c.
Elaborating: App Engine is Google's PaaS offering. You can read more about the standard and flexible environments here.

Vuforia Cloud Database Target with custom content [duplicate]

I am trying to use vuforia framework (https://developer.vuforia.com/library/all-articles) to do a simple image recognition task via cloud. My question is that is it possible to take an image from camera and search it in vuforia cloud (without realtime frame processing - AR) ? They have very limited documentation and could not find any relevant information regarding this.
Vuforia now allows us to upload objects into the target manager, whether it is an image or cylinder/box, or even a multiple dimension object.
Upload these into Vuforia Database (Database should be for cloud reco. If not, create a new database for it) and get the Client Keys.
Now you can import the Cloud reco prefab and add a text on top to augment.
Hope this helped. :)

Resources