Effect of Deep Transfer and Multi task Learning on Sperm Abnormality Detection

Overview

Effect of Deep Transfer and Multi task Learning on Sperm Abnormality Detection

License: GPL v3

Introduction

This repository includes codes and models of "Effect of Deep Transfer and Multi task Learning on Sperm Abnormality Detection" paper. link: https://doi.org/10.1016/j.compbiomed.2020.104121

Dataset

First you should download the MHSMA dataset using:

git clone https://github.com/soroushj/mhsma-dataset.git

Usage

First of all,the configuration file should be setted.So open dmtl.txt or dtl.txt and set the setting you want.This files contains paramaters of the model that you are going to train.

  • dtl.txt have only one line and contains paramaters to train a DTL model.

  • dmtl.txt contains two lines:paramaters of stage 1 are kept in the first line of the file and paramaters of stage 2 are kept in the second line of the file.
    Some paramaters have an aray of three values that they keep the value of three labels.To set them,consider this sequence:[Acrosome,Vacoule,Head].

  • To train a DTL model,use the following commands and arguments:

python train.py -t dtl [-e epchos] [-label label]  [-model model] [-w file] 

Argumetns:

Argument Description
-t type of network(dtl or dmtl)
-e number of epochs
-label label(a,v or h)
-model pre-trained model
-w name of best weihgt file
--phase You can use it to choose stage in DMTL(1 or 2)
--second_model The base model for second stage of DMTL

1.Train

  • To choose a pre-trained model, you can use one of the following models:
model argument Description
vgg_19 VGG 19
vgg_16 VGG 16
resnet_50 Resnet 50
resnet_101 Resnet 101
resnet_502 Resnet 502
  • To train a DMTL model,use the following commands and arguments:
python train.py -t dmtl [--phase phase] [-e epchos] [-label label] [-model model] [-w file]

Also you can use your own pre-trained model by using address of your model instead of the paramaters been told in the table above.

Example:
python train.py -t dmtl --phase 1 -e 100 -label a -model C:\model.h5 -w w.h5

2.K Fold

  • To perform K Fold on a model,use "-k_fold True" argument.
python train.py -k_fold True [-t type] [-e epchos] [-label label] [-model model] [-w file]

3.Threshold Search

  • To find a good threshold for your model,use the following code:
python threshold.py [-t type] [-addr model address] [-l label]

Models

The CNN models that were introduced and evaluated in our research paper can be found in the v1.0 release of this repository.

You might also like...
Face Detection and Alignment using Multi-task Cascaded Convolutional Networks (MTCNN)
Face Detection and Alignment using Multi-task Cascaded Convolutional Networks (MTCNN)

Face-Detection-with-MTCNN Face detection is a computer vision problem that involves finding faces in photos. It is a trivial problem for humans to sol

Multi-task yolov5 with detection and segmentation based on yolov5
Multi-task yolov5 with detection and segmentation based on yolov5

YOLOv5DS Multi-task yolov5 with detection and segmentation based on yolov5(branch v6.0) decoupled head anchor free segmentation head README中文 Ablation

Code for the ICML 2021 paper
Code for the ICML 2021 paper "Bridging Multi-Task Learning and Meta-Learning: Towards Efficient Training and Effective Adaptation", Haoxiang Wang, Han Zhao, Bo Li.

Bridging Multi-Task Learning and Meta-Learning Code for the ICML 2021 paper "Bridging Multi-Task Learning and Meta-Learning: Towards Efficient Trainin

A novel Engagement Detection with Multi-Task Training (ED-MTT) system
A novel Engagement Detection with Multi-Task Training (ED-MTT) system

A novel Engagement Detection with Multi-Task Training (ED-MTT) system which minimizes MSE and triplet loss together to determine the engagement level of students in an e-learning environment.

Self-training for Few-shot Transfer Across Extreme Task Differences

Self-training for Few-shot Transfer Across Extreme Task Differences (STARTUP) Introduction This repo contains the official implementation of the follo

Effect of Different Encodings and Distance Functions on Quantum Instance-based Classifiers

Effect of Different Encodings and Distance Functions on Quantum Instance-based Classifiers The repository contains the code to reproduce the experimen

Efficient neural networks for analog audio effect modeling

micro-TCN Efficient neural networks for audio effect modeling

[CVPR 2021] Counterfactual VQA: A Cause-Effect Look at Language Bias
[CVPR 2021] Counterfactual VQA: A Cause-Effect Look at Language Bias

Counterfactual VQA (CF-VQA) This repository is the Pytorch implementation of our paper "Counterfactual VQA: A Cause-Effect Look at Language Bias" in C

Algebraic effect handlers in Python

PyEffect: Algebraic effects in Python What IDK. Usage effects.handle(operation, handlers=None) effects.set_handler(effect, handler) Supported effects

Comments
  • a possible typo(bug)

    a possible typo(bug)

    Very interesting idea and complements!

    In LoadData.py, starting from line 150, ` if phase == 'search':

        return {
                "x_train": x_train_128,
                "y_train": y_train,
                "x_train_128": x_train_128,
                'x_val_128': x_valid_128,
                "x_val": x_valid_128,
                "y_val": y_valid,
                "x_test": x_test_128,
                "y_test": y_test
                }`
    

    here, I think that the first key-value pair should probably be "x_train": x_train instead of "x_train": x_train_128, which causes an error of shape mismatch during fit.

    opened by captainst 0
Releases(v1.0)
Owner
Amir Abbasi
Student at University of Guilan (Computer Engineering), Working on Computer Vision & Reinforcement Learning
Amir Abbasi
A script written in Python that returns a consensus string and profile matrix of a given DNA string(s) in FASTA format.

A script written in Python that returns a consensus string and profile matrix of a given DNA string(s) in FASTA format.

Zain 1 Feb 01, 2022
3D Avatar Lip Syncronization from speech (JALI based face-rigging)

visemenet-inference Inference Demo of "VisemeNet-tensorflow" VisemeNet is an audio-driven animator centric speech animation driving a JALI or standard

Junhwan Jang 17 Dec 20, 2022
Implementation of gaze tracking and demo

Predicting Customer Demand by Using Gaze Detecting and Object Tracking This project is the integration of gaze detecting and object tracking. Predict

2 Oct 20, 2022
Accelerated Multi-Modal MR Imaging with Transformers

Accelerated Multi-Modal MR Imaging with Transformers Dependencies numpy==1.18.5 scikit_image==0.16.2 torchvision==0.8.1 torch==1.7.0 runstats==1.8.0 p

54 Dec 16, 2022
The Medical Detection Toolkit contains 2D + 3D implementations of prevalent object detectors such as Mask R-CNN, Retina Net, Retina U-Net, as well as a training and inference framework focused on dealing with medical images.

The Medical Detection Toolkit contains 2D + 3D implementations of prevalent object detectors such as Mask R-CNN, Retina Net, Retina U-Net, as well as a training and inference framework focused on dea

MIC-DKFZ 1.2k Jan 04, 2023
Sample code from the Neural Networks from Scratch book.

Neural Networks from Scratch (NNFS) book code Code from the NNFS book (https://nnfs.io) separated by chapter.

Harrison 172 Dec 31, 2022
[ICCV' 21] "Unsupervised Point Cloud Pre-training via Occlusion Completion"

OcCo: Unsupervised Point Cloud Pre-training via Occlusion Completion This repository is the official implementation of paper: "Unsupervised Point Clou

Hanchen 204 Dec 24, 2022
Aligning Latent and Image Spaces to Connect the Unconnectable

About This repo contains the official implementation of the Aligning Latent and Image Spaces to Connect the Unconnectable paper. It is a GAN model whi

Ivan Skorokhodov 203 Jan 03, 2023
Unofficial Tensorflow Implementation of ConvNeXt from A ConvNet for the 2020s

Tensorflow Implementation of "A ConvNet for the 2020s" This is the unofficial Tensorflow Implementation of ConvNeXt from "A ConvNet for the 2020s" pap

DK 11 Oct 12, 2022
SPEAR: Semi suPErvised dAta progRamming

Semi-Supervised Data Programming for Data Efficient Machine Learning SPEAR is a library for data programming with semi-supervision. The package implem

decile-team 91 Dec 06, 2022
This YoloV5 based model is fit to detect people and different types of land vehicles, and displaying their density on a fitted map, according to their coordinates and detected labels.

This YoloV5 based model is fit to detect people and different types of land vehicles, and displaying their density on a fitted map, according to their

Liron Bdolah 8 May 22, 2022
Image-to-image regression with uncertainty quantification in PyTorch

Image-to-image regression with uncertainty quantification in PyTorch. Take any dataset and train a model to regress images to images with rigorous, distribution-free uncertainty quantification.

Anastasios Angelopoulos 25 Dec 26, 2022
Official Repository for the paper "Improving Baselines in the Wild".

iWildCam and FMoW baselines (WILDS) This repository was originally forked from the official repository of WILDS datasets (commit 7e103ed) For general

Kazuki Irie 3 Nov 24, 2022
Efficient Deep Learning Systems course

Efficient Deep Learning Systems This repository contains materials for the Efficient Deep Learning Systems course taught at the Faculty of Computer Sc

Max Ryabinin 173 Dec 29, 2022
Type4Py: Deep Similarity Learning-Based Type Inference for Python

Type4Py: Deep Similarity Learning-Based Type Inference for Python This repository contains the implementation of Type4Py and instructions for re-produ

Software Analytics Lab 45 Dec 15, 2022
Bayesian Optimization using GPflow

Note: This package is for use with GPFlow 1. For Bayesian optimization using GPFlow 2 please see Trieste, a joint effort with Secondmind. GPflowOpt GP

GPflow 257 Dec 26, 2022
Spatial Action Maps for Mobile Manipulation (RSS 2020)

spatial-action-maps Update: Please see our new spatial-intention-maps repository, which extends this work to multi-agent settings. It contains many ne

Jimmy Wu 27 Nov 30, 2022
Graph Analysis From Scratch

Graph Analysis From Scratch Goal In this notebook we wanted to implement some functionalities to analyze a weighted graph only by using algorithms imp

Arturo Ghinassi 0 Sep 17, 2022
PyTorch code for our ECCV 2020 paper "Single Image Super-Resolution via a Holistic Attention Network"

HAN PyTorch code for our ECCV 2020 paper "Single Image Super-Resolution via a Holistic Attention Network" This repository is for HAN introduced in the

五维空间 140 Nov 23, 2022