-
Notifications
You must be signed in to change notification settings - Fork 0
How to install
Install Miniconda (The smaller version of anaconda just with the terminal)
Open an Miniconda Terminal
- Press the
windows key
at your keyboard and type 'anaconda' and them pressenter
.
With the terminal open, go to the conda packages installation to proceed installing all the packages and came back here to finish the process.
Download the landmark model
curl -O http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2
bzip2 -d shape_predictor_68_face_landmarks.dat.bz2
The end! Now you are all set to work with the prototype
If there are errors while extracting features from YouTube, you'll need to update the youtube_dl and pafy packages. Just follow the instructions below:
-
Editing this file: \anaconda3\envs<bio-signals-dataset_env>\Lib\site-packages\youtube_dl\extractor\youtube.py in line 1794 as follows:
Replace:
1794: 'uploader_id': self._search_regex(r'/(?:channel|user)/([^/?&#]+)', owner_profile_url, 'uploader id') if owner_profile_url else None
With:
1794: 'uploader_id': self._search_regex(r'/(?:channel|user)/([^/?&#]+)', owner_profile_url, 'uploader id', fatal=False) if owner_profile_url else None
-
Editing this file: \anaconda3\envs<bio-signals-dataset_env>\Lib\site-packages\pafy\backend_youtube_dl.py in lines 53 and 54 as follows:
Replace:
53: self._likes = self._ydl_info['like_count'] 54: self._dislikes = self._ydl_info['dislike_count']
With:
53: self._likes = self._ydl_info.get('like_count', 0) 54: self._dislikes = self._ydl_info.get('dislike_count', 0)
To install Miniconda just open your linux terminal pressing ctrl + t
and run the following commands.
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
sudo chmod 777 Miniconda3-latest-Linux-x86_64.sh
./Miniconda3-latest-Linux-x86_64.sh
rm Miniconda3-latest-Linux-x86_64.sh
After installing miniconda RESTART YOUR TERMINAL
With the terminal open, go to the conda packages installation to proceed installing all the packages and came back here to finish the process.
Download the landmark model
curl -O http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2
bzip2 -d shape_predictor_68_face_landmarks.dat.bz2
The end! Now you are all set to work with the prototype
If there are errors while extracting features from YouTube, you'll need to update the youtube_dl and pafy packages. Just follow the instructions below:
-
Editing this file: \anaconda3\envs<bio-signals-dataset_env>\Lib\site-packages\youtube_dl\extractor\youtube.py in line 1794 as follows:
Replace:
1794: 'uploader_id': self._search_regex(r'/(?:channel|user)/([^/?&#]+)', owner_profile_url, 'uploader id') if owner_profile_url else None
With:
1794: 'uploader_id': self._search_regex(r'/(?:channel|user)/([^/?&#]+)', owner_profile_url, 'uploader id', fatal=False) if owner_profile_url else None
-
Editing this file: \anaconda3\envs<bio-signals-dataset_env>\Lib\site-packages\pafy\backend_youtube_dl.py in lines 53 and 54 as follows:
Replace:
53: self._likes = self._ydl_info['like_count'] 54: self._dislikes = self._ydl_info['dislike_count']
With:
53: self._likes = self._ydl_info.get('like_count', 0) 54: self._dislikes = self._ydl_info.get('dislike_count', 0)
Update Conda packages
conda update --all
Create a conda environment (Here an environment called "bio-signals-dataset_env" will be used to install the packages)
conda create --name bio-signals-dataset_env python=3.10 pip cmake ipython jupyter
Activate the environment
conda activate bio-signals-dataset_env
Install conda packages
conda install -c conda-forge dlib opencv numpy pandas matplotlib imutils stumpy plotly
Install pip packages
pip install youtube_dl==2021.12.17 pafy==0.5.5 moviepy==1.0.3 notebook dash scikit-learn imbalanced-learn optuna tslearn seaborn
If you want to use the tensorflow running on a GPU (recommended), go here for LINUX and here for WINDOWS, otherwise, if you want to use on the CPU (not recommended) run the following command.
pip install tensorflow
If you want to use tensorflow on your GPU for training and making inferences at the neural net, just follow the installation guide here bellow.
-
Install the latest NVIDIA driver version via GeforceExperience here
-
Install the latest cuda tool-kit version here
After installing the CUDA tool-kit, run the tensorflow gpu installation for conda (make sure you are at the bio-signals-dataset_env environment previously created)
conda install -c conda-forge tensorflow-gpu
If you want to use your GPU for inferences or training the neural network follow the steps bellow
-
Install the latest NVIDIA driver version via GeforceExperience here
-
Install the cuda-toolkit version 11.8 here
-
Install tensorflow via pip (THE TENSORFLOW VERSION MUST BE BELOW 2.11) and cudnn via conda-forge
pip install "tensorflow<2.11" conda install -c conda-forge cudnn=8.1
If there is any doubts left, go at the complete guide here