Repo for the Data Intensive MPhil 2024 Image Analysis coursework.
Please see report/main.pdf
for the full report.
Script outputs will be saved the ./outputs
directory.
Set up
git clone [email protected]:VishalJ99/image_analysis.git
cd image_analysis
conda env create -f environment.yml
conda activate vj279_image_analysis
docker build -t vj279_image_analysis .
All scripts are designed to be run from the command line, the following are docker commands, if running outside docker make sure to activate the conda environment ia_vj279
first.
All outputs are saved to the outputs directory.
Q1a - Lung CT segmentation
docker run -it -v $(pwd):/image_analysis vj279_image_analysis /bin/bash -c "source activate ia_vj279 && python src/q1a.py data/CT.png"
Q1b - Noisy Flower segmentation
docker run -it -v $(pwd):/image_analysis vj279_image_analysis /bin/bash -c "source activate ia_vj279 && python src/q1b.py data/noisy_flower.jpg"
Q1c - Coin segmentation
docker run -it -v $(pwd):/image_analysis vj279_image_analysis /bin/bash -c "source activate ia_vj279 && python src/q1c.py data/coins.png"
Q2a - Line Fitting
docker run -it -v $(pwd):/image_analysis vj279_image_analysis /bin/bash -c "source activate ia_vj279 && python src/q2a.py"
Q2b - Compressed Sensing Reconstruction
docker run -it -v $(pwd):/image_analysis vj279_image_analysis /bin/bash -c "source activate ia_vj279 && python src/q2b.py"
Q2c - Sparse Wavelet Reconstruction
docker run -it -v $(pwd):/image_analysis vj279_image_analysis /bin/bash -c "source activate ia_vj279 && python src/q2c.py data/river.jpg"
Q3a - Gradient Descent Convergence Rate
docker run -it -v $(pwd):/image_analysis vj279_image_analysis /bin/bash -c "source activate ia_vj279 && python src/q3a.py"
Q3b - Learned Gradient Descent Optimisation
docker run -it -v $(pwd):/image_analysis vj279_image_analysis /bin/bash -c "source activate ia_vj279 && python src/q3b.py 10"
Note, docker version can not use GPU, for GPU acceleration, run the notebook src/coursework_LGD_filled_vj.ipynb
on colab.
Please see license.md
Vishal Jain 2024-03-12