Closed DeriZSY closed 4 years ago
I cannot re-produce this error. Can you share your downloaded annotation file pbdata?
For reference, this snippet works for me:
public_url = "https://storage.googleapis.com/objectron"
batch_id = 0
seq_id = 10
annotation_filename = public_url + f'/annotations/bike/batch-{batch_id}/{seq_id}.pbdata'
annotation = requests.get(annotation_filename)
file = open("annotation.pbdata", "wb")
file.write(annotation.content)
file.close()
frame_id = 100
with open('./annotation.pbdata', 'rb') as pb:
data = pb.read()
sequence = annotation_protocol.Sequence()
sequence.ParseFromString(data)
print(sequence)
If I had to guess, you probably tried downloading the pbdata file from the wrong address, try looking into the resulting downloaded file (e.g. try cat annotation.pbdata
)
Yeah, I think you're right. I made a mistake with downloading URL. It seems to be downloaded successfully but the contents are completely wrong.
Met
google.protobuf.message.DecodeError: Error parsing message
orRuntimeWarning: Unexpected end-group tag: Not all data was converted
(and end up have ab empty list of annotations) for all the annotations I tested in bike data.Code for reproduction
What could be wrong? Are there any sepcific version requirements?