Skip to content

Commit

Permalink
Setting class attribute final_result
Browse files Browse the repository at this point in the history
  • Loading branch information
ptr-br committed Sep 7, 2022
1 parent 308cc9a commit 0574e08
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions alphapose/utils/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def start(self):
return self

def update(self):
final_result = []
self.final_result = []
norm_type = self.cfg.LOSS.get('NORM_TYPE', None)
hm_size = self.cfg.DATA_PRESET.HEATMAP_SIZE
if self.save_video:
Expand All @@ -100,7 +100,7 @@ def update(self):
# if the thread indicator variable is set (img is None), stop the thread
if self.save_video:
stream.release()
write_json(final_result, self.opt.outputpath, form=self.opt.format, for_eval=self.opt.eval)
write_json(self.final_result, self.opt.outputpath, form=self.opt.format, for_eval=self.opt.eval)
print("Results have been written to json.")
return
# image channel RGB->BGR
Expand Down Expand Up @@ -168,7 +168,7 @@ def update(self):
for i in range(len(poseflow_result)):
result['result'][i]['idx'] = poseflow_result[i]['idx']

final_result.append(result)
self.final_result.append(result)
if self.opt.save_img or self.save_video or self.opt.vis:
if hm_data.size()[1] == 49:
from alphapose.utils.vis import vis_frame_dense as vis_frame
Expand Down Expand Up @@ -224,7 +224,7 @@ def clear(self, queue):

def results(self):
# return final result
print(self.final_result)
# print(self.final_result)
return self.final_result

def recognize_video_ext(self, ext=''):
Expand Down

0 comments on commit 0574e08

Please sign in to comment.