title: Save prediction to json or txt file and also save output video file in yolov3 object detection - Google colab
body: <p>Object detection on <a href="https://github.com/AlexeyAB/darknet/" rel="nofollow noreferrer">https://github.com/AlexeyAB/darknet/</a> is working and the output is saved to an <code>.avi</code> file. I also want to save the predictions to a <code>json</code> or <code>txt</code> file.</p>
  <p>This is the code I ran:</p>
  <pre><code>./darknet detector demo cfg/coco.data cfg/yolov3.cfg yolov3.weights -dont_show test_vid.mp4 -i 0 -out result.json -out_filename output.avi -ext_output -dont_show 
  </code></pre>
  <p>But only the video output is saved. I want the predictions also to be saved to <code>json</code> or <code>txt</code> file. What am I doing wrong here? Is there any other way to do it?</p>
  <p>I'm new to computer vision and need some help with this. Thanks</p>