{"id":20697603,"url":"https://github.com/epomatti/azure-customvision-classification","last_synced_at":"2026-05-08T14:46:21.221Z","repository":{"id":108712247,"uuid":"284136606","full_name":"epomatti/azure-customvision-classification","owner":"epomatti","description":"Training \u0026 Prediction with Azure Cognitive Services Custom Vision.","archived":false,"fork":false,"pushed_at":"2022-03-25T01:16:10.000Z","size":1859,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-11T02:51:19.375Z","etag":null,"topics":["azure","cognitive-services","computer-vision","custom-vision","machine-learning","nodejs","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/epomatti.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-31T21:55:55.000Z","updated_at":"2022-03-25T01:15:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"3e7c6ee8-978c-4f31-9fb1-d37d1a1dd3fe","html_url":"https://github.com/epomatti/azure-customvision-classification","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/epomatti/azure-customvision-classification","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epomatti%2Fazure-customvision-classification","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epomatti%2Fazure-customvision-classification/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epomatti%2Fazure-customvision-classification/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epomatti%2Fazure-customvision-classification/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/epomatti","download_url":"https://codeload.github.com/epomatti/azure-customvision-classification/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epomatti%2Fazure-customvision-classification/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261897032,"owners_count":23226649,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure","cognitive-services","computer-vision","custom-vision","machine-learning","nodejs","typescript"],"created_at":"2024-11-17T00:19:09.835Z","updated_at":"2026-05-08T14:46:16.161Z","avatar_url":"https://github.com/epomatti.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Azure Custom Vision Benchmark\n\nAutomated programs for training and prediction tasks using Azure Custom Vision (Cognitive Services).\n\n\u003cimg src=\"docs/doggo.png\"/\u003e\n\n## Infrastructure\n\nCreate the Cognitive Services resource:\n\n```sh\naz cognitiveservices account create -n '\u003cname\u003e' -g '\u003cgroup\u003e' --kind CognitiveServices --sku S0 -l 'eastus2' --yes\n```\n\nFor Cognitive Services --sku F0 tier is no longer available.\n\n## Project Setup\n\nStart by copying the sample `.env`:\n\n```sh\ncp example.env .env\n```\n\nGo to [customvision.ai](https://www.customvision.ai/projects#/settings) resources and copy the folling parameters:\n\n\u003cimg src=\"docs/resource.png\"/\u003e\n\n💡 I've opened [#14595](https://github.com/Azure/azure-cli/issues/14595) to get the API Key using the CLI.\n\n\n\nNow add the values to the `.env` file:\n\n```sh\ncustomVisionTrainingKey='\u003ctraining_key\u003e'\ncustomVisionTrainingEndPoint='\u003cendpoint\u003e'\npredictionResourceId='\u003cprediction_resource_id\u003e'\n```\n\nℹ️ _Custom Vision recommends at least 50 images per set to ensure model performance. \nFollowing the rule of thumb 70/30 you should have at least 15 additional images for the prediction tests._\n\nSet the remaining configuration for your project:\n\n```sh\n# Project\nprojectName='\u003cyour_project_name\u003e'\npublishName='\u003cpublish_name\u003e'\n\n# Sample data\ntrainingSampleDataRoot='\u003cpath\u003e'\npredictionSampleDataRoot='\u003cpath\u003e'\n\n# Tags separated by commas\ntags='tag1,tag2,tag3'\n```\n\nThe `tags` must match the directories for each image set.\n\nExample:\n\n\u003cimg src=\"docs/sample.png\"/\u003e\n\nYour data sample must match this directory structure.\n\n## Training and Prediction\n\nIf you haven't already, download the dependencies:\n\n```sh\nyarn install\n```\n\nFirst you need to create your project and tags:\n\n```sh\n# This will output the project id\nts-node src/createProject.ts\n```\n\nAdd the project ID to the `.env` file:\n\n```sh\nprojectId='xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'\n```\n\nRun the model scripts:\n\n```sh\n# Upload the images\nts-node src/upload.ts\n\n# Train the model\nts-node src/training.ts\n\n# Run the prediction tests\nts-node src/prediction.ts\n```\n\n_My upload algorithm is limited to send a single batch of 64 images. Help me with a pull request_ 😁\n\n\nℹ️ You must unpublish previous iterations on the Performance tab at [customvision.ai](https://www.customvision.ai) if you wish to publish new ones.\n\nYou'll get an output for each image according to it's associated tag:\n\n```\nResults for [husky]:\n         husky: 100.00%\n         border_collie: 0.00%\nResults for [border_collie]:\n         border_collie: 100.00%\n         husky: 0.00%\n```\n\nYou may go to the portal now and see the results:\n\n\u003cimg src=\"docs/results.png\"/\u003e\n\n## References\n\n[Custom Vision with SDK](https://docs.microsoft.com/en-us/azure/cognitive-services/custom-vision-service/quickstarts/image-classification?pivots=programming-language-javascript)\n\n[Custom Vision Service Limits and Quotas](https://docs.microsoft.com/en-us/azure/cognitive-services/custom-vision-service/limits-and-quotas)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepomatti%2Fazure-customvision-classification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fepomatti%2Fazure-customvision-classification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepomatti%2Fazure-customvision-classification/lists"}