我有一個函式的以下輸出,我需要從此流中讀取形狀、標簽和域。
[Annotation(shape=Rectangle(x=0.0, y=0.0, width=1.0, height=1.0), labels=[ScoredLabel(62282a1dc79ed6743e731b36, name=GOOD, probability=0.5143796801567078, domain=CLASSIFICATION, color=Color(red=233, green=97, blue=21, alpha=255), hotkey=ctrl 3)], id=622cc4d962f051a8f41ddf35)]
我需要它們如下
shp = Annotation.shape
lbl = Annotation.labels
dmn = domain
這似乎很簡單,但我還想不通。
uj5u.com熱心網友回復:
output作為物件串列給出Annotation:
output = [Annotation(...)]
你應該能夠簡單地做:
shp = output[0].shape
lbl = output[0].labels
dmn = labels[0].domain
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/443244.html
