jaskiratsingh2000 / Research-Scalable-Vehicle-Detection-on-Edge-Devices

Research project tracker: Scalable Vehicle Detection on Edge Devices
MIT License
2 stars 0 forks source link

[Installation] Installing the requirements for YOLO on Jetsan Nano #18

Closed jaskiratsingh2000 closed 3 years ago

jaskiratsingh2000 commented 3 years ago

Installation of Python 3.8.5

(Applicable on Raspberry Pi 4, Raspberry Pi Zero W, and Jetsan Nano)

Below are the following steps to install python 3.8.5 on the Hardware Devices.

Update the System

Prequisistes

Download Python

Install Python 3.8.5

Check Python Version

Make python 3.8.5 as the default version

Check Python Version

Now you have successfully installed Python 3.8.5 on Raspberry Pi.

jaskiratsingh2000 commented 3 years ago

Installation of PyTorch 1.7

(Applicable on Jetsan Nano)

Below are the following steps to install PyTorch 1.7 version on the Jetsan Nano

Download Pytorch from GitHub

* Moving inside the `pytorch` folder

cd pytorch


#### Installing requirements to build PyTorch
* installing the requirements that are needed to build the pytorch

python3.8 -m pip install -r requirements.txt


#### Build PyTorch
* setup.py is a python file, the presence of which is an indication that the module/package you are about to install has likely been packaged and distributed with Distutils, which is the standard for distributing Python Modules.

python3.8 setup.py install --user

jaskiratsingh2000 commented 3 years ago

Installation of TorchVision

(Applicable on Jetsan Nano)

Below are the following steps to install the TorchVsion 0.8.1 version on the Jetsan Nano

Download Pytorch from GitHub

Build TorchVision

NOTE: In case if you get to see version 0.8.0 then do not worry since In short, you do have torchvision v0.8.1, it is just reporting as v0.8.0a0+45f960c. If you look at the torchvision release page 2 for v0.8.1, it has the same commit (45f960c) as reported in the version.

While doing the above TorchVision Setup if you come across the following error:

error: command 'gcc' failed with exit status 1

then follow these steps:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-10 g++-10

The build-essentials are libraries and packages used to build source code. They are essential to build most of the packages. By installing this package the error can be solved.

sudo apt install build-essential

The most prolific reason for the “error command gcc failed with exit status 1” is the absence of the Python development library or package. The Python development library or package is named “python-devel” or “python-dev” in most of the distributions. According to your python version select the proper python development library installation command from below.

sudo apt install python3-dev

Other popular libraries are libffi, libxslt and openssl. They generally required by Python tools and libraries for compilation. So you can install these libraries with the following commands.

sudo apt install libxslt-dev libffi-dev libssl-dev
jaskiratsingh2000 commented 3 years ago

Installation of OpenCV

(Applicable on Jetsan Nano)

Below are the following steps to install OpenCV 4.5.2 version on the Jetsan Nano

Installing the direct package