0
$\begingroup$

In have seen a couple of text and objection detection algorithm wher the first step everyone dose is to install cython and run a make.sh file . why we have run make.sh file initially in darknet/YOLO object detection ?

Below are the 2 links im referring to build yolo algorithm using darknet and im not able to understand why cython is needed and why it is necessary to compile make.sh file for the first step to build yolo model ?

How to compile on Linux (using cmake)

How to compile on Linux (using make)

$\endgroup$
1
$\begingroup$

I know what is cython and make (but I never use YOLO!)

Cython is a C-extension for python. It allows you to write code C/C++ in a python script. (use for very fast program execution)

Make is command which executes your makefile. You can consider makefile is a build script to create/tune the necessary things like environment/folders/.. etc.

$\endgroup$
4
  • $\begingroup$ thanks ,1). so c,c++ is faster than python thats why they use cython is my understanding right ? or is it like there are functionalities already available in C/C++ so no need to write in python that functionalities again so use cython to compile c,c++ code in python environment ? . 2). Is MAKE file the script that takes care of the creating c/c++ environment to run c/c++ code and maintain folder structure inside python environment ?can you give an real time example on why its mandatory to run make file what happens if we dont run it ? $\endgroup$ Jan 6 '20 at 10:08
  • 1
    $\begingroup$ 1) Python is written in C so c/c++ extensions (cython) is make execution faster. and yeah you are right cython allows you to code c/c++ on python script. 2) Make is not specific for python. when you build a envinorment you need dependencies, env variables, folders or scripts to run. When we look at the mentioned makefile <github.com/AlexeyAB/darknet/blob/…> it specifies the environment variables, and paths, ensure compile tools are right. $\endgroup$ Jan 6 '20 at 11:29
  • $\begingroup$ @ Iron Hand Odin thanks , just for my understanding say there is a c/c++ program written to do operations of a CALCULATOR that run very fast rather than writing the same calculator program in python we decided to use the c/c++ program in python enviroment , so "make" command reads the makefile of this program and sets everything(folder structure,environment path,dependency libraries) for the c/c++ CALCULATOR program to run using python (rather than using c/c++ environment directly we use python environment to run the c/C++ calcualtor program ) is my understanding right right ? $\endgroup$ Jan 8 '20 at 14:06
  • $\begingroup$ ... , so "make" command reads the makefile of this program and sets everything(folder structure,environment path,dependency libraries). This is true but not necessarily. I mean you can set your Python environment and libraries differently (with anaconda or only pip). What i mean is you dont need makefile to use Cython (code c/c++ in python). About your problem, makefile did not use for setting Python/Cython environment, to do that they use Cython and to set up other folder structure, paths etc they used make $\endgroup$ Jan 9 '20 at 6:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.