Skip to content

gserifi/DeepSee

Repository files navigation

DeepSee: Monocular Depth Estimation

Aaron Zeller      Gent Serifi      Nicola Studer     

ETH Zurich, Switzerland

Computational Intelligence Lab • Kaggle Competition

Get Started

Create Virtual Environment

python3 -m venv .venv
source .venv/bin/activate

Install PyTorch and PyTorch Lightning

pip install torch torchvision lightning jsonargparse[signatures]

Install Remaining Dependencies

pip install -r requirements.txt

When adding dependencies, run the following command afterwards:

pip list --format=freeze > requirements.txt

Setup Pre-Commit hooks (Development only)

pre-commit install

This will run isort and black for import sorting and code formatting to ensure consistency. Note that if the check fails, the commit will be rejected. You can also run isort .; black . prior to committing to bring the code into the right shape.

Download Dataset

And put it inside ./data.

Train

python3 main.py fit -c configs/<config>.yaml

The configs folder contains various configurations of our model. To run our final best-performing model, use the configs/best_model.yaml file.

Note that this script will install Dinov2 checkpoints from HuggingFace. This may take a while when running the script for the first time.

Checkpoints and logs will be saved in the logs folder.

Monitor using TensorBoard:

tensorboard --logdir logs

Test

python3 main.py test -c configs/<config>.yaml --ckpt_path <path_to_checkpoint>

The checkpoint path has to point to a valid checkpoint file (has to have been trained with the same config YAML file) in the logs folder. The format looks like this: logs/<yyyy-mm-dd>/<hh-mm-ss>/checkpoints/<epoch>.ckpt

This script evaluates the model our own custom holdout test set and prints the respective metrics.

Inference

python3 main.py predict -c configs/<config>.yaml --ckpt_path <path_to_checkpoint>
python3 data/create_prediction_csv.py

These scripts will run the model on the Kaggle test set and create the CSV file.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors