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

Owner
grassking100
A researcher study in bioinformatics and deep learning. To see other repositories: https://bitbucket.org/grassking100/?sort=-updated_on&privacy=public.
grassking100
Contrastive Learning of Image Representations with Cross-Video Cycle-Consistency

Contrastive Learning of Image Representations with Cross-Video Cycle-Consistency This is a official implementation of the CycleContrast introduced in

13 Nov 14, 2022
mbrl-lib is a toolbox for facilitating development of Model-Based Reinforcement Learning algorithms.

mbrl-lib is a toolbox for facilitating development of Model-Based Reinforcement Learning algorithms. It provides easily interchangeable modeling and planning components, and a set of utility function

Facebook Research 724 Jan 04, 2023
Tensorflow 2.x implementation of Panoramic BlitzNet for object detection and semantic segmentation on indoor panoramic images.

Deep neural network for object detection and semantic segmentation on indoor panoramic images. The implementation is based on the papers:

Alejandro de Nova Guerrero 9 Nov 24, 2022
Survival analysis in Python

What is survival analysis and why should I learn it? Survival analysis was originally developed and applied heavily by the actuarial and medical commu

Cameron Davidson-Pilon 2k Jan 08, 2023
ICS 4u HD project, start before-wards. A curtain shooting game using python.

Touhou-Star-Salvation HDCH ICS 4u HD project, start before-wards. A curtain shooting game using python and pygame. By Jason Li For arts and gameplay,

15 Dec 22, 2022
Safe Control for Black-box Dynamical Systems via Neural Barrier Certificates

Safe Control for Black-box Dynamical Systems via Neural Barrier Certificates Installation Clone the repository: git clone https://github.com/Zengyi-Qi

Zengyi Qin 3 Oct 18, 2022
Like ThreeJS but for Python and based on wgpu

pygfx A render engine, inspired by ThreeJS, but for Python and targeting Vulkan/Metal/DX12 (via wgpu). Introduction This is a Python render engine bui

139 Jan 07, 2023
Bio-Computing Platform Featuring Large-Scale Representation Learning and Multi-Task Deep Learning “螺旋桨”生物计算工具集

English | 简体中文 Latest News 2021.10.25 Paper "Docking-based Virtual Screening with Multi-Task Learning" is accepted by BIBM 2021. 2021.07.29 PaddleHeli

633 Jan 04, 2023
Official repository for Automated Learning Rate Scheduler for Large-Batch Training (8th ICML Workshop on AutoML)

Automated Learning Rate Scheduler for Large-Batch Training The official repository for Automated Learning Rate Scheduler for Large-Batch Training (8th

Kakao Brain 35 Jan 04, 2023
PyTorch implementation of "VRT: A Video Restoration Transformer"

VRT: A Video Restoration Transformer Jingyun Liang, Jiezhang Cao, Yuchen Fan, Kai Zhang, Rakesh Ranjan, Yawei Li, Radu Timofte, Luc Van Gool Computer

Jingyun Liang 837 Jan 09, 2023
Code for the paper "Adversarial Generator-Encoder Networks"

This repository contains code for the paper "Adversarial Generator-Encoder Networks" (AAAI'18) by Dmitry Ulyanov, Andrea Vedaldi, Victor Lempitsky. Pr

Dmitry Ulyanov 279 Jun 26, 2022
LightNet++: Boosted Light-weighted Networks for Real-time Semantic Segmentation

LightNet++ !!!New Repo.!!! ⇒ EfficientNet.PyTorch: Concise, Modular, Human-friendly PyTorch implementation of EfficientNet with Pre-trained Weights !!

linksense 237 Jan 05, 2023
Code for HLA-Face: Joint High-Low Adaptation for Low Light Face Detection (CVPR21)

HLA-Face: Joint High-Low Adaptation for Low Light Face Detection The official PyTorch implementation for HLA-Face: Joint High-Low Adaptation for Low L

Wenjing Wang 77 Dec 08, 2022
This repository contains the code used in the paper "Prompt-Based Multi-Modal Image Segmentation".

Prompt-Based Multi-Modal Image Segmentation This repository contains the code used in the paper "Prompt-Based Multi-Modal Image Segmentation". The sys

Timo Lüddecke 305 Dec 30, 2022
Self-supervised Point Cloud Prediction Using 3D Spatio-temporal Convolutional Networks

Self-supervised Point Cloud Prediction Using 3D Spatio-temporal Convolutional Networks This is a Pytorch-Lightning implementation of the paper "Self-s

Photogrammetry & Robotics Bonn 111 Dec 06, 2022
PyTorch implementation for View-Guided Point Cloud Completion

PyTorch implementation for View-Guided Point Cloud Completion

22 Jan 04, 2023
The Curious Layperson: Fine-Grained Image Recognition without Expert Labels (BMVC 2021)

The Curious Layperson: Fine-Grained Image Recognition without Expert Labels Subhabrata Choudhury, Iro Laina, Christian Rupprecht, Andrea Vedaldi Code

Subhabrata Choudhury 18 Dec 27, 2022
[ICCV21] Official implementation of the "Social NCE: Contrastive Learning of Socially-aware Motion Representations" in PyTorch.

Social-NCE + CrowdNav Website | Paper | Video | Social NCE + Trajectron | Social NCE + STGCNN This is an official implementation for Social NCE: Contr

VITA lab at EPFL 125 Dec 23, 2022
This is the solution for 2nd rank in Kaggle competition: Feedback Prize - Evaluating Student Writing.

Feedback Prize - Evaluating Student Writing This is the solution for 2nd rank in Kaggle competition: Feedback Prize - Evaluating Student Writing. The

Udbhav Bamba 41 Dec 14, 2022
This is a collection of our NAS and Vision Transformer work.

This is a collection of our NAS and Vision Transformer work.

Microsoft 828 Dec 28, 2022