Update README.md
Shahjhan Alam authored
59c2b01c
Name Last commit Last update
.idea Intial commit
demo 03062024
output 03062024
Dockerfile updated180524
README.md Update README.md

Concrete Crack Detection

Steps to Containerize the code on Docker:

  1. Assuming that you have Docker installed

  2. Create a local folder with all your files along with the Dockerfile, just like I have in this link Run the command after navigating to the working folder to create a docker image which copies all the contents from demo (inference.py, tfrecords, images, tf/fine_tuned_model) to a new folder 'model' (just in the image)

    docker build -t newimage

    This command builds a new docker image called 'newimage' of all the files in the folder. Our files are saved to the directory 'model' in this image. This building process will take some time because it has to do necessary installations.

  3. Open terminal in this folder and run

    docker run -ti newimage /bin/bash
  4. After this command is executed create a directory with the name 'output' (same name as in inference.py file) using mkdir output. Navigate to the model directory and execute the inference.py using

    python3 Inference.py
  5. After running the inference.py output images are generated and they are stored in the output folder that is created previously. The output images should be copied to the host from the container, open a new terminal and use the below command with paths file paths accordingly,

    docker cp {container_id}:output {path_in_host}

    Example:

    docker cp c78563b67gj8:output my_files/

    The images can be seen in the output folder in the {my_files} directory in the host machine.