0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Azure Custom Visionのプロジェクトをコピーする

0
Posted at

Custom Visionに作成したプロジェクトをコピーする方法です。
REST APIを持ってるのでcurlでもほかの言語でも行けますが

import requests
import json

# Exports param
export_endpoint = ""
export_project_id = ""
export_training_key = ""

export_url = f"{export_endpoint}/customvision/v3.3/Training/projects/{export_project_id}/export"

export_headers = {
    "Training-Key": export_training_key
}

response = requests.get(export_url, headers=export_headers)

res_body = json.loads(response.text)
token = res_body["token"]
print(token)

# Import params
import_endpoint = ""
import_project_name = ""
import_training_key = ""

import_url = f"{import_endpoint}/customvision/v3.3/Training/projects/import"

import_headers = {
    "Training-key": import_training_key,
    "Content-Length": "0"
}

params = {
    "token": token,
    "name": import_project_name
}

response = requests.post(import_url, headers=import_headers, params=params)
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?