bio_inspired_min_nets_improve_the_performance_and_robustness_of_deep_networks

Overview

Code Submission for: Bio-inspired Min-Nets Improve the Performance and Robustness of Deep Networks

Run with docker

To build a docker environment, change dir to 'docker' and run:

bash docker_build.sh

Move back to the parent folder and run

bash docker_run.sh

to start the docker environment. Note that this environments uses Pytorch 1.8 and Cuda 11.1.

Run with virtualenv

In a new virtual environment run

pip install -r venv_requirements.txt

The PYTHONPATH needs to be updated. Append this to your '.bashrc':

export PYTHONPATH=path/to/this/repository:$PYTHONPATH

Furthermore, you need to specify the variable 'DATA_FOLDER' in 'config.py'.

Running the experiments

Python modules meant to be executed include the prefix 'exe_' in their name. The experiments of the paper are located in the 'experiments' folder. Note that each module must be started from the repositories folder, e.g. to evaluate experiment 10 run:

python experiments/exp_10/exe_train_exp_10.py

Here is a list of all experiments:

exp_10: ResNet and PyrblockNet experiment on Cifar-10 classification and JPEG compression

  • 'exe_train_exp_10.py': retrain the networks on Cifar-10. Creates log-files in 'experiments/exp_10/exp_data'
  • 'exe_eval_exp_10.py': runs classification evaluation
  • 'exe_exp10_jpeg_tests.py': evaluates the predictions in saved in 'jpeg_model_predictions'. To again compute the predictions, run this module with the flag 'RUN_PREDICTIONS' set to 'True'

exp_11_1: DenseNet experiment on Cifar-10 classification and JPEG compression

  • 'exe_train_exp_11_1.py': retrain the networks on Cifar-10. Creates log-files in 'experiments/exp_11_1/exp_data'
  • 'exe_eval_exp_11_1.py': runs classification evaluation
  • 'exe_exp10_jpeg_tests.py': evaluates the predictions in saved in 'jpeg_model_predictions'. To again compute the predictions, run this module with the flag 'RUN_PREDICTIONS' set to 'True'

Other modules:

  • 'run_training.py': Module to train a CNN. Is started in any 'exe_train'-file as a subprocess.
  • 'run_jpeg_robustness_test.py': Module to create predictions on compressed data.
  • 'datasets/ds_ds_cifar10_compression_test.py': run this module to create 10 compressed Cifar-10 test-sets. The data are save to 'DATA_FOLDER' in the 'config.py' file

All models are located in the 'model' folder, the dataset code is in the 'datasets' folder.

Downloading model.pt files and JPEG-model-predictions

Additional files containing the models and predictions can be downloaded. To add each model and prediction to the respective experiment folders, extract the zip file, change the path variable 'DOWNLOADED_MODELS' and 'DOWNLOADED_PREDICTIONS' in 'config.py' (if necessary) and run 'exe_move_downloaded_files.py'.

To archive the repo:

git archive -o min_nets_latest.zip HEAD

A simple python stock Predictor

Python Stock Predictor A simple python stock Predictor Demo Run Locally Clone the project git clone https://github.com/yashraj-n/stock-price-predict

Yashraj narke 5 Nov 29, 2021
Training Cifar-10 Classifier Using VGG16

opevcvdl-hw3 This project uses pytorch and Qt to achieve the requirements. Version Python 3.6 opencv-contrib-python 3.4.2.17 Matplotlib 3.1.1 pyqt5 5.

Kenny Cheng 3 Aug 17, 2022
Search and filter videos based on objects that appear in them using convolutional neural networks

Thingscoop: Utility for searching and filtering videos based on their content Description Thingscoop is a command-line utility for analyzing videos se

Anastasis Germanidis 354 Dec 04, 2022
Deep Learning and Reinforcement Learning Library for Scientists and Engineers 🔥

TensorLayer is a novel TensorFlow-based deep learning and reinforcement learning library designed for researchers and engineers. It provides an extens

TensorLayer Community 7.1k Dec 29, 2022
Official code repository for A Simple Long-Tailed Rocognition Baseline via Vision-Language Model.

BALLAD This is the official code repository for A Simple Long-Tailed Rocognition Baseline via Vision-Language Model. Requirements Python3 Pytorch(1.7.

peng gao 42 Nov 26, 2022
Nest Protect integration for Home Assistant. This will allow you to integrate your smoke, heat, co and occupancy status real-time in HA.

Nest Protect integration for Home Assistant Custom component for Home Assistant to interact with Nest Protect devices via an undocumented and unoffici

Mick Vleeshouwer 175 Dec 29, 2022
Code used for the results in the paper "ClassMix: Segmentation-Based Data Augmentation for Semi-Supervised Learning"

Code used for the results in the paper "ClassMix: Segmentation-Based Data Augmentation for Semi-Supervised Learning" Getting started Prerequisites CUD

70 Dec 02, 2022
Toward Realistic Single-View 3D Object Reconstruction with Unsupervised Learning from Multiple Images (ICCV 2021)

Table of Content Introduction Getting Started Datasets Installation Experiments Training & Testing Pretrained models Texture fine-tuning Demo Toward R

VinAI Research 42 Dec 05, 2022
Official Pytorch implementation of "Learning to Estimate Robust 3D Human Mesh from In-the-Wild Crowded Scenes", CVPR 2022

Learning to Estimate Robust 3D Human Mesh from In-the-Wild Crowded Scenes / 3DCrowdNet News 💪 3DCrowdNet achieves the state-of-the-art accuracy on 3D

Hongsuk Choi 113 Dec 21, 2022
retweet 4 satoshi ⚡️

rt4sat retweet 4 satoshi This bot is the codebase for https://twitter.com/rt4sat please feel free to create an issue if you saw any bugs basically thi

6 Sep 30, 2022
Clean Machine Learning, a Coding Kata

Kata: Clean Machine Learning From Dirty Code First, open the Kata in Google Colab (or else download it) You can clone this project and launch jupyter-

Neuraxio 13 Nov 03, 2022
A PyTorch Implementation of PGL-SUM from "Combining Global and Local Attention with Positional Encoding for Video Summarization", Proc. IEEE ISM 2021

PGL-SUM: Combining Global and Local Attention with Positional Encoding for Video Summarization PyTorch Implementation of PGL-SUM From "PGL-SUM: Combin

Evlampios Apostolidis 35 Dec 22, 2022
System-oriented IR evaluations are limited to rather abstract understandings of real user behavior

Validating Simulations of User Query Variants This repository contains the scripts of the experiments and evaluations, simulated queries, as well as t

IR Group at Technische Hochschule Köln 2 Nov 23, 2022
Fast, modular reference implementation of Instance Segmentation and Object Detection algorithms in PyTorch.

Faster R-CNN and Mask R-CNN in PyTorch 1.0 maskrcnn-benchmark has been deprecated. Please see detectron2, which includes implementations for all model

Facebook Research 9k Jan 04, 2023
Out-of-Town Recommendation with Travel Intention Modeling (AAAI2021)

TrainOR_AAAI21 This is the official implementation of our AAAI'21 paper: Haoran Xin, Xinjiang Lu, Tong Xu, Hao Liu, Jingjing Gu, Dejing Dou, Hui Xiong

Jack Xin 13 Oct 19, 2022
A collection of awesome resources image-to-image translation.

awesome image-to-image translation A collection of resources on image-to-image translation. Contributing If you think I have missed out on something (

876 Dec 28, 2022
Pydantic models for pywttr and aiopywttr.

Pydantic models for pywttr and aiopywttr.

Almaz 2 Dec 08, 2022
[NeurIPS 2021] Code for Unsupervised Learning of Compositional Energy Concepts

Unsupervised Learning of Compositional Energy Concepts This is the pytorch code for the paper Unsupervised Learning of Compositional Energy Concepts.

45 Nov 30, 2022
Beyond a Gaussian Denoiser: Residual Learning of Deep CNN for Image Denoising

Beyond a Gaussian Denoiser: Residual Learning of Deep CNN for Image Denoising

Kai Zhang 1.2k Dec 29, 2022
Code for a seq2seq architecture with Bahdanau attention designed to map stereotactic EEG data from human brains to spectrograms, using the PyTorch Lightning.

stereoEEG2speech We provide code for a seq2seq architecture with Bahdanau attention designed to map stereotactic EEG data from human brains to spectro

15 Nov 11, 2022