Convolutional Neural Networks

Overview

Darknet Logo

Darknet

Darknet is an open source neural network framework written in C and CUDA. It is fast, easy to install, and supports CPU and GPU computation.

Discord invite link for for communication and questions: https://discord.gg/zSq8rtW

Scaled-YOLOv4:

YOLOv4:

For more information see the Darknet project website.

For questions or issues please use the Google Group.

scaled_yolov4 AP50:95 - FPS (Tesla V100) Paper: https://arxiv.org/abs/2011.08036


YOLOv4Tiny


YOLOv4


OpenCV_TRT

Issues
  • Run YoloV3 detections on thousands of images and save outputs?

    Run YoloV3 detections on thousands of images and save outputs?

    I've only figured out how to run detections on one image at a time, typing a new image filename each time. Is there any build-in way to run on an entire folder of images and save images with predictions to another folder?

    opened by austinmw 119
  • Darknet Python IMAGE object

    Darknet Python IMAGE object

    Hi,

    I'm trying to forward the feed of a webcam to YOLO in python. My problem is that I capture the images from OpenCV but i don't know how to transform them to an IMAGE object in order to perform the .network_detect() Could you please throw some insight on this matter?

    Thank you!

    opened by FranciscoGomez90 56
  • rnn: ./src/cuda.c:36: check_error: Assertion `0' failed.

    rnn: ./src/cuda.c:36: check_error: Assertion `0' failed.

    I'm running cuda8.0 on Ubuntu16.04LTS.

    [email protected]:~/darknet# ./darknet rnn train cfg/rnn.train.cfg -file ./t8.shakespeare.txt 
    rnn
    layer     filters    size              input                output
        0 RNN Layer: 256 inputs, 1024 outputs
    		CUDA Error: out of memory
    darknet: ./src/cuda.c:36: check_error: Assertion `0' failed.
    Aborted (core dumped)
    [email protected]:~/darknet# nvidia-smi
    Fri Jul 21 14:11:16 2017       
    +-----------------------------------------------------------------------------+
    | NVIDIA-SMI 367.57                 Driver Version: 367.57                    |
    |-------------------------------+----------------------+----------------------+
    | GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
    | Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
    |===============================+======================+======================|
    |   0  GRID K520           Off  | 0000:00:03.0     Off |                  N/A |
    | N/A   62C    P0   104W / 125W |   3554MiB /  4036MiB |     92%      Default |
    +-------------------------------+----------------------+----------------------+
                                                                                   
    +-----------------------------------------------------------------------------+
    | Processes:                                                       GPU Memory |
    |  GPU       PID  Type  Process name                               Usage      |
    |=============================================================================|
    +-----------------------------------------------------------------------------+
    
    opened by loretoparisi 45
  • failing to compile with GPU=1

    failing to compile with GPU=1

    Started playing with your project after catching the ted talk, very cool project. I've gotten it to compile with GPU=0, however When setting GPU=1 I get the following error.

    /usr/include/string.h: In function ‘void* __mempcpy_inline(void*, const void*, size_t)’:
    /usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope
       return (char *) memcpy (__dest, __src, __n) + __n;
                                              ^
    compilation terminated due to -Wfatal-errors.
    Makefile:88: recipe for target 'obj/convolutional_kernels.o' failed
    make: *** [obj/convolutional_kernels.o] Error 1
    

    I'll keep tinkering and see if I can't figure it out just thought it might be worth reporting.

    opened by zacbayhan 32
  • Unable to understand how to train classifier with our own dataset?

    Unable to understand how to train classifier with our own dataset?

    Hey, I'm trying to train a classifier model in Darknet with my own dataset, consists of 4 class data. Though i found a cifar classification example in darknet, but i am unable to find in what format i should provide my data (renaming is required i guess, with classname at end?). or just tell me how should i proceed farther to use my dataset for a classifier specifying the classes that i want. I have followed this https://pjreddie.com/darknet/train-cifar/ link but still not clear how the classifier finds the class information. Please help me in this regards. Thanks in advance.

    opened by LolikaPadmanbhan 26
  • Saving image using python wrapper

    Saving image using python wrapper

    I am fairly new in using YOLO. I was wondering which function could I call to save an image from the darknet.py file found in /python directory. I would like to specify a manual location to save the detected image(containing detected markings).

    I have looked at various function in .c files, but was unable to pinpoint the respective function. Although, I tried calling save_image(im) but I need to pass the detected image.

    Any suggestions would be of great help!

    opened by ishansan 26
  • ./src/image_opencv.cpp:5:10: fatal error: opencv2/opencv.hpp: No such file or directory

    ./src/image_opencv.cpp:5:10: fatal error: opencv2/opencv.hpp: No such file or directory

    [email protected]:~/Desktop/darknet$ make g++ -Iinclude/ -Isrc/ -DOPENCV pkg-config --cflags opencv -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DOPENCV -c ./src/image_opencv.cpp -o obj/image_opencv.o Package opencv was not found in the pkg-config search path. Perhaps you should add the directory containing `opencv.pc' to the PKG_CONFIG_PATH environment variable No package 'opencv' found ./src/image_opencv.cpp:5:10: fatal error: opencv2/opencv.hpp: No such file or directory 5 | #include "opencv2/opencv.hpp" | ^~~~~~~~~~~~~~~~~~~~ compilation terminated. make: *** [Makefile:86: obj/image_opencv.o] Error 1

    opened by Liquid72 24
  • Weights only save every 100 iterations until 900, then saves every 10,000

    Weights only save every 100 iterations until 900, then saves every 10,000

    Hello,

    I am training YOLO on the COCO dataset and I have noticed that the weights only save in increments of 100 until iteration 900. After iteration 900, the next set of saved weights is at iteration 10,000, then 20,000 after that.

    Is there a way to change how often weights are saved to $DARKNET_ROOT/backup? I would request there be a variable in cfg/yolo.cfg that allows the user to choose how often weights are saved to backup.

    opened by allendorf 24
  • what is bad.list used for?

    what is bad.list used for?

    I am trying to train yolo on my custom dataset. However, the final predictions.jpg file is always empty for me.

    • There is file in my root folder called bad.list, that contains thousands of entries such as:

    data/labels/32_0.png data/labels/33_0.png data/labels/34_0.png data/labels/35_0.png ...

    • At the time of prediction, I get similar errors:

    Cannot load image "data/labels/32_0.png" Cannot load image "data/labels/33_0.png" Cannot load image "data/labels/34_0.png" Cannot load image "data/labels/35_0.png" Cannot load image "data/labels/36_0.png" ...

    These png images are not part of my training dataset and do not exist in any configuration file. I'm guessing this is might be the reason why my predictions are empty with no bounding box around the desired object(?).

    Could anybody please throw some light on this.

    opened by reachsumit 22
  • Can darknet detector demo use multiple GPUs?

    Can darknet detector demo use multiple GPUs?

    Can darknet detector demo use multiple GPUs?

    -gpus doesn't seem to kick off a 2nd process on the 2nd GPU.

    $ ./darknet detector demo cfg/coco.data cfg/yolov3.cfg yolov3.weights Delhi.mkv -gpus 0,1
    

    ...

    +-----------------------------------------------------------------------------+
    | NVIDIA-SMI 390.46                 Driver Version: 390.46                    |
    |-------------------------------+----------------------+----------------------+
    | GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
    | Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
    |===============================+======================+======================|
    |   0  Tesla M60           Off  | 00003DB5:00:00.0 Off |                  Off |
    | N/A   54C    P0   135W / 150W |   1450MiB /  8129MiB |     89%      Default |
    +-------------------------------+----------------------+----------------------+
    |   1  Tesla M60           Off  | 000057C7:00:00.0 Off |                  Off |
    | N/A   40C    P8    14W / 150W |     11MiB /  8129MiB |      0%      Default |
    +-------------------------------+----------------------+----------------------+
    
    +-----------------------------------------------------------------------------+
    | Processes:                                                       GPU Memory |
    |  GPU       PID   Type   Process name                             Usage      |
    |=============================================================================|
    |    0     15257      C   ./darknet                                   1439MiB |
    +-----------------------------------------------------------------------------+
    

    Is multi-GPU support just for training?

    opened by snobu 19
  • Error on make: 'cuda_runtime.h: No such file or directory'

    Error on make: 'cuda_runtime.h: No such file or directory'

    Getting this error despite having CUDA 8 installed w/ CUDNN and OpenCV 3.2.0:

    gcc -Iinclude/ -Isrc/ -DOPENCV pkg-config --cflags opencv -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -c ./src/gemm.c -o obj/gemm.o In file included from ./src/utils.h:5:0, from ./src/gemm.c:2: include/darknet.h:14:30: fatal error: cuda_runtime.h: No such file or directory compilation terminated. Makefile:87: recipe for target 'obj/gemm.o' failed make: *** [obj/gemm.o] Error 1

    Where is that file supposed to be? Thanks!

    opened by brandonjabr 19
  • Survey Question on the For loop in source file DarknetDetection/darknet_lib/src/data.c line 1333

    Survey Question on the For loop in source file DarknetDetection/darknet_lib/src/data.c line 1333

    Hello Sir/ Madam We are from a research group at Iowa State University, USA. We want to do a survey on Github developers on the methods they used for paralleling their code. To do the survey, We want to ask three questions about this for loop:

    Can you briefly explain the purpose of using pragma for this case? If the pragma contained reduction and private clauses, can you briefly mention the purposes of variables in those clauses?

    How much confidence do you have about the correctness of this implementation? You can choose from 1-5 with 1 as the lowest confidence score and 5 as the highest confidence score.

    (Optional) Do you actually run (interpret the code with compilation and pass input/get output) the code and see the optimization of parallelization? Yes/No

    If yes, can you provide the information of what are the input and expected output of this program (the input that caused the program to run through this for-loop). The for loop is from line 1333 of file https://github.com/pjreddie/darknet/blob/master/DarknetDetection/darknet_lib/src/data.c Here is a part of the code:

    omp parallel for for (i = 0; i < orig.X.rows; ++i) { image im = float_to_image(orig.w, orig.h, 3, orig.X.vals[i]); d.X.vals[i] = resize_image(im, w, h).data; }

    Sincerely thanks

    opened by pdhung3012 0
  • Running darknet problem

    Running darknet problem

    Hello all,

    I use linux user : Ubuntu 20.04. I want running inference task with my pre-trained darknet yolov4 model using terminal. I ran this command ./darknet detector test ~/Documents/Data_challenge/Apple_detection_via_YOLOV4/main_folder/Model_ALL_views/obj.data ~/Documents/Data_challenge/Apple_detection_via_YOLOV4/main_folder/yolov4-tiny-test.cfg "~/Documents/Data_challenge/Apple_detection_via_YOLOV4/main_folder/Model_ALL_views/backup/yolov4-tiny-train_best.weights" -thresh 0.20 -dont_show -out ~/Documents/Data_challenge/Apple_detection_via_YOLOV4/main_folder/Model_ALL_views/Prediction.csv < ~/Documents/Data_challenge/Apple_detection_via_YOLOV4/main_folder/Model_ALL_views/test.txt After running this command, I got directly this output ./darknet: error while loading shared libraries: libopencv_highgui.so.3.2: cannot open shared object file: No such file or directory How can I solve this problem ? please, I will appreciate your help, Best,

    opened by hereariim 1
  • Training several classes but only one at a time

    Training several classes but only one at a time

    I would like to train, for example, three classes; turtles, koalas, and cats. But for several reasons I would prefer to train only one class at a time. I would like to end up with a training file that understands and can detect all three classes. I understand how to train one class at a time and I understand how to train all three classes at a time. But how to add training to an existing training file I do not understand.

    Can someone please explain how this is done?

    Thank you.

    opened by hnwynters 0
  • Crashed on Nvidia Jetson Xavier NX

    Crashed on Nvidia Jetson Xavier NX

    Hi:

    I have Nvidia Jetpack 4.5.1 installed on my Jetson Xavier NX dev kit. It has CUDA 10.2, CUDNN 8.0. If I build the CPU version, I can run the demo. However, if I build the GPU version (GPU=1, CUDNN=0), it crashed when loading the weights as shown below. How can I fix it?

    [email protected]:~/apps/darknet$ ./darknet detect cfg/yolov3.cfg yolov3.weights data/dog.jpg layer filters size input output 0 1 2 3 4 res 1 304 x 304 x 64 -> 304 x 304 x 64 5 6 7 8 res 5 152 x 152 x 128 -> 152 x 152 x 128 9 10 11 res 8 152 x 152 x 128 -> 152 x 152 x 128 12 13 14 15 res 12 76 x 76 x 256 -> 76 x 76 x 256 16 17 18 res 15 76 x 76 x 256 -> 76 x 76 x 256 19 20 21 res 18 76 x 76 x 256 -> 76 x 76 x 256 22 23 24 res 21 76 x 76 x 256 -> 76 x 76 x 256 25 26 27 res 24 76 x 76 x 256 -> 76 x 76 x 256 28 29 30 res 27 76 x 76 x 256 -> 76 x 76 x 256 31 32 33 res 30 76 x 76 x 256 -> 76 x 76 x 256 34 35 36 res 33 76 x 76 x 256 -> 76 x 76 x 256 37 38 39 40 res 37 38 x 38 x 512 -> 38 x 38 x 512 41 42 43 res 40 38 x 38 x 512 -> 38 x 38 x 512 44 45 46 res 43 38 x 38 x 512 -> 38 x 38 x 512 47 48 49 res 46 38 x 38 x 512 -> 38 x 38 x 512 50 51 52 res 49 38 x 38 x 512 -> 38 x 38 x 512 53 54 55 res 52 38 x 38 x 512 -> 38 x 38 x 512 56 57 58 res 55 38 x 38 x 512 -> 38 x 38 x 512 59 60 61 res 58 38 x 38 x 512 -> 38 x 38 x 512 62 63 64 65 res 62 19 x 19 x1024 -> 19 x 19 x1024 66 67 68 res 65 19 x 19 x1024 -> 19 x 19 x1024 69 70 71 res 68 19 x 19 x1024 -> 19 x 19 x1024 72 73 74 res 71 19 x 19 x1024 -> 19 x 19 x1024 75 76 77 78 79 80 81 82 yolo 83 route 79 84 85 upsample 2x 19 x 19 x 256 -> 38 x 38 x 256 86 route 85 61 87 88 Killed

    opened by spcrobocar 0
Real time monaural source separation base on fully convolutional neural network operates on Time-frequency domain.

Real time monaural source separation base on fully convolutional neural network operates on Time-frequency domain.

James Fung 96 Jun 29, 2022
Tensors and Dynamic neural networks in Python with strong GPU acceleration

PyTorch is a Python package that provides two high-level features: Tensor computation (like NumPy) with strong GPU acceleration Deep neural networks b

null 56.9k Jun 23, 2022
A lightweight C library for artificial neural networks

Getting Started # acquire source code and compile git clone https://github.com/attractivechaos/kann cd kann; make # learn unsigned addition (30000 sam

Attractive Chaos 606 Jun 10, 2022
Low dependency(C++11 STL only), good portability, header-only, deep neural networks for embedded

LKYDeepNN LKYDeepNN 可訓練的深度類神經網路 (Deep Neural Network) 函式庫。 輕量,核心部份只依賴 C++11 標準函式庫,低相依性、好移植,方便在嵌入式系統上使用。 Class diagram 附有訓練視覺化 demo 程式 訓練視覺化程式以 OpenCV

Lin Kao-Yuan 39 Apr 27, 2022
Tiny CUDA Neural Networks

This is a small, self-contained framework for training and querying neural networks. Most notably, it contains a lightning fast "fully fused" multi-layer perceptron as well as support for various advanced input encodings, losses, and optimizers.

NVIDIA Research Projects 1.4k Jul 3, 2022
Raspberry Pi guitar pedal using neural networks to emulate real amps and pedals.

NeuralPi NeuralPi is a guitar pedal using neural networks to emulate real amps and pedals on a Raspberry Pi 4. The NeuralPi software is a VST3 plugin

Keith Bloemer 664 Jun 28, 2022
An Efficient Implementation of Analytic Mesh Algorithm for 3D Iso-surface Extraction from Neural Networks

AnalyticMesh Analytic Marching is an exact meshing solution from neural networks. Compared to standard methods, it completely avoids geometric and top

Jiabao Lei 36 May 21, 2022
An Efficient Implementation of Analytic Mesh Algorithm for 3D Iso-surface Extraction from Neural Networks

AnalyticMesh Analytic Marching is an exact meshing solution from neural networks. Compared to standard methods, it completely avoids geometric and top

null 36 May 21, 2022
A header-only C++ library for deep neural networks

MiniDNN MiniDNN is a C++ library that implements a number of popular deep neural network (DNN) models. It has a mini codebase but is fully functional

Yixuan Qiu 313 Jun 22, 2022
InsNet Runs Instance-dependent Neural Networks with Padding-free Dynamic Batching.

InsNet documentation InsNet (documentation) is a powerful neural network library aiming at building instance-dependent computation graphs. It is desig

Chauncey Wang 58 Jun 9, 2022
A framework for generic hybrid two-party computation and private inference with neural networks

MOTION2NX -- A Framework for Generic Hybrid Two-Party Computation and Private Inference with Neural Networks This software is an extension of the MOTI

ENCRYPTO 10 May 27, 2022
TS-9 guitar pedal clone using neural networks.

TS-M1N3 TS-M1N3 is a guitar plugin clone of the TS-9 Tubescreamer overdrive pedal. Machine learning was used to train a model of both the drive and to

Keith Bloemer 23 Jun 20, 2022
A library for creating Artificial Neural Networks, for use in Machine Learning and Deep Learning algorithms.

iNeural A library for creating Artificial Neural Networks, for use in Machine Learning and Deep Learning algorithms. What is a Neural Network? Work on

Fatih Küçükkarakurt 5 Apr 5, 2022
A Tool for Verifying Neural Networks using SMT-Based Model Checking

Project Title QNNVerifier Description A Tool for Verifying Neural Networks using SMT-Based Model Checking. Using Frama-C and ESBMC as the backends. Yo

null 2 Dec 11, 2021
CoDi is a cellular automaton model for spiking neural networks

CoDi CoDi is a cellular automaton (CA) model for spiking neural networks (SNNs). CoDi is an acronym for Collect and Distribute, referring to the signa

Jett LaRue 6 May 5, 2022
International Business Machines 8 May 16, 2022
Grouped Feedback Delay Networks for Coupled Room Modeling

Grouped Feedback Delay Networks Reverb Plugin GFDNs connect multiple spaces with different T60 characteristics and a parameterized mixing matrix to co

Orchisama Das 26 Jun 23, 2022
Parallel library for approximate inference on discrete Bayesian networks

baylib C++ library Baylib is a parallel inference library for discrete Bayesian networks supporting approximate inference algorithms both in CPU and G

Massimiliano Pronesti 21 Jun 20, 2022
Computer Networks, [email protected], taught by Hong Xu

CSCI4430, Computer Networks (Spring 2022) Administrivia Schedule Lectures: Mon 12:30pm -- 2:15pm, ERB LT (Zoom link) Tue 4:30pm -- 5:15pm, ERB LT (Zoo

Hong Xu 9 Mar 11, 2022