Skip to content

How to read out put of predict #984

Closed Answered by phulelouch
phulelouch asked this question in Q&A
Discussion options

You must be logged in to vote

Still have to read from pickle
`
import pickle
import json
import glob
file_paths = glob.glob(f"{result.get('export_dir')}/pickles/*.pickle")

for file_path in file_paths:
with open(file_path, 'rb') as f:
data = pickle.load(f)
# Process the data as needed

for detection in data:
label = detection.category.name
confidence = detection.score.value
bbox = detection.bbox.to_voc_bbox()

print(f"Label: {label}")
print(f"Confidence: {confidence}")
print(f"Bounding Box: {bbox}")

`

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by phulelouch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant