Depth Estimation is a full-stack application designed to predict depth maps from input images using advanced machine learning models. It consists of a backend API built with FastAPI and a responsive frontend interface developed with modern web technologies. The project leverages Docker for containerization, ensuring consistent environments across development and production setups.
depth-estimation/
├── build_and_run.sh
├── clean_up.sh
├── docker-compose.yml
├── entrypoint.sh
├── notebooks
│ ├── 2024-11-16-depth-anything-launch-and-benchmark.ipynb
│ └── 2024-11-23-benchmark-depth-anything-models.ipynb
├── poetry.lock
├── pyproject.toml
├── README.md
├── setup.py
└── src
├── backend
│ ├── Dockerfile
│ ├── __init__.py
│ ├── main.py
│ └── models
├── depth_estimation
│ ├── depth_anything
│ ├── depth_dataset.py
│ ├── estimation_model.py
│ └── __init__.py
└── frontend
├── Dockerfile
├── nginx.conf
├── node_modules
├── package.json
├── package-lock.json
├── public
├── src
└── tsconfig.json
docker-compose.yml: Defines multi-container Docker applicationsbuild_and_run.sh: Bash script to build and run Docker containers for backend and frontendclean_up.sh: Bash script to stop and remove Docker containers and networksrc/backend/: Contains the backend FastAPI application and its Dockerfilesrc/frontend/: Contains the frontend web application and its Dockerfilenotebooks/: Jupyter notebooks for research and development.dockerignore: Specifies files and directories to exclude from Docker buildsBefore running the project, ensure you have the following installed on your system:
Navigate to your desired directory and clone the project repository:
git clone https://github.com/trybushenko/Depth-Estimation-App.git
cd Depth-Estimation-App
Execute the build_and_run.sh script to build and run both backend and frontend Docker containers:
./build_and_run.sh
docker build -f src/backend/Dockerfile -t depth_estimation:v1.0 .
docker build -f src/frontend/Dockerfile -t depth_estimation_frontend:v1.0 src/frontend/
docker network create app-network
docker run -d --name backend --network app-network -p 8000:8000 depth_estimation:v1.0
docker run -d --name frontend --network app-network -p 8080:80 depth_estimation_frontend:v1.0
Note: Ensure that the ports 8000 and 8080 are available on your host machine.
Once the Docker containers are up and running, you can interact with the application as follows:
Access Swagger UI:
Predict Depth Map:
/predict endpoint to upload an image and receive its depth mapA bash script to build and run Docker containers for both backend and frontend services.
Features:
Usage:
./build_and_run.sh
A bash script to stop and remove Docker containers and the Docker network associated with the project.
Features:
Usage:
./clean_up.sh
To ensure efficient Docker image sizes and build times, the project incorporates several optimizations:
Separates the build environment from the runtime environment, ensuring only necessary artifacts are included in the final image.
Located at the root of the project to exclude unnecessary files and directories from the Docker build context, reducing image size and build time.
# Exclude frontend-related files
src/frontend/
src/**/node_modules/
src/**/__pycache__/
# Exclude development and version control files
.git
.gitignore
.env
*.pyc
notebooks/
tmp/
Contributions are welcome! Please follow these steps:
Fork the Repository
Create a Feature Branch
git checkout -b feature/YourFeature
git commit -m "Add some feature"
git push origin feature/YourFeature
Please ensure your code adheres to the project's coding standards and includes appropriate documentation.
This project is licensed under the MIT License.
2 commits
Jupyter Notebook
94.3%
Python
3.9%
TypeScript
1.0%
Depth Estimation is a full-stack application designed to predict depth maps from input images using advanced machine learning models. It consists of a backend API built with FastAPI and a responsive frontend interface developed with modern web technologies. The project leverages Docker for containerization, ensuring consistent environments across development and production setups.
depth-estimation/
├── build_and_run.sh
├── clean_up.sh
├── docker-compose.yml
├── entrypoint.sh
├── notebooks
│ ├── 2024-11-16-depth-anything-launch-and-benchmark.ipynb
│ └── 2024-11-23-benchmark-depth-anything-models.ipynb
├── poetry.lock
├── pyproject.toml
├── README.md
├── setup.py
└── src
├── backend
│ ├── Dockerfile
│ ├── __init__.py
│ ├── main.py
│ └── models
├── depth_estimation
│ ├── depth_anything
│ ├── depth_dataset.py
│ ├── estimation_model.py
│ └── __init__.py
└── frontend
├── Dockerfile
├── nginx.conf
├── node_modules
├── package.json
├── package-lock.json
├── public
├── src
└── tsconfig.json
docker-compose.yml: Defines multi-container Docker applicationsbuild_and_run.sh: Bash script to build and run Docker containers for backend and frontendclean_up.sh: Bash script to stop and remove Docker containers and networksrc/backend/: Contains the backend FastAPI application and its Dockerfilesrc/frontend/: Contains the frontend web application and its Dockerfilenotebooks/: Jupyter notebooks for research and development.dockerignore: Specifies files and directories to exclude from Docker buildsBefore running the project, ensure you have the following installed on your system:
Navigate to your desired directory and clone the project repository:
git clone https://github.com/trybushenko/Depth-Estimation-App.git
cd Depth-Estimation-App
Execute the build_and_run.sh script to build and run both backend and frontend Docker containers:
./build_and_run.sh
docker build -f src/backend/Dockerfile -t depth_estimation:v1.0 .
docker build -f src/frontend/Dockerfile -t depth_estimation_frontend:v1.0 src/frontend/
docker network create app-network
docker run -d --name backend --network app-network -p 8000:8000 depth_estimation:v1.0
docker run -d --name frontend --network app-network -p 8080:80 depth_estimation_frontend:v1.0
Note: Ensure that the ports 8000 and 8080 are available on your host machine.
Once the Docker containers are up and running, you can interact with the application as follows:
Access Swagger UI:
Predict Depth Map:
/predict endpoint to upload an image and receive its depth mapA bash script to build and run Docker containers for both backend and frontend services.
Features:
Usage:
./build_and_run.sh
A bash script to stop and remove Docker containers and the Docker network associated with the project.
Features:
Usage:
./clean_up.sh
To ensure efficient Docker image sizes and build times, the project incorporates several optimizations:
Separates the build environment from the runtime environment, ensuring only necessary artifacts are included in the final image.
Located at the root of the project to exclude unnecessary files and directories from the Docker build context, reducing image size and build time.
# Exclude frontend-related files
src/frontend/
src/**/node_modules/
src/**/__pycache__/
# Exclude development and version control files
.git
.gitignore
.env
*.pyc
notebooks/
tmp/
Contributions are welcome! Please follow these steps:
Fork the Repository
Create a Feature Branch
git checkout -b feature/YourFeature
git commit -m "Add some feature"
git push origin feature/YourFeature
Please ensure your code adheres to the project's coding standards and includes appropriate documentation.
This project is licensed under the MIT License.
2 commits
Jupyter Notebook
94.3%
Python
3.9%
TypeScript
1.0%