From e17e13efc87f1e19afb324182180a357e0ec0460 Mon Sep 17 00:00:00 2001 From: aparnah Date: Mon, 8 Jul 2024 12:36:47 +0530 Subject: [PATCH] update readme file --- Dockerfile | 10 ++++++++++ README.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 Dockerfile create mode 100644 README.md diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..aeed8db --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM python:3.10-slim + +WORKDIR /app + +COPY . /app + +RUN pip install --no-cache-dir -r requirements.txt +RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y + +ENTRYPOINT ["./entrypoint.sh"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..8404248 --- /dev/null +++ b/README.md @@ -0,0 +1,46 @@ +# Body Measurement Using Computer Vision + +This project utilizes computer vision techniques to estimate body measurements from front and side images of a person. It uses OpenCV and Mediapipe for landmark detection. + +## Setup + +### Requirements + +- Docker +- Mediapipe + +### Install Docker + +Follow the instructions on the [official Docker website](https://docs.docker.com/get-docker/) to install Docker on your system. + +## How to Run the Code + +### Using Docker + +1. **Build the Docker image:** + + ```sh + docker build -t . + ``` + +2. **Run the Docker container:** + + ```sh + docker run -it --front --side --person_height --yaml_file ``` + +### Command Line Arguments + +- `--front`: Path to the front image. +- `--side`: Path to the side image. +- `--pose_detection_confidence`: (Optional) Confidence score for pose detection (default: 0.5). +- `--pose_tracking_confidence`: (Optional) Confidence score for pose tracking (default: 0.5). +- `--person_height`: Height of the person in centimeters. +- `--pixel_height`: (Optional) Pixel height of the person. +- `--measurement`: (Optional) Type of measurement. +- `--yaml_file`: Path to the YAML file containing landmarks. + +### Example Command + +```sh +docker run -it landmarks --front ./assets/aparna_front.jpg --side ./assets/aparna_side.jpg --person_height 157 --yaml_file config.yml +```