Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 117 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
![ML4Sci x DeepLense](/Images_for_README/DEEPLENSE.png)

## 🚀 Quick Start

Follow these steps to set up the project quickly:

```bash
git clone https://github.com/ML4SCI/DeepLense.git
cd DeepLense

python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate

pip install -r requirements.txt

## 1. Background

We at DeepLense explore cutting-edge Machine Learning techniques for the study of Strong Gravitational Lensing and Dark Matter Sub-structure. We use both simulated and real lensing images, for a variety of tasks, using a variety of techniques.
Expand All @@ -26,6 +39,45 @@ In DeepLense, we’re mainly dealing with three kinds of simulated Dark Matter:

## 2. Datasets

## 2.1 Dataset Setup

To run the models in this repository, you need to download and
properly organize the datasets.

### 📥 Download

Datasets can be generated or downloaded from:
https://github.com/mwt5345/DeepLenseSim

(Refer to the repository for instructions specific to each dataset.)

### 📁 Directory Structure

After downloading, organize the dataset as follows:
DeepLense/
│── data/
│ ├── model_1/
│ ├── model_2/
│ ├── model_3/
│ └── model_4/
│── scripts/
│── models/
│── README.md

### ⚙️ Preprocessing

- Ensure images are in the expected format (e.g., `.npy`, `.png`)
- Normalize or preprocess data if required by specific scripts
- Check individual project folders for custom preprocessing steps

### ▶️ Running Training

Example:

```bash
python train.py --data_path ./data/model_1

All datasets are constructed using Lenstronomy, by Michael W. Toomey, as presented in their [repository](https://github.com/mwt5345/DeepLenseSim/tree/main/).

| Dataset | Lens model | Light Profile | Modelling strategy |
Expand All @@ -35,11 +87,76 @@ All datasets are constructed using Lenstronomy, by Michael W. Toomey, as present
|Model 3 dataset|Sheared Isothermal Elliptical lens | Sérsic light profile | HST's observation characteristics, Axion DM and CDM substructure appended to base halo to create 3 sub-structure classes
|Model 4 dataset|Two Isothermal Elliptical lenses | Three-channel **real galaxy** images | Euclid's observation characteristics, Axion DM and CDM substructure appended to base halo to create 3 sub-structure classes

---

## 📦 Dataset Setup

This project uses simulated gravitational lensing datasets generated using Lenstronomy.

### 1. Download / Generate Dataset

Datasets can be generated using the official simulation repository:

https://github.com/mwt5345/DeepLenseSim/tree/main/

Follow the instructions in that repository to generate datasets corresponding to:
- Model 1
- Model 2
- Model 3
- Model 4

*(If pre-generated datasets are available, they can be linked here in the future.)*

---

### 2. Directory Structure

After downloading or generating the dataset, organize it as follows:
DeepLense/
│── data/
│ └── dataset_name/
│ ├── train/
│ ├── test/
│ └── labels/

---

### 3. Configure Dataset Path

Ensure the dataset path is correctly set in the training scripts. For example:

```python
data_dir = "./data/dataset_name/"

## 3. Projects

This section contains various research and implementation projects developed under DeepLense, primarily through GSoC contributions. Each project focuses on different machine learning approaches applied to gravitational lensing datasets.

👉 Navigate to individual project folders for code, training scripts, and detailed instructions.


![Project compositions](/Images_for_README/DeepLense%20project%20composition.jpeg)
![Techniques compositions](/Images_for_README/DeepLense%20ML%20Techniques.jpeg)

---

### 🧭 How to Use These Projects

1. Choose a project from the table below
2. Navigate to its repository folder
3. Check for:
- `train.py` or `main.py`
- notebooks (`.ipynb`)
- specific README (if available)

4. Run the project using:

```bash
python train.py
```

⚠️ Note: Each project may have different dependencies and dataset requirements.

| Project Name | Contributor | Task | ML Techniques | Repository Link | Blog Post |
|---|---|---|---|---|---|
|[DeepLense Classification Using Vision Transformers](#311-deeplense-classification-using-vision-transformers)|Archil Srivastava|Sub-structure classification|Vision Transformer Variants|[Click Here](https://github.com/ML4SCI/DeepLense/tree/main/DeepLense_Classification_Transformers_Archil_Srivastava)|[Click Here](https://medium.com/@archilsrivastava/transformers-for-dark-matter-morphology-with-strong-gravitational-lensing-gsoc-2022-with-ml4sci-b34a03d30114)|
Expand Down