YOLOv4 video detection just loading - neural-network

Hello im trying to use video detection in YOLOv4 this is my command:
!./darknet detector demo cfg/coco.data cfg/yolov4.cfg /content/custom-yolov4-detector_best.weights /content/test.mp4 -benchmark
But it just keep loading with a white square and it doesnt do anything after hours.
Loading weights from /content/custom-yolov4-detector_best.weights...
seen 64, trained: 48 K-images (0 Kilo-batches_64)
Done! Loaded 159 layers from weights-file
video file: /content/test.mp4
Video stream: 2560 x 1080
Do you know what happen?

Related

PSB to Unity Crop Size

I have character made of elements done by graphic designer.
I put it to photoshop to match legs/head/weapon etc. save as PSB and import to Unity.
Problem is that free space of images is cropped in Unity.
F.ex.
Hat's contour, color and shadow layer are 512 x 512
But in sprite editor I see it's
contour 360 x 362, color 340 x 342, shadow 299 x 306
It all have to be 512 x 512 even with free space because I've got more hats I swap to bone in code.
If it's cropped all is messed up.
Any pro tip how to save original dimentions?
Is it something in Unity I missed or it's natural PSB thing to optimize size?

Image Get Jagged in Unity 2D

When images imported into unity gets jagged.
Jagged Image
But the unity 2d pack sprites does not gets jagged:
Jagged Image VS 2D Pack Sprite
I do all tasks like:
1 - Disabling and Enabling Mip Maps
2 - Fit texture size for usage
3 - Change filter mode
4 - Set Compression to None
5 - Importing Images from Photoshop instead of illustrator
Details:
Unity Version 5.5.0f
Images Created in Adobe Illustrator CC 2017
Try the following:
Go into Import Settings by clicking on the file in the project window
Increase pixels per unit to 200-300
For all build platforms:
Increase Max Size to 8192 (or highest)
If you get the option, increase the compressor quality to 100
Not recommended: In the scene, reduce scale and increase width/height
If none of that works:
Use a higher resolution image, or increase import resolution of vector image
Hope this helps!
I solved it.
You should import your textures and sprites in the size that you want for example:
If you need a 64 x 64 texture you should create and import your texture in 128 x 128 size.
By doing this the texture will become anti aliased and a little fade.
Thanks.

How do I change recording framerate of a webcamera in Matlab?

I would like to know how I can record a video and how to change the recording framerate in MATLAB with my webcam using Support Package for USB Webcams (not using toolboxes, including Image Acquisition tool box). I am thinking about using it because that package is free.
The code I made is like the below. I tried to set 2 frames/sec (fps) by v.FrameRate=2 but that code doesn't work (the recorded framerate was about 15 fps and the recording ended on about 10 sec), and I was not able to change fps in this way. Does my webcam work in Matlab Support Package for USB Webcams? How do I solve it?
function webcam_recordingvideo()
cam = webcam;
preview(cam)
v = VideoWriter('frames.avi');
get(v);
v.FrameRate=2;
open(v);
frames = 150; % frame number to get
for i = 1:frames
img = snapshot(cam); % Acquire frame for processing
writeVideo(v, img); % Write frame to video
end
close(v);
clear cam
I'm using Matlab 2016a and Logitech HD Webcam C615.

mplayer under uvesafb frame buffer will show black screen before playing video [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm try using mplayer to play video under frame buffer, and I'm using uvesafb as the frame buffer driver. The board is VIA EPIA-N800
The grub boot setting is:
/boot/vmlinuz-2.6.32 root=UUID=7ece6c10-7255-4f21-8cd8-edb096233969 ro quiet console=tty2 nomodeset video=uvesafb:mode_option=1920x1080-16,mtrr=3,scroll=ywrap
But when I play the video with mplayer, the screen will become black for a while, seems like reset or re-initial the screen before playing the video. The command is like that:
mplayer -vo fbdev /opt/1.avi
And the output is
root#ytmp:/opt/ytmp# mplayer -vo fbdev /opt/1.avi
MPlayer 1.0rc3-4.4.4 (C) 2000-2009 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Playing /opt/1.avi.
AVI file format detected.
[aviheader] Video stream found, -vid 0
[aviheader] Audio stream found, -aid 1
VIDEO: [] 720x576 24bpp 25.000 fps 5459.1 kbps (666.4 kbyte/s)
Clip info:
Software: MEncoder 1.0rc3-4.4.4
==========================================================================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 720 x 576 (preferred colorspace: Mpeg PES)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
Try appending the scale filter to your filter list,
e.g. -vf spp,scale instead of -vf spp.
VDecoder init failed :(
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Unsupported PixelFormat -1
Selected video codec: [ffmpeg2] vfm: ffmpeg (FFmpeg MPEG-2)
==========================================================================
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 48000 Hz, 2 ch, s16le, 224.0 kbit/14.58% (ratio: 28000->192000)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
AO: [pulse] Init failed: Connection refused
Failed to initialize audio driver 'pulse'
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
VDec: vo config request - 720 x 576 (preferred colorspace: Planar YV12)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
[swscaler # 0xb5f167a0]using unscaled yuv420p -> rgb565 special converter
VO: [fbdev] 720x576 => 768x576 BGR 16-bit
A: 75.0 V: 75.0 A-V: 0.000 ct: 0.024 1875/1875 19% 1% 0.7% 0 0
MPlayer interrupted by signal 2 in module: sleep_timer
A: 75.0 V: 75.0 A-V: 0.000 ct: 0.024 1876/1876 19% 1% 0.7% 0 0
Exiting... (Quit)
If I change the grub boot setting like this:
/boot/vmlinuz-2.6.32 root=UUID=7ece6c10-7255-4f21-8cd8-edb096233969 ro quiet console=tty2 vga=0x317
The problem did not appear. I did compare both mplayer output, but the output is same.
Did there any way to solve this?
In the first case (argument=nomodeset video=uvesafb:mode_option=1920x1080-16), you disabled KMS(Kernel Mode Settings), and use uvesafb instead. If KMS is disabled, when you switch between virtual terminal and X11/framebuffer, the screen will turn black for a while. In the second case you just set the resolution and KMS works. So you can switch between terminal and framebuffer without any problems.

Achieving very poor fps for my iphone app for decode + display h264 frames using ffmpeg and opengl

I have three steps process for my application which display h264 frame on iPhone screen.
decode using ffmpeg.
scale and colorspace conversion (scale to 256 X 256 Opengl ES 1 texture and convert colospace from yuv420p to rgb565 using sws_Scale from ffmpeg).
Render opengl 1 texture to frame buffer to render buffer
after these three step process, I got my picture on iPhone screen.
When I was testing the performance for 720 X 576 resolution frames, I obtain very poor FPS. It is reaching max to 180 milliseconds and hence resulting into 5 to 6 FPS.
Any direction will be grateful.