pyannote上的rest api
pyannote.server的Python项目详细描述
#pyannote rest-api
$pip install pyannote.server
<运行服务器
$python-m pyannote.server.run
<
*/parser/`返回支持的文件格式列表
$curl-x获取http://localhost:5000/parser/
[“mdtm”,“uem”]
*`/parser/<;format>;`解析“post”ed文件并以pyannote json格式返回其内容。
评估指标
*`/metric/`返回可用评估指标列表
$curl-x获取http://localhost:5000/metric/
[“检测”、“二值化”,“identification”]
*`/metric/<;name>;`比较json格式的“post”引用和假设注释,并返回相应的计算度量。
**输入格式(json)**
{
“reference”:[
…
],
“hypothesis”:[
…
]
}
**输出格式(json)**
{
{
度量:{
度量:值,
组件1:值1,
组件2:值2,
…#分量是
中的值…#最后的值是计算出来的。#对/parser/<;metric>;的一次调用可能会
…#返回多个子度量
}
],
“假设”:[
…
]
}
*`/error/regression`将“后”引用与两个假设进行比较,并返回第二个假设(`after`)相对于第一个假设(`before`)带来的回归和/或改进。
**输入格式(json)**
{
“reference”:[
…
],
“之前”:[
…
],
“之后”:[
…
]
}
$pip install pyannote.server
<运行服务器
$python-m pyannote.server.run
<
*/parser/`返回支持的文件格式列表
$curl-x获取http://localhost:5000/parser/
[“mdtm”,“uem”]
*`/parser/<;format>;`解析“post”ed文件并以pyannote json格式返回其内容。
评估指标
*`/metric/`返回可用评估指标列表
$curl-x获取http://localhost:5000/metric/
[“检测”、“二值化”,“identification”]
*`/metric/<;name>;`比较json格式的“post”引用和假设注释,并返回相应的计算度量。
**输入格式(json)**
{
“reference”:[
…
],
“hypothesis”:[
…
]
}
**输出格式(json)**
{
{
度量:{
度量:值,
组件1:值1,
组件2:值2,
…#分量是
中的值…#最后的值是计算出来的。#对/parser/<;metric>;的一次调用可能会
…#返回多个子度量
}
],
“假设”:[
…
]
}
*`/error/regression`将“后”引用与两个假设进行比较,并返回第二个假设(`after`)相对于第一个假设(`before`)带来的回归和/或改进。
**输入格式(json)**
{
“reference”:[
…
],
“之前”:[
…
],
“之后”:[
…
]
}