#测试显卡类别
!nvidia-smi
Fri Aug 6 00:55:57 2021
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.42.01 Driver Version: 460.32.03 CUDA Version: 11.2 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 Tesla T4 Off | 00000000:00:04.0 Off | 0 |
| N/A 39C P8 11W / 70W | 0MiB / 15109MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
# 下载yolov3
!git clone https://github.com/AlexeyAB/darknet
Cloning into 'darknet'...
remote: Enumerating objects: 15298, done.[K
remote: Counting objects: 100% (9/9), done.[K
remote: Compressing objects: 100% (9/9), done.[K
remote: Total 15298 (delta 1), reused 5 (delta 0), pack-reused 15289[K
Receiving objects: 100% (15298/15298), 13.70 MiB | 22.44 MiB/s, done.
Resolving deltas: 100% (10383/10383), done.
#设置gpu 显卡
%cd darknet
!sed -i 's/OPENCV=0/OPENCV=1/' Makefile
!sed -i 's/GPU=0/GPU=1/' Makefile
!sed -i 's/CUDNN=0/CUDNN=1/' Makefile
/content/darknet
# 看下CUDA
!/usr/local/cuda/bin/nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Wed_Jul_22_19:09:09_PDT_2020
Cuda compilation tools, release 11.0, V11.0.221
Build cuda_11.0_bu.TC445_37.28845127_0
#编译
!make
mkdir -p ./obj/
mkdir -p backup
chmod +x *.sh
g++ -std=c++11 -std=c++11 -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/image_opencv.cpp -o obj/image_opencv.o
[01m[K./src/image_opencv.cpp:[m[K In function ‘[01m[Kvoid draw_detections_cv_v3(void**, detection*, int, float, char**, image**, int, int)[m[K’:
[01m[K./src/image_opencv.cpp:946:23:[m[K [01;35m[Kwarning: [m[Kvariable ‘[01m[Krgb[m[K’ set but not used [[01;35m[K-Wunused-but-set-variable[m[K]
float [01;35m[Krgb[m[K[3];
[01;35m[K^~~[m[K
[01m[K./src/image_opencv.cpp:[m[K In function ‘[01m[Kvoid draw_train_loss(char*, void**, int, float, float, int, int, float, int, char*, float, int, int, double)[m[K’:
[01m[K./src/image_opencv.cpp:1147:13:[m[K [01;35m[Kwarning: [m[Kthis ‘[01m[Kif[m[K’ clause does not guard... [[01;35m[K-Wmisleading-indentation[m[K]
[01;35m[Kif[m[K (iteration_old == 0)
[01;35m[K^~[m[K
[01m[K./src/image_opencv.cpp:1150:10:[m[K [01;36m[Knote: [m[K...this statement, but the latter is misleadingly indented as if it were guarded by the ‘[01m[Kif[m[K’
[01;36m[Kif[m[K (iteration_old != 0){
[01;36m[K^~[m[K
[01m[K./src/image_opencv.cpp:[m[K In function ‘[01m[Kvoid cv_draw_object(image, float*, int, int, int*, float*, int*, int, char**)[m[K’:
[01m[K./src/image_opencv.cpp:1444:14:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Kbuff[m[K’ [[01;35m[K-Wunused-variable[m[K]
char [01;35m[Kbuff[m[K[100];
[01;35m[K^~~~[m[K
[01m[K./src/image_opencv.cpp:1420:9:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Kit_tb_res[m[K’ [[01;35m[K-Wunused-variable[m[K]
int [01;35m[Kit_tb_res[m[K = cv::createTrackbar(it_trackbar_name, window_name, &it_trackbar_value, 1000);
[01;35m[K^~~~~~~~~[m[K
[01m[K./src/image_opencv.cpp:1424:9:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Klr_tb_res[m[K’ [[01;35m[K-Wunused-variable[m[K]
int [01;35m[Klr_tb_res[m[K = cv::createTrackbar(lr_trackbar_name, window_name, &lr_trackbar_value, 20);
[01;35m[K^~~~~~~~~[m[K
[01m[K./src/image_opencv.cpp:1428:9:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Kcl_tb_res[m[K’ [[01;35m[K-Wunused-variable[m[K]
int [01;35m[Kcl_tb_res[m[K = cv::createTrackbar(cl_trackbar_name, window_name, &cl_trackbar_value, classes-1);
[01;35m[K^~~~~~~~~[m[K
[01m[K./src/image_opencv.cpp:1431:9:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Kbo_tb_res[m[K’ [[01;35m[K-Wunused-variable[m[K]
int [01;35m[Kbo_tb_res[m[K = cv::createTrackbar(bo_trackbar_name, window_name, boxonly, 1);
[01;35m[K^~~~~~~~~[m[K
g++ -std=c++11 -std=c++11 -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/http_stream.cpp -o obj/http_stream.o
[01m[K./src/http_stream.cpp:[m[K In member function ‘[01m[Kbool JSON_sender::write(const char*)[m[K’:
[01m[K./src/http_stream.cpp:253:21:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Kn[m[K’ [[01;35m[K-Wunused-variable[m[K]
int [01;35m[Kn[m[K = _write(client, outputbuf, outlen);
[01;35m[K^[m[K
[01m[K./src/http_stream.cpp:[m[K In member function ‘[01m[Kbool MJPG_sender::write(const cv::Mat&)[m[K’:
[01m[K./src/http_stream.cpp:511:113:[m[K [01;35m[Kwarning: [m[Kformat ‘[01m[K%zu[m[K’ expects argument of type ‘[01m[Ksize_t[m[K’, but argument 3 has type ‘[01m[Kint[m[K’ [[01;35m[K-Wformat=[m[K]
sprintf(head, "--mjpegstream\r\nContent-Type: image/jpeg\r\nContent-Length: %zu\r\n\r\n", outlen[01;35m[K)[m[K;
[01;35m[K^[m[K
[01m[K./src/http_stream.cpp:[m[K In function ‘[01m[Kvoid set_track_id(detection*, int, float, float, float, int, int, int)[m[K’:
[01m[K./src/http_stream.cpp:867:27:[m[K [01;35m[Kwarning: [m[Kcomparison between signed and unsigned integer expressions [[01;35m[K-Wsign-compare[m[K]
for (int i = 0; [01;35m[Ki < v.size()[m[K; ++i) {
[01;35m[K~~^~~~~~~~~~[m[K
[01m[K./src/http_stream.cpp:875:33:[m[K [01;35m[Kwarning: [m[Kcomparison between signed and unsigned integer expressions [[01;35m[K-Wsign-compare[m[K]
for (int old_id = 0; [01;35m[Kold_id < old_dets.size()[m[K; ++old_id) {
[01;35m[K~~~~~~~^~~~~~~~~~~~~~~~~[m[K
[01m[K./src/http_stream.cpp:894:31:[m[K [01;35m[Kwarning: [m[Kcomparison between signed and unsigned integer expressions [[01;35m[K-Wsign-compare[m[K]
for (int index = 0; [01;35m[Kindex < new_dets_num*old_dets.size()[m[K; ++index) {
[01;35m[K~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[m[K
[01m[K./src/http_stream.cpp:930:28:[m[K [01;35m[Kwarning: [m[Kcomparison between signed and unsigned integer expressions [[01;35m[K-Wsign-compare[m[K]
if ([01;35m[Kold_dets_dq.size() > deque_size[m[K) old_dets_dq.pop_front();
[01;35m[K~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~[m[K
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/gemm.c -o obj/gemm.o
[01m[K./src/gemm.c:[m[K In function ‘[01m[Kconvolution_2d[m[K’:
[01m[K./src/gemm.c:2044:15:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Kout_w[m[K’ [[01;35m[K-Wunused-variable[m[K]
const int [01;35m[Kout_w[m[K = (w + 2 * pad - ksize) / stride + 1; // output_width=input_width for stride=1 and pad=1
[01;35m[K^~~~~[m[K
[01m[K./src/gemm.c:2043:15:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Kout_h[m[K’ [[01;35m[K-Wunused-variable[m[K]
const int [01;35m[Kout_h[m[K = (h + 2 * pad - ksize) / stride + 1; // output_height=input_height for stride=1 and pad=1
[01;35m[K^~~~~[m[K
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/utils.c -o obj/utils.o
[01m[K./src/utils.c:[m[K In function ‘[01m[Kcustom_hash[m[K’:
[01m[K./src/utils.c:1061:12:[m[K [01;35m[Kwarning: [m[Ksuggest parentheses around assignment used as truth value [[01;35m[K-Wparentheses[m[K]
while ([01;35m[Kc[m[K = *str++)
[01;35m[K^[m[K
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/dark_cuda.c -o obj/dark_cuda.o
[01m[K./src/dark_cuda.c:[m[K In function ‘[01m[Kcudnn_check_error_extended[m[K’:
[01m[K./src/dark_cuda.c:231:20:[m[K [01;35m[Kwarning: [m[Kcomparison between ‘[01m[KcudaError_t {aka enum cudaError}[m[K’ and ‘[01m[Kenum <anonymous>[m[K’ [[01;35m[K-Wenum-compare[m[K]
if (status [01;35m[K!=[m[K CUDNN_STATUS_SUCCESS)
[01;35m[K^~[m[K
[01m[K./src/dark_cuda.c:[m[K In function ‘[01m[Kcublas_check_error_extended[m[K’:
[01m[K./src/dark_cuda.c:265:18:[m[K [01;35m[Kwarning: [m[Kcomparison between ‘[01m[KcudaError_t {aka enum cudaError}[m[K’ and ‘[01m[Kenum cudaError_enum[m[K’ [[01;35m[K-Wenum-compare[m[K]
if (status [01;35m[K!=[m[K CUDA_SUCCESS)
[01;35m[K^~[m[K
[01m[K./src/dark_cuda.c:[m[K In function ‘[01m[Kpre_allocate_pinned_memory[m[K’:
[01m[K./src/dark_cuda.c:396:40:[m[K [01;35m[Kwarning: [m[Kformat ‘[01m[K%u[m[K’ expects argument of type ‘[01m[Kunsigned int[m[K’, but argument 2 has type ‘[01m[Klong unsigned int[m[K’ [[01;35m[K-Wformat=[m[K]
printf("pre_allocate: size = [01;35m[K%Iu[m[K MB, num_of_blocks = %Iu, block_size = %Iu MB \n",
[01;35m[K~~^[m[K
[32m[K%Ilu[m[K
[32m[Ksize / (1024*1024)[m[K, num_of_blocks, pinned_block_size / (1024 * 1024));
[32m[K~~~~~~~~~~~~~~~~~~[m[K
[01m[K./src/dark_cuda.c:396:64:[m[K [01;35m[Kwarning: [m[Kformat ‘[01m[K%u[m[K’ expects argument of type ‘[01m[Kunsigned int[m[K’, but argument 3 has type ‘[01m[Ksize_t {aka const long unsigned int}[m[K’ [[01;35m[K-Wformat=[m[K]
printf("pre_allocate: size = %Iu MB, num_of_blocks = [01;35m[K%Iu[m[K, block_size = %Iu MB \n",
[01;35m[K~~^[m[K
[32m[K%Ilu[m[K
[01m[K./src/dark_cuda.c:396:82:[m[K [01;35m[Kwarning: [m[Kformat ‘[01m[K%u[m[K’ expects argument of type ‘[01m[Kunsigned int[m[K’, but argument 4 has type ‘[01m[Klong unsigned int[m[K’ [[01;35m[K-Wformat=[m[K]
printf("pre_allocate: size = %Iu MB, num_of_blocks = %Iu, block_size = [01;35m[K%Iu[m[K MB \n",
[01;35m[K~~^[m[K
[32m[K%Ilu[m[K
[01m[K./src/dark_cuda.c:406:37:[m[K [01;35m[Kwarning: [m[Kformat ‘[01m[K%d[m[K’ expects argument of type ‘[01m[Kint[m[K’, but argument 2 has type ‘[01m[Ksize_t {aka const long unsigned int}[m[K’ [[01;35m[K-Wformat=[m[K]
printf(" Allocated [01;35m[K%d[m[K pinned block \n", pinned_block_size);
[01;35m[K~^[m[K
[32m[K%ld[m[K
[01m[K./src/dark_cuda.c:[m[K In function ‘[01m[Kcuda_make_array_pinned_preallocated[m[K’:
[01m[K./src/dark_cuda.c:427:43:[m[K [01;35m[Kwarning: [m[Kformat ‘[01m[K%d[m[K’ expects argument of type ‘[01m[Kint[m[K’, but argument 2 has type ‘[01m[Ksize_t {aka long unsigned int}[m[K’ [[01;35m[K-Wformat=[m[K]
printf("\n Pinned block_id = [01;35m[K%d[m[K, filled = %f %% \n", pinned_block_id, filled);
[01;35m[K~^[m[K
[32m[K%ld[m[K
[01m[K./src/dark_cuda.c:442:64:[m[K [01;35m[Kwarning: [m[Kformat ‘[01m[K%d[m[K’ expects argument of type ‘[01m[Kint[m[K’, but argument 2 has type ‘[01m[Klong unsigned int[m[K’ [[01;35m[K-Wformat=[m[K]
printf("Try to allocate new pinned memory, size = [01;35m[K%d[m[K MB \n", [32m[Ksize / (1024 * 1024)[m[K);
[01;35m[K~^[m[K [32m[K~~~~~~~~~~~~~~~~~~~~[m[K
[32m[K%ld[m[K
[01m[K./src/dark_cuda.c:448:63:[m[K [01;35m[Kwarning: [m[Kformat ‘[01m[K%d[m[K’ expects argument of type ‘[01m[Kint[m[K’, but argument 2 has type ‘[01m[Klong unsigned int[m[K’ [[01;35m[K-Wformat=[m[K]
printf("Try to allocate new pinned BLOCK, size = [01;35m[K%d[m[K MB \n", [32m[Ksize / (1024 * 1024)[m[K);
[01;35m[K~^[m[K [32m[K~~~~~~~~~~~~~~~~~~~~[m[K
[32m[K%ld[m[K
At top level:
[01m[K./src/dark_cuda.c:288:23:[m[K [01;35m[Kwarning: [m[K‘[01m[KswitchBlasHandle[m[K’ defined but not used [[01;35m[K-Wunused-variable[m[K]
static cublasHandle_t [01;35m[KswitchBlasHandle[m[K[16];
[01;35m[K^~~~~~~~~~~~~~~~[m[K
[01m[K./src/dark_cuda.c:287:12:[m[K [01;35m[Kwarning: [m[K‘[01m[KswitchBlasInit[m[K’ defined but not used [[01;35m[K-Wunused-variable[m[K]
static int [01;35m[KswitchBlasInit[m[K[16] = { 0 };
[01;35m[K^~~~~~~~~~~~~~[m[K
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/convolutional_layer.c -o obj/convolutional_layer.o
[01m[K./src/convolutional_layer.c:[m[K In function ‘[01m[Kforward_convolutional_layer[m[K’:
[01m[K./src/convolutional_layer.c:1341:32:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Kt_intput_size[m[K’ [[01;35m[K-Wunused-variable[m[K]
size_t [01;35m[Kt_intput_size[m[K = binary_transpose_align_input(k, n, state.workspace, &l.t_bit_input, ldb_align, l.bit_align);
[01;35m[K^~~~~~~~~~~~~[m[K
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/list.c -o obj/list.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/image.c -o obj/image.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/activations.c -o obj/activations.o
[01m[K./src/activations.c:[m[K In function ‘[01m[Kactivate[m[K’:
[01m[K./src/activations.c:79:5:[m[K [01;35m[Kwarning: [m[Kenumeration value ‘[01m[KRELU6[m[K’ not handled in switch [[01;35m[K-Wswitch[m[K]
[01;35m[Kswitch[m[K(a){
[01;35m[K^~~~~~[m[K
[01m[K./src/activations.c:79:5:[m[K [01;35m[Kwarning: [m[Kenumeration value ‘[01m[KSWISH[m[K’ not handled in switch [[01;35m[K-Wswitch[m[K]
[01m[K./src/activations.c:79:5:[m[K [01;35m[Kwarning: [m[Kenumeration value ‘[01m[KMISH[m[K’ not handled in switch [[01;35m[K-Wswitch[m[K]
[01m[K./src/activations.c:79:5:[m[K [01;35m[Kwarning: [m[Kenumeration value ‘[01m[KHARD_MISH[m[K’ not handled in switch [[01;35m[K-Wswitch[m[K]
[01m[K./src/activations.c:79:5:[m[K [01;35m[Kwarning: [m[Kenumeration value ‘[01m[KNORM_CHAN[m[K’ not handled in switch [[01;35m[K-Wswitch[m[K]
[01m[K./src/activations.c:79:5:[m[K [01;35m[Kwarning: [m[Kenumeration value ‘[01m[KNORM_CHAN_SOFTMAX[m[K’ not handled in switch [[01;35m[K-Wswitch[m[K]
[01m[K./src/activations.c:79:5:[m[K [01;35m[Kwarning: [m[Kenumeration value ‘[01m[KNORM_CHAN_SOFTMAX_MAXVAL[m[K’ not handled in switch [[01;35m[K-Wswitch[m[K]
[01m[K./src/activations.c:[m[K In function ‘[01m[Kgradient[m[K’:
[01m[K./src/activations.c:310:5:[m[K [01;35m[Kwarning: [m[Kenumeration value ‘[01m[KSWISH[m[K’ not handled in switch [[01;35m[K-Wswitch[m[K]
[01;35m[Kswitch[m[K(a){
[01;35m[K^~~~~~[m[K
[01m[K./src/activations.c:310:5:[m[K [01;35m[Kwarning: [m[Kenumeration value ‘[01m[KMISH[m[K’ not handled in switch [[01;35m[K-Wswitch[m[K]
[01m[K./src/activations.c:310:5:[m[K [01;35m[Kwarning: [m[Kenumeration value ‘[01m[KHARD_MISH[m[K’ not handled in switch [[01;35m[K-Wswitch[m[K]
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/im2col.c -o obj/im2col.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/col2im.c -o obj/col2im.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/blas.c -o obj/blas.o
[01m[K./src/blas.c:[m[K In function ‘[01m[Kbackward_shortcut_multilayer_cpu[m[K’:
[01m[K./src/blas.c:207:21:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Kout_index[m[K’ [[01;35m[K-Wunused-variable[m[K]
int [01;35m[Kout_index[m[K = id;
[01;35m[K^~~~~~~~~[m[K
[01m[K./src/blas.c:[m[K In function ‘[01m[Kfind_sim[m[K’:
[01m[K./src/blas.c:597:59:[m[K [01;35m[Kwarning: [m[Kformat ‘[01m[K%d[m[K’ expects argument of type ‘[01m[Kint[m[K’, but argument 2 has type ‘[01m[Ksize_t {aka long unsigned int}[m[K’ [[01;35m[K-Wformat=[m[K]
printf(" Error: find_sim(): sim isn't found: i = [01;35m[K%d[m[K, j = %d, z = %d \n", i, j, z);
[01;35m[K~^[m[K
[32m[K%ld[m[K
[01m[K./src/blas.c:597:67:[m[K [01;35m[Kwarning: [m[Kformat ‘[01m[K%d[m[K’ expects argument of type ‘[01m[Kint[m[K’, but argument 3 has type ‘[01m[Ksize_t {aka long unsigned int}[m[K’ [[01;35m[K-Wformat=[m[K]
printf(" Error: find_sim(): sim isn't found: i = %d, j = [01;35m[K%d[m[K, z = %d \n", i, j, z);
[01;35m[K~^[m[K
[32m[K%ld[m[K
[01m[K./src/blas.c:597:75:[m[K [01;35m[Kwarning: [m[Kformat ‘[01m[K%d[m[K’ expects argument of type ‘[01m[Kint[m[K’, but argument 4 has type ‘[01m[Ksize_t {aka long unsigned int}[m[K’ [[01;35m[K-Wformat=[m[K]
printf(" Error: find_sim(): sim isn't found: i = %d, j = %d, z = [01;35m[K%d[m[K \n", i, j, z);
[01;35m[K~^[m[K
[32m[K%ld[m[K
[01m[K./src/blas.c:[m[K In function ‘[01m[Kfind_P_constrastive[m[K’:
[01m[K./src/blas.c:611:68:[m[K [01;35m[Kwarning: [m[Kformat ‘[01m[K%d[m[K’ expects argument of type ‘[01m[Kint[m[K’, but argument 2 has type ‘[01m[Ksize_t {aka long unsigned int}[m[K’ [[01;35m[K-Wformat=[m[K]
printf(" Error: find_P_constrastive(): P isn't found: i = [01;35m[K%d[m[K, j = %d, z = %d \n", i, j, z);
[01;35m[K~^[m[K
[32m[K%ld[m[K
[01m[K./src/blas.c:611:76:[m[K [01;35m[Kwarning: [m[Kformat ‘[01m[K%d[m[K’ expects argument of type ‘[01m[Kint[m[K’, but argument 3 has type ‘[01m[Ksize_t {aka long unsigned int}[m[K’ [[01;35m[K-Wformat=[m[K]
printf(" Error: find_P_constrastive(): P isn't found: i = %d, j = [01;35m[K%d[m[K, z = %d \n", i, j, z);
[01;35m[K~^[m[K
[32m[K%ld[m[K
[01m[K./src/blas.c:611:84:[m[K [01;35m[Kwarning: [m[Kformat ‘[01m[K%d[m[K’ expects argument of type ‘[01m[Kint[m[K’, but argument 4 has type ‘[01m[Ksize_t {aka long unsigned int}[m[K’ [[01;35m[K-Wformat=[m[K]
printf(" Error: find_P_constrastive(): P isn't found: i = %d, j = %d, z = [01;35m[K%d[m[K \n", i, j, z);
[01;35m[K~^[m[K
[32m[K%ld[m[K
[01m[K./src/blas.c:[m[K In function ‘[01m[KP_constrastive_f[m[K’:
[01m[K./src/blas.c:651:79:[m[K [01;35m[Kwarning: [m[Kformat ‘[01m[K%d[m[K’ expects argument of type ‘[01m[Kint[m[K’, but argument 3 has type ‘[01m[Ksize_t {aka long unsigned int}[m[K’ [[01;35m[K-Wformat=[m[K]
fprintf(stderr, " Error: in P_constrastive must be i != l, while i = [01;35m[K%d[m[K, l = %d \n", i, l);
[01;35m[K~^[m[K
[32m[K%ld[m[K
[01m[K./src/blas.c:651:87:[m[K [01;35m[Kwarning: [m[Kformat ‘[01m[K%d[m[K’ expects argument of type ‘[01m[Kint[m[K’, but argument 4 has type ‘[01m[Ksize_t {aka long unsigned int}[m[K’ [[01;35m[K-Wformat=[m[K]
fprintf(stderr, " Error: in P_constrastive must be i != l, while i = %d, l = [01;35m[K%d[m[K \n", i, l);
[01;35m[K~^[m[K
[32m[K%ld[m[K
[01m[K./src/blas.c:[m[K In function ‘[01m[KP_constrastive[m[K’:
[01m[K./src/blas.c:785:79:[m[K [01;35m[Kwarning: [m[Kformat ‘[01m[K%d[m[K’ expects argument of type ‘[01m[Kint[m[K’, but argument 3 has type ‘[01m[Ksize_t {aka long unsigned int}[m[K’ [[01;35m[K-Wformat=[m[K]
fprintf(stderr, " Error: in P_constrastive must be i != l, while i = [01;35m[K%d[m[K, l = %d \n", i, l);
[01;35m[K~^[m[K
[32m[K%ld[m[K
[01m[K./src/blas.c:785:87:[m[K [01;35m[Kwarning: [m[Kformat ‘[01m[K%d[m[K’ expects argument of type ‘[01m[Kint[m[K’, but argument 4 has type ‘[01m[Ksize_t {aka long unsigned int}[m[K’ [[01;35m[K-Wformat=[m[K]
fprintf(stderr, " Error: in P_constrastive must be i != l, while i = %d, l = [01;35m[K%d[m[K \n", i, l);
[01;35m[K~^[m[K
[32m[K%ld[m[K
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/crop_layer.c -o obj/crop_layer.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/dropout_layer.c -o obj/dropout_layer.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/maxpool_layer.c -o obj/maxpool_layer.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/softmax_layer.c -o obj/softmax_layer.o
[01m[K./src/softmax_layer.c:[m[K In function ‘[01m[Kmake_contrastive_layer[m[K’:
[01m[K./src/softmax_layer.c:203:101:[m[K [01;35m[Kwarning: [m[Kformat ‘[01m[K%d[m[K’ expects argument of type ‘[01m[Kint[m[K’, but argument 9 has type ‘[01m[Ksize_t {aka const long unsigned int}[m[K’ [[01;35m[K-Wformat=[m[K]
fprintf(stderr, "contrastive %4d x%4d x%4d x emb_size %4d x batch: %4d classes = %4d, step = [01;35m[K%4d[m[K \n", w, h, l.n, l.embedding_size, batch, l.classes, step);
[01;35m[K~~^[m[K
[32m[K%4ld[m[K
[01m[K./src/softmax_layer.c:[m[K In function ‘[01m[Kforward_contrastive_layer[m[K’:
[01m[K./src/softmax_layer.c:244:27:[m[K [01;35m[Kwarning: [m[Kvariable ‘[01m[Kmax_truth[m[K’ set but not used [[01;35m[K-Wunused-but-set-variable[m[K]
float [01;35m[Kmax_truth[m[K = 0;
[01;35m[K^~~~~~~~~[m[K
[01m[K./src/softmax_layer.c:423:71:[m[K [01;35m[Kwarning: [m[Kformat ‘[01m[K%d[m[K’ expects argument of type ‘[01m[Kint[m[K’, but argument 2 has type ‘[01m[Ksize_t {aka const long unsigned int}[m[K’ [[01;35m[K-Wformat=[m[K]
printf(" Error: too large number of bboxes: contr_size = [01;35m[K%d[m[K > max_contr_size = %d \n", contr_size, max_contr_size);
[01;35m[K~^[m[K
[32m[K%ld[m[K
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/data.c -o obj/data.o
[01m[K./src/data.c:[m[K In function ‘[01m[Kload_data_detection[m[K’:
[01m[K./src/data.c:1297:24:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Kx[m[K’ [[01;35m[K-Wunused-variable[m[K]
int k, [01;35m[Kx[m[K, y;
[01;35m[K^[m[K
[01m[K./src/data.c:1090:43:[m[K [01;35m[Kwarning: [m[Kvariable ‘[01m[Kr_scale[m[K’ set but not used [[01;35m[K-Wunused-but-set-variable[m[K]
float r1 = 0, r2 = 0, r3 = 0, r4 = 0, [01;35m[Kr_scale[m[K = 0;
[01;35m[K^~~~~~~[m[K
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/matrix.c -o obj/matrix.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/network.c -o obj/network.o
[01m[K./src/network.c:[m[K In function ‘[01m[Ktrain_network_waitkey[m[K’:
[01m[K./src/network.c:435:13:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Kema_period[m[K’ [[01;35m[K-Wunused-variable[m[K]
int [01;35m[Kema_period[m[K = (net.max_batches - ema_start_point - 1000) * (1.0 - net.ema_alpha);
[01;35m[K^~~~~~~~~~[m[K
[01m[K./src/network.c:[m[K In function ‘[01m[Kresize_network[m[K’:
[01m[K./src/network.c:660:42:[m[K [01;35m[Kwarning: [m[Kpassing argument 1 of ‘[01m[KcudaHostAlloc[m[K’ from incompatible pointer type [[01;35m[K-Wincompatible-pointer-types[m[K]
if (cudaSuccess == cudaHostAlloc([01;35m[K&[m[Knet->input_pinned_cpu, size * sizeof(float), cudaHostRegisterMapped))
[01;35m[K^[m[K
In file included from [01m[K/usr/local/cuda/include/cuda_runtime.h:96:0[m[K,
from [01m[Kinclude/darknet.h:41[m[K,
from [01m[K./src/network.c:1[m[K:
[01m[K/usr/local/cuda/include/cuda_runtime_api.h:4707:39:[m[K [01;36m[Knote: [m[Kexpected ‘[01m[Kvoid **[m[K’ but argument is of type ‘[01m[Kfloat **[m[K’
extern __host__ cudaError_t CUDARTAPI [01;36m[KcudaHostAlloc[m[K(void **pHost, size_t size, unsigned int flags);
[01;36m[K^~~~~~~~~~~~~[m[K
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/connected_layer.c -o obj/connected_layer.o
[01m[K./src/connected_layer.c:[m[K In function ‘[01m[Kforward_connected_layer_gpu[m[K’:
[01m[K./src/connected_layer.c:346:11:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Kone[m[K’ [[01;35m[K-Wunused-variable[m[K]
float [01;35m[Kone[m[K = 1; // alpha[0], beta[0]
[01;35m[K^~~[m[K
[01m[K./src/connected_layer.c:344:13:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Kc[m[K’ [[01;35m[K-Wunused-variable[m[K]
float * [01;35m[Kc[m[K = l.output_gpu;
[01;35m[K^[m[K
[01m[K./src/connected_layer.c:343:13:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Kb[m[K’ [[01;35m[K-Wunused-variable[m[K]
float * [01;35m[Kb[m[K = l.weights_gpu;
[01;35m[K^[m[K
[01m[K./src/connected_layer.c:342:13:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Ka[m[K’ [[01;35m[K-Wunused-variable[m[K]
float * [01;35m[Ka[m[K = state.input;
[01;35m[K^[m[K
[01m[K./src/connected_layer.c:341:9:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Kn[m[K’ [[01;35m[K-Wunused-variable[m[K]
int [01;35m[Kn[m[K = l.outputs;
[01;35m[K^[m[K
[01m[K./src/connected_layer.c:340:9:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Kk[m[K’ [[01;35m[K-Wunused-variable[m[K]
int [01;35m[Kk[m[K = l.inputs;
[01;35m[K^[m[K
[01m[K./src/connected_layer.c:339:9:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Km[m[K’ [[01;35m[K-Wunused-variable[m[K]
int [01;35m[Km[m[K = l.batch;
[01;35m[K^[m[K
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/cost_layer.c -o obj/cost_layer.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/parser.c -o obj/parser.o
[01m[K./src/parser.c:[m[K In function ‘[01m[Kparse_network_cfg_custom[m[K’:
[01m[K./src/parser.c:1777:42:[m[K [01;35m[Kwarning: [m[Kpassing argument 1 of ‘[01m[KcudaHostAlloc[m[K’ from incompatible pointer type [[01;35m[K-Wincompatible-pointer-types[m[K]
if (cudaSuccess == cudaHostAlloc([01;35m[K&[m[Knet.input_pinned_cpu, size * sizeof(float), cudaHostRegisterMapped)) net.input_pinned_cpu_flag = 1;
[01;35m[K^[m[K
In file included from [01m[K/usr/local/cuda/include/cuda_runtime.h:96:0[m[K,
from [01m[Kinclude/darknet.h:41[m[K,
from [01m[K./src/activations.h:3[m[K,
from [01m[K./src/activation_layer.h:4[m[K,
from [01m[K./src/parser.c:6[m[K:
[01m[K/usr/local/cuda/include/cuda_runtime_api.h:4707:39:[m[K [01;36m[Knote: [m[Kexpected ‘[01m[Kvoid **[m[K’ but argument is of type ‘[01m[Kfloat **[m[K’
extern __host__ cudaError_t CUDARTAPI [01;36m[KcudaHostAlloc[m[K(void **pHost, size_t size, unsigned int flags);
[01;36m[K^~~~~~~~~~~~~[m[K
[01m[K./src/parser.c:[m[K In function ‘[01m[Ksave_implicit_weights[m[K’:
[01m[K./src/parser.c:1909:9:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Ki[m[K’ [[01;35m[K-Wunused-variable[m[K]
int [01;35m[Ki[m[K;
[01;35m[K^[m[K
[01m[K./src/parser.c:[m[K In function ‘[01m[Kget_classes_multipliers[m[K’:
[01m[K./src/parser.c:438:29:[m[K [01;35m[Kwarning: [m[Kargument 1 range [18446744071562067968, 18446744073709551615] exceeds maximum object size 9223372036854775807 [[01;35m[K-Walloc-size-larger-than=[m[K]
[01;35m[Kclasses_multipliers = (float *)calloc(classes_counters, sizeof(float))[m[K;
[01;35m[K~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[m[K
In file included from [01m[K./src/parser.c:3:0[m[K:
[01m[K/usr/include/stdlib.h:541:14:[m[K [01;36m[Knote: [m[Kin a call to allocation function ‘[01m[Kcalloc[m[K’ declared here
extern void *[01;36m[Kcalloc[m[K (size_t __nmemb, size_t __size)
[01;36m[K^~~~~~[m[K
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/option_list.c -o obj/option_list.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/darknet.c -o obj/darknet.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/detection_layer.c -o obj/detection_layer.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/captcha.c -o obj/captcha.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/route_layer.c -o obj/route_layer.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/writing.c -o obj/writing.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/box.c -o obj/box.o
[01m[K./src/box.c:[m[K In function ‘[01m[Kbox_iou_kind[m[K’:
[01m[K./src/box.c:154:5:[m[K [01;35m[Kwarning: [m[Kenumeration value ‘[01m[KMSE[m[K’ not handled in switch [[01;35m[K-Wswitch[m[K]
[01;35m[Kswitch[m[K(iou_kind) {
[01;35m[K^~~~~~[m[K
[01m[K./src/box.c:[m[K In function ‘[01m[Kdiounms_sort[m[K’:
[01m[K./src/box.c:898:27:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Kbeta_prob[m[K’ [[01;35m[K-Wunused-variable[m[K]
float [01;35m[Kbeta_prob[m[K = pow(dets[j].prob[k], 2) / sum_prob;
[01;35m[K^~~~~~~~~[m[K
[01m[K./src/box.c:897:27:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Kalpha_prob[m[K’ [[01;35m[K-Wunused-variable[m[K]
float [01;35m[Kalpha_prob[m[K = pow(dets[i].prob[k], 2) / sum_prob;
[01;35m[K^~~~~~~~~~[m[K
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/nightmare.c -o obj/nightmare.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/normalization_layer.c -o obj/normalization_layer.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/avgpool_layer.c -o obj/avgpool_layer.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/coco.c -o obj/coco.o
[01m[K./src/coco.c:[m[K In function ‘[01m[Kvalidate_coco_recall[m[K’:
[01m[K./src/coco.c:248:11:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Kbase[m[K’ [[01;35m[K-Wunused-variable[m[K]
char *[01;35m[Kbase[m[K = "results/comp4_det_test_";
[01;35m[K^~~~[m[K
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/dice.c -o obj/dice.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/yolo.c -o obj/yolo.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/detector.c -o obj/detector.o
[01m[K./src/detector.c:[m[K In function ‘[01m[Ktrain_detector[m[K’:
[01m[K./src/detector.c:386:72:[m[K [01;35m[Kwarning: [m[Ksuggest parentheses around ‘[01m[K&&[m[K’ within ‘[01m[K||[m[K’ [[01;35m[K-Wparentheses[m[K]
[01;35m[K(iteration >= (iter_save + 1000) || iteration % 1000 == 0) && net.max_batches < 10000[m[K)
[01;35m[K~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~[m[K
[01m[K./src/detector.c:[m[K In function ‘[01m[Kprint_cocos[m[K’:
[01m[K./src/detector.c:486:29:[m[K [01;35m[Kwarning: [m[Kformat not a string literal and no format arguments [[01;35m[K-Wformat-security[m[K]
fprintf(fp, [01;35m[Kbuff[m[K);
[01;35m[K^~~~[m[K
[01m[K./src/detector.c:[m[K In function ‘[01m[Keliminate_bdd[m[K’:
[01m[K./src/detector.c:579:21:[m[K [01;35m[Kwarning: [m[Kstatement with no effect [[01;35m[K-Wunused-value[m[K]
[01;35m[Kfor[m[K (k; buf[k + n] != '\0'; k++)
[01;35m[K^~~[m[K
[01m[K./src/detector.c:[m[K In function ‘[01m[Kvalidate_detector[m[K’:
[01m[K./src/detector.c:700:13:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Kmkd2[m[K’ [[01;35m[K-Wunused-variable[m[K]
int [01;35m[Kmkd2[m[K = make_directory(buff2, 0777);
[01;35m[K^~~~[m[K
[01m[K./src/detector.c:698:13:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Kmkd[m[K’ [[01;35m[K-Wunused-variable[m[K]
int [01;35m[Kmkd[m[K = make_directory(buff, 0777);
[01;35m[K^~~[m[K
[01m[K./src/detector.c:[m[K In function ‘[01m[Kvalidate_detector_map[m[K’:
[01m[K./src/detector.c:1315:24:[m[K [01;35m[Kwarning: [m[Kvariable ‘[01m[Kcur_prob[m[K’ set but not used [[01;35m[K-Wunused-but-set-variable[m[K]
double [01;35m[Kcur_prob[m[K = 0;
[01;35m[K^~~~~~~~[m[K
[01m[K./src/detector.c:1336:15:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Kclass_recall[m[K’ [[01;35m[K-Wunused-variable[m[K]
float [01;35m[Kclass_recall[m[K = (float)tp_for_thresh_per_class[i] / ((float)tp_for_thresh_per_class[i] + (float)(truth_classes_count[i] - tp_for_thresh_per_class[i]));
[01;35m[K^~~~~~~~~~~~[m[K
[01m[K./src/detector.c:1335:15:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Kclass_precision[m[K’ [[01;35m[K-Wunused-variable[m[K]
float [01;35m[Kclass_precision[m[K = (float)tp_for_thresh_per_class[i] / ((float)tp_for_thresh_per_class[i] + (float)fp_for_thresh_per_class[i]);
[01;35m[K^~~~~~~~~~~~~~~[m[K
[01m[K./src/detector.c:[m[K In function ‘[01m[Kdraw_object[m[K’:
[01m[K./src/detector.c:1871:19:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Kinv_loss[m[K’ [[01;35m[K-Wunused-variable[m[K]
float [01;35m[Kinv_loss[m[K = 1.0 / max_val_cmp(0.01, avg_loss);
[01;35m[K^~~~~~~~[m[K
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/layer.c -o obj/layer.o
[01m[K./src/layer.c:[m[K In function ‘[01m[Kfree_layer_custom[m[K’:
[01m[K./src/layer.c:208:68:[m[K [01;35m[Kwarning: [m[Ksuggest parentheses around ‘[01m[K&&[m[K’ within ‘[01m[K||[m[K’ [[01;35m[K-Wparentheses[m[K]
if (l.delta_gpu && (l.optimized_memory < 1 || [01;35m[Kl.keep_delta_gpu && l.optimized_memory < 3[m[K)) cuda_free(l.delta_gpu), l.delta_gpu = NULL;
[01;35m[K~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~[m[K
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/compare.c -o obj/compare.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/classifier.c -o obj/classifier.o
[01m[K./src/classifier.c:[m[K In function ‘[01m[Ktrain_classifier[m[K’:
[01m[K./src/classifier.c:146:9:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Kcount[m[K’ [[01;35m[K-Wunused-variable[m[K]
int [01;35m[Kcount[m[K = 0;
[01;35m[K^~~~~[m[K
[01m[K./src/classifier.c:[m[K In function ‘[01m[Kpredict_classifier[m[K’:
[01m[K./src/classifier.c:855:13:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Ktime[m[K’ [[01;35m[K-Wunused-variable[m[K]
clock_t [01;35m[Ktime[m[K;
[01;35m[K^~~~[m[K
[01m[K./src/classifier.c:[m[K In function ‘[01m[Kdemo_classifier[m[K’:
[01m[K./src/classifier.c:1287:49:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Ktval_result[m[K’ [[01;35m[K-Wunused-variable[m[K]
struct timeval tval_before, tval_after, [01;35m[Ktval_result[m[K;
[01;35m[K^~~~~~~~~~~[m[K
[01m[K./src/classifier.c:1287:37:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Ktval_after[m[K’ [[01;35m[K-Wunused-variable[m[K]
struct timeval tval_before, [01;35m[Ktval_after[m[K, tval_result;
[01;35m[K^~~~~~~~~~[m[K
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/local_layer.c -o obj/local_layer.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/swag.c -o obj/swag.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/shortcut_layer.c -o obj/shortcut_layer.o
[01m[K./src/shortcut_layer.c:[m[K In function ‘[01m[Kmake_shortcut_layer[m[K’:
[01m[K./src/shortcut_layer.c:55:15:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Kscale[m[K’ [[01;35m[K-Wunused-variable[m[K]
float [01;35m[Kscale[m[K = sqrt(2. / l.nweights);
[01;35m[K^~~~~[m[K
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/representation_layer.c -o obj/representation_layer.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/activation_layer.c -o obj/activation_layer.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/rnn_layer.c -o obj/rnn_layer.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/gru_layer.c -o obj/gru_layer.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/rnn.c -o obj/rnn.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/rnn_vid.c -o obj/rnn_vid.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/crnn_layer.c -o obj/crnn_layer.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/demo.c -o obj/demo.o
[01m[K./src/demo.c:[m[K In function ‘[01m[Kdetect_in_thread[m[K’:
[01m[K./src/demo.c:101:15:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Kl[m[K’ [[01;35m[K-Wunused-variable[m[K]
layer [01;35m[Kl[m[K = net.layers[net.n - 1];
[01;35m[K^[m[K
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/tag.c -o obj/tag.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/cifar.c -o obj/cifar.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/go.c -o obj/go.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/batchnorm_layer.c -o obj/batchnorm_layer.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/art.c -o obj/art.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/region_layer.c -o obj/region_layer.o
[01m[K./src/region_layer.c:[m[K In function ‘[01m[Kresize_region_layer[m[K’:
[01m[K./src/region_layer.c:63:9:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Kold_h[m[K’ [[01;35m[K-Wunused-variable[m[K]
int [01;35m[Kold_h[m[K = l->h;
[01;35m[K^~~~~[m[K
[01m[K./src/region_layer.c:62:9:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Kold_w[m[K’ [[01;35m[K-Wunused-variable[m[K]
int [01;35m[Kold_w[m[K = l->w;
[01;35m[K^~~~~[m[K
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/reorg_layer.c -o obj/reorg_layer.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/reorg_old_layer.c -o obj/reorg_old_layer.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/super.c -o obj/super.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/voxel.c -o obj/voxel.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/tree.c -o obj/tree.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/yolo_layer.c -o obj/yolo_layer.o
[01m[K./src/yolo_layer.c:[m[K In function ‘[01m[Kmake_yolo_layer[m[K’:
[01m[K./src/yolo_layer.c:68:38:[m[K [01;35m[Kwarning: [m[Kpassing argument 1 of ‘[01m[KcudaHostAlloc[m[K’ from incompatible pointer type [[01;35m[K-Wincompatible-pointer-types[m[K]
if (cudaSuccess == cudaHostAlloc([01;35m[K&[m[Kl.output, batch*l.outputs*sizeof(float), cudaHostRegisterMapped)) l.output_pinned = 1;
[01;35m[K^[m[K
In file included from [01m[K/usr/local/cuda/include/cuda_runtime.h:96:0[m[K,
from [01m[Kinclude/darknet.h:41[m[K,
from [01m[K./src/activations.h:3[m[K,
from [01m[K./src/layer.h:4[m[K,
from [01m[K./src/yolo_layer.h:5[m[K,
from [01m[K./src/yolo_layer.c:1[m[K:
[01m[K/usr/local/cuda/include/cuda_runtime_api.h:4707:39:[m[K [01;36m[Knote: [m[Kexpected ‘[01m[Kvoid **[m[K’ but argument is of type ‘[01m[Kfloat **[m[K’
extern __host__ cudaError_t CUDARTAPI [01;36m[KcudaHostAlloc[m[K(void **pHost, size_t size, unsigned int flags);
[01;36m[K^~~~~~~~~~~~~[m[K
[01m[K./src/yolo_layer.c:75:38:[m[K [01;35m[Kwarning: [m[Kpassing argument 1 of ‘[01m[KcudaHostAlloc[m[K’ from incompatible pointer type [[01;35m[K-Wincompatible-pointer-types[m[K]
if (cudaSuccess == cudaHostAlloc([01;35m[K&[m[Kl.delta, batch*l.outputs*sizeof(float), cudaHostRegisterMapped)) l.delta_pinned = 1;
[01;35m[K^[m[K
In file included from [01m[K/usr/local/cuda/include/cuda_runtime.h:96:0[m[K,
from [01m[Kinclude/darknet.h:41[m[K,
from [01m[K./src/activations.h:3[m[K,
from [01m[K./src/layer.h:4[m[K,
from [01m[K./src/yolo_layer.h:5[m[K,
from [01m[K./src/yolo_layer.c:1[m[K:
[01m[K/usr/local/cuda/include/cuda_runtime_api.h:4707:39:[m[K [01;36m[Knote: [m[Kexpected ‘[01m[Kvoid **[m[K’ but argument is of type ‘[01m[Kfloat **[m[K’
extern __host__ cudaError_t CUDARTAPI [01;36m[KcudaHostAlloc[m[K(void **pHost, size_t size, unsigned int flags);
[01;36m[K^~~~~~~~~~~~~[m[K
[01m[K./src/yolo_layer.c:[m[K In function ‘[01m[Kresize_yolo_layer[m[K’:
[01m[K./src/yolo_layer.c:106:42:[m[K [01;35m[Kwarning: [m[Kpassing argument 1 of ‘[01m[KcudaHostAlloc[m[K’ from incompatible pointer type [[01;35m[K-Wincompatible-pointer-types[m[K]
if (cudaSuccess != cudaHostAlloc([01;35m[K&[m[Kl->output, l->batch*l->outputs * sizeof(float), cudaHostRegisterMapped)) {
[01;35m[K^[m[K
In file included from [01m[K/usr/local/cuda/include/cuda_runtime.h:96:0[m[K,
from [01m[Kinclude/darknet.h:41[m[K,
from [01m[K./src/activations.h:3[m[K,
from [01m[K./src/layer.h:4[m[K,
from [01m[K./src/yolo_layer.h:5[m[K,
from [01m[K./src/yolo_layer.c:1[m[K:
[01m[K/usr/local/cuda/include/cuda_runtime_api.h:4707:39:[m[K [01;36m[Knote: [m[Kexpected ‘[01m[Kvoid **[m[K’ but argument is of type ‘[01m[Kfloat **[m[K’
extern __host__ cudaError_t CUDARTAPI [01;36m[KcudaHostAlloc[m[K(void **pHost, size_t size, unsigned int flags);
[01;36m[K^~~~~~~~~~~~~[m[K
[01m[K./src/yolo_layer.c:115:42:[m[K [01;35m[Kwarning: [m[Kpassing argument 1 of ‘[01m[KcudaHostAlloc[m[K’ from incompatible pointer type [[01;35m[K-Wincompatible-pointer-types[m[K]
if (cudaSuccess != cudaHostAlloc([01;35m[K&[m[Kl->delta, l->batch*l->outputs * sizeof(float), cudaHostRegisterMapped)) {
[01;35m[K^[m[K
In file included from [01m[K/usr/local/cuda/include/cuda_runtime.h:96:0[m[K,
from [01m[Kinclude/darknet.h:41[m[K,
from [01m[K./src/activations.h:3[m[K,
from [01m[K./src/layer.h:4[m[K,
from [01m[K./src/yolo_layer.h:5[m[K,
from [01m[K./src/yolo_layer.c:1[m[K:
[01m[K/usr/local/cuda/include/cuda_runtime_api.h:4707:39:[m[K [01;36m[Knote: [m[Kexpected ‘[01m[Kvoid **[m[K’ but argument is of type ‘[01m[Kfloat **[m[K’
extern __host__ cudaError_t CUDARTAPI [01;36m[KcudaHostAlloc[m[K(void **pHost, size_t size, unsigned int flags);
[01;36m[K^~~~~~~~~~~~~[m[K
[01m[K./src/yolo_layer.c:[m[K In function ‘[01m[Kprocess_batch[m[K’:
[01m[K./src/yolo_layer.c:426:25:[m[K [01;35m[Kwarning: [m[Kvariable ‘[01m[Kbest_match_t[m[K’ set but not used [[01;35m[K-Wunused-but-set-variable[m[K]
int [01;35m[Kbest_match_t[m[K = 0;
[01;35m[K^~~~~~~~~~~~[m[K
[01m[K./src/yolo_layer.c:[m[K In function ‘[01m[Kforward_yolo_layer[m[K’:
[01m[K./src/yolo_layer.c:707:11:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Kavg_anyobj[m[K’ [[01;35m[K-Wunused-variable[m[K]
float [01;35m[Kavg_anyobj[m[K = 0;
[01;35m[K^~~~~~~~~~[m[K
[01m[K./src/yolo_layer.c:706:11:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Kavg_obj[m[K’ [[01;35m[K-Wunused-variable[m[K]
float [01;35m[Kavg_obj[m[K = 0;
[01;35m[K^~~~~~~[m[K
[01m[K./src/yolo_layer.c:705:11:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Kavg_cat[m[K’ [[01;35m[K-Wunused-variable[m[K]
float [01;35m[Kavg_cat[m[K = 0;
[01;35m[K^~~~~~~[m[K
[01m[K./src/yolo_layer.c:704:11:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Krecall75[m[K’ [[01;35m[K-Wunused-variable[m[K]
float [01;35m[Krecall75[m[K = 0;
[01;35m[K^~~~~~~~[m[K
[01m[K./src/yolo_layer.c:703:11:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Krecall[m[K’ [[01;35m[K-Wunused-variable[m[K]
float [01;35m[Krecall[m[K = 0;
[01;35m[K^~~~~~[m[K
[01m[K./src/yolo_layer.c:702:11:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Ktot_ciou_loss[m[K’ [[01;35m[K-Wunused-variable[m[K]
float [01;35m[Ktot_ciou_loss[m[K = 0;
[01;35m[K^~~~~~~~~~~~~[m[K
[01m[K./src/yolo_layer.c:701:11:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Ktot_diou_loss[m[K’ [[01;35m[K-Wunused-variable[m[K]
float [01;35m[Ktot_diou_loss[m[K = 0;
[01;35m[K^~~~~~~~~~~~~[m[K
[01m[K./src/yolo_layer.c:698:11:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Ktot_ciou[m[K’ [[01;35m[K-Wunused-variable[m[K]
float [01;35m[Ktot_ciou[m[K = 0;
[01;35m[K^~~~~~~~[m[K
[01m[K./src/yolo_layer.c:697:11:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Ktot_diou[m[K’ [[01;35m[K-Wunused-variable[m[K]
float [01;35m[Ktot_diou[m[K = 0;
[01;35m[K^~~~~~~~[m[K
[01m[K./src/yolo_layer.c:696:11:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Ktot_giou[m[K’ [[01;35m[K-Wunused-variable[m[K]
float [01;35m[Ktot_giou[m[K = 0;
[01;35m[K^~~~~~~~[m[K
[01m[K./src/yolo_layer.c:668:12:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Kn[m[K’ [[01;35m[K-Wunused-variable[m[K]
int b, [01;35m[Kn[m[K;
[01;35m[K^[m[K
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/gaussian_yolo_layer.c -o obj/gaussian_yolo_layer.o
[01m[K./src/gaussian_yolo_layer.c:[m[K In function ‘[01m[Kmake_gaussian_yolo_layer[m[K’:
[01m[K./src/gaussian_yolo_layer.c:72:38:[m[K [01;35m[Kwarning: [m[Kpassing argument 1 of ‘[01m[KcudaHostAlloc[m[K’ from incompatible pointer type [[01;35m[K-Wincompatible-pointer-types[m[K]
if (cudaSuccess == cudaHostAlloc([01;35m[K&[m[Kl.output, batch*l.outputs * sizeof(float), cudaHostRegisterMapped)) l.output_pinned = 1;
[01;35m[K^[m[K
In file included from [01m[K/usr/local/cuda/include/cuda_runtime.h:96:0[m[K,
from [01m[Kinclude/darknet.h:41[m[K,
from [01m[K./src/gaussian_yolo_layer.h:5[m[K,
from [01m[K./src/gaussian_yolo_layer.c:7[m[K:
[01m[K/usr/local/cuda/include/cuda_runtime_api.h:4707:39:[m[K [01;36m[Knote: [m[Kexpected ‘[01m[Kvoid **[m[K’ but argument is of type ‘[01m[Kfloat **[m[K’
extern __host__ cudaError_t CUDARTAPI [01;36m[KcudaHostAlloc[m[K(void **pHost, size_t size, unsigned int flags);
[01;36m[K^~~~~~~~~~~~~[m[K
[01m[K./src/gaussian_yolo_layer.c:79:38:[m[K [01;35m[Kwarning: [m[Kpassing argument 1 of ‘[01m[KcudaHostAlloc[m[K’ from incompatible pointer type [[01;35m[K-Wincompatible-pointer-types[m[K]
if (cudaSuccess == cudaHostAlloc([01;35m[K&[m[Kl.delta, batch*l.outputs * sizeof(float), cudaHostRegisterMapped)) l.delta_pinned = 1;
[01;35m[K^[m[K
In file included from [01m[K/usr/local/cuda/include/cuda_runtime.h:96:0[m[K,
from [01m[Kinclude/darknet.h:41[m[K,
from [01m[K./src/gaussian_yolo_layer.h:5[m[K,
from [01m[K./src/gaussian_yolo_layer.c:7[m[K:
[01m[K/usr/local/cuda/include/cuda_runtime_api.h:4707:39:[m[K [01;36m[Knote: [m[Kexpected ‘[01m[Kvoid **[m[K’ but argument is of type ‘[01m[Kfloat **[m[K’
extern __host__ cudaError_t CUDARTAPI [01;36m[KcudaHostAlloc[m[K(void **pHost, size_t size, unsigned int flags);
[01;36m[K^~~~~~~~~~~~~[m[K
[01m[K./src/gaussian_yolo_layer.c:[m[K In function ‘[01m[Kresize_gaussian_yolo_layer[m[K’:
[01m[K./src/gaussian_yolo_layer.c:111:42:[m[K [01;35m[Kwarning: [m[Kpassing argument 1 of ‘[01m[KcudaHostAlloc[m[K’ from incompatible pointer type [[01;35m[K-Wincompatible-pointer-types[m[K]
if (cudaSuccess != cudaHostAlloc([01;35m[K&[m[Kl->output, l->batch*l->outputs * sizeof(float), cudaHostRegisterMapped)) {
[01;35m[K^[m[K
In file included from [01m[K/usr/local/cuda/include/cuda_runtime.h:96:0[m[K,
from [01m[Kinclude/darknet.h:41[m[K,
from [01m[K./src/gaussian_yolo_layer.h:5[m[K,
from [01m[K./src/gaussian_yolo_layer.c:7[m[K:
[01m[K/usr/local/cuda/include/cuda_runtime_api.h:4707:39:[m[K [01;36m[Knote: [m[Kexpected ‘[01m[Kvoid **[m[K’ but argument is of type ‘[01m[Kfloat **[m[K’
extern __host__ cudaError_t CUDARTAPI [01;36m[KcudaHostAlloc[m[K(void **pHost, size_t size, unsigned int flags);
[01;36m[K^~~~~~~~~~~~~[m[K
[01m[K./src/gaussian_yolo_layer.c:120:42:[m[K [01;35m[Kwarning: [m[Kpassing argument 1 of ‘[01m[KcudaHostAlloc[m[K’ from incompatible pointer type [[01;35m[K-Wincompatible-pointer-types[m[K]
if (cudaSuccess != cudaHostAlloc([01;35m[K&[m[Kl->delta, l->batch*l->outputs * sizeof(float), cudaHostRegisterMapped)) {
[01;35m[K^[m[K
In file included from [01m[K/usr/local/cuda/include/cuda_runtime.h:96:0[m[K,
from [01m[Kinclude/darknet.h:41[m[K,
from [01m[K./src/gaussian_yolo_layer.h:5[m[K,
from [01m[K./src/gaussian_yolo_layer.c:7[m[K:
[01m[K/usr/local/cuda/include/cuda_runtime_api.h:4707:39:[m[K [01;36m[Knote: [m[Kexpected ‘[01m[Kvoid **[m[K’ but argument is of type ‘[01m[Kfloat **[m[K’
extern __host__ cudaError_t CUDARTAPI [01;36m[KcudaHostAlloc[m[K(void **pHost, size_t size, unsigned int flags);
[01;36m[K^~~~~~~~~~~~~[m[K
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/upsample_layer.c -o obj/upsample_layer.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/lstm_layer.c -o obj/lstm_layer.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/conv_lstm_layer.c -o obj/conv_lstm_layer.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/scale_channels_layer.c -o obj/scale_channels_layer.o
gcc -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -c ./src/sam_layer.c -o obj/sam_layer.o
nvcc -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compute_52,code=[sm_52,compute_52] -gencode arch=compute_61,code=[sm_61,compute_61] -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN --compiler-options "-Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include" -c ./src/convolutional_kernels.cu -o obj/convolutional_kernels.o
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compute_52,code=[sm_52,compute_52] -gencode arch=compute_61,code=[sm_61,compute_61] -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN --compiler-options "-Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include" -c ./src/activation_kernels.cu -o obj/activation_kernels.o
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
./src/activation_kernels.cu(263): warning: variable "MISH_THRESHOLD" was declared but never referenced
./src/activation_kernels.cu(263): warning: variable "MISH_THRESHOLD" was declared but never referenced
./src/activation_kernels.cu(263): warning: variable "MISH_THRESHOLD" was declared but never referenced
./src/activation_kernels.cu(263): warning: variable "MISH_THRESHOLD" was declared but never referenced
nvcc -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compute_52,code=[sm_52,compute_52] -gencode arch=compute_61,code=[sm_61,compute_61] -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN --compiler-options "-Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include" -c ./src/im2col_kernels.cu -o obj/im2col_kernels.o
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compute_52,code=[sm_52,compute_52] -gencode arch=compute_61,code=[sm_61,compute_61] -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN --compiler-options "-Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include" -c ./src/col2im_kernels.cu -o obj/col2im_kernels.o
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compute_52,code=[sm_52,compute_52] -gencode arch=compute_61,code=[sm_61,compute_61] -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN --compiler-options "-Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include" -c ./src/blas_kernels.cu -o obj/blas_kernels.o
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
./src/blas_kernels.cu(1086): warning: variable "out_index" was declared but never referenced
./src/blas_kernels.cu(1130): warning: variable "step" was set but never used
./src/blas_kernels.cu(1736): warning: variable "stage_id" was declared but never referenced
./src/blas_kernels.cu(1086): warning: variable "out_index" was declared but never referenced
./src/blas_kernels.cu(1130): warning: variable "step" was set but never used
./src/blas_kernels.cu(1736): warning: variable "stage_id" was declared but never referenced
./src/blas_kernels.cu(1086): warning: variable "out_index" was declared but never referenced
./src/blas_kernels.cu(1130): warning: variable "step" was set but never used
./src/blas_kernels.cu(1736): warning: variable "stage_id" was declared but never referenced
./src/blas_kernels.cu(1086): warning: variable "out_index" was declared but never referenced
./src/blas_kernels.cu(1130): warning: variable "step" was set but never used
./src/blas_kernels.cu(1736): warning: variable "stage_id" was declared but never referenced
[01m[K./src/blas_kernels.cu:[m[K In function ‘[01m[Kvoid backward_shortcut_multilayer_gpu(int, int, int, int*, float**, float*, float*, float*, float*, int, float*, float**, WEIGHTS_NORMALIZATION_T)[m[K’:
[01m[K./src/blas_kernels.cu:1130:5:[m[K [01;35m[Kwarning: [m[Kvariable ‘[01m[Kstep[m[K’ set but not used [[01;35m[K-Wunused-but-set-variable[m[K]
[01;35m[Kint [m[Kstep = 0;
[01;35m[K^~~~[m[K
nvcc -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compute_52,code=[sm_52,compute_52] -gencode arch=compute_61,code=[sm_61,compute_61] -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN --compiler-options "-Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include" -c ./src/crop_layer_kernels.cu -o obj/crop_layer_kernels.o
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compute_52,code=[sm_52,compute_52] -gencode arch=compute_61,code=[sm_61,compute_61] -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN --compiler-options "-Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include" -c ./src/dropout_layer_kernels.cu -o obj/dropout_layer_kernels.o
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compute_52,code=[sm_52,compute_52] -gencode arch=compute_61,code=[sm_61,compute_61] -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN --compiler-options "-Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include" -c ./src/maxpool_layer_kernels.cu -o obj/maxpool_layer_kernels.o
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compute_52,code=[sm_52,compute_52] -gencode arch=compute_61,code=[sm_61,compute_61] -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN --compiler-options "-Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include" -c ./src/network_kernels.cu -o obj/network_kernels.o
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
./src/network_kernels.cu(379): warning: variable "l" was declared but never referenced
./src/network_kernels.cu(379): warning: variable "l" was declared but never referenced
./src/network_kernels.cu(379): warning: variable "l" was declared but never referenced
./src/network_kernels.cu(379): warning: variable "l" was declared but never referenced
[01m[K./src/network_kernels.cu:[m[K In function ‘[01m[Kfloat train_network_datum_gpu(network, float*, float*)[m[K’:
[01m[K./src/network_kernels.cu:379:7:[m[K [01;35m[Kwarning: [m[Kvariable ‘[01m[Kl[m[K’ set but not used [[01;35m[K-Wunused-but-set-variable[m[K]
[01;35m[K [m[K layer l = net.layers[net.n - 1];
[01;35m[K^[m[K
nvcc -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compute_52,code=[sm_52,compute_52] -gencode arch=compute_61,code=[sm_61,compute_61] -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN --compiler-options "-Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include" -c ./src/avgpool_layer_kernels.cu -o obj/avgpool_layer_kernels.o
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
g++ -std=c++11 -std=c++11 -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include obj/image_opencv.o obj/http_stream.o obj/gemm.o obj/utils.o obj/dark_cuda.o obj/convolutional_layer.o obj/list.o obj/image.o obj/activations.o obj/im2col.o obj/col2im.o obj/blas.o obj/crop_layer.o obj/dropout_layer.o obj/maxpool_layer.o obj/softmax_layer.o obj/data.o obj/matrix.o obj/network.o obj/connected_layer.o obj/cost_layer.o obj/parser.o obj/option_list.o obj/darknet.o obj/detection_layer.o obj/captcha.o obj/route_layer.o obj/writing.o obj/box.o obj/nightmare.o obj/normalization_layer.o obj/avgpool_layer.o obj/coco.o obj/dice.o obj/yolo.o obj/detector.o obj/layer.o obj/compare.o obj/classifier.o obj/local_layer.o obj/swag.o obj/shortcut_layer.o obj/representation_layer.o obj/activation_layer.o obj/rnn_layer.o obj/gru_layer.o obj/rnn.o obj/rnn_vid.o obj/crnn_layer.o obj/demo.o obj/tag.o obj/cifar.o obj/go.o obj/batchnorm_layer.o obj/art.o obj/region_layer.o obj/reorg_layer.o obj/reorg_old_layer.o obj/super.o obj/voxel.o obj/tree.o obj/yolo_layer.o obj/gaussian_yolo_layer.o obj/upsample_layer.o obj/lstm_layer.o obj/conv_lstm_layer.o obj/scale_channels_layer.o obj/sam_layer.o obj/convolutional_kernels.o obj/activation_kernels.o obj/im2col_kernels.o obj/col2im_kernels.o obj/blas_kernels.o obj/crop_layer_kernels.o obj/dropout_layer_kernels.o obj/maxpool_layer_kernels.o obj/network_kernels.o obj/avgpool_layer_kernels.o -o darknet -lm -pthread `pkg-config --libs opencv4 2> /dev/null || pkg-config --libs opencv` -L/usr/local/cuda/lib64 -lcuda -lcudart -lcublas -lcurand -L/usr/local/cudnn/lib64 -lcudnn -lstdc++
# 下载预训练的权重
!wget https://pjreddie.com/media/files/yolov3.weights
--2021-08-06 00:58:07-- https://pjreddie.com/media/files/yolov3.weights
Resolving pjreddie.com (pjreddie.com)... 128.208.4.108
Connecting to pjreddie.com (pjreddie.com)|128.208.4.108|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 248007048 (237M) [application/octet-stream]
Saving to: ‘yolov3.weights’
yolov3.weights 100%[===================>] 236.52M 80.0MB/s in 3.0s
2021-08-06 00:58:10 (80.0 MB/s) - ‘yolov3.weights’ saved [248007048/248007048]
# 显示
def imShow(path):
import cv2
import matplotlib.pyplot as plt
%matplotlib inline
image = cv2.imread(path)
height, width = image.shape[:2]
resized_image = cv2.resize(image,(3*width, 3*height), interpolation = cv2.INTER_CUBIC)
fig = plt.gcf()
fig.set_size_inches(18, 10)
plt.axis("off")
plt.imshow(cv2.cvtColor(resized_image, cv2.COLOR_BGR2RGB))
plt.show()
# 上传文件
def upload():
from google.colab import files
uploaded = files.upload()
for name, data in uploaded.items():
with open(name, 'wb') as f:
f.write(data)
print ('saved file', name)
# 下载文件
def download(path):
from google.colab import files
files.download(path)
%cd /content/darknet
/content/darknet
# 检测试一下
!./darknet detect cfg/yolov3.cfg yolov3.weights data/dog.jpg
# 上述函数写好了,显示一下
imShow('predictions.jpg')
CUDA-version: 11000 (11020), cuDNN: 7.6.5, GPU count: 1
OpenCV version: 3.2.0
0 : compute_capability = 750, cudnn_half = 0, GPU: Tesla T4
net.optimized_memory = 0
mini_batch = 1, batch = 1, time_steps = 1, train = 0
layer filters size/strd(dil) input output
0 Create CUDA-stream - 0
Create cudnn-handle 0
conv 32 3 x 3/ 1 416 x 416 x 3 -> 416 x 416 x 32 0.299 BF
1 conv 64 3 x 3/ 2 416 x 416 x 32 -> 208 x 208 x 64 1.595 BF
2 conv 32 1 x 1/ 1 208 x 208 x 64 -> 208 x 208 x 32 0.177 BF
3 conv 64 3 x 3/ 1 208 x 208 x 32 -> 208 x 208 x 64 1.595 BF
4 Shortcut Layer: 1, wt = 0, wn = 0, outputs: 208 x 208 x 64 0.003 BF
5 conv 128 3 x 3/ 2 208 x 208 x 64 -> 104 x 104 x 128 1.595 BF
6 conv 64 1 x 1/ 1 104 x 104 x 128 -> 104 x 104 x 64 0.177 BF
7 conv 128 3 x 3/ 1 104 x 104 x 64 -> 104 x 104 x 128 1.595 BF
8 Shortcut Layer: 5, wt = 0, wn = 0, outputs: 104 x 104 x 128 0.001 BF
9 conv 64 1 x 1/ 1 104 x 104 x 128 -> 104 x 104 x 64 0.177 BF
10 conv 128 3 x 3/ 1 104 x 104 x 64 -> 104 x 104 x 128 1.595 BF
11 Shortcut Layer: 8, wt = 0, wn = 0, outputs: 104 x 104 x 128 0.001 BF
12 conv 256 3 x 3/ 2 104 x 104 x 128 -> 52 x 52 x 256 1.595 BF
13 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF
14 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF
15 Shortcut Layer: 12, wt = 0, wn = 0, outputs: 52 x 52 x 256 0.001 BF
16 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF
17 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF
18 Shortcut Layer: 15, wt = 0, wn = 0, outputs: 52 x 52 x 256 0.001 BF
19 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF
20 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF
21 Shortcut Layer: 18, wt = 0, wn = 0, outputs: 52 x 52 x 256 0.001 BF
22 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF
23 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF
24 Shortcut Layer: 21, wt = 0, wn = 0, outputs: 52 x 52 x 256 0.001 BF
25 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF
26 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF
27 Shortcut Layer: 24, wt = 0, wn = 0, outputs: 52 x 52 x 256 0.001 BF
28 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF
29 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF
30 Shortcut Layer: 27, wt = 0, wn = 0, outputs: 52 x 52 x 256 0.001 BF
31 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF
32 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF
33 Shortcut Layer: 30, wt = 0, wn = 0, outputs: 52 x 52 x 256 0.001 BF
34 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF
35 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF
36 Shortcut Layer: 33, wt = 0, wn = 0, outputs: 52 x 52 x 256 0.001 BF
37 conv 512 3 x 3/ 2 52 x 52 x 256 -> 26 x 26 x 512 1.595 BF
38 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF
39 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF
40 Shortcut Layer: 37, wt = 0, wn = 0, outputs: 26 x 26 x 512 0.000 BF
41 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF
42 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF
43 Shortcut Layer: 40, wt = 0, wn = 0, outputs: 26 x 26 x 512 0.000 BF
44 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF
45 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF
46 Shortcut Layer: 43, wt = 0, wn = 0, outputs: 26 x 26 x 512 0.000 BF
47 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF
48 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF
49 Shortcut Layer: 46, wt = 0, wn = 0, outputs: 26 x 26 x 512 0.000 BF
50 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF
51 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF
52 Shortcut Layer: 49, wt = 0, wn = 0, outputs: 26 x 26 x 512 0.000 BF
53 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF
54 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF
55 Shortcut Layer: 52, wt = 0, wn = 0, outputs: 26 x 26 x 512 0.000 BF
56 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF
57 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF
58 Shortcut Layer: 55, wt = 0, wn = 0, outputs: 26 x 26 x 512 0.000 BF
59 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF
60 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF
61 Shortcut Layer: 58, wt = 0, wn = 0, outputs: 26 x 26 x 512 0.000 BF
62 conv 1024 3 x 3/ 2 26 x 26 x 512 -> 13 x 13 x1024 1.595 BF
63 conv 512 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 512 0.177 BF
64 conv 1024 3 x 3/ 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BF
65 Shortcut Layer: 62, wt = 0, wn = 0, outputs: 13 x 13 x1024 0.000 BF
66 conv 512 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 512 0.177 BF
67 conv 1024 3 x 3/ 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BF
68 Shortcut Layer: 65, wt = 0, wn = 0, outputs: 13 x 13 x1024 0.000 BF
69 conv 512 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 512 0.177 BF
70 conv 1024 3 x 3/ 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BF
71 Shortcut Layer: 68, wt = 0, wn = 0, outputs: 13 x 13 x1024 0.000 BF
72 conv 512 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 512 0.177 BF
73 conv 1024 3 x 3/ 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BF
74 Shortcut Layer: 71, wt = 0, wn = 0, outputs: 13 x 13 x1024 0.000 BF
75 conv 512 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 512 0.177 BF
76 conv 1024 3 x 3/ 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BF
77 conv 512 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 512 0.177 BF
78 conv 1024 3 x 3/ 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BF
79 conv 512 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 512 0.177 BF
80 conv 1024 3 x 3/ 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BF
81 conv 255 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 255 0.088 BF
82 yolo
[yolo] params: iou loss: mse (2), iou_norm: 0.75, obj_norm: 1.00, cls_norm: 1.00, delta_norm: 1.00, scale_x_y: 1.00
83 route 79 -> 13 x 13 x 512
84 conv 256 1 x 1/ 1 13 x 13 x 512 -> 13 x 13 x 256 0.044 BF
85 upsample 2x 13 x 13 x 256 -> 26 x 26 x 256
86 route 85 61 -> 26 x 26 x 768
87 conv 256 1 x 1/ 1 26 x 26 x 768 -> 26 x 26 x 256 0.266 BF
88 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF
89 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF
90 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF
91 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF
92 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF
93 conv 255 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 255 0.177 BF
94 yolo
[yolo] params: iou loss: mse (2), iou_norm: 0.75, obj_norm: 1.00, cls_norm: 1.00, delta_norm: 1.00, scale_x_y: 1.00
95 route 91 -> 26 x 26 x 256
96 conv 128 1 x 1/ 1 26 x 26 x 256 -> 26 x 26 x 128 0.044 BF
97 upsample 2x 26 x 26 x 128 -> 52 x 52 x 128
98 route 97 36 -> 52 x 52 x 384
99 conv 128 1 x 1/ 1 52 x 52 x 384 -> 52 x 52 x 128 0.266 BF
100 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF
101 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF
102 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF
103 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF
104 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF
105 conv 255 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 255 0.353 BF
106 yolo
[yolo] params: iou loss: mse (2), iou_norm: 0.75, obj_norm: 1.00, cls_norm: 1.00, delta_norm: 1.00, scale_x_y: 1.00
Total BFLOPS 65.879
avg_outputs = 532444
Allocate additional workspace_size = 52.43 MB
Loading weights from yolov3.weights...
seen 64, trained: 32013 K-images (500 Kilo-batches_64)
Done! Loaded 107 layers from weights-file
Detection layer: 82 - type = 28
Detection layer: 94 - type = 28
Detection layer: 106 - type = 28
data/dog.jpg: Predicted in 40.893000 milli-seconds.
bicycle: 99%
dog: 100%
truck: 94%
Unable to init server: Could not connect: Connection refused
(predictions:1183): Gtk-[1;33mWARNING[0m **: [34m00:58:30.073[0m: cannot open display:

# 为了创建自定义YOLOv3检测器,需要以下内容:
# 自己的带标签的数据集
# 配置自己的 .cfg 文件
# obj.data 和 obj.names 文件
# train.txt 文件,测试集可选
! rm -rf /content/cfg_mask
! mkdir /content/cfg_mask
! head /content/drive/MyDrive/cfg_mask/obj.data
classes= 1
train = /content/drive/MyDrive/cfg_mask/train.txt
valid = /content/drive/MyDrive/cfg_mask/test.txt
names = /content/cfg_mask/obj.names
backup = /content/cfg_mask/weights/
#从谷歌云盘上传根据自己数据集修改的.cfg文件 会上传到darknet/cfg文件夹下
!cp /content/drive/MyDrive/cfg_mask/yolov3_custom2.cfg /content/cfg_mask
#从谷歌云盘上传自己数据集的obj.data obj.names
!cp /content/drive/MyDrive/cfg_mask/obj.data /content/cfg_mask
!cp /content/drive/MyDrive/cfg_mask/obj.names /content/cfg_mask
#上传generate_train.py 以在服务器的data下生成train.txt
!cp /content/drive/MyDrive/cfg_mask/train.txt /content/cfg_mask
%cd /content/cfg_mask
/content/cfg_mask
!wget http://pjreddie.com/media/files/darknet53.conv.74
URL transformed to HTTPS due to an HSTS policy
--2021-08-06 01:01:11-- https://pjreddie.com/media/files/darknet53.conv.74
Resolving pjreddie.com (pjreddie.com)... 128.208.4.108
Connecting to pjreddie.com (pjreddie.com)|128.208.4.108|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 162482580 (155M) [application/octet-stream]
Saving to: ‘darknet53.conv.74’
darknet53.conv.74 100%[===================>] 154.96M 107MB/s in 1.5s
2021-08-06 01:01:13 (107 MB/s) - ‘darknet53.conv.74’ saved [162482580/162482580]
# 开始训练
# function ClickConnect(){
# console.log("Working");
# document.querySelector("colab-toolbar-button#connect").click()
# }
# setInterval(ClickConnect,60000)
%cd /content/darknet
/content/darknet
imShow('/content/drive/MyDrive/yolov3/data/obj/raccoon-100.jpg')
# 运行就好,从本地或者云端
!./darknet detector test /content/cfg_mask/obj.data /content/cfg_mask/yolov3_custom2.cfg /content/cfg_mask/yolov3_custom2_final.weights /content/drive/MyDrive/yolo3/mask_dataset/02C96BZM5DKA178WY34I.jpg -thresh 0.99
imShow('predictions.jpg')
CUDA-version: 11000 (11020), cuDNN: 7.6.5, GPU count: 1
OpenCV version: 3.2.0
0 : compute_capability = 750, cudnn_half = 0, GPU: Tesla T4
net.optimized_memory = 0
mini_batch = 1, batch = 1, time_steps = 1, train = 0
layer filters size/strd(dil) input output
0 Create CUDA-stream - 0
Create cudnn-handle 0
conv 32 3 x 3/ 1 416 x 416 x 3 -> 416 x 416 x 32 0.299 BF
1 conv 64 3 x 3/ 2 416 x 416 x 32 -> 208 x 208 x 64 1.595 BF
2 conv 32 1 x 1/ 1 208 x 208 x 64 -> 208 x 208 x 32 0.177 BF
3 conv 64 3 x 3/ 1 208 x 208 x 32 -> 208 x 208 x 64 1.595 BF
4 Shortcut Layer: 1, wt = 0, wn = 0, outputs: 208 x 208 x 64 0.003 BF
5 conv 128 3 x 3/ 2 208 x 208 x 64 -> 104 x 104 x 128 1.595 BF
6 conv 64 1 x 1/ 1 104 x 104 x 128 -> 104 x 104 x 64 0.177 BF
7 conv 128 3 x 3/ 1 104 x 104 x 64 -> 104 x 104 x 128 1.595 BF
8 Shortcut Layer: 5, wt = 0, wn = 0, outputs: 104 x 104 x 128 0.001 BF
9 conv 64 1 x 1/ 1 104 x 104 x 128 -> 104 x 104 x 64 0.177 BF
10 conv 128 3 x 3/ 1 104 x 104 x 64 -> 104 x 104 x 128 1.595 BF
11 Shortcut Layer: 8, wt = 0, wn = 0, outputs: 104 x 104 x 128 0.001 BF
12 conv 256 3 x 3/ 2 104 x 104 x 128 -> 52 x 52 x 256 1.595 BF
13 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF
14 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF
15 Shortcut Layer: 12, wt = 0, wn = 0, outputs: 52 x 52 x 256 0.001 BF
16 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF
17 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF
18 Shortcut Layer: 15, wt = 0, wn = 0, outputs: 52 x 52 x 256 0.001 BF
19 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF
20 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF
21 Shortcut Layer: 18, wt = 0, wn = 0, outputs: 52 x 52 x 256 0.001 BF
22 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF
23 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF
24 Shortcut Layer: 21, wt = 0, wn = 0, outputs: 52 x 52 x 256 0.001 BF
25 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF
26 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF
27 Shortcut Layer: 24, wt = 0, wn = 0, outputs: 52 x 52 x 256 0.001 BF
28 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF
29 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF
30 Shortcut Layer: 27, wt = 0, wn = 0, outputs: 52 x 52 x 256 0.001 BF
31 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF
32 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF
33 Shortcut Layer: 30, wt = 0, wn = 0, outputs: 52 x 52 x 256 0.001 BF
34 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF
35 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF
36 Shortcut Layer: 33, wt = 0, wn = 0, outputs: 52 x 52 x 256 0.001 BF
37 conv 512 3 x 3/ 2 52 x 52 x 256 -> 26 x 26 x 512 1.595 BF
38 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF
39 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF
40 Shortcut Layer: 37, wt = 0, wn = 0, outputs: 26 x 26 x 512 0.000 BF
41 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF
42 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF
43 Shortcut Layer: 40, wt = 0, wn = 0, outputs: 26 x 26 x 512 0.000 BF
44 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF
45 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF
46 Shortcut Layer: 43, wt = 0, wn = 0, outputs: 26 x 26 x 512 0.000 BF
47 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF
48 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF
49 Shortcut Layer: 46, wt = 0, wn = 0, outputs: 26 x 26 x 512 0.000 BF
50 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF
51 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF
52 Shortcut Layer: 49, wt = 0, wn = 0, outputs: 26 x 26 x 512 0.000 BF
53 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF
54 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF
55 Shortcut Layer: 52, wt = 0, wn = 0, outputs: 26 x 26 x 512 0.000 BF
56 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF
57 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF
58 Shortcut Layer: 55, wt = 0, wn = 0, outputs: 26 x 26 x 512 0.000 BF
59 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF
60 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF
61 Shortcut Layer: 58, wt = 0, wn = 0, outputs: 26 x 26 x 512 0.000 BF
62 conv 1024 3 x 3/ 2 26 x 26 x 512 -> 13 x 13 x1024 1.595 BF
63 conv 512 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 512 0.177 BF
64 conv 1024 3 x 3/ 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BF
65 Shortcut Layer: 62, wt = 0, wn = 0, outputs: 13 x 13 x1024 0.000 BF
66 conv 512 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 512 0.177 BF
67 conv 1024 3 x 3/ 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BF
68 Shortcut Layer: 65, wt = 0, wn = 0, outputs: 13 x 13 x1024 0.000 BF
69 conv 512 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 512 0.177 BF
70 conv 1024 3 x 3/ 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BF
71 Shortcut Layer: 68, wt = 0, wn = 0, outputs: 13 x 13 x1024 0.000 BF
72 conv 512 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 512 0.177 BF
73 conv 1024 3 x 3/ 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BF
74 Shortcut Layer: 71, wt = 0, wn = 0, outputs: 13 x 13 x1024 0.000 BF
75 conv 512 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 512 0.177 BF
76 conv 1024 3 x 3/ 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BF
77 conv 512 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 512 0.177 BF
78 conv 1024 3 x 3/ 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BF
79 conv 512 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 512 0.177 BF
80 conv 1024 3 x 3/ 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BF
81 conv 18 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 18 0.006 BF
82 yolo
[yolo] params: iou loss: mse (2), iou_norm: 0.75, obj_norm: 1.00, cls_norm: 1.00, delta_norm: 1.00, scale_x_y: 1.00
83 route 79 -> 13 x 13 x 512
84 conv 256 1 x 1/ 1 13 x 13 x 512 -> 13 x 13 x 256 0.044 BF
85 upsample 2x 13 x 13 x 256 -> 26 x 26 x 256
86 route 85 61 -> 26 x 26 x 768
87 conv 256 1 x 1/ 1 26 x 26 x 768 -> 26 x 26 x 256 0.266 BF
88 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF
89 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF
90 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF
91 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF
92 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF
93 conv 18 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 18 0.012 BF
94 yolo
[yolo] params: iou loss: mse (2), iou_norm: 0.75, obj_norm: 1.00, cls_norm: 1.00, delta_norm: 1.00, scale_x_y: 1.00
95 route 91 -> 26 x 26 x 256
96 conv 128 1 x 1/ 1 26 x 26 x 256 -> 26 x 26 x 128 0.044 BF
97 upsample 2x 26 x 26 x 128 -> 52 x 52 x 128
98 route 97 36 -> 52 x 52 x 384
99 conv 128 1 x 1/ 1 52 x 52 x 384 -> 52 x 52 x 128 0.266 BF
100 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF
101 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF
102 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF
103 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF
104 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF
105 conv 18 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 18 0.025 BF
106 yolo
[yolo] params: iou loss: mse (2), iou_norm: 0.75, obj_norm: 1.00, cls_norm: 1.00, delta_norm: 1.00, scale_x_y: 1.00
Total BFLOPS 65.304
avg_outputs = 516723
Allocate additional workspace_size = 52.43 MB
Loading weights from /content/cfg_mask/yolov3_custom2_final.weights...
seen 64, trained: 0 K-images (0 Kilo-batches_64)
Done! Loaded 107 layers from weights-file
Detection layer: 82 - type = 28
Detection layer: 94 - type = 28
Detection layer: 106 - type = 28
/content/drive/MyDrive/yolo3/mask_dataset/02C96BZM5DKA178WY34I.jpg: Predicted in 40.201000 milli-seconds.
kouzhao: 100%
kouzhao: 100%
kouzhao: 100%
kouzhao: 99%
kouzhao: 100%
kouzhao: 99%
kouzhao: 100%
kouzhao: 100%
kouzhao: 100%
kouzhao: 99%
kouzhao: 100%
kouzhao: 100%
kouzhao: 99%
Unable to init server: Could not connect: Connection refused
(predictions:3399): Gtk-[1;33mWARNING[0m **: [34m01:10:08.120[0m: cannot open display:

# 1000次训练结果
from PIL import Image
img = Image.open('/content/drive/MyDrive/yolo3/mask_dataset/02C96BZM5DKA178WY34I.jpg')
img

# 运行就好,从本地或者云端
%cd /content/darknet
!./darknet detector test /content/cfg_mask/obj.data /content/cfg_mask/yolov3_custom2.cfg /content/cfg_mask/yolov3_custom2_final.weights /content/drive/MyDrive/yolo3/mask_dataset/02C96BZM5DKA178WY34I.jpg
imShow('predictions.jpg')
/content/darknet
CUDA-version: 11000 (11020), cuDNN: 7.6.5, GPU count: 1
OpenCV version: 3.2.0
0 : compute_capability = 750, cudnn_half = 0, GPU: Tesla T4
net.optimized_memory = 0
mini_batch = 1, batch = 1, time_steps = 1, train = 0
layer filters size/strd(dil) input output
0 Create CUDA-stream - 0
Create cudnn-handle 0
conv 32 3 x 3/ 1 416 x 416 x 3 -> 416 x 416 x 32 0.299 BF
1 conv 64 3 x 3/ 2 416 x 416 x 32 -> 208 x 208 x 64 1.595 BF
2 conv 32 1 x 1/ 1 208 x 208 x 64 -> 208 x 208 x 32 0.177 BF
3 conv 64 3 x 3/ 1 208 x 208 x 32 -> 208 x 208 x 64 1.595 BF
4 Shortcut Layer: 1, wt = 0, wn = 0, outputs: 208 x 208 x 64 0.003 BF
5 conv 128 3 x 3/ 2 208 x 208 x 64 -> 104 x 104 x 128 1.595 BF
6 conv 64 1 x 1/ 1 104 x 104 x 128 -> 104 x 104 x 64 0.177 BF
7 conv 128 3 x 3/ 1 104 x 104 x 64 -> 104 x 104 x 128 1.595 BF
8 Shortcut Layer: 5, wt = 0, wn = 0, outputs: 104 x 104 x 128 0.001 BF
9 conv 64 1 x 1/ 1 104 x 104 x 128 -> 104 x 104 x 64 0.177 BF
10 conv 128 3 x 3/ 1 104 x 104 x 64 -> 104 x 104 x 128 1.595 BF
11 Shortcut Layer: 8, wt = 0, wn = 0, outputs: 104 x 104 x 128 0.001 BF
12 conv 256 3 x 3/ 2 104 x 104 x 128 -> 52 x 52 x 256 1.595 BF
13 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF
14 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF
15 Shortcut Layer: 12, wt = 0, wn = 0, outputs: 52 x 52 x 256 0.001 BF
16 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF
17 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF
18 Shortcut Layer: 15, wt = 0, wn = 0, outputs: 52 x 52 x 256 0.001 BF
19 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF
20 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF
21 Shortcut Layer: 18, wt = 0, wn = 0, outputs: 52 x 52 x 256 0.001 BF
22 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF
23 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF
24 Shortcut Layer: 21, wt = 0, wn = 0, outputs: 52 x 52 x 256 0.001 BF
25 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF
26 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF
27 Shortcut Layer: 24, wt = 0, wn = 0, outputs: 52 x 52 x 256 0.001 BF
28 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF
29 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF
30 Shortcut Layer: 27, wt = 0, wn = 0, outputs: 52 x 52 x 256 0.001 BF
31 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF
32 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF
33 Shortcut Layer: 30, wt = 0, wn = 0, outputs: 52 x 52 x 256 0.001 BF
34 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF
35 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF
36 Shortcut Layer: 33, wt = 0, wn = 0, outputs: 52 x 52 x 256 0.001 BF
37 conv 512 3 x 3/ 2 52 x 52 x 256 -> 26 x 26 x 512 1.595 BF
38 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF
39 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF
40 Shortcut Layer: 37, wt = 0, wn = 0, outputs: 26 x 26 x 512 0.000 BF
41 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF
42 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF
43 Shortcut Layer: 40, wt = 0, wn = 0, outputs: 26 x 26 x 512 0.000 BF
44 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF
45 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF
46 Shortcut Layer: 43, wt = 0, wn = 0, outputs: 26 x 26 x 512 0.000 BF
47 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF
48 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF
49 Shortcut Layer: 46, wt = 0, wn = 0, outputs: 26 x 26 x 512 0.000 BF
50 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF
51 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF
52 Shortcut Layer: 49, wt = 0, wn = 0, outputs: 26 x 26 x 512 0.000 BF
53 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF
54 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF
55 Shortcut Layer: 52, wt = 0, wn = 0, outputs: 26 x 26 x 512 0.000 BF
56 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF
57 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF
58 Shortcut Layer: 55, wt = 0, wn = 0, outputs: 26 x 26 x 512 0.000 BF
59 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF
60 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF
61 Shortcut Layer: 58, wt = 0, wn = 0, outputs: 26 x 26 x 512 0.000 BF
62 conv 1024 3 x 3/ 2 26 x 26 x 512 -> 13 x 13 x1024 1.595 BF
63 conv 512 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 512 0.177 BF
64 conv 1024 3 x 3/ 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BF
65 Shortcut Layer: 62, wt = 0, wn = 0, outputs: 13 x 13 x1024 0.000 BF
66 conv 512 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 512 0.177 BF
67 conv 1024 3 x 3/ 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BF
68 Shortcut Layer: 65, wt = 0, wn = 0, outputs: 13 x 13 x1024 0.000 BF
69 conv 512 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 512 0.177 BF
70 conv 1024 3 x 3/ 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BF
71 Shortcut Layer: 68, wt = 0, wn = 0, outputs: 13 x 13 x1024 0.000 BF
72 conv 512 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 512 0.177 BF
73 conv 1024 3 x 3/ 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BF
74 Shortcut Layer: 71, wt = 0, wn = 0, outputs: 13 x 13 x1024 0.000 BF
75 conv 512 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 512 0.177 BF
76 conv 1024 3 x 3/ 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BF
77 conv 512 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 512 0.177 BF
78 conv 1024 3 x 3/ 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BF
79 conv 512 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 512 0.177 BF
80 conv 1024 3 x 3/ 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BF
81 conv 18 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 18 0.006 BF
82 yolo
[yolo] params: iou loss: mse (2), iou_norm: 0.75, obj_norm: 1.00, cls_norm: 1.00, delta_norm: 1.00, scale_x_y: 1.00
83 route 79 -> 13 x 13 x 512
84 conv 256 1 x 1/ 1 13 x 13 x 512 -> 13 x 13 x 256 0.044 BF
85 upsample 2x 13 x 13 x 256 -> 26 x 26 x 256
86 route 85 61 -> 26 x 26 x 768
87 conv 256 1 x 1/ 1 26 x 26 x 768 -> 26 x 26 x 256 0.266 BF
88 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF
89 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF
90 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF
91 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF
92 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF
93 conv 18 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 18 0.012 BF
94 yolo
[yolo] params: iou loss: mse (2), iou_norm: 0.75, obj_norm: 1.00, cls_norm: 1.00, delta_norm: 1.00, scale_x_y: 1.00
95 route 91 -> 26 x 26 x 256
96 conv 128 1 x 1/ 1 26 x 26 x 256 -> 26 x 26 x 128 0.044 BF
97 upsample 2x 26 x 26 x 128 -> 52 x 52 x 128
98 route 97 36 -> 52 x 52 x 384
99 conv 128 1 x 1/ 1 52 x 52 x 384 -> 52 x 52 x 128 0.266 BF
100 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF
101 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF
102 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF
103 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF
104 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF
105 conv 18 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 18 0.025 BF
106 yolo
[yolo] params: iou loss: mse (2), iou_norm: 0.75, obj_norm: 1.00, cls_norm: 1.00, delta_norm: 1.00, scale_x_y: 1.00
Total BFLOPS 65.304
avg_outputs = 516723
Allocate additional workspace_size = 52.43 MB
Loading weights from /content/cfg_mask/yolov3_custom2_final.weights...
seen 64, trained: 32 K-images (0 Kilo-batches_64)
Done! Loaded 107 layers from weights-file
Detection layer: 82 - type = 28
Detection layer: 94 - type = 28
Detection layer: 106 - type = 28
/content/drive/MyDrive/yolo3/mask_dataset/02C96BZM5DKA178WY34I.jpg: Predicted in 40.202000 milli-seconds.
kouzhao: 75%
kouzhao: 57%
Unable to init server: Could not connect: Connection refused
(predictions:100884): Gtk-[1;33mWARNING[0m **: [34m02:16:44.443[0m: cannot open display:

!cp /content/cfg_mask/yolov3_custom2_final.weights /content/drive/MyDrive/yolo3/mask
!cp /content/cfg_mask/obj.data /content/drive/MyDrive/yolo3/mask
!cp /content/cfg_mask/obj.names /content/drive/MyDrive/yolo3/mask
!cp /content/cfg_mask/yolov3_custom2.cfg /content/drive/MyDrive/yolo3/mask
# 使用opencv
cp: -r not specified; omitting directory '/content/cfg_mask'
import cv2
import numpy as np
net = cv2.dnn.readNetFromDarknet("/content/drive/MyDrive/yolo3/mask/yolov3_custom2.cfg","/content/drive/MyDrive/yolo3/mask/yolov3_custom2_final.weights")
layer_names = net.getLayerNames()
print(layer_names)
['conv_0', 'bn_0', 'relu_0', 'conv_1', 'bn_1', 'relu_1', 'conv_2', 'bn_2', 'relu_2', 'conv_3', 'bn_3', 'relu_3', 'shortcut_4', 'conv_5', 'bn_5', 'relu_5', 'conv_6', 'bn_6', 'relu_6', 'conv_7', 'bn_7', 'relu_7', 'shortcut_8', 'conv_9', 'bn_9', 'relu_9', 'conv_10', 'bn_10', 'relu_10', 'shortcut_11', 'conv_12', 'bn_12', 'relu_12', 'conv_13', 'bn_13', 'relu_13', 'conv_14', 'bn_14', 'relu_14', 'shortcut_15', 'conv_16', 'bn_16', 'relu_16', 'conv_17', 'bn_17', 'relu_17', 'shortcut_18', 'conv_19', 'bn_19', 'relu_19', 'conv_20', 'bn_20', 'relu_20', 'shortcut_21', 'conv_22', 'bn_22', 'relu_22', 'conv_23', 'bn_23', 'relu_23', 'shortcut_24', 'conv_25', 'bn_25', 'relu_25', 'conv_26', 'bn_26', 'relu_26', 'shortcut_27', 'conv_28', 'bn_28', 'relu_28', 'conv_29', 'bn_29', 'relu_29', 'shortcut_30', 'conv_31', 'bn_31', 'relu_31', 'conv_32', 'bn_32', 'relu_32', 'shortcut_33', 'conv_34', 'bn_34', 'relu_34', 'conv_35', 'bn_35', 'relu_35', 'shortcut_36', 'conv_37', 'bn_37', 'relu_37', 'conv_38', 'bn_38', 'relu_38', 'conv_39', 'bn_39', 'relu_39', 'shortcut_40', 'conv_41', 'bn_41', 'relu_41', 'conv_42', 'bn_42', 'relu_42', 'shortcut_43', 'conv_44', 'bn_44', 'relu_44', 'conv_45', 'bn_45', 'relu_45', 'shortcut_46', 'conv_47', 'bn_47', 'relu_47', 'conv_48', 'bn_48', 'relu_48', 'shortcut_49', 'conv_50', 'bn_50', 'relu_50', 'conv_51', 'bn_51', 'relu_51', 'shortcut_52', 'conv_53', 'bn_53', 'relu_53', 'conv_54', 'bn_54', 'relu_54', 'shortcut_55', 'conv_56', 'bn_56', 'relu_56', 'conv_57', 'bn_57', 'relu_57', 'shortcut_58', 'conv_59', 'bn_59', 'relu_59', 'conv_60', 'bn_60', 'relu_60', 'shortcut_61', 'conv_62', 'bn_62', 'relu_62', 'conv_63', 'bn_63', 'relu_63', 'conv_64', 'bn_64', 'relu_64', 'shortcut_65', 'conv_66', 'bn_66', 'relu_66', 'conv_67', 'bn_67', 'relu_67', 'shortcut_68', 'conv_69', 'bn_69', 'relu_69', 'conv_70', 'bn_70', 'relu_70', 'shortcut_71', 'conv_72', 'bn_72', 'relu_72', 'conv_73', 'bn_73', 'relu_73', 'shortcut_74', 'conv_75', 'bn_75', 'relu_75', 'conv_76', 'bn_76', 'relu_76', 'conv_77', 'bn_77', 'relu_77', 'conv_78', 'bn_78', 'relu_78', 'conv_79', 'bn_79', 'relu_79', 'conv_80', 'bn_80', 'relu_80', 'conv_81', 'permute_82', 'yolo_82', 'identity_83', 'conv_84', 'bn_84', 'relu_84', 'upsample_85', 'concat_86', 'conv_87', 'bn_87', 'relu_87', 'conv_88', 'bn_88', 'relu_88', 'conv_89', 'bn_89', 'relu_89', 'conv_90', 'bn_90', 'relu_90', 'conv_91', 'bn_91', 'relu_91', 'conv_92', 'bn_92', 'relu_92', 'conv_93', 'permute_94', 'yolo_94', 'identity_95', 'conv_96', 'bn_96', 'relu_96', 'upsample_97', 'concat_98', 'conv_99', 'bn_99', 'relu_99', 'conv_100', 'bn_100', 'relu_100', 'conv_101', 'bn_101', 'relu_101', 'conv_102', 'bn_102', 'relu_102', 'conv_103', 'bn_103', 'relu_103', 'conv_104', 'bn_104', 'relu_104', 'conv_105', 'permute_106', 'yolo_106']
classes = [line.strip() for line in open("/content/drive/MyDrive/yolo3/mask/obj.names")]
colors = [(0,0,255),(255,0,0),(0,255,0)]
from PIL import Image
Image.open('/content/drive/MyDrive/yolo3/mask/download.png')

from PIL import Image
Image.open('/content/drive/MyDrive/yolo3/mask/download.png')

img = cv2.imread("/content/drive/MyDrive/yolo3/mask/download.png")
img.shape
(675, 900, 3)
path="/content/drive/MyDrive/yolo3/mask/download.png"
img=cv2.imread(path)
img.shape
(675, 900, 3)
output_layers = [layer_names[i[0] - 1] for i in net.getUnconnectedOutLayers()]
output_layers
['yolo_82', 'yolo_94', 'yolo_106']
img = cv2.resize(img, None, fx=0.4, fy=0.4)
height, width, channels = img.shape
blob = cv2.dnn.blobFromImage(img, 1/255.0, (416, 416), (0, 0, 0), True, crop=False)
net.setInput(blob)
outs = net.forward(output_layers)
class_ids = []
confidences = []
boxes = []
for out in outs:
for detection in out:
tx, ty, tw, th, confidence = detection[0:5]
scores = detection[5:]
class_id = np.argmax(scores)
if confidence > 0.3:
center_x = int(tx * width)
center_y = int(ty * height)
w = int(tw * width)
h = int(th * height)
# 取得箱子方框座標
x = int(center_x - w / 2)
y = int(center_y - h / 2)
boxes.append([x, y, w, h])
confidences.append(float(confidence))
class_ids.append(class_id)
indexes = cv2.dnn.NMSBoxes(boxes, confidences, 0.3, 0.4)
%pylab inline
from matplotlib import pyplot as plt
plt.rcParams['figure.figsize'] = [15, 10]
img_rgb = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
plt.imshow(img_rgb)
Populating the interactive namespace from numpy and matplotlib
<matplotlib.image.AxesImage at 0x7faa4e397c90>

font = cv2.FONT_HERSHEY_PLAIN
for i in range(len(boxes)):
if i in indexes:
x, y, w, h = boxes[i]
label = str(classes[class_ids[i]])
color = colors[class_ids[i]]
cv2.rectangle(img, (x, y), (x + w, y + h), color, 2)
cv2.putText(img, label, (x, y - 5), font, 2, color, 3)
import cv2
import numpy as np
net = net = cv2.dnn.readNetFromDarknet("/content/drive/MyDrive/yolo3/mask/yolov3_custom2.cfg","/content/drive/MyDrive/yolo3/mask/yolov3_custom2_final.weights")
layer_names = net.getLayerNames()
output_layers = [layer_names[i[0] - 1] for i in net.getUnconnectedOutLayers()]
classes = [line.strip() for line in open("/content/drive/MyDrive/yolo3/mask/obj.names")]
colors = [(0,0,255),(255,0,0),(0,255,0)]
def yolo_detect(frame):
# forward propogation
img = cv2.resize(frame, None, fx=0.4, fy=0.4)
height, width, channels = img.shape
blob = cv2.dnn.blobFromImage(img, 1/255.0, (416, 416), (0, 0, 0), True, crop=False)
net.setInput(blob)
outs = net.forward(output_layers)
# get detection boxes
class_ids = []
confidences = []
boxes = []
for out in outs:
for detection in out:
tx, ty, tw, th, confidence = detection[0:5]
scores = detection[5:]
class_id = np.argmax(scores)
if confidence > 0.3:
center_x = int(tx * width)
center_y = int(ty * height)
w = int(tw * width)
h = int(th * height)
# 取得箱子方框座標
x = int(center_x - w / 2)
y = int(center_y - h / 2)
boxes.append([x, y, w, h])
confidences.append(float(confidence))
class_ids.append(class_id)
# draw boxes
indexes = cv2.dnn.NMSBoxes(boxes, confidences, 0.3, 0.4)
font = cv2.FONT_HERSHEY_PLAIN
for i in range(len(boxes)):
if i in indexes:
x, y, w, h = boxes[i]
label = str(classes[class_ids[i]])
color = colors[class_ids[i]]
cv2.rectangle(img, (x, y), (x + w, y + h), color, 2)
cv2.putText(img, label, (x, y -5), font, 3, color, 3)
return img
img = cv2.imread(path)
im = yolo_detect(img)
img_rgb = cv2.cvtColor(im, cv2.COLOR_BGR2RGB)
plt.imshow(img_rgb)
<matplotlib.image.AxesImage at 0x7faa4e33b2d0>

print("opencv版本:%s"% cv2.__version__)
opencv版本:4.1.2
from google.colab.patches import cv2_imshow
import cv2
import imutils
import time
VIDEO_IN = cv2.VideoCapture(0)
while True:
hasFrame, frame = VIDEO_IN.read()
print(frame)
#img = yolo_detect(frame)
cv2.imshow("Frame", imutils.resize(frame, width=850))
if cv2.waitKey(1) & 0xFF == ord('q'):
break
VIDEO_IN.release()
cv2.destroyAllWindows()
None
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-70-79e306786c1d> in <module>()
10 #img = yolo_detect(frame)
11
---> 12 cv2.imshow("Frame", imutils.resize(frame, width=850))
13
14 if cv2.waitKey(1) & 0xFF == ord('q'):
/usr/local/lib/python3.7/dist-packages/imutils/convenience.py in resize(image, width, height, inter)
67 # grab the image size
68 dim = None
---> 69 (h, w) = image.shape[:2]
70
71 # if both the width and height are None, then return the
AttributeError: 'NoneType' object has no attribute 'shape'
import cv2
#选择摄像头号,一般从 0 开始
cap = cv2.VideoCapture(0)
while True:
ret, img = cap.read()
cv2.imshow("input", img)
# 按 ESC 键退出
key = cv2.waitKey(10)
if key == 27:
break
cv2.destroyAllWindows()
cv2.VideoCapture(0).release()
#从谷歌云盘上传根据自己数据集修改的.cfg文件 会上传到darknet/cfg文件夹下
!cp /content/drive/MyDrive/cfg_mask/yolov3_custom2.cfg ./cfg
#从谷歌云盘上传自己数据集的obj.data obj.names
!cp /content/drive/MyDrive/cfg_mask/obj.data ./data
!cp /content/drive/MyDrive/cfg_mask/obj.names ./data
#上传generate_train.py 以在服务器的data下生成train.txt
!cp /content/drive/MyDrive/cfg_mask/train.txt ./data