Skip to content

Instantly share code, notes, and snippets.

View prakashjayy's full-sized avatar
🏠
Working from home

prakashjay prakashjayy

🏠
Working from home
View GitHub Profile
@prakashjayy
prakashjayy / gans.md
Last active September 16, 2024 06:55
GAN papers list

These are the list of papers concepts you should learn to become a PRO in GAN Research. We will see one as a step by step improvment in generation quality, stabilized training etc.

  1. The first paper on GAN by IAN GoodFellow and team. There are many blogs on how a GAN works based on this paper. A simple search on google should give u many results. Asking an LLM is far more better.
  2. GANs more susceptible to mode-collapse, vanishing gradients, so people moved away from simple BCE loss to Earth mover distance and some kind of regalurization to avoid these. Read WGAN and WGAN-GP papers to understand this again.
  3. Next up is ProGAN. this is the first paper to my knowledge which basically made GANs possible to generate high resolution images. though progressive training is out of fashion, I still consider one should read about this [https://arxiv.org/pdf/1710.10196v3]. Their another key contribution is
@prakashjayy
prakashjayy / satellite_tiles.py
Created June 15, 2021 05:15
Generating tiles on satellite and its mask respectively.
def get_tile_name_path(dst_dir, index, city=city, code=code):
'''
generating specific tile name
'''
dst_tile_name = "{}_{}_{}.tif".format(city, code, str(index).zfill(5))
dst_tile_path = os.path.join(dst_dir, dst_tile_name)
return dst_tile_name, dst_tile_path
def get_tile_transform(parent_transform, pixel_x,pixel_y):
'''
@prakashjayy
prakashjayy / satellite.py
Created June 15, 2021 05:01
patch read_generic to Feature collection fuction in aeronetlib.
@patch_to(ds.FeatureCollection, cls_method=True)
def read_generic(cls,
fp: str,
dst_crs: Union[str, rasterio.crs.CRS]=None,
):
'''
geojson reader and can also be used to ensure the geojson in mapped to a destined crs
'''
with open(fp, 'r', encoding='utf-8') as f:
collection = json.load(f)
@prakashjayy
prakashjayy / fastscript.py
Last active November 5, 2020 03:37
fastscript usage
# Fastscript usage under various instancees
# https://github.com/fastai/fastscript/blob/master/00_core.ipynb
# https://fastcore.fast.ai/script.html
from fastcore.all import *
@call_parse
def test_script(p: Param(help="any basic string", type=str)):
print(len(p))
@prakashjayy
prakashjayy / inception_v3_pytorch.py
Last active March 2, 2019 13:37
Transfer learning using pytorch
import torch
import torch.nn as nn
import torch.optim as optim
from torch.optim import lr_scheduler
import numpy as np
import time
import os
import argparse
## Load the model
@prakashjayy
prakashjayy / Dockerfile
Last active July 31, 2017 13:36
A simple Dockerfile for running Deep Learning models using Volumes
# This is the docker image available. I am using cpu version here. If needed there is gpu version available.
FROM bvlc/caffe:cpu
# Copy the file into docker
COPY requirements.txt requirements.txt
# Run the copied file
RUN pip install -r requirements.txt
# create a folder called model1 and copy all the files in the folder into that folder
\begin{equation*}
\left[ \begin{array}{cccc}
i_{1} & i_{2} & i_{3} \\\end{array} \right] \times \left[ \begin{array}{cccc}
W_{i1j1} & W_{i1j2} & W_{i1j3} \\
W_{i2j1} & W_{i2j2} & W_{i2j3} \\
W_{i3j1} & W_{i3j2} & W_{i3j3} \\ \end{array} \right] = \left[ \begin{array}{cccc}
h_{1in} & h_{2in} & h_{3in} \\\end{array} \right]
\end{equation*}
@prakashjayy
prakashjayy / Tranfer_Learning_Keras_02.py
Last active September 17, 2019 17:10
Transfer Learning using Keras
from keras import applications
from keras.preprocessing.image import ImageDataGenerator
from keras import optimizers
from keras.models import Sequential, Model
from keras.layers import Dropout, Flatten, Dense, GlobalAveragePooling2D
from keras import backend as k
from keras.callbacks import ModelCheckpoint, LearningRateScheduler, TensorBoard, EarlyStopping
img_width, img_height = 256, 256
@prakashjayy
prakashjayy / Transfer_Learning_Keras_01.py
Last active June 21, 2019 19:23
Transfer Learning using Keras
from keras import applications
from keras.preprocessing.image import ImageDataGenerator
from keras import optimizers
from keras.models import Sequential, Model
from keras.layers import Dropout, Flatten, Dense, GlobalAveragePooling2D
from keras import backend as k
from keras.callbacks import ModelCheckpoint, LearningRateScheduler, TensorBoard, EarlyStopping
img_width, img_height = 256, 256
train_data_dir = "data/train"