Training Microsoft Custom Vision model via rest api

Training Microsoft Custom Vision model via rest api

By : Oladayo Noah Akintol
Date : November 21 2020, 07:01 PM
it fixes the issue I got it working using the "API testing console" feature, so I can help you to identify your issue (but sorry, I'm not expert in node.js so I will guide you with C# code)
Format of content for API
code :
public ImageFileCreateEntry(string name = default(string), byte[] contents = default(byte[]), IList<System.Guid> tagIds = default(IList<System.Guid>))
// Or uploaded in a single batch 
var imageFiles = japaneseCherryImages.Select(img => new ImageFileCreateEntry(Path.GetFileName(img), File.ReadAllBytes(img))).ToList();
trainingApi.CreateImagesFromFiles(project.Id, new ImageFileCreateBatch(imageFiles, new List<Guid>() { japaneseCherryTag.Id }));
Image img = Image.FromFile(@"\\Mac\Home\Downloads\Picto.jpg");
byte[] arr;
using (MemoryStream ms = new MemoryStream())
    img.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
    arr = ms.ToArray();

var content = Convert.ToBase64String(arr);
POST https://southcentralus.api.cognitive.microsoft.com/customvision/v2.2/Training/projects/MY_PROJECT_ID/images/files HTTP/1.1
Host: southcentralus.api.cognitive.microsoft.com
Content-Type: application/json

  "images": [
      "name": "imageSentByApi",
      "contents": "/9j/4AAQSkZJRgA...TOO LONG FOR STACK OVERFLOW...",
      "tagIds": [],
      "regions": []
  "tagIds": []
  "isBatchSuccessful": true,
  "images": [{
    "sourceUrl": "imageSentByApi",
    "status": "OK",
    "image": {
      "id": "GENERATED_ID_OF_IMAGE",
      "created": "2018-11-05T22:33:31.6513607",
      "width": 328,
      "height": 328,
      "resizedImageUri": "https://irisscuprodstore.blob.core.windows.net/...",
      "thumbnailUri": "https://irisscuprodstore.blob.core.windows.net/...",
      "originalImageUri": "https://irisscuprodstore.blob.core.windows.net/..."

Share : facebook icon twitter icon
Is there a way to see estimated time for training a model in Google AutoML Vision?

Is there a way to see estimated time for training a model in Google AutoML Vision?

By : user2254595
Date : March 29 2020, 07:55 AM
I hope this helps . The time required to train your model will completely depends and vary based on the amount of data included within your dataset and the accuracy desired for your model; therefore, I think it is not possible to determine the number of hours needed to complete the training phase. The GCP pricing documentation mentions the following suggestion:
Azure custom vision choose training time

Azure custom vision choose training time

By : john
Date : March 29 2020, 07:55 AM
this one helps. i'm using API to load my data and make prediction. I have seen documentation to train model using code (https://docs.microsoft.com/en-us/azure/cognitive-services/Custom-Vision-Service/python-tutorial) but I can't figure how to chose training time of my model using the API? , Basically to queue project for training, you have to use below API :
code :
POST {Endpoint}/customvision/v3.0/training/projects/{projectId}/train?trainingType={trainingType}&reservedBudgetInHours={reservedBudgetInHours}&forceTrain={forceTrain}&notificationEmailAddress={notificationEmailAddress}
train_project(project_id, training_type=None, reserved_budget_in_hours=0, force_train=False, notification_email_address=None, custom_headers=None, raw=False, **operation_config)
What is the format for the training/testing data for a Computer Vision model

What is the format for the training/testing data for a Computer Vision model

By : user3585636
Date : March 29 2020, 07:55 AM
it should still fix some issue Yolo version 3 is a good starting point. The trained model will have a .weight file and a .cfg file which can be used to detect object from webcam, video in computer or, in Android with opencv.
In opencv python, cv.dnn.readNetFromDarknet("yolov3_tiny.cfg", "CarDetector.weights") can be used load the trained model.
code :
String tinyYoloCfg = getPath("yolov3_tiny.cfg", this);
String tinyYoloWeights = getPath("CarDetector.weights", this);
Net tinyYolo = Dnn.readNetFromDarknet(tinyYoloCfg, tinyYoloWeights);
Get project ID without using training module on custom vision?

Get project ID without using training module on custom vision?

By : Izabela Horvath
Date : March 29 2020, 07:55 AM
Any of those help The simplest way to get the project url from the website is to open the project in a browser and look at the URL; the project id is the GUID listed after /projects: customvision.ai/projects/#/manage
(Microsoft Azure custom vision service: Object Detection) How to find bounding box info of training data?

(Microsoft Azure custom vision service: Object Detection) How to find bounding box info of training data?

By : Jonida Shaptej
Date : October 13 2020, 08:00 AM
seems to work fine All the data that you are looking for is available through Custom Vision Training API. Currently the latest API is v3.0, its portal is here.
More in details, GetTaggedImages method will give you the associations of images and regions bounding box
Related Posts Related Posts :
  • SQLite3 Node.js JSON
  • Mongo and Node.js find and aggregate
  • A problem occurred configuring project ':CordovaLib
  • JSON SQlite3 Create table with JSON
  • Best practice regarding dependencies
  • Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit co
  • How to use Node.js with Jemalloc?
  • What does 'npm i --package-lock-only' do?
  • How to app use all routes from different file
  • Save binary image to file
  • How is Node.js Knex similar/different to Sequelize?
  • node.js on shared server space
  • Problem deploying Apollo Express server to Heroku: "GET query missing."
  • Im having trouble while serving or deploying Firebase Hosting Functions
  • How to install node js tools for Visual Studio 2019?
  • Difference between route and endpoint?
  • angular ngIf condition inside ngFor for to display like button
  • Why is module.exports=router is needed?
  • Node.js check if running locally or in google cloud VM?
  • Node TypeScript delete require cache
  • Error: ENOENT: no such file or directory, open 'F:\login\uploads\2019-05-12T18:23:38.048Z20190319_214122.jpg'
  • 'nvm' is not recognized as an internal or external command Windows
  • How to send email with ReactJS and SendGrid?
  • aws-xray captureAWS annotations
  • In Angular, what are the advantages of using Renderer over ElementRef?
  • How to get an "Image in cell" URL from the Google Sheets API
  • Missing Script when I run npm start to create React app
  • node install some times have @ and not always
  • npm WARN tar ENOENT no such file or directory node_modules/.staging/typescript-8be04997/lib/zh-CN/diagnosticMessages.gen
  • Loop through set of results in node js
  • Why deployed serverless functions not displayed in list of lambda functions in AWS console?
  • Where should I define the DocumentClient when using ExpressJs?
  • Node.js and mongoDB multiple concurrent request for shopping cart checkout function
  • How to fix ' Support for the experimental syntax 'exportDefaultFrom' isn't currently enabled' in node
  • how do i declare a custom function in twilio function runtime environment?
  • Slow loading web page served by Node.js HTTP server
  • How to get Session Entities to work as part of Dialogflow detect intent
  • Namecheap: Node JS Express App - App Route return 404 not found
  • How to create m3u8 playlist from mp4 video url ( stored in amazon S3 ) and store the video chunks ( .ts files) and .m3u8
  • How to write aeropike service file so that it reconnects if connection failed?
  • How to mock API client created inside a test class?
  • Failed at the node-expat@2.3.17 install script - Happens with any NPM installation
  • Node module path alias with experimental modules
  • How to get the Base Url in Twig
  • Actions-On-Google Card Subtitle not displaying in Simulator or Android phone
  • Creating Node.js enum in code to match list of values in database
  • How do I install fonts in the IBM Cloud nodejs runtime? (cloud foundry)
  • Can we read files from server path using any fs method in NodeJs
  • NodeJS, DiscordJS command arguments split by {}
  • Values are set as null inside the database when the respective values are not passed while updating
  • The "path" argument must be of type string. Received type object - Angular 7
  • Find out all running node.js application with pid and port
  • Deploying React express App on Google app engine: 404 error
  • Angular 5 : Cannot read property 'subscribe' of undefined
  • How to create groups and grant different permissions in AWS Cognito in Serverless
  • Why not to consider models in REST API versioning?
  • React js - problem with proxy for web socket link in react
  • MongoDB query to find documents with variations
  • should I open/close different Postgres connections in one node endpoint? making this work with OOP
  • Publish a TypeScript Project to NPM without source
  • shadow
    Privacy Policy - Terms - Contact Us © 35dp-dentalpractice.co.uk