This is my repository for the A7 coursework. The code for this project is in the Jupyter Notebooks in the root directory of this repository.
- module1.ipynb contains the code for Module 1 of the coursework.
- module2.ipynb contains the code for Module 2 and Exercise 3.1.a of the coursework.
- module3.1.ipynb contains the code for Exercise 3.1.b of the coursework.
- ex3.2.ipynb contains the code for Exercise 3.2 of the coursework. Please note that you will need to edit the paths in this notebook to point to your own data (which are not included in this repository).
The report for this project is in pdf format and is located in the report directory.
You will need to download the denoiser to the root directory of this repository. We use a pre-trained deep denoiser (based on a U-net architecture, available at https://drive.google.com/file/d/1FFuauq-PUjY_kG3iiiHfDpHcG4Srl8mQ/view?usp=sharing)
Clone this GitLab repository to your local machine.
git clone https://gitlab.developers.cam.ac.uk/phy/data-intensive-science-mphil/assessments/a7_coursework/fm565.gitCreate a conda environment by running:
conda env create -f environment.ymlin the root directory of this repository.
This will create a new conda environment called A7Coursework. This will install the necessary packages for this project, listed in the requirements.txt file. This may take a while (~5-10 minutes).
Activate the environment by running:
conda activate A7CourseworkThis may automatically create a Jupyter Kernel for the new environment. If not, you can create a kernel manually e.g.
python -m ipykernel install --user --name A7Coursework --display-name "A7Coursework (Python 3.11)"You should now be able to run the notebooks in this repository.
To deactivate the conda environment, run conda deactivate.
Microsoft Copilot was used in the following cases:
- In module 1, when trying to fill in holes produced from the segmentation of the images, Copilot suggested to use the
binary_fill_holesfunction fromscipy.ndimage, which I then used in the code. - In module 1,2 when trying to display the images in a grid with only one index, Copilot suggested to use
ax.flat[idx]. I used this suggestion in the code. - In module 2, I have written many functions with docstrings. Some of these docstrings were initially generated by Copilot, which I then edited to fit the context of the function.
A declaration of the use of generative tools in writing the report is given in the report itself.