Deep Learning for Computer Vision final project

Overview

Deep Learning for Computer Vision final project

Team: DLCV1

Member & Contribution:

  • 林彥廷 (R06943184): 主程式撰寫、模型訓練 (50%)
  • 王擎天 (R06945055): 副程式撰寫、模型訓練、海報設計 (50%)

Overview:

This project contains code to predict image's type from different domain using moment matching.

Description:

Folders:

  • script: folder contains scripts
  • src: folder contains source code
  • model: folder contains saved models which automatically download from network

Files:

  • script/get_dataset.sh: script which downloads training and testing dataset
  • script/download_from_gdrive.sh: script which downloads googledrive data
  • script/parse_data.sh: script which loads training dataset and converts to torch dataset
  • script/predict.sh: script which predicts images
  • script/evaluate.sh: script which evaluates the model
  • script/predict_for_verify.sh script which generates mini-batch average validation accuracy and loss plot
  • src/models/classifier.py: classifier model
  • src/models/loss.py: loss function
  • src/models/pretrained.py: pretrained model
  • src/models/model.py: Model and function for prediction and evaluation
  • src/parse_data.py: load data in folder and convert them to torch dataset
  • src/predict.py: prediction main function
  • src/evaluate.py: evaluation main function
  • src/train.py: training function
  • src/utils.py: code for parsing and saving
  • src/util/dataset.py: customized dataloader
  • src/util/visual.py: code for visualization
  • src/create_path_csv.py:main function to create image path csv file for image folder

Dataset:

Download training and testing dataset to folder named "dataset_public":

bash ./script/get_dataset.sh

WARNING:

You MUST use src/create_path_csv.py to create image-path csv file for image folder which hasn't contain image-path csv file, the usage will teach you how to use it!!!

Usage:

Create image-path csv file for image folder:

User can use this script to create image-path csv file

python3 src/create_path_csv.py $1
  • $1 is the folder containing the images

Example: (path: /home/final-dlcv1)

python3 src/create_path_csv.py dataset_public/test

The result will look like following text: image_name,label test/018764.jpg,-1 test/034458.jpg,-1 test/050001.jpg,-1 test/027193.jpg,-1 test/002637.jpg,-1 test/017265.jpg,-1 test/048396.jpg,-1 test/013178.jpg,-1 test/036777.jpg,-1 ......

Predict labels of images:

User can use this script to predict labels of images

bash ./script/predict.sh $1 $2 $3 $4 $5
  • $1 is the domain of images (Option: infograph, quickdraw, real, sketch)
  • $2 is the folder containing the images
  • $3 is the csv file contains image paths
  • $4 is the folder to saved the result file
  • $5 is the batch size

Example 1: Predict images from real domain (path: /home/final-dlcv1)

bash script/predict.sh real dataset_public dataset_public/test/image_path.csv predict 256

Example 2: Predict images from sketch domain (path: /home/final-dlcv1)

bash script/predict.sh sketch dataset_public dataset_public/sketch/sketch_test.csv predict 256

Example 3: Predict images from infograph domain (path: /home/final-dlcv1)

bash script/predict.sh infograph dataset_public dataset_public/infograph/infograph_test.csv predict 256

Example 4: Predict images from quickdraw domain (path: /home/final-dlcv1)

bash script/predict.sh quickdraw dataset_public dataset_public/quickdraw/quickdraw_test.csv predict 256

Evaluate the result file:

User can use this script to evaluate the reuslt file with answer file, it will print result on the screen

bash ./script/evaluate.sh $1 $2
  • $1 is the predicted file csv
  • $2 is the answer file csv

Example (path:/home/final-dlcv1)

bash ./script/evaluate.sh predict/real_predict.csv test/test_answer.csv

Reference

You might also like...
LeafSnap replicated using deep neural networks to test accuracy compared to traditional computer vision methods.

Deep-Leafsnap Convolutional Neural Networks have become largely popular in image tasks such as image classification recently largely due to to Krizhev

Computer vision - fun segmentation experience using classic and deep tools :)
Computer vision - fun segmentation experience using classic and deep tools :)

Computer_Vision_Segmentation_Fun Segmentation of Images and Video. Tools: pytorch Models: Classic model - GrabCut Deep model - Deeplabv3_resnet101 Flo

Final project for Intro to CS class.

Financial Analysis Web App https://share.streamlit.io/mayurk1/fin-web-app-final-project/webApp.py 1. Project Description This project is a technical a

NAVER BoostCamp Final Project

CV 14조 final project Super Resolution and Deblur module Inference code & Pretrained weight Repo SwinIR Deblur 실행 방법 streamlit run WebServer/Server_SRD

Final project code: Implementing MAE with downscaled encoders and datasets, for ESE546 FA21 at University of Pennsylvania

546 Final Project: Masked Autoencoder Haoran Tang, Qirui Wu 1. Training To train the network, please run mae_pretraining.py. Please modify folder path

Final project code: Implementing BicycleGAN, for CIS680 FA21 at University of Pennsylvania

680 Final Project: BicycleGAN Haoran Tang Instructions 1. Training To train the network, please run train.py. Change hyper-parameters and folder paths

Final Project for the CS238: Decision Making Under Uncertainty course at Stanford University in Autumn '21.

Final Project for the CS238: Decision Making Under Uncertainty course at Stanford University in Autumn '21. We optimized wind turbine placement in a wind farm, subject to wake effects, using Q-learning.

Implementation of the final project of the course DDA6309 Probabilistic Graphical Model

Task-aware Joint CWS and POS (TCwsPos) This is the implementation of the final project of the course DDA6309 Probabilistic Graphical Models, The Chine

Cmsc11 arcade - Final Project for CMSC11

cmsc11_arcade Final Project for CMSC11 Developers: Limson, Mark Vincent Peñafiel

Owner
grassking100
A researcher study in bioinformatics and deep learning. To see other repositories: https://bitbucket.org/grassking100/?sort=-updated_on&privacy=public.
grassking100
It's final year project of Diploma Engineering. This project is based on Computer Vision.

Face-Recognition-Based-Attendance-System It's final year project of Diploma Engineering. This project is based on Computer Vision. Brief idea about ou

Neel 10 Nov 2, 2022
PyTorchCV: A PyTorch-Based Framework for Deep Learning in Computer Vision.

PyTorchCV: A PyTorch-Based Framework for Deep Learning in Computer Vision @misc{CV2018, author = {Donny You ([email protected])}, howpubl

Donny You 40 Sep 14, 2022
A PyTorch-Based Framework for Deep Learning in Computer Vision

TorchCV: A PyTorch-Based Framework for Deep Learning in Computer Vision @misc{you2019torchcv, author = {Ansheng You and Xiangtai Li and Zhen Zhu a

Donny You 2.2k Jan 9, 2023
TorchOk - The toolkit for fast Deep Learning experiments in Computer Vision

TorchOk - The toolkit for fast Deep Learning experiments in Computer Vision

null 52 Dec 23, 2022
Monk is a low code Deep Learning tool and a unified wrapper for Computer Vision.

Monk - A computer vision toolkit for everyone Why use Monk Issue: Want to begin learning computer vision Solution: Start with Monk's hands-on study ro

Tessellate Imaging 507 Dec 4, 2022
Final term project for Bayesian Machine Learning Lecture (XAI-623)

Mixquality_AL Final Term Project For Bayesian Machine Learning Lecture (XAI-623) Youtube Link The presentation is given in YoutubeLink Problem Formula

JeongEun Park 3 Jan 18, 2022
Final project for machine learning (CSC 590). Detection of hepatitis C and progression through blood samples.

Hepatitis C Blood Based Detection Final project for machine learning (CSC 590). Dataset from Kaggle. Using data from previous hepatitis C blood panels

Jennefer Maldonado 1 Dec 28, 2021
This project demonstrates the use of neural networks and computer vision to create a classifier that interprets the Brazilian Sign Language.

LIBRAS-Image-Classifier This project demonstrates the use of neural networks and computer vision to create a classifier that interprets the Brazilian

Aryclenio Xavier Barros 26 Oct 14, 2022
Rohit Ingole 2 Mar 24, 2022
QTool: A Low-bit Quantization Toolbox for Deep Neural Networks in Computer Vision

This project provides abundant choices of quantization strategies (such as the quantization algorithms, training schedules and empirical tricks) for quantizing the deep neural networks into low-bit counterparts.

Monash Green AI Lab 51 Dec 10, 2022