This repository helps you to extend the models is to detect objects using YOLO-V2 on a MaixPY
Install Docker on your machine and create a notebooks
folder inside e.g. Documents
:
curl -sSL https://get.docker.com | sh
mkdir ~/Documents/notebooks/
Then, deploy the tensorflow/tensorflow:latest-py3-jupyter
image using:
sudo docker run -d -p 8888:8888 -v ~/Documents/notebooks/:/tf/notebooks/ tensorflow/tensorflow:latest-py3-jupyter
I explained the -v
flag here. But, it is a "Bind Mount". This means the ~/Documents/notebooks/
folder is connected to the /tf/notebooks/
folder inside the container. This makes the data inside the folder /tf/notebooks/
(container) persistent. Otherwise, if the container is stopped you lose the files.
Then, clone this repository inside ~/Documents/notebooks/
cd ~/Documents/notebooks/
git clone https://github.com/lemariva/MaixPy_YoloV2
Open the following URL in your host web browser: http://localhost:8888
You need a token to log in. The token is inside the container. List the container to get the ID with following command:
$ docker container ls
CONTAINER ID IMAGE [....]
5082a85283bb tensorflow/ [....]
Then, read the logs typing:
$ docker logs 5082a85283bb
[...]
The Jupyter Notebook is running at:
[...] http://ac64d540a1cb:8888/?token=df050fa3b53de5f9203ca862e5f3656962b665dc224243a8
[...]
The hash after token=
is the token to log in.
I added a training example with the brio 33594. You can train the model running the code inside training.ipynb
.
Note: Some additional libraries are required inside the container and they are installed on the first cell block of the Notebook. You don't need to run the cell every time that you compile the model. However, if you start a new container (not restart the stopped one), you need to install them again. You can extend the container to include these libraries per default. You can find more info about that on this tutorial.
Visit the following tutorial for more information: MAixPy: Object detector - MobileNet and YOLOv2 on Sipeed MAix Dock