Skip to content

Latest commit

 

History

History
171 lines (95 loc) · 5.81 KB

README.md

File metadata and controls

171 lines (95 loc) · 5.81 KB

100_days_of_computer_vision

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.

Covered Topics

  1. PyTorch3D:

    Please refer to this readme file for in-depth information on the implemented projects with PyTorch3D. The covered projects are:

    1. Rendering a textured mesh

      Texture

      Texture UV map

      Textured 3D Cow

    2. Rendering a dense pose

      Dense Pose Texture

      Dense Pose

    3. Deforming a base mesh and optimizing to get to the target mesh

      Source Point cloud

      Target Point Cloud

      Losses and metrics

      Deformed source point cloud

  2. From Scratch Projects:

    Please refer to this readme file for in-depth information on the implemented projects from scratch. The covered projects are:

    1. Image Formation Image Formation 3D Plot Image Formation 2D Plot

    2. ViT from scratch

      Making patches as tokens from an input image:

      Patches of an image

      Visualizing Positional Embedding:

      Positional Embedding

      Testing the predictions of classifier:

      Testing Classifier

    3. VAE From Scratch

      A sample from the final trained VAE (on Mnist):

      Number 6 Generated

      Generating 25 samples:

      25 Samples

      Visualizing the distribution of generation in the trained VAE:

      Distribution

    4. Spherical Harmonics From Scratch

      Vectors on the surface of a sphere:

      Vectors SH

      Legendre Polynomials:

      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
    5. Grid Encoding (like InstantNGP) From Scratch

      A sample 3D grid (sampled points):

      3D Grid

      A sample point $\bar{x}=(x, y, z)$ and it's nearest voxel:

      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.

    6. 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):

      Ground truth

      Predicted Image:

      Predicted Image

      Training Process (Gif):

      Training Process

    7. Tiny Renderer from Scratch

      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);

      Line Segment

      Rendering an obj model:

      void wireframe_obj(Model &model, TGAImage &image, TGAColor color);

      Obj wireframe

      Rasterizing a triangle (only contours):

      void triangle_contour(Vec2f t0, Vec2f t1, Vec2f t2, TGAImage &image,
                      TGAColor color);

      Triangle Contour

      Rasterizing a triangle (filled):

      void triangle(Vec2i t0, Vec2i t1, Vec2i t2, TGAImage &image, TGAColor color);

      Triangle Filled

    8. Semantic Segmentation of Carla dataset

      Implemented UNet from scratch and trained on CARLA autonomous driving dataset:

      Segmentation Results Segmentation Results Segmentation Results

      Also, implemented Attention UNet from scratch and trained on CARLA data:

      Attention UNet Attention UNet Attention UNet

    9. Diffusion model from scratch ...