This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
projects:farmrobot:step-by-step-example [2021/02/27 16:17] jason |
projects:farmrobot:step-by-step-example [2021/04/01 02:25] (current) |
||
---|---|---|---|
Line 59: | Line 59: | ||
<WRAP info> | <WRAP info> | ||
- | Consult the repository' | + | Consult the repository' |
</ | </ | ||
Line 143: | Line 143: | ||
===== - Setting up our custom implementation of YOLOv5 ===== | ===== - Setting up our custom implementation of YOLOv5 ===== | ||
- | First, clone the [[https:// | + | ==== - Cloning the repositories ==== |
+ | |||
+ | First, clone the [[https:// | ||
<file shell> | <file shell> | ||
- | git clone https:// | + | git clone https:// |
</ | </ | ||
Line 159: | Line 161: | ||
Once this is set up, you are theoretically ready to build the [[https:// | Once this is set up, you are theoretically ready to build the [[https:// | ||
- | The repository comes with a '' | + | ==== - Configuration ==== |
+ | |||
+ | The repository comes with a '' | ||
<file shell> | <file shell> | ||
Line 165: | Line 169: | ||
</ | </ | ||
+ | The '' | ||
+ | |||
+ | In the newly created '' | ||
+ | |||
+ | <file shell> | ||
+ | v4l2src device=/ | ||
+ | </ | ||
+ | |||
+ | <WRAP important> | ||
+ | It is important to replace the '' | ||
+ | </ | ||
+ | |||
+ | The configured '' | ||
+ | |||
+ | <file toml> | ||
+ | [yolov5] | ||
+ | # Input source. | ||
+ | source = " | ||
+ | |||
+ | ... | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | Consult the repository' | ||
+ | </ | ||
+ | |||
+ | <WRAP important> | ||
+ | If you intend to run the [[https:// | ||
+ | </ | ||
+ | |||
+ | ==== - Building the Docker image ==== | ||
+ | |||
+ | Building the [[https:// | ||
+ | |||
+ | <file shell> | ||
+ | sudo docker build -t farm-robot-yolov5 . | ||
+ | </ | ||
+ | |||
+ | <WRAP important> | ||
+ | The build process of the [[https:// | ||
+ | </ | ||
+ | |||
+ | ==== - Instantiating the Docker container ==== | ||
+ | |||
+ | When instantiating the [[https:// | ||
+ | |||
+ | <file shell> | ||
+ | sudo docker run -it --rm --runtime nvidia --device /dev/video0 --device / | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | Consult the repository' | ||
+ | </ | ||
+ | |||
+ | ==== - Starting the inference ==== | ||
+ | |||
+ | Once the interactive [[https:// | ||
+ | |||
+ | <file shell> | ||
+ | python3 . | ||
+ | </ | ||
+ | |||
+ | If everything is configured correctly, the delta arm should start to move to its home position and then to its configured initial position. A few seconds after that, [[https:// | ||