admin管理员组文章数量:1399881
I downloaded the annotation from the video in CVAT. I want to import this annotation to another video. When I import it via ui, there are no problems. But when I import via API, I get an error: "JSON parse error - Expecting value: line 1 column 1 (char 0)". Here is my code
TOKEN = 'my_token'
task_id = 'my_task_id'
url = f'{HOST}/api/tasks/{task_id}/annotations/'
file_path = "default.json"
headers = {
"Authorization": f"Token {TOKEN}",
"Content-Type": "application/json"
}
params = {
"format": "Datumaro 1.0",
"location": "local"
}
with open(file_path, "rb") as file:
data = file.read()
files = {"annotation_file": data}
response = requests.post(url, headers=headers, params=params, files=files)
I tried to pass json in different ways, but without success
本文标签: Can not import task annotation in CVAT using APIStack Overflow
版权声明:本文标题:Can not import task annotation in CVAT using API - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744171058a2593782.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论