As given in Image the dataset contains images of three class "no" ,"spherical", "vortex" substructures having 10000 training image and 2500 testing images for each class . I introduced data Augumantation technique which decreased models training accuracy overall predicting accuracy of moel is increased. It made the dataset more tough .
We applied the following transformations to preprocess the dataset:
Resize: Scales images to 150×150 pixels.
Random Horizontal Flip: Randomly flips images horizontally with a probability of 50%.
Random Vertical Flip: Randomly flips images vertically with a probability of 50%.
Random Rotation: Rotates images randomly up to ±20 degrees.
Normalize: Normalizes pixel values to have a mean of 0.5 and a standard deviation of 0.5.
On this dataset after 50 epochs the model performed very well with atraing accuracy of 95.01 % and traing accuracy of 94.80 % .
Traing Result
Testing Result
I used three Architectures ResNet-18,EfficientNetB0,DensNet and trained each for 50 epochs on the dataset.
| Model | Accuracy | No of Parameters | Computation time | ROC AUC score | Colab Notbook |
|---|---|---|---|---|---|
| EfficientNetB0 | 94.80% | 4010815 | ~100min | 0.9895 | Link |
| ResNet18 | 90.73% | 11171779 | ~75min | 0.9779 | Link |
| DenseNet | ~91.88% | 930835 | ~150min | 0.9806 | Link |
Approach-1
Approach-2
| Model | Accuracy | No of Parameters | Computation time | ROC AUC score | Colab Notbook | Weights |
|---|---|---|---|---|---|---|
| Approach - 1 | 94.55% | 36840447 | ~180min | 0.9891 | Link | Link |
| Approach - 2 | 93.19% | 9876655 | ~130min | 0.9849 | Link | Link |
I used two EfficientNet networks—one as an encoder and another as a classifier.
Encoder
- Architecture :- It is EfficeintNetB0 architecture.
- Input :- It takes single channel(gray-scale) image of lens image.
- Output :- It produces Potential value for each coordinate.
Classifier
- Architecture :- It is EfficeintNetB0 architecture.
- Input :- It takes 2 channel(both lense and source image) image.
- Output :- It produces probability of class
Physics used
To Reconstruct the Source image, we use the equation for gravitational lensing, in its dimensionless form, that is given by the following relation:
The distortions caused by dark matter are localized and can be ignored in most of the formed image. Therefore, we will approximate:
from encoder we got
In this approach, I used image preprocessing and a converter to transform the lens image into the source image using deflection and gradient terms (referenced from last year's DeepLense repository).
Preprocess
Converter
I used encoder-decoder architecture.
Encoder
- Architecture:- ResNet
- Input:- It takes single channel(gray-scale) image of lens image.
- Output :- It produces Potential value for each coordinate.
Decoder
- Architecture:- EfficientB0
- Input:- It takes 3 channel image (source image,Lens image,preprocessed image) .
- Output:- It produces probabilities of 3 classes .


