NassimeBejaia commited on
Commit
bd22bb0
·
1 Parent(s): 7a51791

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -79,13 +79,18 @@ def prediction(vname):
79
  wpath = 'test_detection/yolov5/weights/crowdhuman_yolov5m.pt'
80
  if os.path.exists(wpath):
81
  with st.spinner('Running detection...'):
 
 
 
82
  os.system("python test_detection/track.py --yolo_weights test_detection/yolov5/weights/crowdhuman_yolov5m.pt --img 352 --save-vid --save-txt --classes 1 --conf-thres 0.4 --source " + vpath)
83
 
84
- path = 'inference/output/output_'+vname
85
- st.write(os.path.exists(path), os.path.exists('inference/output/output'+vname))
 
 
 
86
 
87
  st.write(os.listdir(path))
88
- st.write(os.listdir('inference/output/output'+vname))
89
 
90
  with st.spinner('Video loading...'):
91
  os.system("ffmpeg -i inference/output/"+vname + " -vcodec libx264 -y inference/output/output_"+vname)
 
79
  wpath = 'test_detection/yolov5/weights/crowdhuman_yolov5m.pt'
80
  if os.path.exists(wpath):
81
  with st.spinner('Running detection...'):
82
+
83
+ st.write('vpath befor calling track : ', vpath)
84
+
85
  os.system("python test_detection/track.py --yolo_weights test_detection/yolov5/weights/crowdhuman_yolov5m.pt --img 352 --save-vid --save-txt --classes 1 --conf-thres 0.4 --source " + vpath)
86
 
87
+ path = 'inference/output/'
88
+ #st.write(os.path.exists(path), os.path.exists('inference/output/output'+vname))
89
+
90
+
91
+ st.write(os.listdir('test_detection/'))
92
 
93
  st.write(os.listdir(path))
 
94
 
95
  with st.spinner('Video loading...'):
96
  os.system("ffmpeg -i inference/output/"+vname + " -vcodec libx264 -y inference/output/output_"+vname)