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)