Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saving Video File #308

Open
ilopezfr opened this issue Jun 28, 2017 · 18 comments
Open

Saving Video File #308

ilopezfr opened this issue Jun 28, 2017 · 18 comments

Comments

@ilopezfr
Copy link

So I'm trying to run the model in a video file with this line of code:
flow --model cfg/tiny-yolo.cfg --load bin/tiny-yolo-voc.weights --demo ~/camera-project/videos/test_cars.mp4 --gpu 0.5 --saveVideo

Below is the output I get, however no video file is generated.
Can anyone help me interpret the output code and tell how to save the output video with the bounding boxes?

Thanks in advance!

Parsing ./cfg/tiny-yolo-voc.cfg
Parsing cfg/tiny-yolo.cfg
Loading bin/tiny-yolo-voc.weights ...
Successfully identified 63471556 bytes
Finished in 0.0071680545806884766s
Model has a coco model name, loading coco labels.

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Load  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Load  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Load  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Load  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Load  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Load  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Load  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Load  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
GPU mode with 0.5 usage
2017-06-28 00:04:14.062914: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2017-06-28 00:04:14.062971: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2017-06-28 00:04:14.062989: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-06-28 00:04:15.368115: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:901] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2017-06-28 00:04:15.368539: I tensorflow/core/common_runtime/gpu/gpu_device.cc:887] Found device 0 with properties: 
name: GRID K520
major: 3 minor: 0 memoryClockRate (GHz) 0.797
pciBusID 0000:00:03.0
Total memory: 3.94GiB
Free memory: 3.91GiB
2017-06-28 00:04:15.368648: W tensorflow/stream_executor/cuda/cuda_driver.cc:485] creating context when one is currently active; existing: 0x4a54d90
2017-06-28 00:04:15.398140: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:901] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2017-06-28 00:04:15.398557: I tensorflow/core/common_runtime/gpu/gpu_device.cc:887] Found device 1 with properties: 
name: GRID K520
major: 3 minor: 0 memoryClockRate (GHz) 0.797
pciBusID 0000:00:04.0
Total memory: 3.94GiB
Free memory: 3.91GiB
2017-06-28 00:04:15.398646: W tensorflow/stream_executor/cuda/cuda_driver.cc:485] creating context when one is currently active; existing: 0x4a58b70
2017-06-28 00:04:15.429436: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:901] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2017-06-28 00:04:15.429907: I tensorflow/core/common_runtime/gpu/gpu_device.cc:887] Found device 2 with properties: 
name: GRID K520
major: 3 minor: 0 memoryClockRate (GHz) 0.797
pciBusID 0000:00:05.0
Total memory: 3.94GiB
Free memory: 3.91GiB
2017-06-28 00:04:15.430410: W tensorflow/stream_executor/cuda/cuda_driver.cc:485] creating context when one is currently active; existing: 0x4a5c980
2017-06-28 00:04:15.460532: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:901] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2017-06-28 00:04:15.460941: I tensorflow/core/common_runtime/gpu/gpu_device.cc:887] Found device 3 with properties: 
name: GRID K520
major: 3 minor: 0 memoryClockRate (GHz) 0.797
pciBusID 0000:00:06.0
Total memory: 3.94GiB
Free memory: 3.91GiB
2017-06-28 00:04:15.461087: I tensorflow/core/common_runtime/gpu/gpu_device.cc:779] Peer access not supported between device ordinals 0 and 1
2017-06-28 00:04:15.461118: I tensorflow/core/common_runtime/gpu/gpu_device.cc:779] Peer access not supported between device ordinals 0 and 2
2017-06-28 00:04:15.461145: I tensorflow/core/common_runtime/gpu/gpu_device.cc:779] Peer access not supported between device ordinals 0 and 3
2017-06-28 00:04:15.461170: I tensorflow/core/common_runtime/gpu/gpu_device.cc:779] Peer access not supported between device ordinals 1 and 0
2017-06-28 00:04:15.461195: I tensorflow/core/common_runtime/gpu/gpu_device.cc:779] Peer access not supported between device ordinals 1 and 2
2017-06-28 00:04:15.461220: I tensorflow/core/common_runtime/gpu/gpu_device.cc:779] Peer access not supported between device ordinals 1 and 3
2017-06-28 00:04:15.461245: I tensorflow/core/common_runtime/gpu/gpu_device.cc:779] Peer access not supported between device ordinals 2 and 0
2017-06-28 00:04:15.461270: I tensorflow/core/common_runtime/gpu/gpu_device.cc:779] Peer access not supported between device ordinals 2 and 1
2017-06-28 00:04:15.461295: I tensorflow/core/common_runtime/gpu/gpu_device.cc:779] Peer access not supported between device ordinals 2 and 3
2017-06-28 00:04:15.461320: I tensorflow/core/common_runtime/gpu/gpu_device.cc:779] Peer access not supported between device ordinals 3 and 0
2017-06-28 00:04:15.461345: I tensorflow/core/common_runtime/gpu/gpu_device.cc:779] Peer access not supported between device ordinals 3 and 1
2017-06-28 00:04:15.461373: I tensorflow/core/common_runtime/gpu/gpu_device.cc:779] Peer access not supported between device ordinals 3 and 2
2017-06-28 00:04:15.461465: I tensorflow/core/common_runtime/gpu/gpu_device.cc:908] DMA: 0 1 2 3 
2017-06-28 00:04:15.461493: I tensorflow/core/common_runtime/gpu/gpu_device.cc:918] 0:   Y N N N 
2017-06-28 00:04:15.461510: I tensorflow/core/common_runtime/gpu/gpu_device.cc:918] 1:   N Y N N 
2017-06-28 00:04:15.461523: I tensorflow/core/common_runtime/gpu/gpu_device.cc:918] 2:   N N Y N 
2017-06-28 00:04:15.461532: I tensorflow/core/common_runtime/gpu/gpu_device.cc:918] 3:   N N N Y 
2017-06-28 00:04:15.461560: I tensorflow/core/common_runtime/gpu/gpu_device.cc:977] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GRID K520, pci bus id: 0000:00:03.0)
2017-06-28 00:04:15.461575: I tensorflow/core/common_runtime/gpu/gpu_device.cc:977] Creating TensorFlow device (/gpu:1) -> (device: 1, name: GRID K520, pci bus id: 0000:00:04.0)
2017-06-28 00:04:15.461586: I tensorflow/core/common_runtime/gpu/gpu_device.cc:977] Creating TensorFlow device (/gpu:2) -> (device: 2, name: GRID K520, pci bus id: 0000:00:05.0)
2017-06-28 00:04:15.461600: I tensorflow/core/common_runtime/gpu/gpu_device.cc:977] Creating TensorFlow device (/gpu:3) -> (device: 3, name: GRID K520, pci bus id: 0000:00:06.0)
Finished in 3.338170289993286s 
@jubjamie
Copy link

The savevideo flag should do the trick. Are you sure no video is being saved? I believe it is saved as an avi file if I remember correctly.

@ilopezfr
Copy link
Author

Thanks for your reply, @jubjamie. I checked for any video files but it doesn't get saved. Any idea why based on the log?

@nicolasugrinovic
Copy link

nicolasugrinovic commented Jun 30, 2017

@ilopezfr is that the complete log output? Because after:
Finished in 3.338170289993286s
and saving the video you should see:

Press [ESC] to quit demo
33.058 FPS
End of Video

Demo stopped, exit.

or some error that is preventing from processing the video

@ilopezfr
Copy link
Author

@NicolasUgri Thanks for your reply. I missed to include this line:
(.:28684): Gtk-WARNING **: cannot open display:
Which is normal given that I'm using an EC2 instance. I was able to replicate the code in an Ubuntu VM running in CPU and it worked--and got the same output from the console as the one you shared--, however I still haven't figure out how to make it work in EC2 using GPU.

@nicolasugrinovic
Copy link

nicolasugrinovic commented Jun 30, 2017

Yes as you say it is normal, the thing is that if you are running it on a remote server (e.g. AWS) you don't have a display where to show the video while processing. What I did was comment those lines which need the display in help.py where the camera function is defined. Specifically I commented lines 82, 85 and 125:
Lines 82, 85:

    # cv2.namedWindow('', 0)
    _, frame = camera.read()
    height, width, _ = frame.shape
    # cv2.resizeWindow('', width, height)

Line 125:
# cv2.imshow('', postprocessed)
With that the warning should disappear and be able to process the video.
I can process the video, however, I don't get any annotated output. If you have a good annotated result, please tell me!

@ilopezfr
Copy link
Author

ilopezfr commented Jul 1, 2017

Hey @NicolasUgri, thanks for the tip!
Your fix helped save the video but, as you mentioned, without the bounding boxes.
Let's see if @thtrieu or someone else can help us figure out the issue. In the meantime I'll try to do some research around it.

As reference, here's my input:
ubuntu@ip-172-31-29-137:~/camera-project/darkflow$ flow --model cfg/tiny-yolo.cfg --load bin/tiny-yolo-voc.weights --demo ~/camera-project/videos/boarding_5sec-T1-B4-20171704.mp4 --gpu 0.8 --saveVideo

And output:


Parsing ./cfg/tiny-yolo-voc.cfg
Parsing cfg/tiny-yolo.cfg
Loading bin/tiny-yolo-voc.weights ...
Successfully identified 63471556 bytes
Finished in 0.007139921188354492s
Model has a coco model name, loading coco labels.

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 416, 416, 3)
 Load  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 416, 416, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 208, 208, 16)
 Load  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 208, 208, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 104, 104, 32)
 Load  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 104, 104, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 52, 52, 64)
 Load  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 52, 52, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 26, 26, 128)
 Load  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 26, 26, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 13, 13, 256)
 Load  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 512)
 Load  |  Yep!  | maxp 2x2p0_1                     | (?, 13, 13, 512)
 Load  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Load  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 13, 13, 1024)
 Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 13, 13, 425)
-------+--------+----------------------------------+---------------
GPU mode with 0.8 usage
2017-07-01 05:12:53.470720: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2017-07-01 05:12:53.470766: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2017-07-01 05:12:53.470783: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-07-01 05:12:54.704204: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:893] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2017-07-01 05:12:54.704633: I tensorflow/core/common_runtime/gpu/gpu_device.cc:940] Found device 0 with properties: 
name: GRID K520
major: 3 minor: 0 memoryClockRate (GHz) 0.797
pciBusID 0000:00:03.0
Total memory: 3.94GiB
Free memory: 3.91GiB
2017-07-01 05:12:54.731627: W tensorflow/stream_executor/cuda/cuda_driver.cc:523] A non-primary context 0x56216d0 exists before initializing the StreamExecutor. We haven't verified StreamExecutor works with that.
2017-07-01 05:12:54.731929: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:893] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2017-07-01 05:12:54.732316: I tensorflow/core/common_runtime/gpu/gpu_device.cc:940] Found device 1 with properties: 
name: GRID K520
major: 3 minor: 0 memoryClockRate (GHz) 0.797
pciBusID 0000:00:04.0
Total memory: 3.94GiB
Free memory: 3.91GiB
2017-07-01 05:12:54.759519: W tensorflow/stream_executor/cuda/cuda_driver.cc:523] A non-primary context 0x56254e0 exists before initializing the StreamExecutor. We haven't verified StreamExecutor works with that.
2017-07-01 05:12:54.759821: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:893] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2017-07-01 05:12:54.760205: I tensorflow/core/common_runtime/gpu/gpu_device.cc:940] Found device 2 with properties: 
name: GRID K520
major: 3 minor: 0 memoryClockRate (GHz) 0.797
pciBusID 0000:00:05.0
Total memory: 3.94GiB
Free memory: 3.91GiB
2017-07-01 05:12:54.787656: W tensorflow/stream_executor/cuda/cuda_driver.cc:523] A non-primary context 0x56292f0 exists before initializing the StreamExecutor. We haven't verified StreamExecutor works with that.
2017-07-01 05:12:54.787964: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:893] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2017-07-01 05:12:54.788350: I tensorflow/core/common_runtime/gpu/gpu_device.cc:940] Found device 3 with properties: 
name: GRID K520
major: 3 minor: 0 memoryClockRate (GHz) 0.797
pciBusID 0000:00:06.0
Total memory: 3.94GiB
Free memory: 3.91GiB
2017-07-01 05:12:54.788514: I tensorflow/core/common_runtime/gpu/gpu_device.cc:832] Peer access not supported between device ordinals 0 and 1
2017-07-01 05:12:54.788548: I tensorflow/core/common_runtime/gpu/gpu_device.cc:832] Peer access not supported between device ordinals 0 and 2
2017-07-01 05:12:54.788576: I tensorflow/core/common_runtime/gpu/gpu_device.cc:832] Peer access not supported between device ordinals 0 and 3
2017-07-01 05:12:54.788603: I tensorflow/core/common_runtime/gpu/gpu_device.cc:832] Peer access not supported between device ordinals 1 and 0
2017-07-01 05:12:54.788631: I tensorflow/core/common_runtime/gpu/gpu_device.cc:832] Peer access not supported between device ordinals 1 and 2
2017-07-01 05:12:54.788658: I tensorflow/core/common_runtime/gpu/gpu_device.cc:832] Peer access not supported between device ordinals 1 and 3
2017-07-01 05:12:54.788687: I tensorflow/core/common_runtime/gpu/gpu_device.cc:832] Peer access not supported between device ordinals 2 and 0
2017-07-01 05:12:54.788714: I tensorflow/core/common_runtime/gpu/gpu_device.cc:832] Peer access not supported between device ordinals 2 and 1
2017-07-01 05:12:54.788741: I tensorflow/core/common_runtime/gpu/gpu_device.cc:832] Peer access not supported between device ordinals 2 and 3
2017-07-01 05:12:54.788768: I tensorflow/core/common_runtime/gpu/gpu_device.cc:832] Peer access not supported between device ordinals 3 and 0
2017-07-01 05:12:54.788795: I tensorflow/core/common_runtime/gpu/gpu_device.cc:832] Peer access not supported between device ordinals 3 and 1
2017-07-01 05:12:54.788821: I tensorflow/core/common_runtime/gpu/gpu_device.cc:832] Peer access not supported between device ordinals 3 and 2
2017-07-01 05:12:54.788907: I tensorflow/core/common_runtime/gpu/gpu_device.cc:961] DMA: 0 1 2 3 
2017-07-01 05:12:54.788927: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] 0:   Y N N N 
2017-07-01 05:12:54.788941: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] 1:   N Y N N 
2017-07-01 05:12:54.788955: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] 2:   N N Y N 
2017-07-01 05:12:54.788965: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] 3:   N N N Y 
2017-07-01 05:12:54.788985: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GRID K520, pci bus id: 0000:00:03.0)
2017-07-01 05:12:54.789002: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Creating TensorFlow device (/gpu:1) -> (device: 1, name: GRID K520, pci bus id: 0000:00:04.0)
2017-07-01 05:12:54.789017: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Creating TensorFlow device (/gpu:2) -> (device: 2, name: GRID K520, pci bus id: 0000:00:05.0)
2017-07-01 05:12:54.789029: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Creating TensorFlow device (/gpu:3) -> (device: 3, name: GRID K520, pci bus id: 0000:00:06.0)
Finished in 3.1566929817199707s

Press [ESC] to quit demo
13.487 FPS
End of Video

Demo stopped, exit.```

@nicolasugrinovic
Copy link

Ok @ilopezfr got it. Just check the folder where you executed the script you should see a video file named video.avi. I was not aware that was the output. As you can see in line 96 of help.py:
'video.avi', fourcc, fps, (width, height))
the output has that name. Hope this helps!

@ilopezfr
Copy link
Author

ilopezfr commented Jul 1, 2017

@NicolasUgri yes, I see the video. But it looks raw, without any detections. Not sure why.

@jubjamie
Copy link

jubjamie commented Jul 1, 2017

Sure you're getting detections? Run with --json to get the output of the detector to check that the threshold isn't too high.

@ilopezfr
Copy link
Author

ilopezfr commented Jul 1, 2017

@jubjamie Since I commented out some lines in help.py as @NicolasUgri suggested, the command runs and generates an output, but this one comes without any detections. The json file comes empty as well (I tried with --threshold 0 without any difference). Any thoughts?

@jubjamie
Copy link

jubjamie commented Jul 1, 2017

do the sample images work?

@nicolasugrinovic
Copy link

Are you using a pre-train network or are you traning a new one from scratch with your own data? In my experience, if your loss is too high you will not get detections. As @jubjamie suggests usually it should work by lowering the threshold and if you have it to cero you should see a lot of boxes filling the whole image.

@ilopezfr
Copy link
Author

ilopezfr commented Jul 2, 2017

@jubjamie @NicolasUgri Even with threshold 0, I don't get any detections in the images since I made the changes in help.py.

@ilopezfr ilopezfr closed this as completed Jul 2, 2017
@ilopezfr ilopezfr reopened this Jul 2, 2017
@jubjamie
Copy link

jubjamie commented Jul 3, 2017

What images are you using? The sample ones included? Something sounds very wrong here. Have you tried reinstalling? Perhaps you have a bad installation. Are you seeing no error messages?

Changing help.py as you did above should have no bearing on the sample images test. Can you please post what command you run and the full console output.

@mrhalyang
Copy link

Same issue, any solution?

@wangwh0204
Copy link

@ilopezfr maybe you should try this :
flow --model cfg/tiny-yolo-voc.cfg --load bin/tiny-yolo-voc.weights --demo ~/camera-project/videos/boarding_5sec-T1-B4-20171704.mp4 --gpu 0.8 --saveVideo --labels voc.names
the voc.names ref the url : https://github.com/pjreddie/darknet/blob/master/data/voc.names
the cfg(net model), weights, labels(xx.names) should keep same.

@marcunzueta
Copy link

Hello @ilopezfr, I was encountering a similar error using darkflow. I was not able to save the video file even that the --saveVideo flag was there and the whole process was working and ending with no error

python flow --model cfg/v1.1/tiny-yolov1.cfg --load bin/tiny-yolo-v1.1.weights --demo a.mp4 --saveVideo --threshold 0.2 --gpu 1.0

/Users/MarcUnzueta/github/test/darkflow/darkflow/dark/darknet.py:54: UserWarning: ./cfg/tiny-yolo-v1.1.cfg not found, use cfg/v1.1/tiny-yolov1.cfg instead
  cfg_path, FLAGS.model))
Parsing cfg/v1.1/tiny-yolov1.cfg
Loading bin/tiny-yolo-v1.1.weights ...
Successfully identified 108399816 bytes
Finished in 0.044751882553100586s
Model has a VOC model name, loading VOC labels.

Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 448, 448, 3)
 Load  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 448, 448, 16)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 224, 224, 16)
 Load  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 224, 224, 32)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 112, 112, 32)
 Load  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 112, 112, 64)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 56, 56, 64)
 Load  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 56, 56, 128)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 28, 28, 128)
 Load  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 28, 28, 256)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 14, 14, 256)
 Load  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 14, 14, 512)
 Load  |  Yep!  | maxp 2x2p0_2                     | (?, 7, 7, 512)
 Load  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 7, 7, 1024)
 Load  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 7, 7, 256)
 Load  |  Yep!  | flat                             | (?, 12544)
 Load  |  Yep!  | full 12544 x 1470  linear        | (?, 1470)
-------+--------+----------------------------------+---------------
GPU mode with 1.0 usage
Finished in 4.4150989055633545s

Press [ESC] to quit demo
3.902 FPS
End of Video

Demo stopped, exit.

However, the video.avi output was 404 bytes... I found out that in my conda environment the openCV version was not working as it should. I installed it with pip install opencv-contrib-python inside the conda environment, instead of using homebrew.

I have attached my conda environment that works with the darkflow video example, using python flow --model cfg/v1.1/tiny-yolov1.cfg --load bin/tiny-yolo-v1.1.weights --demo a.mp4 --saveVideo --threshold 0.2 --gpu 1.0

environment.txt

(change the file extension to .yml)

@mawa1
Copy link

mawa1 commented Apr 21, 2020

Look up how to save it with " ffmpeg ". Especially look for a guy on YouTube called Jeaff Heaton. He's got an awesome applicable solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants