yusuketomoto / chainer-fast-neuralstyle

Chainer implementation of "Perceptual Losses for Real-Time Style Transfer and Super-Resolution".
MIT License
803 stars 229 forks source link

How to do real time processing #46

Open sukerlove opened 8 years ago

sukerlove commented 8 years ago

Dear yusuketomoto: how can process real time video?

Machine configuration: OS............: ubuntu14.04 Memory........: 32G CPU...........: Intel Core i7-6700K 4.00GHz*8 DisplayCard...: NVIDIA GeForce GTX 1080 Harddisk......: 256G ssd


gtx1080@suker:~$ nvidia-smi Tue Aug 23 21:17:24 2016
+-----------------------------------------------------------------------------+ | NVIDIA-SMI 367.35 Driver Version: 367.35 | |-------------------------------+----------------------+----------------------+ | 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 1080 Off | 0000:01:00.0 On | N/A | | 34% 35C P8 10W / 200W | 1306MiB / 8112MiB | 5% Default | +-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| | 0 1169 G /usr/bin/X 1014MiB | | 0 2025 G compiz 59MiB | | 0 3571 G unity-control-center 2MiB | | 0 10412 G ...ves-passed-by-fd --v8-snapshot-passed-by- 227MiB | +-----------------------------------------------------------------------------+ gtx1080@suker:~$

I am looking forward to your reply. Thanks.

ttoinou commented 8 years ago

How much time does it takes to process one frame at given resolution with your machine ?

6o6o commented 8 years ago

See here: https://github.com/genekogan/CubistMirror

sukerlove commented 8 years ago

@ttoinou

I use command $ python generate.py sample_images/image0001.jpg -m models/composition.model -o sample_images/output-0001.jpg

/usr/lib/python2.7/dist-packages/pkg_resources.py:1031: UserWarning: /home/gtx1080/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable). warnings.warn(msg, UserWarning)

3.45500588417 sec $

cost 3.455sec

sukerlove commented 8 years ago

@6o6o I try now, thanks

xpeng commented 8 years ago

@sukerlove , hmm, 3.4sec, what the size of your image(image0001.jpg)?

sukerlove commented 8 years ago

@xpeng image0001.jpg:640*360

kaca0083 commented 8 years ago

@sukerlove Missing -g or --gpu option?

vermapratyush commented 8 years ago

@kaca0083 @xpeng On GTX 1080 and 1024px image, I am getting response time of ~ 2.5 seconds. TitanX is reportedly doing it in <1 second. Shouldn't the response time in GTX 1080 be comparable, maybe 1.5sec (max).

austingg commented 7 years ago

@vermapratyush you may run second time. The first run cost longer time.