This repository contains a collection of computer vision experiments and a mini project focusing on different image processing and computer vision techniques.
- Edge Detection - Implementation of various edge detection techniques
- Difference of Gaussians (DoG) - Image enhancement using DoG
- Histogram of Oriented Gradients (HoG) - Feature extraction using HoG
- Harris Corner Detector - Corner detection in images
- SIFT - Scale-Invariant Feature Transform implementation
- ORB Descriptor - Oriented FAST and Rotated BRIEF features
- Kmeans - Image segmentation using Kmeans clustering
- Gabor Filter - Texture analysis using Gabor filters
- Gaussian Mixture Model - Probabilistic modeling
The mini project demonstrates how to generate 3D models from single images using Microsoft's MoGe (Monocular 3D Generation) model.
- PyTorch
- OpenCV
- Trimesh
- NumPy
- PIL
- MoGe model
- The code clones the Microsoft MoGe repository
- Installs all required dependencies
- Loads a pre-trained MoGe model from Hugging Face
- Processes an input image to generate 3D coordinates, depth maps, and normals
- Creates a textured 3D mesh using the extracted information
- Exports the 3D model in PLY format
# Load the model from huggingface hub
model = MoGeModel.from_pretrained("Ruicheng/moge-vitl").to(device).eval()
# Read the input image
input_image = cv2.cvtColor(cv2.imread("input.png"), cv2.COLOR_BGR2RGB)
# Convert image to tensor
input_image_tensor = torch.tensor(input_image / 255, dtype=torch.float32, device=device).permute(2, 0, 1)
# Infer 3D information
output = model.infer(input_image_tensor, resolution_level=9, apply_mask=True)
# Generate and export mesh
mesh.export('output_model.ply')Each experiment is contained within its own directory with a Jupyter notebook (.ipynb) file that includes detailed instructions, code implementation, and explanations.
To run the experiments:
- Open the corresponding notebook in Jupyter
- Execute cells sequentially
- Follow the instructions within each notebook
For the mini project, a GPU environment is recommended for faster processing.