TRM: Tiny AI Models beating Giants on Complex Puzzles
Models with billions, or trillions, of parameters are becoming the norm. These models can write
In this post, we will provide step by step instructions on how to install Dlib on MacOS and OSX. The installation instructions are slightly different for different versions of the operating system and XCode. Please choose the right one for you. Install Dlib on MacOS >= 10.11 & XCode >=
In this post, we will provide step by step instructions on how to install Dlib on MacOS and OSX. The installation instructions are slightly different for different versions of the operating system and XCode. Please choose the right one for you.
brew cask install xquartz brew install gtk+3 boost brew install boost-python --with-python3
brew install python python3 brew link python brew link python3 # check whether Python using homebrew install correctly which python2 # it should output /usr/local/bin/python2 which python3 # it should output /usr/local/bin/python3 # check Python versions python2 --version python3 --version
Python version (2.6 or 2.7, 3.5 or 3.6) installed on your machine is required to determine path of Python’s site-packages. It will be used later.
We are going to use a Virtual Environment to install Python libraries. It is generally a good practice to separate your project environment and global environment.
# Install virtual environment pip install virtualenv virtualenvwrapper echo "# Virtual Environment Wrapper" echo "source /usr/local/bin/virtualenvwrapper.sh" >> ~/.bash_profile source ~/.bash_profile ############ For Python 2 ############ # create virtual environment mkvirtualenv facecourse-py2 -p python2 workon facecourse-py2 # now install python libraries within this virtual environment pip install numpy scipy matplotlib scikit-image scikit-learn ipython # quit virtual environment deactivate ############ For Python 3 ############ # create virtual environment mkvirtualenv facecourse-py3 -p python3 workon facecourse-py3 # now install python libraries within this virtual environment pip install numpy scipy matplotlib scikit-image scikit-learn ipython # quit virtual environment deactivate
brew install dlib
Now activate "facecourse-py2" or "facecourse-py3" virtual environment based on whether you were following the process for Python2 or Python3.
############ For Python 2 ############ workon facecourse-py2 ############ For Python 3 ############ workon facecourse-py3
We will now install Dlib using pip.
pip install dlib
Installation is complete. You can now exit from virtualenv using deactive.
deactivate
brew cask install xquartz brew install gtk+3 boost brew install boost-python --with-python3
brew install python python3 brew link python brew link python3 # check whether Python using homebrew install correctly which python2 # it should output /usr/local/bin/python2 which python3 # it should output /usr/local/bin/python3 # check Python versions python2 --version python3 --version
Python version (2.6 or 2.7, 3.5 or 3.6) installed on your machine is required to determine path of Python’s site-packages. It will be used later.
We are going to use a Virtual Environment to install Python libraries. It is generally a good practice to separate your project environment and global environment.
# Install virtual environment pip install virtualenv virtualenvwrapper echo "# Virtual Environment Wrapper" echo "source /usr/local/bin/virtualenvwrapper.sh" >> ~/.bash_profile source ~/.bash_profile ############ For Python 2 ############ # create virtual environment mkvirtualenv facecourse-py2 -p python2 workon facecourse-py2 # now install python libraries within this virtual environment pip install numpy scipy matplotlib scikit-image scikit-learn ipython # quit virtual environment deactivate ############ For Python 3 ############ # create virtual environment mkvirtualenv facecourse-py3 -p python3 workon facecourse-py3 # now install python libraries within this virtual environment pip install numpy scipy matplotlib scikit-image scikit-learn ipython # quit virtual environment deactivate
Dlib uses few C++11 features which XCode 7 does not support. We have patched Dlib v19.4 by replacing this feature with Dlib’s internal function. This patched version of Dlib compiles with XCode 7. So if you are using XCode 7, use branch v19.4-thread-local-patch of our Dlib fork in your projects.
Davis King, creator of Dlib, recommends using CMake for using Dlib in your code. But if you want to use Dlib as a library follow these steps:
git clone https://github.com/vaibhawchandel/dlib.git cd dlib git checkout v19.4-thread-local-patch mkdir build cd build cmake .. cmake --build . --config Release make install cd ..
Now you can use pkg-config to provide path to Dlib’s include directory and link Dlib library file.
pkg-config --libs --cflags dlib-1
Now activate "facecourse-py2" or "facecourse-py3" virtual environment based on whether you were following the process for Python2 or Python3.
############ For Python 2 ############ workon facecourse-py2 ############ For Python 3 ############ workon facecourse-py3
Now run the following command to build Python module.
python setup.py install
For consistency we have installed Python and C++ binaries of Dlib using same source code.
Since we installed dlib in facecource-py3/facecourse-py2 virtualenv, dlib was installed only in this virtualenv and not globally. So whenever you want to use dlib, you have to activate the virtualenv using workon command as we used earlier in this post.
Now exit from virtualenv
deactivate
Models with billions, or trillions, of parameters are becoming the norm. These models can write
Deploying ML on Arduino Nano 33 BLE. Explore TinyML techniques, setup steps, and why older
Discover VideoRAG, a framework that fuses graph-based reasoning and multi-modal retrieval to enhance LLMs’ ability
Discover VideoRAG, a framework that fuses graph-based reasoning and multi-modal retrieval to enhance LLMs' ability to understand multi-hour videos efficiently.
Learn how to build AI agent from scratch using Moondream3 and Gemini. It is a generic task based agent free from…
Get a comprehensive overview of VLM Evaluation Metrics, Benchmarks and various datasets for tasks like VQA, OCR and Image Captioning.
Subscribe to our email newsletter to get the latest posts delivered right to your email.
We hate SPAM and promise to keep your email address safe.