Skip to content

Install TagLab

Massimiliano Corsini edited this page Nov 6, 2024 · 73 revisions

Installing TagLab

Windows

Before installing TagLab, make sure that you have installed a 64 bit version of Python 3.11, and a working NVIDIA driver.

IMPORTANT NOTE: When installing Python on Windows be sure to add it to the PATH and check the Disable PATH Limit Length before exiting the setup (see the screenshots below).

You can check if Python is properly installed by running the following commands in a shell:

python3 --version

You can check if NVIDIA CUDA is properly installed by running the following commands in a shell:

nvidia-smi

If everything is working correctly something similar should appear:

image

If your CUDA version is older than 11.8, consider to upgrade your drivers!

You need also to install the Visual Studio Redistributable. Download them from this link.

Clone the repository

Go on GitHub and just click on the "Clone or Download" button at the top of this page and unzip the whole package in a folder of your choice.

Launch TagLab installer

  • open a terminal (not a python prompt!);
  • change directory to the TagLab main directory: type cd (be sure to type the space after cd) and then drag and drop into the terminal the TagLab folder; then click enter;
  • type the following command in the terminal:
python.exe install.py

Linux

Under Linux, if you use a debian-based distribution (e.g. Ubuntu), except for python and NVIDIA CUDA driver, there are no other real requirements (note that AMD ROCm is supported on Linux): the TagLab installer will take care of get and install all the dependencies. If you do not use the APT package manager (not ubuntu or debian derived distros), you'll need to install manually the GDAL library (the command gdal-config --version should output the gdal library version), and cmake. Check out for your distribution how to install these two packages!

The next two steps are similar to the ones for Windows:

Clone the repository

Go on GitHub and just click on the "Clone or Download" button at the top of this page and unzip the whole package in a folder of your choice.

Launch TagLab installer

  • open a terminal (not a python prompt!);
  • change directory to the TagLab main directory: type cd (be sure to type the space after cd) and then drag and drop into the terminal the TagLab folder; then click enter;
  • type the following command in the terminal:
python3 install.py

MacOS

On MacOS, the only real requirement (besides python 3.11) is the HomeBrew package manager: be sure to have it installed before running the TagLab installer. You can check here the instructions on how to install it. If you don't want to install the HomeBrew package manager, be sure to install the gdal library manually (the command gdal-config --version should output the gdal library version), and cmake. Take care that on MacOS the GPU accelerated version is not available, at the moment.

Launch TagLab installer

  • open a terminal (not python prompt!);
  • change directory to the TagLab main directory: type cd (be sure to type the space after cd) and then drag and drop into the terminal the TagLab folder; then click enter;
  • type the following command in the terminal:
python3 install.py

or, on Windows:

python.exe install.py

The install.py script will automatically install the remaining libraries required by TagLab and download the network weights used in the interactive AI-based segmentation tools. If NVIDIA CUDA Toolkit is not supported by your machine, the script will install the cpu version. If you launch the script with the SAM option, the installation will include two additional segmentation tools based on the Segment Anything (SAM) network (more information on the official GitHub page here). These latter tools requires at least 8 GB of GPU RAM to work properly.

python.exe install.py SAM

If your machine does not support the NVIDIA CUDA Toolkit, you can install the cpu version of TagLab with the following command:

python3 install.py cpu

or, on Windows:

python.exe install.py cpu

Run

Just start TagLab.py from a command shell or your preferred Python IDE.

From a terminal simply write:

python3 TagLab.py

or, on Windows:

python.exe taglab.py

To test if TagLab works correctly, try to open the sample project available in the projects folder.

Known problems and how to solve them

  • The update of the 7th of October 2022 introduce a dependency from pycocotools to export dataset in COCO format. After this update you need to install Microsoft Visual C++ Build Tools from this link link (for Windows) and re-run install.py (for all systems).

  • If PyQt not work properly under Windows (e.g. import problems when TagLab is launched) perhaps the Microsoft Visual C++ Redistributable is not installed on your machine. Download and install it using this link .

  • Note that, the versions of Python older than 3.11 are no more supported.

Clone this wiki locally