/image-segmentation

Parallized image segmentation using OpenMPI

Primary LanguageC++

image-segmentation

  • Ivan Buendia Gutierrez
  • Jhoel Salomon Tapara Quispe
  • Diego Espirilla Portocarrero

Image segmentation implemented using MPI, K-means algorithm in a network

Set up container

  1. Set up .env file:
NET_MODE=<main|worker>
NET_NAME=<name>
NET_PASS=<password>
USER_PASS=<user password>
  1. Create a images folder put your images in:

  2. Start container:

docker-compose up -d
  1. Create or join network:
docker exec -it worker sh -c "./init-vpn.sh"
  1. In main docker container, add worker node on main node:
# Main container
./add-node.sh -H <host> -HN <host-name> -P <port> -U <user>

Image segmentation:

Run mpirun:

# Main container
mpirun --allow-run-as-root -H <host>:N --mca btl_tcp_if_include ham0 mpi-img-seg <n_cluster> <path/to/img> <n_iter>

Using hostfile:

# Main container
mpirun --allow-run-as-root --hostfile ./hostfile --mca btl_tcp_if_include ham0 mpi-img-seg <n_cluster> <path/to/img> <n_iter>