pjreddie / darknet

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

A doubt about performance #500

Open komalpharate opened 6 years ago

komalpharate commented 6 years ago

Hi, It is said that on "GPU" tiny YOLO works >200FPS Can I know the specifications of the GPU mentioned? I have Jetson TX2 with NVIDIA Pascal™, 256 CUDA cores GPU. What should I expect about FPS then?

ahsan856jalal commented 6 years ago

I think you will have to use hardware like this https://pjreddie.com/darknet/hardware-guide/

komalpharate commented 6 years ago

Okay.. There are multiple options available there. With the hardware I'm having, Cam I know the perfomance. If anybody have tried this setup.

ykangpark commented 6 years ago

@komalpharate I'm getting 6-7 FPS en the YoloV2. It's been some time since I tried, but I think i got 20 FPS on the tiny model.

AlexeyAB commented 6 years ago

It is said that on "GPU" tiny YOLO works >200FPS Can I know the specifications of the GPU mentioned?

200 FPS on Titan X GM200: 6604 GFlops-FP32

Jetson TX2 with NVIDIA Pascal has about 700 GFlops-FP32 (1300 FP16)

komalpharate commented 6 years ago

@ykangpark Can I know the hardware you are using? @AlexeyAB So should I expect atleast 15-20 FPS?

AlexeyAB commented 6 years ago

@komalpharate Yes, 15-20 FPS on Jetson TX2, but don't forget to use this ARCH in the Makefile: https://github.com/AlexeyAB/darknet/blob/490d02505b42701d9682591631c61d40e6cddeb4/Makefile#L27

komalpharate commented 6 years ago

Thanks a lot.. Can I know the significance of that? I'm really new to this Because the MakeFile I'm using is little old.

AlexeyAB commented 6 years ago

You should use this line ARCH= -gencode arch=compute_62,code=[sm_62,compute_62] Instead of these lines: https://github.com/AlexeyAB/darknet/blob/490d02505b42701d9682591631c61d40e6cddeb4/Makefile#L8-L12

It will optimize CUDA C++ code at compile time for the Jetson TX2 GPU.

komalpharate commented 6 years ago

Okay. Will try to do that and let you know. Thanks a lot @AlexeyAB . It's really helpful.

ykangpark commented 6 years ago

@komalpharate Using the Jetson TX2 in Max-N mode (nvpmodel) and fixed frecuency (using jetson_clocks.sh). (And no display, just detection)

TheMikeyR commented 6 years ago

I don't really get any performance chances on my custom network by using ARCH=62 or not, but as @ykangpark mention, do following: sudo nvpmodel -m 0 to activate all 6 cores and enable maximum frequencies sudo ~/jetson-clocks.sh to prevent downclocking and get stable fps. Hint: use sudo ~/jetson-clocks.sh --store before you activate it, and then you can use sudo ~/jetson-clocks.sh --restore to disable the script and get it back to before (the fan usually spins down, depends on the load ofc.)

komalpharate commented 6 years ago

@AlexeyAB I tested your branch. It's performance is really great. I checked with video file and also with some images. It is much faster now. Will investigate more. Video file is processed with almost triple FPS now. @ykangpark I do use both the options. But I have less info about jetson-clock.sh working. And exactly how it affects performance. I observed the difference and improvement in performance though. @TheMikeyR Was finding that --store and --restore option. luckily you mentioned the same. Thanks for your support. will use it.

sharoseali commented 5 years ago

GPU=0 CUDNN=0 OPENCV=0 DEBUG=0 OPENMP=0 @AlexeyAB can i leave CUDA, OPENCV AND CUDNN equal to 0 to speed up yolov2 ?? please tell about these flags Secondly, i had to use camera to get video through python script.. what to do than.. ??

sharoseali commented 5 years ago

@komalpharate how u edit make file to get good FPS on tx2 please show your make file.. help me please

komalpharate commented 5 years ago

GPU=1 CUDNN=1 OPENCV=1

Do refer @AlexeyAB darknet repository. The make file consists number of architecture parameters. You just have to select one for Jetson TX-2

Also refer all the above comments.

sharoseali commented 5 years ago

@komalpharate thanks for your's reply.. i have followed these instruction but i got just 3.3 frames on yolov2 coco. what was your FPS on TX2 for yolov2 ?? This is strange to me because in in youtube videos yolov3 runs on 3.3 FPS on TX2 and i got 3.3 FPS for yolov2!!. I write these lines after setting the flags: GPU=1 CUDNN=1 OPENCV=1

ARCH= -gencode arch=compute_53,code=[sm_53,compute_53] \ -gencode arch=compute_62,code=[sm_62,compute_62]

komalpharate commented 5 years ago

Can you please elaborate all steps you did. Repository and commands you executed.

sharoseali commented 5 years ago

CUDNN=1 OPENCV=1

ARCH= -gencode arch=compute_53,code=[sm_53,compute_53] -gencode arch=compute_62,code=[sm_62,compute_62]

i just make these changes .. set these flags = 1 and . replace these two lines by the statements starting by ARCH.. then i make my file an test the video and getting only 3.3 frames

sharoseali commented 5 years ago

@komalpharate please suggest something if u know how to get more FPS. i am currently Yolo v2 COCO model

sharoseali commented 5 years ago

@komalpharate i use original dark-net repository no Alexey because i have to execute darknet yolo from python. currently i have 3.3 FPS on jetson TX2. this isn't good @AlexeyAB can i use this repository from python??

komalpharate commented 5 years ago

You should get atleast 6 fps on Jetson TX2

aburney123 commented 5 years ago

I am running Darknet YOLOv2 on Jetson TX2 and getting 4fps. I have made the changes to ARCH in make file and also the following: sudo nvpmodel -m 0 to activate all 6 cores and enable maximum frequencies sudo ~/jetson-clocks.sh to prevent downclocking and get stable fps. I am using original YOLOv2 weights and cfg file. and input image size is 608x608

sharoseali commented 5 years ago

I am running Darknet YOLOv2 on Jetson TX2 and getting 4fps. I have made the changes to ARCH in make file and also the following: sudo nvpmodel -m 0 to activate all 6 cores and enable maximum frequencies sudo ~/jetson-clocks.sh to prevent downclocking and get stable fps. I am using original YOLOv2 weights and cfg file. and input image size is 608x608

@aburney123 you can change image size to 416 x 416 to get FPS improved up to some extent.