darknet icon indicating copy to clipboard operation
darknet copied to clipboard

yolov4-tiny colab notebook stop training model after T4 upgrade

Open aabilityuk opened this issue 5 months ago • 3 comments

Hello dear community! I am trying to use YOLOv4-tiny colab notebook (YOLOv4-tiny) for training the model, but i have got some errors on that stage:

#install environment from the Makefile

%cd /content/darknet/

# compute_37, sm_37 for Tesla K80

# compute_75, sm_75 for Tesla T4

# !sed -i 's/ARCH= -gencode arch=compute_60,code=sm_60/ARCH= -gencode arch=compute_75,code=sm_75/g' Makefile




#install environment from the Makefile

#note if you are on Colab Pro this works on a P100 GPU

#if you are on Colab free, you may need to change the Makefile for the K80 GPU

#this goes for any GPU, you need to change the Makefile to inform darknet which GPU you are running on.

!sed -i 's/OPENCV=0/OPENCV=1/g' Makefile

!sed -i 's/GPU=0/GPU=1/g' Makefile

!sed -i 's/CUDNN=0/CUDNN=1/g' Makefile

!sed -i "s/ARCH= -gencode arch=compute_60,code=sm_60/ARCH= ${ARCH_VALUE}/g" Makefile

!make

Here is errors:

/content/darknet 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 Package opencv was not found in the pkg-config search path. Perhaps you should add the directory containing `opencv.pc' to the PKG_CONFIG_PATH environment variable Package 'opencv', required by 'virtual:world', not found ./src/image_opencv.cpp:16:10: fatal error: opencv2/core/version.hpp: No such file or directory 16 | #include <opencv2/core/version.hpp> | ^~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make: *** [Makefile:165: obj/image_opencv.o] Error 1

My project is on windows (YOLO darknet). Help me please to find a solution.

P.S.

A couple years ago YOLOv4-tiny colab notebook worked very good with no errors. My guess it stop training the model after upgrade from K80 GPU to T4. thank you very much!

aabilityuk avatar Nov 18 '25 19:11 aabilityuk

Note this repo is no longer maintained. You may want to see this repo instead: https://github.com/hank-ai/darknet#table-of-contents

The colab example notebooks in that repo were last updated in August 2025: https://github.com/hank-ai/darknet/tree/master/colab

stephanecharette avatar Nov 18 '25 19:11 stephanecharette

Note this repo is no longer maintained. You may want to see this repo instead: https://github.com/hank-ai/darknet#table-of-contents

The colab example notebooks in that repo were last updated in August 2025: https://github.com/hank-ai/darknet/tree/master/colab

Thank you very much for a quick reply!!! I really appreciate it! I will check the new repo.

aabilityuk avatar Nov 18 '25 19:11 aabilityuk

Dear guru @stephanecharette , i opened up a question in new repo you suggested, could you please take a look and help me a little bit, i am very new to yolo/darknet. Here is a link to my question: https://github.com/hank-ai/darknet/issues/145

Thank you so much

aabilityuk avatar Nov 19 '25 07:11 aabilityuk