Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mingdong-li committed Oct 1, 2019
2 parents 7997c84 + eca52e2 commit ef34647
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
- [YOLOv3预训练(用于训练行人检测的预训练Darknet53模型)](https://pan.baidu.com/s/1_5Rwvc8clnCb44z0R2o70Q)
- [yolov3用于行人检测的权重](https://pan.baidu.com/s/1KsQPTdgABt_rRLn7H_AA8w)
- [keypoints-Mask-R-CNN](https://pan.baidu.com/s/1a8A6xVNuuo6Zr3cc3DbB2Q)
- [pysot](https://pan.baidu.com/s/1sROOxFIgQYqrZA0CvLuMU)
- [pysot](https://pan.baidu.com/s/1Cx--3FqdcRna7vbJwppvrQ)


### 训练
Expand Down
6 changes: 3 additions & 3 deletions detector/yolov3/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def detect(save_txt=True, save_img=False, stream_img=False):
# save_res.append([int(im_num),-1,*xyxy,conf,-1,-1,-1])
#with open(save_path + '.txt', 'a') as file:
#file.write(('%g ' * 6 + '\n') % (*xyxy, cls, conf))
with open(os.path.join(out, "det"+video_name+'.txt'),'a') as f:
with open(os.path.join(out, 'det.txt'),'a') as f:
xyxy[2] = xyxy[2] - xyxy[0]
xyxy[3] = xyxy[3] - xyxy[1]
f.write(('%g ' * 10 + '\n') % (int(im_num),-1,*xyxy,conf,-1,-1,-1))
Expand Down Expand Up @@ -159,8 +159,8 @@ def detect(save_txt=True, save_img=False, stream_img=False):
print('Done. (%.3fs)' % (time.time() - t0))

if save_txt:
save_form = np.loadtxt(os.path.join(out, "det"+video_name+'.txt'))
np.savetxt(os.path.join(out, video_name+'.txt'),save_form,fmt="%d,%d,%.3f,%.3f,%.3f,%.3f,%.4f,%d,%d,%d")
save_form = np.loadtxt(os.path.join(out, 'det.txt'))
np.savetxt(os.path.join(out, 'det.txt'),save_form,fmt="%d,%d,%.3f,%.3f,%.3f,%.3f,%.4f,%d,%d,%d")


if __name__ == '__main__':
Expand Down

0 comments on commit ef34647

Please sign in to comment.