Skip to content

This repo contains the necessary code for running models used in combination with the robofarmer dataset.

Notifications You must be signed in to change notification settings

Gregz9/RobfarmerModel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RobfarmerModel Docker Setup

This guide explains how to build and run the RobfarmerModel using Docker.

Prerequisites

  • Docker installed on your system
  • NVIDIA Docker runtime (for GPU support)
  • Copy the Robofarmer-II directory from elvex.sintef.no:/data/robofarmer to your home directory

Building the Docker Image

Build the Docker image with the following command:

podman build -t robofarmer:latest .

Note: The build process will:

  • Use NVIDIA PyTorch base image with CUDA support
  • Install system dependencies and build tools
  • Set up Anaconda environment
  • Clone the repository and install dependencies
  • Build OpenCV with CUDA support
  • Extract the dataset from Robofarmer-II.tar.gz

Running the Container

Basic Run Command

podman run -it --rm robofarmer:latest

With GPU Support

podman run -it --rm --gpus all robofarmer:latest

With Volume Mounting (for data persistence)

podman run -it --rm --device nvidia.com/gpu=0 \
  -v $(pwd)/Robofarmer-II:/app/data/datasets/Robofarmer-II  \
  robofarmer:latest

Interactive Shell Access (Recommended for running all scripts)

podman run -dit --shm-size=24g --device nvidia.com/gpu=0 --name robofarmer -v $HOME/Robofarmer-II:/app/data/datasets/Robofarmer-II bash

Enter the container

podman attach robofarmer

Working Directory

The container's working directory is /app, which contains:

  • /app/src - The cloned RobfarmerModel repository
  • /app/data - Dataset directory
  • /app/opencv - OpenCV source code

Conda Environment

The container uses a conda environment called samclip. To activate it within the container:

conda activate robrobofarmer

Common Commands

Once inside the container, you can run the model scripts:

# Activate the environment
conda activate robofarmer

# Navigate to source directory
cd src/interaction_hotspots

How to train and evaluate models

In the interaction_hotspots directory, there are README files explaining how to train and evaluate models and to visualize heatmaps using trained models.

About

This repo contains the necessary code for running models used in combination with the robofarmer dataset.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages