zenseact / zod

Software Development Kit for the Zenseact Open Dataset (ZOD)
https://zod.zenseact.com
MIT License
92 stars 13 forks source link

Accessing ego road and debris annotations #38

Closed ErikLarssonDev closed 5 months ago

ErikLarssonDev commented 5 months ago

Hello,

I am trying to access ego road and debris annotations but I cannot see any "class" in the annotation object. I think it should be accessible according to https://zod.zenseact.com/annotations/.

Could you explain how I can access this information?

Code: seq = zod_sequences[list(training_sequences)[0]]

try: annotations = seq.get_annotation(AnnotationProject.EGO_ROAD) except: annotations = []

for annotation in annotations: print(annotation)

Output: [[[52.207340240478516, 1579.9600830078125], [377.20196533203125, 1488.13330078125], [394.30694580078125, 1579.9600830078125], [397.9079895019531, 1586.2618408203125], [932.151123046875, 1684.2645263671875], [833.3350830078125, 1708.4195556640625], [781.7311401367188, 1724.888916015625], [727.9312744140625, 1742.456298828125], [266.78973388671875, 1648.031982421875], [52.207340240478516, 1579.9600830078125]]] [[[485.4187316894531, 1458.4837646484375], [485.4187316894531, 1472.2899169921875], [466.6423645019531, 1471.1854248046875], [445.104736328125, 1467.8719482421875], [485.4187316894531, 1458.4837646484375]]] [[[1198.166259765625, 1652.607666015625], [1210.58251953125, 1648.261962890625], [1220.5155029296875, 1643.2955322265625], [1230.4486083984375, 1635.224853515625], [1566.30908203125, 1385.6575927734375], [1571.896484375, 1375.103759765625], [1576.8629150390625, 1357.720947265625], [1578.9271240234375, 1340.8114013671875], [1578.9271240234375, 1316.737548828125], [1581.5439453125, 1305.223876953125], [1582.590576171875, 1279.056640625], [1582.116455078125, 1264.7713623046875], [1581.0491943359375, 1245.203857421875], [1577.1356201171875, 1215.6748046875], [1574.645263671875, 1182.9437255859375], [1700.2330322265625, 1162.308837890625], [1847.120361328125, 1139.2613525390625], [1921.6995849609375, 1128.3316650390625], [1932.090576171875, 1126.1170654296875], [1953.825439453125, 1123.304443359375], [2015.1942138671875, 1118.446044921875], [2025.9239501953125, 1118.21826171875], [2023.8717041015625, 1126.13427734375], [2022.9920654296875, 1132.8775634765625], [2024.1649169921875, 1154.2802734375], [2025.04443359375, 1156.0394287109375], [2093.650390625, 1156.3326416015625], [2096.2890625, 1156.0394287109375], [2101.56640625, 1152.521240234375], [2102.7392578125, 1151.348388671875], [2102.7392578125, 1122.9091796875], [2100.97998046875, 1116.7523193359375], [2099.220947265625, 1113.5272216796875], [2170.465576171875, 1110.0089111328125], [2171.638427734375, 1112.3544921875], [2174.277099609375, 1113.5272216796875], [2194.2138671875, 1114.1136474609375], [2195.386474609375, 1137.86181640625], [2196.8525390625, 1139.6209716796875], [2199.197998046875, 1140.50048828125], [2256.82080078125, 1140.4046630859375], [2258.00830078125, 1139.2171630859375], [2258.483154296875, 1136.6048583984375], [2258.958251953125, 1105.019287109375], [2271.070068359375, 1104.5443115234375], [2271.782470703125, 1108.3441162109375], [2273.207275390625, 1110.0064697265625], [2299.09326171875, 1110.2440185546875], [2300.51806640625, 1109.531494140625], [2300.51806640625, 1104.5443115234375], [2311.4423828125, 1104.5443115234375], [2312.392333984375, 1105.7318115234375], [2338.515869140625, 1106.206787109375], [2339.703369140625, 1107.3941650390625], [2341.60302734375, 1107.869140625], [2361.552001953125, 1107.869140625], [2362.501953125, 1107.1566162109375], [2362.501953125, 1105.7318115234375], [2382.55615234375, 1105.20751953125], [2382.55615234375, 1104.2479248046875], [2392.343505859375, 1104.2479248046875], [2393.494873046875, 1103.4803466796875], [2393.494873046875, 1100.9854736328125], [2428.6142578125, 1099.833984375], [2428.42236328125, 1102.904541015625], [2414.60498046875, 1105.97509765625], [2412.877685546875, 1106.9346923828125], [2411.726318359375, 1108.853759765625], [2411.342529296875, 1112.1162109375], [2411.342529296875, 1114.611083984375], [2413.069580078125, 1124.59033203125], [2414.4130859375, 1126.701416015625], [2416.14013671875, 1128.4285888671875], [2422.900146484375, 1133.1707763671875], [2440.1982421875, 1140.50048828125], [2441.664306640625, 1170.9920654296875], [2442.5439453125, 1173.6307373046875], [2452.805419921875, 1181.2535400390625], [2454.8115234375, 1189.2962646484375], [2455.96044921875, 1193.509521484375], [2458.6416015625, 1196.57373046875], [2461.705810546875, 1198.4888916015625], [2519.54296875, 1218.40625], [2525.67138671875, 1219.9383544921875], [2701.6748046875, 1219.4991455078125], [2706.43505859375, 1217.7681884765625], [2709.46435546875, 1214.7388916015625], [2711.628173828125, 1209.5457763671875], [2722.447021484375, 1209.113037109375], [2722.447021484375, 1199.592529296875], [2841.886962890625, 1221.230224609375], [3149.385498046875, 1272.6693115234375], [3650.3828125, 1360.824951171875], [3848, 1393.7281494140625], [3848, 1568.685546875], [3607.259521484375, 1629.1820068359375], [3135.9501953125, 1736.1058349609375], [3017.437255859375, 1700.651611328125], [2921.47265625, 1678.886474609375], [2825.508056640625, 1665.035888671875], [2739.4365234375, 1655.142578125], [2645.45068359375, 1648.21728515625], [2582.379150390625, 1637.052490234375], [2541.754638671875, 1632.66064453125], [2311.183837890625, 1624.9749755859375], [1866.51171875, 1624.9749755859375], [1449.2884521484375, 1631.562744140625], [1308.75, 1639.2484130859375], [1264.831787109375, 1643.6402587890625], [1198.166259765625, 1652.607666015625]]]

wljungbergh commented 5 months ago

Hi, thank you for raising this issue. We are fixing this in a current pull request, see #41. Once that is merged, we will push a new package to PyPI, but you can ofc just use the source code directly if you are blocked by this.

wljungbergh commented 5 months ago

The PR is now merged (and the package is pushed to PyPI) and you should be getting a list of EgoRoadAnnotation objects back from the call you previously posted. You can check the class of each of these via the type attribute.

To get this you can simply update your zod package to 0.3.7.

If you have any further questions, please open up the issue again.