# YoloV7 Raspberry Pi 4
![output image]( https://qengineering.eu/images/ParkingYoloV7.jpg )
------------
## Dependencies.
To run the application, you have to:
- A Raspberry Pi 4 with a 32 or 64-bit operating system. It can be the Raspberry 64-bit OS, or Ubuntu 18.04 / 20.04. [Install 64-bit OS](https://qengineering.eu/install-raspberry-64-os.html) <br/>
- The Tencent ncnn framework installed. [Install ncnn](https://qengineering.eu/install-ncnn-on-raspberry-pi-4.html) <br/>
- OpenCV 64-bit installed. [Install OpenCV 4.5](https://qengineering.eu/install-opencv-4.5-on-raspberry-64-os.html) <br/>
- Code::Blocks installed. (```$ sudo apt-get install codeblocks```)
------------
## Installing the app.
To extract and run the network in Code::Blocks <br/>
$ mkdir *MyDir* <br/>
$ cd *MyDir* <br/>
$ 下载工程
Your *MyDir* folder must now look like this: <br/>
parking.jpg <br/>
busstop.jpg <br/>
YoloV7.cpb <br/>
yolo.cpp <br/>
yolo.h <br/>
yoloV7main.cpp <br/>
yolov7-tiny.bin <br/>
yolov7-tiny.param <br/>
------------
## Running the app.
To run the application load the project file YoloV7.cbp in Code::Blocks. More info or<br/>
if you want to connect a camera to the app, follow the instructions at [Hands-On](https://qengineering.eu/deep-learning-examples-on-raspberry-32-64-os.html#HandsOn).<br/><br/>
------------
### Dynamic sizes.
YoloV7 can handle different input resolutions without changing the deep learning model.<br/>
On line 28 of `yolov7main.cpp` you can change the `target_size` (default 640).<br/>
Decreasing the size to say 412 will speed up the inference time. On the other hand, the resizing makes the image less detailed; the model will no longer detect all objects.<br/><br/>。
------------
[![paypal](https://qengineering.eu/images/TipJarSmall4.png)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CPZTM5BB3FCYL)