Get your os image from this site: https://www.raspberrypi.org/software/raspberry-pi-desktop/ and flash it to a tf card; when you booted up successful,you can follow with steps below;
Notice: With the 64-bit OS version, although our environment is configured correctly, we got the error 'illegal instruction' without running;
update the system,and install some base package;
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install libopenblas-dev libblas-dev m4 cmake cython python3-dev python3-yaml python3-setuptools
install virtualenv for system python3;
sudo pip3 install virtualenv
get the yolov5 clone;
git clone https://github.com/ultralytics/yolov5
cd yolov5
create a virtual environment of python3 and active it;
virtualenv yolov5-venv
source ./yolov5-venv/bin/activate
update pip3 of the environment;
python3 -m pip install --upgrade pip
By the way, pytorch has not provided an official compiled packages of arm32 (arm64 only); you need to download both packages in release here;
wget https://github.com/weirros/yolov5_wi_pi4/releases/download/Torch1.7/torch-1.7.0a0-cp37-cp37m-linux_armv7l.whl
wget https://github.com/weirros/yolov5_wi_pi4/releases/download/Torch1.7/torchvision-0.8.0a0+45f960c-cp37-cp37m-linux_armv7l.whl
install some package for the environment; Do not use pip3 install -r requirements.txt,it leads errors;
pip3 install numpy
python3.7 -m pip install torch-1.7.0a0-cp37-cp37m-linux_armv7l.whl
python3.7 -m pip install torchvision-0.8.0a0+45f960c-cp37-cp37m-linux_armv7l.whl
python3.7 -m pip install matplotlib
python3.7 -m pip install opencv-python
python3.7 -m pip install pyyaml
python3.7 -m pip install pandas
python3.7 -m pip install h5py
python3.7 -m pip install scipy
python3.7 -m pip install keras
python3.7 -m pip install tensorboard
python3.7 -m pip install tqdm
python3.7 -m pip install seaborn
now you can try;
**but if you get some error ,like **
you may need install this lib of system;
sudo apt-get install libjpeg8-dev -y
sudo apt-get install libatlas-base-dev gfortran -y
sudo apt-get install libgtk2.0-dev -y
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev -y
sudo apt-get install libtiff5-dev -y
sudo apt-get install libjasper-dev -y
sudo apt-get install libpng12-dev -y
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev -y
sudo apt install libopenblas-dev libblas-dev m4 cmake cython python3-dev python3-yaml python3-setuptools
Thanks;
https://blog.csdn.net/m0_46295742/article/details/112967918
Torch1.7 Precompiled;
https://download.csdn.net/download/m0_46295742/14933968
We provide a configured OS mirror, please contact us with stars!