This repository contains the codes for 100 days of computer vision challenge. I pursue this challenge with a focus on concepts of 3D & 2D Computer vision (and thus, some concepts in computer graphics). The challenge is inspired by the 100 Days of Code challenge.
-
PyTorch3D:
Please refer to this readme file for in-depth information on the implemented projects with PyTorch3D. The covered projects are:
-
From Scratch Projects:
Please refer to this readme file for in-depth information on the implemented projects from scratch. The covered projects are:
-
Making patches as tokens from an input image:
Visualizing Positional Embedding:
Testing the predictions of classifier:
-
A sample from the final trained VAE (on Mnist):
Generating 25 samples:
Visualizing the distribution of generation in the trained VAE:
-
Spherical Harmonics From Scratch
Vectors on the surface of a sphere:
Legendre Polynomials:
Spherical Harmonics with
$l=1$ and$m=-1$ :SH_1.mp4
Spherical Harmonics with
$l=1$ and$m=0$ :SH_2.mp4
Spherical Harmonics with
$l=1$ and$m=1$ :SH_3.mp4
-
Grid Encoding (like InstantNGP) From Scratch
A sample 3D grid (sampled points):
A sample point
$\bar{x}=(x, y, z)$ and it's nearest voxel:Then the point's encoding is calculated as the Linear interpolation of the 8 nearest voxels. For the training process, please refer to the notebook.
-
RGB Prediction Using Spherical Harmonics
The RGB prediction using Spherical Harmonics. SH Order is
$3$ and the features are simple$(x,y)$ coordinates of the RGB image.Target Image (Ground Truth):
Predicted Image:
Training Process (Gif):
-
This is a C++ implementation of a tiny renderer. I made it to play around with the concepts of comuter graphics and the most important focus here is rasterization. I took the guidances of the tinyrenderer repository.
Rendering simple line segments (without anti-aliasing):
void line(int x0, int y0, int x1, int y1, TGAImage &image, TGAColor color);
Rendering an
obj
model:void wireframe_obj(Model &model, TGAImage &image, TGAColor color);
Rasterizing a triangle (only contours):
void triangle_contour(Vec2f t0, Vec2f t1, Vec2f t2, TGAImage &image, TGAColor color);
Rasterizing a triangle (filled):
void triangle(Vec2i t0, Vec2i t1, Vec2i t2, TGAImage &image, TGAColor color);
-
Semantic Segmentation of Carla dataset
Implemented UNet from scratch and trained on CARLA autonomous driving dataset:
Also, implemented Attention UNet from scratch and trained on CARLA data: