- Download and install Anaconda as described in https://docs.anaconda.com/anaconda/install
- Download the tool from this link, and decompress the zip.
- Open the terminal in Linux/MacOS. In Windows, open the Anaconda Prompt.
- "cd" into the decompressed directory
- Download the trained models from here and put them in
object-locator-1.3.0/object-locator/checkpoints
- Install the dependencies:
- Activate the environment:
- In Linux/MacOS:
- In Windows:
- Install the tool:
- Download some example data from here and decompress it wherever you want.
- In Linux/MacOS:
- In Windows:
- In Linux/MacOS:
- In Windows:
- Install docker-ce as described in https://docs.docker.com/install/linux/docker-ce/ubuntu/#set-up-the-repository
- Install NVIDIA drivers
- Run the following commands
conda env create
source activate object-locator
activate object-locator
pip install .
Activate the environment:
source activate object-locator
activate object-locator
To use a pre-trained model/checkpoint.
Run this to get help (usage instructions):
python -m object-locator.locate -h
Example:
python -m object-locator.locate \ --dataset DIRECTORY \ --out DIRECTORY \ --model CHECKPOINTS \ --evaluate \ --no-gpu \ --radius 5
If you do not want to use one of the provided pretrained models, you can train your own model. Run the following command to get the full help message on how to train, with an explanation of all available training parameters. You need to have a NVIDIA card and CUDA 8 installed to train your own model. This depends greatly on the specific model of your NVIDIA card and operating system.
Run this to get help (usage instructions):
python -m object-locator.train -h
Example:
python -m object-locator.train \ --train-dir ~/data/20160613_F54_training_256x256 \ --batch-size 32 \ --env-name sorghum \ --lr 1e-3 \ --val-dir ~/data/plant_counts_random_patches/20160613_F54_validation_256x256 \ --optim Adam \ --save unet_model.ckpt
source deactivate object-locator
deactivate object-locator
conda env remove --name object-locator
(only for expert users)
docker volume ls -q -f driver=nvidia-docker | xargs -r -I{} -n1 docker ps -q -a -f volume={} | xargs -r docker rm -f
sudo apt-get purge -y nvidia-docker
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | \
sudo apt-key add -
curl -s -L https://nvidia.github.io/nvidia-docker/ubuntu16.04/amd64/nvidia-docker.list | \
sudo tee /etc/apt/sources.list.d/nvidia-docker.list
sudo apt-get update
sudo apt-get install -y nvidia-docker2
sudo pkill -SIGHUP dockerd
docker run --runtime=nvidia --rm nvidia/cuda nvidia-smi
You can get more details at https://github.com/NVIDIA/nvidia-docker