Face detection

Discussions about the AI-deck
Post Reply
AriadnaR
Beginner
Posts: 21
Joined: Fri Jun 04, 2021 3:19 pm

Face detection

Post by AriadnaR »

Hello,
I have been running all my codes in Idle 3. Which means all have been python codes. I was looking at the github face detection example and I could not find the oython code of it. Do you know where I can find it ?
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Face detection

Post by kimberly »

Hi!

The facedetector example is based on greenwaves example found here: https://github.com/GreenWaves-Technolog ... eDetection

But no, it's not based on any python example I know of, this has been especially made for the gap8 chip.

If you want any python examples I would suggest googling opencv + facedetection
AriadnaR
Beginner
Posts: 21
Joined: Fri Jun 04, 2021 3:19 pm

Re: Face detection

Post by AriadnaR »

So I followed this website https://www.bitcraze.io/documentation/r ... ker-gap8/ , but I am not able to run any example. I might be missing something to run but I am not sure what. I also went through this https://www.bitcraze.io/documentation/r ... tection/ one before the gap 8 docker.

For the first link I attached I got stuck in the "Running an Example"
Attachments
Screenshot (2618)_LI.jpg
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Face detection

Post by kimberly »

Hi. Let's do one thing at the time... so let's fix your docker issue first.

So your screenshot is showing that you do the

Code: Select all

docker commit <container id> bitcraze/aideck
within the bitcraze/aideck container itself. That is not what the instructions are indicating. You are supposed to do the commit in the same terminal where you did the 'docker ps' command, so in a seperate terminal outside of the docker container.
AriadnaR
Beginner
Posts: 21
Joined: Fri Jun 04, 2021 3:19 pm

Re: Face detection

Post by AriadnaR »

I did it in a separate terminal but I closed it, since it was just one line of code.
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Face detection

Post by kimberly »

Oke great, I saw it in the container file so I thought that it how it went.

Now you can close the container again with 'exit' and use the 'running an example' subtitle of the docker instructions, like face detection example. You go to the folder where the Makefile exist of the example and then copy and run the docker command.
AriadnaR
Beginner
Posts: 21
Joined: Fri Jun 04, 2021 3:19 pm

Re: Face detection

Post by AriadnaR »

That’s where I have problems, where should the make file be located at ? I looked for the AI deck examples folder but I can’t find it in the virtual machine.
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Face detection

Post by kimberly »

It's not by standard in the bitcraze virtual machine. You will need git clone this repository to it first: https://github.com/bitcraze/AIdeck_examples
AriadnaR
Beginner
Posts: 21
Joined: Fri Jun 04, 2021 3:19 pm

Re: Face detection

Post by AriadnaR »

How can I run the face detection code?
Screenshot (2654).png
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Face detection

Post by kimberly »

The gap_run function will only work on the aideck VM provided for the AIdeck workshop. in your case, you will need to follow the exact instructions of the docker instructions of running an example:

Code: Select all

docker run --rm -it -v $PWD:/module/data/ --device /dev/ttyUSB0 --privileged -P bitcraze/aideck /bin/bash -c 'export GAPY_OPENOCD_CABLE=interface/ftdi/olimex-arm-usb-tiny-h.cfg; source /gap_sdk/configs/ai_deck.sh; cd /module/data/;  make clean all run'
Make sure that your debugger is selected in your VM and that the right .cfg is also in the same command line as well.

If that works, you can use the above line to create an 'gap_run' alias in your ~/.bashrc file
Post Reply