trrahul / densepose-video

Code to run densepose on video with detectron. https://github.com/facebookresearch/Detectron
GNU General Public License v3.0
62 stars 18 forks source link

Error opening video stream or file #4

Closed ForgottenOneNyx closed 6 years ago

ForgottenOneNyx commented 6 years ago

Hello,

I am trying to implement densepose on videos, while I was doing that, I encountered this error.

python2 tools/infer_vid.py --cfg configs/DensePose_ResNet101_FPN_s1x-e2e.yaml --output-dir DensePoseData/infer_out/ --wts https://s3.amazonaws.com/densepose/DensePose_ResNet101_FPN_s1x-e2e.pkl --input-file tools/_000269.mp4

ERROR:

Found Detectron ops lib: /usr/local/caffe2_build/lib/libcaffe2_detectron_ops_gpu.so E0727 00:22:12.939193 466 init_intrinsics_check.cc:54] CPU feature avx is present on your machine, but the Caffe2 binary is not compiled with it. It means you may not get the full speed of your CPU. E0727 00:22:12.939213 466 init_intrinsics_check.cc:54] CPU feature avx2 is present on your machine, but the Caffe2 binary is not compiled with it. It means you may not get the full speed of your CPU. E0727 00:22:12.939218 466 init_intrinsics_check.cc:54] CPU feature fma is present on your machine, but the Caffe2 binary is not compiled with it. It means you may not get the full speed of your CPU. WARNING cnn.py: 40: [====DEPRECATE WARNING====]: you are creating an object from CNNModelHelper class which will be deprecated soon. Please use ModelHelper object with brew module. For more information, please refer to caffe2.ai and python/brew.py, python/brew_test.py for more information. INFO net.py: 51: Loading weights from: /tmp/detectron-download-cache/DensePose_ResNet101_FPN_s1x-e2e.pkl I0727 00:22:14.933914 466 net_dag_utils.cc:118] Operator graph pruning prior to chain compute took: 0.000143883 secs I0727 00:22:14.934108 466 net_dag.cc:61] Number of parallel execution chains 63 Number of operators = 402 I0727 00:22:14.965337 466 net_dag_utils.cc:118] Operator graph pruning prior to chain compute took: 0.00012249 secs I0727 00:22:14.965505 466 net_dag.cc:61] Number of parallel execution chains 30 Number of operators = 358 I0727 00:22:14.968510 466 net_dag_utils.cc:118] Operator graph pruning prior to chain compute took: 1.3365e-05 secs I0727 00:22:14.968546 466 net_dag.cc:61] Number of parallel execution chains 10 Number of operators = 30 |Processing Frame 1/287 -Frame read in 0.012s |Processing Frame 2/287 -Frame read in 0.001s | Inference time: 1.321s | im_detect_bbox: 1.034s | im_detect_body_uv: 0.287s | misc_bbox: 0.000s : cannot connect to X server F0727 00:22:16.488592 517 context_gpu.h:121] Check failed: error == cudaSuccess driver shutting down *** Check failure stack trace: *** F0727 00:22:16.488590 518 context_gpu.h:121] Check failed: error == cudaSuccess driver shutting down *** Check failure stack trace: *** F0727 00:22:16.488592 517 context_gpu.h:121] Check failed: error == cudaSuccess driver shutting downF0727 00:22:16.488714 520 context_gpu.h:121] Check failed: error == cudaSuccess driver shutting down *** Check failure stack trace: *** Aborted (core dumped)

Any idea why this happening? Where as for image it is working. I have made 2 vis files.

trrahul commented 6 years ago

Could you post your system configuration?

ForgottenOneNyx commented 6 years ago

Thank you for your reply.

This is my system config -

Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 12 On-line CPU(s) list: 0-11 Thread(s) per core: 2 Core(s) per socket: 6 Socket(s): 1 NUMA node(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 79 Model name: Intel(R) Core(TM) i7-6850K CPU @ 3.60GHz Stepping: 1 CPU MHz: 3605.086 CPU max MHz: 4000.0000 CPU min MHz: 1200.0000 BogoMIPS: 7196.44 Virtualization: VT-x L1d cache: 32K L1i cache: 32K L2 cache: 256K L3 cache: 15360K NUMA node0 CPU(s): 0-11 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 invpcid_single pti intel_ppin ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdt_a rdseed adx smap intel_pt xsaveopt cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts

+-----------------------------------------------------------------------------+ | NVIDIA-SMI 384.130 Driver Version: 384.130 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 GeForce GTX 108... Off | 00000000:05:00.0 On | N/A | | 23% 41C P8 12W / 250W | 5424MiB / 11169MiB | 0% Default | +-------------------------------+----------------------+----------------------+ | 1 GeForce GTX 108... Off | 00000000:06:00.0 Off | N/A | | 39% 67C P2 70W / 250W | 2990MiB / 11172MiB | 0% Default | +-------------------------------+----------------------+----------------------+ | 2 GeForce GTX 108... Off | 00000000:09:00.0 Off | N/A | | 55% 84C P2 151W / 250W | 2437MiB / 11172MiB | 100% Default | +-------------------------------+----------------------+----------------------+ | 3 GeForce GTX 108... Off | 00000000:0A:00.0 Off | N/A | | 46% 78C P2 222W / 250W | 1664MiB / 11172MiB | 100% Default | +-------------------------------+----------------------+----------------------+

trrahul commented 6 years ago

Are you running it from a command line interface without a desktop environment? Could you comment the line 421 cv2.imshow("plot",img) in file vis.py and try again.

ForgottenOneNyx commented 6 years ago

So I did that, it worked and then I got another error

Run Time Error: AttributeError: 'NoneType' object has no attribute 'astype'

Which also I fixed because you go the solution in another issue.

Can I ask where is my pose estimated video stored or by what name?

python2 tools/infer_vid.py --cfg configs/DensePose_ResNet101_FPN_s1x-e2e.yaml --output-dir DensePoseData/infer_out/ --wts https://s3.amazonaws.com/densepose/DensePose_ResNet101_FPN_s1x-e2e.pkl --input-file tools/_000269.mp4

I believe it should have been in infer_out. But I get this jpg file with the name dummy_name.jpg

trrahul commented 6 years ago

Pull the latest and run it again. There should be a folder named vid with images and video.

kaisark commented 6 years ago

I think for the older branch you might need to manually create a vid folder under Densepose directory (from where the infer command/python script is launched in the shell). Otherwise, just pull the latest from master (git pull)...

ForgottenOneNyx commented 6 years ago

@trrahul @kaisark Apologies on replying late.

It's working now. Thank you very much!!!