Skip to content

Implementation of Farm Surveillance Problem introduced in Optimizing Camera Placement for Chicken Farm Monitoring

Notifications You must be signed in to change notification settings

CYENS/FarmCameraPlacementOptimizer

Repository files navigation

Optimizing Camera Placement for Chicken Farm Monitoring

Prerequisites

  • Python >= 3.12.4

Installing dependencies

For a CPU

pip install -r requirements.txt

For a GPU

pip install -r requirements-gpu.txt

Running the experiments

Performing all the experiments

python run_experiments.py all

Performing individual experiments

CMA-ES experiments

python run_experiments.py cma-es [OPTIONS]
Extra Options
  • -e or --experiment The number of the experiment to be performed. Available experiments: [0 - 29].
  • -g or --generations The total generations to execute the algorithm for. The population of each generation will be adjusted accordingly. Available generations: 16667, 1000, 2000.

If the option -g is given, all the experiments will be performed for that generation. If -e is given, the experiment will be performed for all generations. If both are given, only that specific experiment on the given generation will be performed.

Examples
  • All experiments for 1000 generations.
python run_experiments.py cma-es -g 1000
  • The 2nd experiment will be performed for all generations
python run_experiments.py cma-es -e 2
  • The 21st experiment will be performed for 16667 generations. One experiment will be performed.
python run_experiments.py cma-es -g 16667 -e 21

Quality Diversity experiments

python run_experiments.py qd ALGORITHM BEHAVIOUR_DESCRIPTOR [OPTIONS]
  • Available options for ALGORITHM:
    • isolinedd
    • cma-me
  • Available options for BEHAVIOUR_DESCRIPTOR:
    • used-beams
    • spread-xy
Extra Options
  • -e or --experiment The number of the experiment to be performed. Available experiments: [0 - 29].
  • -g or --grid_size The grid size of the behaviour space. Available size: 1000, 10000. It can only be used with spread-xy.

If -e is given, the experiment will be performed for all grid sizes. If the option -g is given, all the experiments will be performed for that grid size. If both are given, only that specific experiment on the given generation will be performed.

Examples
  • All experiments using CMA-ME, spread-xy, and 1000 grid size.
python run_experiments.py qd cma-me spread-xy -g 1000
  • The 28th experiment using IsoLineDD, spread-xy, and 10000 grid size.
python run_experiments.py qd isolinedd spread-xy -e 28 -g 10000
  • The 14th experiment using CMA-ME, and used-beams.
python run_experiments.py qd cma-me used-beams -e 14

Plotting results

  • To only display the final solutions (the state of the algorithms after their final generation).
python plot.py solutions PATHS... [OPTIONS]
  • To display the performance of the experiments over time.
python plot.py overtime PATHS... [OPTIONS]
  • To create a CCDF (Complementary cumulative distribution function) of the experiments.
python plot.py ccdf PATHS... [OPTIONS]

Note: for over time experiments, CMA-ES experiments cannot be combined with QD experiments, and vice-versa.

Extra Options

  • -f or --filename Optional filename for the plot.

About

Implementation of Farm Surveillance Problem introduced in Optimizing Camera Placement for Chicken Farm Monitoring

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages