pjreddie / darknet

Convolutional Neural Networks
http://pjreddie.com/darknet/
Other
25.75k stars 21.33k forks source link

save the demo results to video file #102

Open tianlei822 opened 7 years ago

tianlei822 commented 7 years ago

I find the demo video on the website. and I want to test it on my video file . However, I didn't find the way to save the demo results. Besides, it runs very slow on my server (using Tesla k80). Don't know why.

AlexeyAB commented 7 years ago

@tianlei822

To save result to the video file test_dnn_out.avi:

After this line cvShowImage(buff, disp); in the file image.c: https://github.com/pjreddie/darknet/blob/7a223d8591e0a497889b9fce9bc43ac4bd3969fd/src/image.c#L482

You should add this code, as by the URL, but without cvReleaseImage(&disp);: https://github.com/AlexeyAB/darknet/blob/f9b306bd122b2ce332ef537cc4551f6e5abbe0b3/src/image.c#L439

{
    CvSize size;
    size.width = disp->width;
    size.height = disp->height;

    static CvVideoWriter* output_video = NULL;    // cv::VideoWriter output_video;
    if (output_video == NULL)
    {
        printf("\n SRC output_video = %p \n", output_video);
        const char* output_name = "test_dnn_out.avi";
        output_video = cvCreateVideoWriter(output_name, CV_FOURCC('D', 'I', 'V', 'X'), 25, size, 1);
        printf("\n cvCreateVideoWriter, DST output_video = %p  \n", output_video);
    }
    cvWriteFrame(output_video, disp);
}
tianlei822 commented 7 years ago

Thanks a lot. The CV_FOURCC type is confusing, only CV_FOURCC('M','P','4','2') works on my server (ubuntu 14.04). Maybe I didn't install the right library for the video format.

tianlei822 commented 7 years ago

I tested the other CV_FOURCC. CV_FOURCC(‘D’,‘I’,‘V’,‘X’), CV_FOURCC(‘M’,‘J’,‘P’,‘G’) also work on my server. It did't work before, cause I named the output video as *.mp4.

kaisark commented 6 years ago

Writing to a file via CV_FOURCC works, but it seems like the speed of the recording/playback is extra fast (appears as fast forward). There might be a mismatch between the FPS capture rate vs output rate. I tried all three (DIVX, MJPG, H264) with similar results. I also ran playback of the AVI file on both the Nvidia TX1 and on a Mac. Same warp speed. Has anyone run into the speed issue? Doesn't writing out at 25 FPS below assume a similar capture rate???

//output_video = cvCreateVideoWriter(output_name, CV_FOURCC('H', '2', '6', '4'), 25, size, 1); //output_video = cvCreateVideoWriter(output_name, CV_FOURCC('D', 'I', 'V', 'X'), 25, size, 1); output_video = cvCreateVideoWriter(output_name, CV_FOURCC('M', 'J', 'P', 'G'), 25, size, 1);

kaisark commented 6 years ago

@AlexeyAB What if you are not showing the image in the stream for performance (e.g. running on AWS instance), but want to save the results to a video file?

demo.c: //display_in_thread=0;

AlexeyAB commented 6 years ago

@kaisark To disable showing window with video - comment these lines:

  1. https://github.com/pjreddie/darknet/blob/c7252703420159a9f3a1ec416b1b4326c4c95402/src/demo.c#L85-L100
  2. https://github.com/pjreddie/darknet/blob/532c6e1481e78ba0e27c56f4492a7e8d3cc36597/src/image.c#L540
  3. https://github.com/pjreddie/darknet/blob/c7252703420159a9f3a1ec416b1b4326c4c95402/src/demo.c#L175-L183
  4. https://github.com/pjreddie/darknet/blob/c7252703420159a9f3a1ec416b1b4326c4c95402/src/demo.c#L263-L271
  5. https://github.com/pjreddie/darknet/blob/532c6e1481e78ba0e27c56f4492a7e8d3cc36597/src/image.c#L518
kaisark commented 6 years ago

@AlexeyAB commenting out "int c = cvWaitKey(1); " will result in compile error.

./src/demo.c: In function ‘display_in_thread’: ./src/demo.c:95:9: error: ‘c’ undeclared (first use in this function) if (c != -1) c = c%256;

AlexeyAB commented 6 years ago

@kaisark Comment all these lines: https://github.com/pjreddie/darknet/blob/c7252703420159a9f3a1ec416b1b4326c4c95402/src/demo.c#L85-L100

kaisark commented 6 years ago

@AlexeyAB Commenting out the rest of the block is what I ended up doing. Tested locally, but I didn't see the performance boost (getting about 4 fps on my TX1) that I anticipated.

command: ./darknet detector demo cfg/coco.data cfg/yolo.cfg weights/yolo.weights ~/Videos/myvid.mp4

I still need to test on AWS P2 instance for performance gains (currently getting about 22 fps without display in thread).

Update: When I tested on AWS (copied the local demo.c and image.c), I ran into a demo.c compile errror:

ubuntu@ip-172-31-0-76:~/darknet$ make gcc -Iinclude/ -Isrc/ -DOPENCV pkg-config --cflags opencv -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -c ./src/image.c -o obj/image.o ./src/image.c: In function ‘load_image_cv’: ./src/image.c:613:9: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result] system(buff); ^ gcc -Iinclude/ -Isrc/ -DOPENCV pkg-config --cflags opencv -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -c ./src/demo.c -o obj/demo.o ./src/demo.c: In function ‘detect_in_thread’: ./src/demo.c:57:41: error: incompatible type for argument 1 of ‘network_predict’ float *prediction = network_predict(net, X); ^ compilation terminated due to -Wfatal-errors. Makefile:85: recipe for target 'obj/demo.o' failed make: *** [obj/demo.o] Error 1

AlexeyAB commented 6 years ago

@kaisark Also you can try to use this fork with the same changes: https://github.com/AlexeyAB/darknet


Or in this way - it gives highest FPS:

kaisark commented 6 years ago

@AlexeyAB I went ahead and cloned your fork and built darknet and uselib. I am still only getting about 5 FPS (without opencv show images). Maybe, that is as good as it gets on the TX1 (TX2 is faster). I do not see this fork moving any faster than the original darknet repository, at least within this one scenario.

Makefile: GPU=1 CUDNN=1 OPENCV=1 DEBUG=0 OPENMP=0 LIBSO=1

./darknet detector demo ./cfg/voc.data ./cfg/yolo-voc.cfg ~/darknet/weights/yolo-voc.weights ~/Videos/kk.mp4 -i 0 -thresh 0.2

FPS:4.9 Objects:

car: 81% car: 58% car: 41% car: 23%

I commented and uncommented the following like:

//draw_boxes(cur_frame, result_vec, obj_names, 3, current_det_fps, current_cap_fps); show_console_result(result_vec, obj_names);

I built uselib, but I can't see the frame rate, so it is hard to gauge the performance change. It still looks like it is slow moving...

nvidia@tegra-ubuntu:~/darknetAB$ ./uselib ~/Videos/kk.mp4 layer filters size input output 0 conv 32 3 x 3 / 1 416 x 416 x 3 -> 416 x 416 x 32 1 max 2 x 2 / 2 416 x 416 x 32 -> 208 x 208 x 32 2 conv 64 3 x 3 / 1 208 x 208 x 32 -> 208 x 208 x 64 3 max 2 x 2 / 2 208 x 208 x 64 -> 104 x 104 x 64 4 conv 128 3 x 3 / 1 104 x 104 x 64 -> 104 x 104 x 128 5 conv 64 1 x 1 / 1 104 x 104 x 128 -> 104 x 104 x 64 6 conv 128 3 x 3 / 1 104 x 104 x 64 -> 104 x 104 x 128 7 max 2 x 2 / 2 104 x 104 x 128 -> 52 x 52 x 128 8 conv 256 3 x 3 / 1 52 x 52 x 128 -> 52 x 52 x 256 9 conv 128 1 x 1 / 1 52 x 52 x 256 -> 52 x 52 x 128 10 conv 256 3 x 3 / 1 52 x 52 x 128 -> 52 x 52 x 256 11 max 2 x 2 / 2 52 x 52 x 256 -> 26 x 26 x 256 12 conv 512 3 x 3 / 1 26 x 26 x 256 -> 26 x 26 x 512 13 conv 256 1 x 1 / 1 26 x 26 x 512 -> 26 x 26 x 256 14 conv 512 3 x 3 / 1 26 x 26 x 256 -> 26 x 26 x 512 15 conv 256 1 x 1 / 1 26 x 26 x 512 -> 26 x 26 x 256 16 conv 512 3 x 3 / 1 26 x 26 x 256 -> 26 x 26 x 512 17 max 2 x 2 / 2 26 x 26 x 512 -> 13 x 13 x 512 18 conv 1024 3 x 3 / 1 13 x 13 x 512 -> 13 x 13 x1024 19 conv 512 1 x 1 / 1 13 x 13 x1024 -> 13 x 13 x 512 20 conv 1024 3 x 3 / 1 13 x 13 x 512 -> 13 x 13 x1024 21 conv 512 1 x 1 / 1 13 x 13 x1024 -> 13 x 13 x 512 22 conv 1024 3 x 3 / 1 13 x 13 x 512 -> 13 x 13 x1024 23 conv 1024 3 x 3 / 1 13 x 13 x1024 -> 13 x 13 x1024 24 conv 1024 3 x 3 / 1 13 x 13 x1024 -> 13 x 13 x1024 25 route 16 26 conv 64 1 x 1 / 1 26 x 26 x 512 -> 26 x 26 x 64 27 reorg / 2 26 x 26 x 64 -> 13 x 13 x 256 28 route 27 24 29 conv 1024 3 x 3 / 1 13 x 13 x1280 -> 13 x 13 x1024 30 conv 125 1 x 1 / 1 13 x 13 x1024 -> 13 x 13 x 125 31 detection Loading weights from ../darknet/weights/yolo-voc.weights...Done! object names loaded input image or video filename: car - obj_id = 6, x = 440, y = 237, w = 183, h = 98, prob = 0.346 car - obj_id = 6, x = 292, y = 291, w = 73, h = 45, prob = 0.339 car - obj_id = 6, x = 429, y = 248, w = 196, h = 91, prob = 0.766 car - obj_id = 6, x = 283, y = 290, w = 84, h = 46, prob = 0.706 car - obj_id = 6, x = 430, y = 248, w = 201, h = 88, prob = 0.764 car - obj_id = 6, x = 283, y = 290, w = 91, h = 46, prob = 0.71

AlexeyAB commented 6 years ago

@kaisark These optimizations can only be applied if required more than 25 FPS on video-input resolution FullHD (1920x1080) or more.

In other cases you can increase speed only in 2 ways:

trohit920 commented 6 years ago

@AlexeyAB @pjreddie @kaisark Hello, i am getting an error like this please take a look:

ubuntu@ip-172-31-10-252:~/darknet$ ./darknet detector demo ./cfg/voc.data ./cfg/yolo-voc.cfg yolo-voc.weights outside.mp4 -i 0 -thresh 0.2 Demo layer filters size input output 0 conv 32 3 x 3 / 1 416 x 416 x 3 -> 416 x 416 x 32 1 max 2 x 2 / 2 416 x 416 x 32 -> 208 x 208 x 32 2 conv 64 3 x 3 / 1 208 x 208 x 32 -> 208 x 208 x 64 3 max 2 x 2 / 2 208 x 208 x 64 -> 104 x 104 x 64 4 conv 128 3 x 3 / 1 104 x 104 x 64 -> 104 x 104 x 128 5 conv 64 1 x 1 / 1 104 x 104 x 128 -> 104 x 104 x 64 6 conv 128 3 x 3 / 1 104 x 104 x 64 -> 104 x 104 x 128 7 max 2 x 2 / 2 104 x 104 x 128 -> 52 x 52 x 128 8 conv 256 3 x 3 / 1 52 x 52 x 128 -> 52 x 52 x 256 9 conv 128 1 x 1 / 1 52 x 52 x 256 -> 52 x 52 x 128 10 conv 256 3 x 3 / 1 52 x 52 x 128 -> 52 x 52 x 256 11 max 2 x 2 / 2 52 x 52 x 256 -> 26 x 26 x 256 12 conv 512 3 x 3 / 1 26 x 26 x 256 -> 26 x 26 x 512 13 conv 256 1 x 1 / 1 26 x 26 x 512 -> 26 x 26 x 256 14 conv 512 3 x 3 / 1 26 x 26 x 256 -> 26 x 26 x 512 15 conv 256 1 x 1 / 1 26 x 26 x 512 -> 26 x 26 x 256 16 conv 512 3 x 3 / 1 26 x 26 x 256 -> 26 x 26 x 512 17 max 2 x 2 / 2 26 x 26 x 512 -> 13 x 13 x 512 18 conv 1024 3 x 3 / 1 13 x 13 x 512 -> 13 x 13 x1024 19 conv 512 1 x 1 / 1 13 x 13 x1024 -> 13 x 13 x 512 20 conv 1024 3 x 3 / 1 13 x 13 x 512 -> 13 x 13 x1024 21 conv 512 1 x 1 / 1 13 x 13 x1024 -> 13 x 13 x 512 22 conv 1024 3 x 3 / 1 13 x 13 x 512 -> 13 x 13 x1024 23 conv 1024 3 x 3 / 1 13 x 13 x1024 -> 13 x 13 x1024 24 conv 1024 3 x 3 / 1 13 x 13 x1024 -> 13 x 13 x1024 25 route 16 26 conv 64 1 x 1 / 1 26 x 26 x 512 -> 26 x 26 x 64 27 reorg / 2 26 x 26 x 64 -> 13 x 13 x 256 28 route 27 24 29 conv 1024 3 x 3 / 1 13 x 13 x1280 -> 13 x 13 x1024 30 conv 125 1 x 1 / 1 13 x 13 x1024 -> 13 x 13 x 125 31 detection Loading weights from yolo-voc.weights... seen 32 Done! video file: outside.mp4 Invalid UE golomb code Invalid UE golomb code

FPS:0.0 Objects:

FPS:0.0 Objects:

train: 30% car: 26% QXcbConnection: Could not connect to display Aborted (core dumped)

I have compiled your version of YOLO with all the modifications mentioned by you. I am using an AWS EC2-Ubuntu16.04 p2.xlarge instance to perform the whole operation. I configured the environment with CUDA 9, cuDNN 7.5 and OpenCV3.3.0.
However i can do everything correctly on my own local PC with same environment. I mean i can run and save the output file after successful detection. Can you advice me what i am doing wrong, i just want to save the output of object detection as .avi file after watching the output on AWS server? Or is it because of AWS?

favia96 commented 6 years ago

@AlexeyAB i`m working on MAC OS Sierra 10.12.6, when I've added the code for saving results to video file as written in your helpful comment (To save result to the video file test_dnn_out.avi:........), I cannot find the video... don't know why

AlexeyAB commented 6 years ago

@favia96 Try to use this repository: https://github.com/AlexeyAB/darknet And use this command: ./darknet detector demo cfg/coco.data yolov3.cfg yolov3.weights test.mp4 -out_filename res.avi

akde commented 6 years ago

hi @AlexeyAB I made the changes in image.c file and now it looks like the following:

` cvResize(buffer, disp, CV_INTER_LINEAR); cvReleaseImage(&buffer); } // I added that part. cvShowImage(buff, disp);

{
    CvSize size;
    {
        size.width = disp->width, size.height = disp->height;
    }

    static CvVideoWriter* output_video = NULL;    // cv::VideoWriter output_video;
    if (output_video == NULL)
    {
        printf("\n SRC output_video = %p \n", output_video);
        const char* output_name = "test_dnn_out.avi";
        //output_video = cvCreateVideoWriter(output_name, CV_FOURCC('H', '2', '6', '4'), 25, size, 1);
        output_video = cvCreateVideoWriter(output_name, CV_FOURCC('D', 'I', 'V', 'X'), 25, size, 1);
        //output_video = cvCreateVideoWriter(output_name, CV_FOURCC('M', 'J', 'P', 'G'), 25, size, 1);
        printf("\n cvCreateVideoWriter, DST output_video = %p  \n", output_video);
    }

    cvWriteFrame(output_video, disp);
    printf("\n cvWriteFrame \n");
    }

//--------------------------------------------------

}

endif

void show_image(image p, const char *name) {`

Then I execute the following: ./darknet detector demo cfg/coco.data cfg/yolov3-tiny.cfg yolov3-tiny.weights ~/darknet/teklerbad.mp4 res

the process starts as expected but in terminal I get this error for each frame.

**FPS:11.1 Objects:

person: 93% 0.568025 0.669842 0.066057 0.305464 person: 59% 0.414743 0.325839 0.040630 0.154070

SRC output_video = (nil) OpenCV Error: Unspecified error (GStreamer: cannot put pipeline to play ) in CvVideoWriter_GStreamer::open, file /home/akde/opencv-3.3.0/modules/videoio/src/cap_gstreamer.cpp, line 1690 VIDEOIO(cvCreateVideoWriter_GStreamer (filename, fourcc, fps, frameSize, is_color)): raised OpenCV exception:

/home/akde/opencv-3.3.0/modules/videoio/src/cap_gstreamer.cpp:1690: error: (-2) GStreamer: cannot put pipeline to play in function CvVideoWriter_GStreamer::open

cvCreateVideoWriter, DST output_video = (nil)

cvWriteFrame**

So what am I doing wrong? Looking for your reply...

dheerajpai commented 6 years ago

Where does the video get saved? Regarding the AlexAB forked repository

shriprateek commented 6 years ago

Hi @AlexeyAB , I followed the above commands as it but there is no video file as out even when it is detecting my class object . Display Output is as below:

mask_scale: Using default '1.000000' Loading weights from backup/obj_2100.weights...Demo Total BFLOPS 34.876 Done!

(Demo:15502): Gtk-WARNING **: cannot open display:

seen 32 video file: New Project.mp4 Video stream: 1920 x 1080 FPS:0.0 Objects:

FPS:0.0 Objects:

Traffic_Sign: 32%

AlexeyAB commented 6 years ago

@shriprateek

Did you use such command? ./darknet detector demo cfg/coco.data yolov3.cfg yolov3.weights test.mp4 -dont_show -out_filename res.avi

Do you use this repository? https://github.com/AlexeyAB/darknet

Wait for about 10 frames. Then try to find res.avi file.

shriprateek commented 6 years ago

@AlexeyAB
Yeah I used the same repo but missed out on the "-dont_show" parameter. Now I am getting proper output. Appreciate the quick response.

sarathbhushan commented 5 years ago

Hi, @AlexeyAB @shriprateek,

I have followed the steps stated above. i'm not getting any output video as res.avi.

I have used this command on CPU : darknet_no_gpu.exe detector demo cfg/obj.data cfg/yolo-obj.cfg yolo-obj_600.weights data/hd/test.mp4 -dont_show -out_filename res.avi

This is the output I got: mask_scale: Using default '1.000000' Total BFLOPS 34.876 Loading weights from yolo-obj_600.weights... seen 32 Done! video file: data/hd/test.mp4 Video stream: 848 x 480 Used FMA & AVX2 Used AVX Used AVX Used AVX  FPS:0.0 Objects:

 FPS:0.0 Objects:

Cylinder: 87% Cylinder: 75% Cylinder: 64% Cylinder: 63% Cylinder: 45% Cylinder: 45%

Help is very much appreiated... Thank You...

buzdarbalooch commented 5 years ago

@sarathbhushan hi any idea, how we can avoid that �[2J�[1;1H and get bbox coordinates instead.

devvikas commented 5 years ago

@shriprateek

Did you use such command? ./darknet detector demo cfg/coco.data yolov3.cfg yolov3.weights test.mp4 -dont_show -out_filename res.avi

Do you use this repository? https://github.com/AlexeyAB/darknet

Wait for about 10 frames. Then try to find res.avi file.

what you mean wait for 10 frames. I get this response

FPS:35.3 Objects: gascocyl: 91% Stream closed. input video stream closed.

But then there is no avi file

nielstron commented 5 years ago

Got it working with OpenCV 4.0.1 using these changes to the show_image_cv function

VideoWriter* video;

int show_image_cv(image im, const char* name, int ms)
{
    Mat m = image_to_mat(im);
    imshow(name, m);
    {

        if(video == NULL){
            const char* output_name = "predictions.avi";
            video = new VideoWriter(output_name, VideoWriter::fourcc('M','J','P','G'),30, Size(im.w,im.h));
            //output_video = cvCreateVideoWriter(output_name, CV_FOURCC('M', 'J', 'P', 'G'), 25, size, 1); - depending on your version of OpenCV
            printf("\n DST output_video = %s  \n", output_name);
        }

        video->write(m);
        printf("\n cvWriteFrame \n");
    }
    int c = waitKey(ms);
    if (c != -1) c = c%256;
    return c;
}
ohlr commented 5 years ago

@nielstron thanks for sharing! works great - also with OpenCV 3.4.3 Note: image_opencv.cpp is the file that needs to be modified

yudapp commented 5 years ago

@nielstron Hello, I am having the same issue. In image_opencv.cpp, the int show_image function is commented. I added the code suggested separately. I still get... ..... Stream closed. input video stream closed. And no avi is created. Did I add the function properly?

nielstron commented 5 years ago

If the method was commented in the fork/branch you are using, the method may have never been called originally. Then the video stream is not written to disk (the corresponding lines of code are never executed). Make sure that you can see the images when running the executable (which is due to the modified method), then an output stream should be written.

rakshitks commented 4 years ago

It is really easy with yolov3 just enter this command darknet.exe detector demo cfg/coco.data cfg/yolov3.cfg yolov3.weights airport.mp4 -out_filename results.mp4

where results.mp4 is the output file of the video and airport.mp4 is input video

Akshaypatil15 commented 4 years ago

@AlexeyAB What if you are not showing the image in the stream for performance (e.g. running on AWS instance), but want to save the results to a video file?

demo.c: //display_in_thread=0;

If you have https://pjreddie.com/darknet/yolo/ repo then try this answer https://github.com/pjreddie/darknet/issues/1235#issuecomment-452708059

monowang commented 4 years ago

@AlexeyAB @pjreddie @kaisark Hello, i am getting an error like this please take a look:

ubuntu@ip-172-31-10-252:~/darknet$ ./darknet detector demo ./cfg/voc.data ./cfg/yolo-voc.cfg yolo-voc.weights outside.mp4 -i 0 -thresh 0.2 Demo layer filters size input output 0 conv 32 3 x 3 / 1 416 x 416 x 3 -> 416 x 416 x 32 1 max 2 x 2 / 2 416 x 416 x 32 -> 208 x 208 x 32 2 conv 64 3 x 3 / 1 208 x 208 x 32 -> 208 x 208 x 64 3 max 2 x 2 / 2 208 x 208 x 64 -> 104 x 104 x 64 4 conv 128 3 x 3 / 1 104 x 104 x 64 -> 104 x 104 x 128 5 conv 64 1 x 1 / 1 104 x 104 x 128 -> 104 x 104 x 64 6 conv 128 3 x 3 / 1 104 x 104 x 64 -> 104 x 104 x 128 7 max 2 x 2 / 2 104 x 104 x 128 -> 52 x 52 x 128 8 conv 256 3 x 3 / 1 52 x 52 x 128 -> 52 x 52 x 256 9 conv 128 1 x 1 / 1 52 x 52 x 256 -> 52 x 52 x 128 10 conv 256 3 x 3 / 1 52 x 52 x 128 -> 52 x 52 x 256 11 max 2 x 2 / 2 52 x 52 x 256 -> 26 x 26 x 256 12 conv 512 3 x 3 / 1 26 x 26 x 256 -> 26 x 26 x 512 13 conv 256 1 x 1 / 1 26 x 26 x 512 -> 26 x 26 x 256 14 conv 512 3 x 3 / 1 26 x 26 x 256 -> 26 x 26 x 512 15 conv 256 1 x 1 / 1 26 x 26 x 512 -> 26 x 26 x 256 16 conv 512 3 x 3 / 1 26 x 26 x 256 -> 26 x 26 x 512 17 max 2 x 2 / 2 26 x 26 x 512 -> 13 x 13 x 512 18 conv 1024 3 x 3 / 1 13 x 13 x 512 -> 13 x 13 x1024 19 conv 512 1 x 1 / 1 13 x 13 x1024 -> 13 x 13 x 512 20 conv 1024 3 x 3 / 1 13 x 13 x 512 -> 13 x 13 x1024 21 conv 512 1 x 1 / 1 13 x 13 x1024 -> 13 x 13 x 512 22 conv 1024 3 x 3 / 1 13 x 13 x 512 -> 13 x 13 x1024 23 conv 1024 3 x 3 / 1 13 x 13 x1024 -> 13 x 13 x1024 24 conv 1024 3 x 3 / 1 13 x 13 x1024 -> 13 x 13 x1024 25 route 16 26 conv 64 1 x 1 / 1 26 x 26 x 512 -> 26 x 26 x 64 27 reorg / 2 26 x 26 x 64 -> 13 x 13 x 256 28 route 27 24 29 conv 1024 3 x 3 / 1 13 x 13 x1280 -> 13 x 13 x1024 30 conv 125 1 x 1 / 1 13 x 13 x1024 -> 13 x 13 x 125 31 detection Loading weights from yolo-voc.weights... seen 32 Done! video file: outside.mp4 Invalid UE golomb code Invalid UE golomb code

FPS:0.0 Objects:

FPS:0.0 Objects:

train: 30% car: 26% QXcbConnection: Could not connect to display Aborted (core dumped)

I have compiled your version of YOLO with all the modifications mentioned by you. I am using an AWS EC2-Ubuntu16.04 p2.xlarge instance to perform the whole operation. I configured the environment with CUDA 9, cuDNN 7.5 and OpenCV3.3.0. However i can do everything correctly on my own local PC with same environment. I mean i can run and save the output file after successful detection. Can you advice me what i am doing wrong, i just want to save the output of object detection as .avi file after watching the output on AWS server? Or is it because of AWS?

Facing the same problem. I am wondering if you were able to solve it in aws ec2 with videos input

Mohammed-Bin-Mohammed commented 3 years ago

I got error

demo needs opencv for webcam images.

any help