diff options
author | Saumit Dinesan <justsaumit@protonmail.com> | 2023-05-08 19:51:16 +0530 |
---|---|---|
committer | Saumit Dinesan <justsaumit@protonmail.com> | 2023-05-08 19:51:16 +0530 |
commit | 62272372a66399ce56297fa8aabea660c220a816 (patch) | |
tree | 4dd75657479ff0b3021a8d2663a31cb2ed3083a4 | |
parent | 12d1f650543a44c282c6b97ecb01a25637b0ff18 (diff) |
CamTest: updating dependencies,requirements+removing venv
-rw-r--r-- | README.md | 23 | ||||
-rw-r--r-- | face-detection/requirements.txt | 7 |
2 files changed, 18 insertions, 12 deletions
@@ -139,22 +139,27 @@ cd opencv-face-detection ``` bash cd face-detection ``` -4. Create a virtual environment named ".venv" for the project. +4. Install the dependencies +System dependencies ``` bash -python -m venv .venv +sudo apt install -y python3-libcamera python3-kms++ libcap-dev ``` -5. Activate the virtual environment. +**Note!:** libcamera won't work if you're using virtual environment since it's a lowlevel library that cannot be install using pip +Then pip dependencies ``` bash -source .venv/bin/activate +pip install -r requirements.txt ``` -6. Install the required Python packages using the "requirements.txt" file. +OR Manually ``` bash -pip install -r requirements.txt +pip install opencv-python picamera2 +``` +**Note!** If you face error installing Picamera2 using pip make sure you have the following dependency installed: +``` bash +sudo apt install -y libcap-dev ``` -**Note!** Picamera2 is recommended to install using apt. Hence, till it's stable version is not released it won't be included in requirements.txt. Read more [here](https://pypi.org/project/picamera2/). -Use the following command to install Picamera2: +If you still face error and unable to install, you may install opencv and picamera2 using apt with the following command: ``` bash -sudo apt install -y python3-picamera2 +sudo apt install -y python3-opencv python3-picamera2 ``` 7. Change to the parent directory -opencv-face-recognition. ``` bash diff --git a/face-detection/requirements.txt b/face-detection/requirements.txt index b438717..207f665 100644 --- a/face-detection/requirements.txt +++ b/face-detection/requirements.txt @@ -1,3 +1,4 @@ -numpy==1.24.2 -opencv-contrib-python==4.7.0.72 -Pillow==9.4.0 +numpy==1.24.3 +opencv-python==4.7.0.72 +picamera2==0.3.9 +Pillow==9.5.0 |