Comments (5)
As mentioned in the edits, I got passed this issue by running checkout manually and then running the next task in the install_darknet
task group which is given the name build_darknet
.
# Do every step for CPU-based only build.
install_darknet: download_darknet build_darknet sudo_install clean
After running make build_darknet
, it seems to invoke the prepare_cuda
task which doesn't seem right since I am only building for CPU usage. It fails with:
/Applications/Xcode.app/Contents/Developer/usr/bin/make -j 8
sudo apt-get install linux-headers-
sudo: apt-get: command not found
make[1]: *** [prepare_cuda] Error 1
make: *** [build_darknet] Error 2
This error makes sense because CUDA is not compatible with macs and apt-get
is not a UNIX command. I am just curious why it's being invoked when building CPU on macs.
from go-darknet.
Describe the bug First of all, thanks for this repo! You've done a lot of amazing work that I'm excited to use! I am not sure if this is a bug or a mismatch in system compatibilities. It could also just be some github hiccup and in that case, my apologies for posting this here but I would appreciate any help! The issue seems to be that the reference to darknet repo at commit
f056fc3b6a11528fa0522a468eca1e909b7004b7
is not a tree.Command:
make install_darknet
Result:
rm -rf /tmp/install_darknet mkdir /tmp/install_darknet git clone https://github.com/AlexeyAB/darknet.git /tmp/install_darknet Cloning into '/tmp/install_darknet'... remote: Enumerating objects: 15386, done. remote: Total 15386 (delta 0), reused 0 (delta 0), pack-reused 15386 Receiving objects: 100% (15386/15386), 14.01 MiB | 2.00 MiB/s, done. Resolving deltas: 100% (10345/10345), done. cd /tmp/install_darknet git checkout f056fc3b6a11528fa0522a468eca1e909b7004b7 fatal: reference is not a tree: f056fc3b6a11528fa0522a468eca1e909b7004b7 make: *** [download_darknet] Error 128
To Reproduce
git clone [email protected]:LdDl/go-darknet.git
cd go-darknet/
make install_darknet
Expected behavior Darknet compiles correctly
Describe the solution you'd like and provide pseudocode examples if you can If there are any workarounds to this issue on my system or glaring git mishaps occurring, I would love to know more in hopes that this issue helps others encountering this issue.
EDIT: I just went back over the README and noticed a potential issue. It states that the most recent battle-tested commit of the forked darknet is what
go-darknet
is using to build but while taking a peek in the Makefile, theLATEST_COMMIT
variable is set tof056fc3b6a11528fa0522a468eca1e909b7004b7
which is not the same hash as the commit in the README. That hash isd65909fbea471d06e52a2e4a41132380dc2edaa6
and when attempting to change theLATEST_COMMIT
variable to this hash, I get the same issue.EDIT: The trouble command is when the Makefile runs
git checkout $(LATEST_COMMIT)
but when navigating to the/tmp/install_darknet
directory and running the command manually, it switches refs just fine.
Hello there!
- Thanks, I've changed commit in README to f056fc3b6a11528fa0522a468eca1e909b7004b7
- About 'make build_darknet'
build_darknet:
cd $(TMP_DIR)install_darknet
sed -i -e 's/GPU=1/GPU=0/g' Makefile
sed -i -e 's/CUDNN=1/CUDNN=0/g' Makefile
sed -i -e 's/LIBSO=0/LIBSO=1/g' Makefile
$(MAKE) -j $(shell nproc --all)
$(MAKE) preinstall
cd -
According to
/Applications/Xcode.app/Contents/Developer/usr/bin/make -j 8
I guess problem is in here:
$(MAKE) -j $(shell nproc --all)
Can you manually check if contents of 'build_darknet' work fine?
cd /tmp/install_darknet
sed -i -e 's/GPU=1/GPU=0/g' Makefile
sed -i -e 's/CUDNN=1/CUDNN=0/g' Makefile
sed -i -e 's/LIBSO=0/LIBSO=1/g' Makefile
make -j 8
make preinstall
cd -
p.s. Unfortunately, I haven't any macOS device :( So I'm 'blind' a bit.
from go-darknet.
Apologies for the delay!
From running manually, I get:
./src/yolo_layer.c:656:10: fatal error: use of undeclared identifier 'b'
for (b = 0; b < l.batch; ++b) {
while the make -j 8
command is executing. Seems to be an issue with AlexeyAB's darknet implementation?
from go-darknet.
Seems so.
I'm trying to figure out stable commit of implementation: #23
from go-darknet.
Apologies for delay. I ended up getting this to work by reinstalling Xcode. This was the main issue, however, the build scripts are currently incompatible with mac. I plan on making a PR in the future but I do not have a clean implementation yet. For those running into this issue in the mean time, when running the make install_darknet
task, I had to git checkout
manually. Not sure why this was an issue but the commit could not be found when using the task.
Next, instead of using the build_darknet
task, I ran the following script:
export TMP_DIR=/tmp
cd $TMP_DIR/install_darknet
sed -i -e 's/GPU=1/GPU=0/g' Makefile
sed -i -e 's/CUDNN=1/CUDNN=0/g' Makefile
sed -i -e 's/LIBSO=1/LIBSO=1/g' Makefile
/Applications/Xcode.app/Contents/Developer/usr/bin/make -j $(sysctl -n hw.ncpu)
/Applications/Xcode.app/Contents/Developer/usr/bin/make preinstall
cd -
Finally, to download the model, I used the following script:
curl https://cdn-images-1.medium.com/max/800/1*EYFejGUjvjPcc4PZTwoufw.jpeg -o sample.jpg
curl https://raw.githubusercontent.com/AlexeyAB/darknet/master/data/coco.names -o coco.names
curl https://raw.githubusercontent.com/AlexeyAB/darknet/master/cfg/yolov4.cfg -o yolov4.cfg
sed -i -e "\$anames = coco.names" yolov4.cfg
curl https://pjreddie.com/media/files/yolov4.weights -o yolov4.weights
I hope this helps others and as I said I will make a PR in the future.
from go-darknet.
Related Issues (17)
- docker container [feature request] HOT 6
- [FEATURE REQUEST] Installation script HOT 1
- [BUG] memory leak on perform_network_detect C function HOT 7
- [BUG] Build error on golang:1.15.7-alpine3.13 docker image HOT 2
- [BUG] 为什么检测一次很慢,大概再6-10秒左右,yolov5大概再20ms左右 HOT 4
- crop the bounding box content HOT 3
- [FEATURE REQUEST] Update to stable YOLO v4 HOT 1
- [BUG] - when running example code on Mac 12.1 - fatal error: unexpected signal during runtime execution HOT 1
- Support for YOLO v5 / v6 / v7 or other variants HOT 5
- Update darknet package on go.dev HOT 4
- Custom yolov7 pytorch HOT 2
- [QUESTION] Go-Darknet for Windows HOT 1
- [BUG] yolov4 tiny example produces fatal error: unexpected signal during runtime execution HOT 5
- rest api example HOT 6
- memory leak in perform_network_detect
- Segmentation Violation HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-darknet.