Spaces:
Runtime error
Runtime error
Commit
•
1fcad52
1
Parent(s):
9075a90
Update app.py
Browse files
app.py
CHANGED
@@ -80,11 +80,12 @@ def starter():
|
|
80 |
|
81 |
def prediction(vname):
|
82 |
|
|
|
83 |
vpath='test_detection/data/'+vname
|
84 |
wpath = 'test_detection/yolov5/weights/crowdhuman_yolov5m.pt'
|
85 |
if os.path.exists(wpath):
|
86 |
-
|
87 |
-
os.system("python 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)
|
88 |
os.system("ffmpeg -i test_detection/inference/output/"+vname + " -vcodec libx264 -y test_detection/inference/output/output_video.mp4")
|
89 |
path = 'test_detection/inference/output/output_video.mp4'
|
90 |
if os.path.exists(path):
|
@@ -110,13 +111,14 @@ def main():
|
|
110 |
if __name__ == '__main__':
|
111 |
|
112 |
os.system('git clone --recurse-submodules https://github.com/nnassime/test_detection.git')
|
113 |
-
st.write(os.listdir('test_detection/'))
|
114 |
|
115 |
-
os.system('python test_detection/__streamlit_app.py')
|
116 |
|
117 |
load_model()
|
118 |
st.write("bismillah")
|
119 |
print("bismillah")
|
|
|
120 |
main()
|
121 |
|
122 |
st.write('out function ', os.listdir('test_detection/data/'))
|
|
|
80 |
|
81 |
def prediction(vname):
|
82 |
|
83 |
+
|
84 |
vpath='test_detection/data/'+vname
|
85 |
wpath = 'test_detection/yolov5/weights/crowdhuman_yolov5m.pt'
|
86 |
if os.path.exists(wpath):
|
87 |
+
st.write('start prediction')
|
88 |
+
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)
|
89 |
os.system("ffmpeg -i test_detection/inference/output/"+vname + " -vcodec libx264 -y test_detection/inference/output/output_video.mp4")
|
90 |
path = 'test_detection/inference/output/output_video.mp4'
|
91 |
if os.path.exists(path):
|
|
|
111 |
if __name__ == '__main__':
|
112 |
|
113 |
os.system('git clone --recurse-submodules https://github.com/nnassime/test_detection.git')
|
114 |
+
#st.write(os.listdir('test_detection/'))
|
115 |
|
116 |
+
#os.system('python test_detection/__streamlit_app.py')
|
117 |
|
118 |
load_model()
|
119 |
st.write("bismillah")
|
120 |
print("bismillah")
|
121 |
+
|
122 |
main()
|
123 |
|
124 |
st.write('out function ', os.listdir('test_detection/data/'))
|