I want to store each detection value and combine it into an array to save it to excel. I want to apped sa_mask to add all detection values ββto save_mask variable, but I tried apped and got only the last detected value. It doesn't store all values. enter image description here
if FLAGS.count:
# count objects found
counted_classes = count_objects(pred_bbox, by_class = True)
# loop through dict and print
sa_counted = np.array(counted_classes)
print(sa_counted)
for key, value in counted_classes.items():
print("Number of {}s: {}".format(key, value))
sa_mask = ("{} {}".format(key, value))
save_mask = []
save_mask.apped(sa_mask)