repo
stringlengths
8
116
tasks
stringlengths
8
117
titles
stringlengths
17
302
dependencies
stringlengths
5
372k
readme
stringlengths
5
4.26k
__index_level_0__
int64
0
4.36k
KevinHuang841006/AI_Security_training
['adversarial attack']
['Towards Evaluating the Robustness of Neural Networks']
rescaling_defense/l2_attack.py ZOO/models.py FGSM/model_CW.py CandWL2/models.py rescaling_defense/check_test.py FGSM/model.py rescaling_defense/test_attack.py Downscaling_Attack/down_attack.py rescaling_defense/setup_inception2.py FGSM/run.py CandWL2/train_model.py ZOO/zoo_newton.py CandWL2/C_W.py ZOO/train_model.py CandWL2/CarliniWagner.py model.py cnn_model conv_2d ZERO CarliniWagnerL2 Softmax MLP Linear Model ReLU Conv2D make_basic_cnn Flatten Layer batch_indices model_loss model_train cnn_model conv_2d conv_2d batch_indices model_train cnn_model model_loss fgm test show generate_data CarliniL2 readimg NodeLookup ImageNet create_graph InceptionModel main maybe_download_and_extract run_inference_on_image show generate_data Softmax MLP Linear Model ReLU Conv2D make_basic_cnn Flatten Layer batch_indices model_loss model_train plot_image Run_Stocastic_Gradient check_range gradient_hessian Sequential model Activation add MLP softmax_cross_entropy_with_logits reduce_mean int update join list RandomState minimize print batch_indices len shuffle AdamOptimizer Saver save global_variables_initializer range model_loss run print to_float reduce_max reduce_sum stop_gradient equal to_float softmax_cross_entropy_with_logits gradients reduce_max reduce_sum sign reduce_mean clip_by_value stop_gradient equal flatten join print range append array range sample create_graph read fatal join urlretrieve st_size print extractall stat model_dir makedirs maybe_download_and_extract run_inference_on_image imread array imresize square randint sqrt zeros sum max log run print reshape show reshape imshow argmax print plot_image min range sqrt gradient_hessian zeros sum max clip run
# AI_Security_training ## Setup run python ./C_W.py env : anoconda, python-3.5, numpy, tensorflow ## Attack : Carlini and Wagner L2 Proposed by Carlini and Wagner. It is an iterative, white box attack. paper reference : https://arxiv.org/abs/1608.04644 ## Model model data structure : Reference from Cleverhan. Definded in models.py, witch providing numerous hirachical tensor model. ### 3 layer CNN
600
KexianHust/Structure-Guided-Ranking-Loss
['depth estimation', 'monocular depth estimation']
['Structure-Guided Ranking Loss for Single Image Depth Prediction']
demo.py models/syncbn/modules/functional/syncbn.py models/syncbn/test.py models/syncbn/modules/nn/__init__.py models/networks.py models/syncbn/modules/functional/_syncbn/_ext/syncbn/__init__.py models/syncbn/modules/functional/__init__.py models/syncbn/modules/functional/_syncbn/build.py models/syncbn/modules/nn/syncbn.py models/resnet.py models/DepthNet.py demo DepthNet Decoder FTB AO FFM ResNet resnet50 Bottleneck resnet152 conv3x3 resnet34 resnet18 BasicBlock resnet101 init_weight _count_samples _check_contiguous BatchNorm2dSyncFunc _import_symbols BatchNorm2d unsqueeze resize fromarray data_dir imsave format asarray img_transform size Compose astype listdir net join uint8 ANTIALIAS print Variable result_dir convert BILINEAR numpy update ResNet load_state_dict state_dict update ResNet load_state_dict state_dict update ResNet load_state_dict state_dict update ResNet load_state_dict state_dict update ResNet load_state_dict state_dict fill_ isinstance out_channels Conv2d normal_ sqrt modules zero_ Linear size enumerate dir _wrap_function getattr append callable
# Structure-Guided Ranking Loss for Single Image Depth Prediction This repository contains a pytorch implementation of our CVPR2020 paper "Structure-Guided Ranking Loss for Single Image Depth Prediction". [Project Page](https://KexianHust.github.io/Structure-Guided-Ranking-Loss/) ![Teaser Image](https://KexianHust.github.io/Structure-Guided-Ranking-Loss/teaser.png) ## Changelog * [Jun. 2020] Initial release ## To do - [ ] Mix data training ## Prerequisites * Pytorch >= 0.4.1
601
Keziwen/Unsupervised-via-TIS
['mri reconstruction']
['An Unsupervised Deep Learning Method for Multi-coil Cine MRI']
train_v2.py evaluate_v2.py model.py dataset.py get_train_data_UIH get_fine_tuning_data get_train_data get_test_data get_data_sos main evaluate getCoilCombineImage_DCCNN apply_conv getMultiCoilImage getADMM_2D apply_conv_3D dc conv_op DC_CNN_2D dc_DCCNN real2complex getCoilCombineImage generate_data get_data_sos shape transpose shape transpose shape transpose transpose concatenate abs transpose squeeze fft2 shape tile sum join makedirs join format fftshift evaluate get_test_data print size sum value value value cast imag real stack range zeros_like complex conv_op range dc_DCCNN append stack range getADMM_2D complex apply_conv getADMM_2D relu concat dc shape stack append abs range complex apply_conv relu concat shape stack ifft2d DC_CNN_2D real2complex abs range append multiply ifft2d fft2d real2complex multiply ifft2d fft2d permutation range len
# Unsupervised-via-TIS Code for our work: "An unsupervised deep learning method for multi-coil cine MRI". If you use this code, please refer to: Ke et al 2020 Phys. Med. Biol. https://doi.org/10.1088/1361-6560/abaffa
602
Kipok/understanding-momentum
['stochastic optimization']
['Understanding the Role of Momentum in Stochastic Gradient Methods']
utils/qhm.py resnet_on_cifar/utils.py resnet_on_cifar/shb.py utils/verify_conjecture.py lr_on_mnist/utils.py lr_on_mnist/main.py resnet_on_cifar/main.py lr_on_mnist/qhm.py resnet_on_cifar/models.py lr_on_mnist/param_conv.py eval_train eval_test Net loss_fn run_exp train from_accsgd from_synthesized_nesterov from_nadam from_robust_momentum from_pid from_two_state_optimizer QHM get_git_diff get_git_hash Logger eval_test AverageMeter loss_fn run_exp train resnet44_cifar resnet110_cifar resnet1202_cifar resnet1001_cifar PreActBasicBlock ResNet_Cifar Bottleneck resnet164_cifar preact_resnet110_cifar resnet20_cifar conv3x3 preact_resnet1001_cifar resnet32_cifar PreActBottleneck BasicBlock resnet56_cifar PreAct_ResNet_Cifar preact_resnet164_cifar SHB get_git_diff get_git_hash Logger regime alpha_solver qhm_rate qhm qhm_rate_split beta_solver nu_solver alpha_beta_solver verify_conjecture exp view nll_loss scatter_ wd weight zeros sum mse_loss step enumerate add_scalar format add_scalar print eval item dataset len format add_scalar print eval dataset len drop_freq MultiStepLR DataLoader output_dir device StepLR eval_test data_dir drop_steps epochs to range eval_train SummaryWriter format bs is_available drop_rate MNIST join print QHM parameters train step add_scalar sqrt sqrt named_parameters model zero_grad max update val format size mean avg time norm backward print AverageMeter min named_parameters loss_fn SHB save load_state_dict CIFAR10 checkpoint load isfile ResNet_Cifar ResNet_Cifar ResNet_Cifar ResNet_Cifar ResNet_Cifar ResNet_Cifar ResNet_Cifar ResNet_Cifar PreAct_ResNet_Cifar PreAct_ResNet_Cifar PreAct_ResNet_Cifar g copy zeros empty range sqrt abs max sqrt alpha_solver qhm_rate linspace empty enumerate alpha_solver qhm_rate linspace empty enumerate alpha_solver qhm_rate linspace empty enumerate join qhm_rate format kappa_grid_size kappa_rb nu_grid_size print dump_results kappa_lb mkdir linspace save alpha_beta_solver empty range enumerate
# Understanding the Role of Momentum in Stochastic Gradient Methods To reproduce experiments performed in the paper, see code and comments in `experiments.ipynb`. To run logistic regression on MNIST or ResNet-18 on CIFAR, you can use scripts in `lr_on_mnist` and `resnet_on_cifar` correspondingly. Run `python main.py --help` for list of available hyperparameters in both scripts. To be able to run the code, you need to install the following Python packages: numpy, matplotlib, pytorch (v0.4), tensorboardx
603
KirillShmilovich/ActiveLearningCG
['active learning']
['Discovery of Self-Assembling $π$-Conjugated Peptides by Active Learning-Directed Coarse-Grained Molecular Simulation']
ActiveLearning/step_2-aquisition/Acquisitions.py ActiveLearning/step_2-aquisition/GPR_v2.py ActiveLearning/step_1-GPR/GPR_v2.py VAE/IO.py VAE/martini22_ff.py VAE/encoding.py VAE/MAP.py VAE/SS.py VAE/FUNC.py GaussianProcessRegressor EIacquisition PIacquisition UCBacquisition Exploitacquisition GaussianProcessRegressor main Processing norm2 pat norm cos_angle distance2 spl hash nsplit formatString pdbOut pdbAtom pdbBoxRead Residue pdbFrameIterator breaks streamTag contacts Chain getChargeType pdbBoxString check_merge groAtom pdbChains add_dummy groFrameIterator groBoxRead residues residueDistance2 isPdbAtom mapIndex CoarseGrained map aver martini22 tt ssClassification typesub call_dssp sqrt log pi sqrt sum startswith sqrt append info append pdbAtom pdbBoxRead startswith strip int groBoxRead next print iteritems input endswith isdigit open info append range len append norm range join zip sort distance2 extend set dict add reverse warning info append range len update spl nsplit sum zip replace zip dict join translate communicate debug pdbOut wait write system id readlines Popen
# Discovery of Self-Assembling pi-Conjugated Peptides by Active Learning-Directed Coarse-Grained Molecular Simulation Code and notebooks to accompany "Discovery of Self-Assembling pi-Conjugated Peptides by Active Learning-Directed Coarse-Grained Molecular Simulation" (DOI: https://doi.org/10.1021/acs.jpcb.0c00708) ## Contents ### VAE The [VAE](VAE) directory details the procedure for generating the VAE used for producing the latent space embeddings. [VAE notebook](VAE/VAE.ipynb) ![Image](VAE/VAE.png) ### Active Learning The [ActiveLearning](ActiveLearning) directory contains details the steps involved for a single active learning iteration. [GPR model selection notebook](ActiveLearning/step_1-GPR/Model_Selection_GPR.ipynb)
604
Kishwar/tensorflow
['style transfer']
['Artistic style transfer for videos and spherical images']
rnn-mnist/model.py vgg19-style-transfer/model.py vgg19-style-transfer-video/vgg19Model.py emotion/emo_test.py vgg19-style-transfer/utils.py deep-cnn-rnn-asr/char_map.py vgg19-style-transfer-video/utils.py vgg19-style-transfer/optimize.py vgg19-style-transfer/style-transfer-main.py emotion/model.py vgg19-style-transfer/constants.py vgg19-style-transfer-video/style-transfer-Noise-train.py vgg19-style-transfer-video/optimize.py vgg19-style-transfer-video/style-transfer-Noise-test.py vgg19-style-transfer-video/noiseModel.py rnn-mnist/rnn_mnist_train.py mnist/mnist_test.py vgg19-style-transfer-video/constants.py rnn-mnist/constants.py tiny_yolo_tf_keras/yolo_utils.py mnist/mnist_train.py tiny_yolo_tf_keras/coco2pascal.py tiny_yolo_tf_keras/preprocessing.py emotion/utils.py mnist/model.py emotion/constants.py mnist/constants.py emotion/emo_train.py rnn-voice-control-car/keras/Generate_Voice_Data.py rnn-voice-control-car/keras/Test-Voice-Control-Car-Model.py main main model init_biases init_weights layer_weights layer_biases train loss create_onehot_label read_data get_next_batch run init_weights layer_weights model RNN run model wav2mfcc run create_imageset write_categories get_instances keyjoin create_annotations rename instance_to_xml root BatchGenerator parse_annotation _sigmoid generate_colors _softmax read_anchors draw_boxes BoundBox bbox_iou decode_netout read_classes preprocess_image scale_boxes vgg19 optimize build_parser generate_noise_image getresizeImage compute_style_cost compute_tv_cost normalize_image compute_layer_gen_cost list_files Denormalize tensor_size gram_matrix compute_content_cost load_mat_file save_image compute_layer_style_cost resizeImage total_cost init_weights layer_weights Layer_Norm noiseModel optimize generate build_parser build_parser generate_noise_image getresizeImage readimage compute_style_cost compute_tv_cost normalize_image compute_layer_gen_cost list_files Denormalize tensor_size gram_matrix compute_content_cost load_mat_file get_video_image save_image compute_layer_style_cost resizeImage total_cost vgg19 model Variable float32 placeholder layer_biases layer_weights init_weights init_biases dropout relu reshape matmul max_pool conv2d add_to_collection bias_add l2_loss softmax_cross_entropy_with_logits get_collection reduce_mean add_n scalar zeros join int permutation print reshape apply dropna read_csv softmax_cross_entropy_with_logits model print reshape minimize placeholder shape layer_weights reduce_mean argmax read_data_sets reshape BasicLSTMCell transpose static_rnn split RNN equal float32 cast sleep encode send LSTM Dense Sequential add load print shape pad mfcc ElementMaker ElementMaker text tuple expand loads savemat text loads expand stripext write_text format stripext expand listdir iteritems groupby format print write expand get_instances rename instance_to_xml root imread append enumerate int list parse sorted listdir text iter float round seed list shuffle map reshape stack tuple reversed BICUBIC what resize expand_dims array open get_score int str ymin putText ymax FONT_HERSHEY_SIMPLEX xmin shape xmax rectangle ymin min ymax xmax xmin max list exp _softmax _sigmoid reversed argsort BoundBox append range len exp min max constant relu max_pool _weights conv2d load_mat_file bias_add vgg19 reset_default_graph save_image run str compute_style_cost normalize_image placeholder shape imsave range getresizeImage compute_tv_cost astype compute_content_cost zeros InteractiveSession generate_noise_image time minimize print float32 tensor_size AdamOptimizer global_variables_initializer array total_cost add_argument ArgumentParser walk extend gram_matrix reshape eval size as_list reshape transpose matmul size compute_layer_gen_cost reduce add append compute_layer_style_cost l2_loss l2_loss tensor_size l2_loss str print shape uniform imsave astype imsave as_list tanh conv2d_transpose relu conv2d layer_weights Layer_Norm stack moments len VideoCapture destroyAllWindows Graph ConfigProto release divide multiply divide float32 cast to_float get_shape multiply subtract divide float32 reduce_prod cast to_float multiply subtract divide to_float subtract multiply divide add add subtract add uint8 astype avg_pool
# tensorflow (Python 2.7 / 3.5) This repo contains my tensorflow codes ## MNIST <br /> - mnist training - python mnist_train.py <br /> Required training and test/validation data is automatically downloaded by code. <br /> - mnist test - python mnist_test.py <br /> Image input as arg (not yet implemented, arg for input image, change in code for now) ## EMOTION <br /> - emotion training - python emo_train.py <br /> Required training and test/validation data can be downloaded from <br />
605
KnollFrank/automl_zero
['automl']
['AutoML-Zero: Evolving Machine Learning Algorithms From Scratch']
generate_datasets.py task_pb2.py get_dataset create_projected_binary_dataset main load_projected_binary_dataset train_valid_test_split seed int list append randn extend ScalarLabelDataset get_dataset dot add transform StandardScaler range train_valid_test_split fit valid_labels train_labels zeros features range test_labels len as_numpy reshape load_fn astype float select_classes train_test_split projected_dim as_numpy min_data_seed dataset_name sorted list data_dir SerializeToString create_projected_binary_dataset num_test_examples range format num_valid_examples load max_data_seed num_train_examples print makedirs len
# AutoML-Zero Open source code for the paper: \"[**AutoML-Zero: Evolving Machine Learning Algorithms From Scratch**](https://arxiv.org/abs/2003.03384)" | [Introduction](#what-is-automl-zero) | [Quick Demo](#5-minute-demo-discovering-linear-regression-from-scratch)| [Reproducing Search Baselines](#reproducing-search-baselines) | [Citation](#citation) | |-|-|-|-| ## What is AutoML-Zero? AutoML-Zero aims to automatically discover computer programs that can solve machine learning tasks, starting from empty or random programs and using only basic math operations. The goal is to simultaneously search for all aspects of an ML algorithm&mdash;including the model structure and the learning strategy&mdash;while employing *minimal human bias*. ![GIF for the experiment progress](progress.gif) Despite AutoML-Zero's challenging search space, *evolutionary search* shows promising results by discovering linear regression with gradient descent, 2-layer neural networks with backpropagation, and even algorithms that surpass hand designed baselines of comparable complexity. The figure above shows an example sequence of discoveries from one of our experiments, evolving algorithms to solve binary classification tasks. Notably, the evolved algorithms can be *interpreted*. Below is an analysis of the best evolved algorithm: the search process "invented" techniques like bilinear interactions, weight averaging, normalized gradient, and data augmentation (by adding noise to the inputs). ![GIF for the interpretation of the best evolved algorithm](best_algo.gif) More examples, analysis, and details can be found in the [paper](https://arxiv.org/abs/2003.03384).
606
Koldh/LearnableGroupTransform-TimeSeries
['time series']
['Learnable Group Transform For Time-Series']
LGT-ToyExample.py LGT-Haptics.py LGT-BirdDetection.py
# LearnableGroupTransform-TimeSeries
607
Krisztina-Sinkovics/IDcard-visibility-classifier
['face detection']
['MIDV-500: A Dataset for Identity Documents Analysis and Recognition on Mobile Devices in Video Stream']
code/main.py code/lib/model.py code/lib/predict.py code/lib/train.py code/lib/load_images.py code/lib/helpers/__init__.py code/lib/helpers/helpers.py load_images load_single_image get_model predict train_model to_one_channel contrast_stretching oversample_minority_classes join print len append array load_single_image to_one_channel imread contrast_stretching stack print compile Sequential output Adam add Dense ResNet50 Model Flatten Dropout load_model print reshape argmax load_single_image strip to_categorical LabelEncoder load_images classes_ flow save list apply fit_generator ImageDataGenerator join oversample_minority_classes print summary transform get_model read_csv fit percentile rescale_intensity int str value_counts print shape floor append float range len
*** # Classifying visibility of ID cards in photos Implementation of multiclass image classifier for identifying visibility of ID cards on corrupted images utilizing CNN architecture with a pretrained backbone network and Keras/Tensorflow. Input image example: ![Input image example](sample_images/example_input_images.PNG) Output labels example: ![Output labels example](sample_images/example_labels.PNG) The project includes: - a [notebook](notebook/House_of_ID_Cards.html) with data exploration, model training and evaluation of the performance;
608
KurochkinAlexey/IMV_LSTM
['time series']
['Exploring Interpretable LSTM Neural Networks over Multi-Variable Data']
networks.py IMVFullLSTM IMVTensorLSTM
# IMV-LSTM Pytorch implementation of "Exploring Interpretable LSTM Neural Networks over Multi-Variable Data" https://arxiv.org/pdf/1905.12034.pdf # Content 1) Nasdaq dataset experiment 2) SML2010 dataset experiment 3) PM2.5 dataset experiment
609
KylianvG/Embetter
['word embeddings']
['Man is to Computer Programmer as Woman is to Homemaker? Debiasing Word Embeddings']
embetter/data.py embetter/download.py embetter/benchmarks.py experiments.py embetter/debias.py compare_bias.py embetter/embeddings_config.py embetter/we.py compare_occupational_bias get_datapoints_embedding project_profession_words plot_comparison_embeddings soft run_benchmark hard print_details show_bias main Benchmark load_professions load_gender_seed load_equalize_pairs load_data load_definitional_pairs soft_debias hard_debias download get_confirm_token save_response_content doPCA viz WordEmbedding to_utf8 drop show format subplots xlabel min set_xlim ylabel title scatter savefig max set_ylim sorted range len words load_definitional_pairs profession_stereotypes load_professions list get_datapoints_embedding project_profession_words intersection plot_comparison_embeddings center soft print run_benchmark words hard print_details WordEmbedding show_bias load_data embeddings center print ljust embeddings rjust center best_analogies_dist_thresh print viz profession_stereotypes print deepcopy hard_debias deepcopy soft_debias print WordEmbedding do_soft Benchmark format evaluate print pprint_compare join join join join load_professions load_gender_seed load_definitional_pairs load_equalize_pairs norm words v set sqrt normalize enumerate drop randn zero_grad MultiStepLR numpy svd list str mm Adam range detach words set item norm backward print t step diag get join save_response_content print get_confirm_token dirname abspath Session items startswith isinstance center join print ljust rjust PCA append v array fit
# Embetter: FactAI Word Embedding Debiassing Are you using pre-trained word embeddings like word2vec, GloVe or fastText? `Embetter` allows you to easily remove gender bias. No longer can nurses only be female or are males the only cowards. This repository was made during the FACT-AI course at the University of Amsterdam, during which papers from the FACT field are reproduced and possibly extended. ## Getting Started Here we will outline how to access the code. ### Prerequisites To run the code, create an Anaconda environment using: ``` conda env create -f environment.yml
610
Kyubyong/g2p
['speech synthesis']
['Learning pronunciation from a foreign language in speech synthesis networks', 'Learning pronunciation from a foreign language in speech synthesis networks']
g2p_en/expand.py setup.py g2p_en/g2p.py g2p_en/__init__.py normalize_numbers _expand_dollars _expand_ordinal _expand_decimal_point _expand_number _remove_commas G2p construct_homograph_dictionary group split int group sub join dict splitlines startswith split
[![image](https://img.shields.io/pypi/v/g2p-en.svg)](https://pypi.org/project/g2p-en/) [![image](https://img.shields.io/pypi/l/g2p-en.svg)](https://pypi.org/project/g2p-en/) # g2pE: A Simple Python Module for English Grapheme To Phoneme Conversion * [v.2.0] We removed TensorFlow from the dependencies. After all, it changes its APIs quite often, and we don't expect you to have a GPU. Instead, NumPy is used for inference. This module is designed to convert English graphemes (spelling) to phonemes (pronunciation). It is considered essential in several tasks such as speech synthesis. Unlike many languages like Spanish or German where pronunciation of a word can be inferred from its spelling, English words are often far from people's expectations. Therefore, it will be the best idea to consult a dictionary if we want to know the pronunciation of some word. However, there are at least two tentative issues in this approach.
611
L0SG/seqgan-music
['text generation']
['SeqGAN: Sequence Generative Adversarial Nets with Policy Gradient']
discriminator.py music_seqgan_conditional.py postprocessing.py music_seqgan.py discriminator_w.py music_lsseqgan.py music_wseqgan.py dataloader.py utils.py discriminator_ls.py generator_w.py rollout.py music_lsseqgan_conditional.py generator.py make_ref.py utils_pickle_reference.py rollout_w.py preprocessing.py generator_ls.py overfit_noise.py rollout_ls.py Dis_fakedataloader Gen_Data_loader Dis_dataloader Dis_realdataloader linear highway Discriminator linear highway Discriminator linear highway Discriminator Generator Generator Generator load_data preprocessing generate_samples load_checkpoint save_checkpoint main pre_train_epoch calculate_train_loss_epoch calculate_bleu generate_samples pre_train_epoch_condtional generate_samples_conditional_v2 load_checkpoint generate_samples_conditonal save_checkpoint main pre_train_epoch calculate_train_loss_epoch calculate_bleu generate_samples load_checkpoint save_checkpoint main pre_train_epoch calculate_train_loss_epoch calculate_bleu generate_samples pre_train_epoch_condtional generate_samples_conditional_v2 load_checkpoint generate_samples_conditonal save_checkpoint main pre_train_epoch calculate_train_loss_epoch calculate_bleu generate_samples load_checkpoint save_checkpoint main pre_train_epoch calculate_train_loss_epoch calculate_bleu load_data preprocessing ROLLOUT ROLLOUT ROLLOUT Dis_fakedataloader Gen_Data_loader Dis_dataloader Dis_realdataloader linear highway Discriminator Generator load_data preprocessing generate_samples load_checkpoint save_checkpoint main pre_train_epoch calculate_train_loss_epoch calculate_bleu pre_train_epoch_condtional generate_samples_conditional_v2 generate_samples_conditonal pre_train_epoch_condtional generate_samples_conditional_v2 generate_samples_conditonal load_data preprocessing ROLLOUT as_list parse int range extend generate pretrain_step num_batch append next_batch reset_pointer range calculate_nll_loss_step num_batch append next_batch reset_pointer range SmoothingFunction tolist extend map mean num_batch array Pool next_batch reset_pointer range predict trainable_variables Dis_realdataloader num_batch save_checkpoint Gen_Data_loader Saver create_batches Dis_fakedataloader Session calculate_bleu open seed str run ROLLOUT Generator Discriminator generate pre_train_epoch range load_train_data close get_reward update_params ConfigProto flush generate_samples train_op print load_checkpoint g_updates write global_variables_initializer next_batch reset_pointer print str restore format join str format print save int range extend predict int extend next_batch reset_pointer range predict constant pretrain_step num_batch append next_batch reset_pointer range generate_samples_conditional_v2 pre_train_epoch_condtional Dis_dataloader argmax
**This repo is a work-in-progress status without code cleanup and refactoring.** ## Introduction This is an implementation of a paper [Polyphonic Music Generation with Sequence Generative Adversarial Networks](https://arxiv.org/abs/1710.11418) in TensorFlow. Hard-forked from the [official SeqGAN code](https://github.com/LantaoYu/SeqGAN). ## Requirements Python 2.7 Tensorflow 1.4 or newer (tested on 1.9) pip packages: music21 4.1.0, pyyaml, nltk, pathos ## How to use `python music_seqgan.py` for full training run.
612
L706077/OCR-CRNN
['optical character recognition', 'scene text recognition']
['An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition']
tool/create_dataset.py createDataset writeCache checkImageIsValid imdecode fromstring IMREAD_GRAYSCALE join str print len xrange writeCache open
Convolutional Recurrent Neural Network ====================================== This software implements the Convolutional Recurrent Neural Network (CRNN), a combination of CNN, RNN and CTC loss for image-based sequence recognition tasks, such as scene text recognition and OCR. For details, please refer to our paper http://arxiv.org/abs/1507.05717. **UPDATE Mar 14, 2017** A Docker file has been added to the project. Thanks to [@varun-suresh](https://github.com/varun-suresh). **UPDATE May 1, 2017** A PyTorch [port](https://github.com/meijieru/crnn.pytorch) has been made by [@meijieru](https://github.com/meijieru). **UPDATE Jun 19, 2017** For an end-to-end text detector+recognizer, check out the [CTPN+CRNN implementation](https://github.com/AKSHAYUBHAT/DeepVideoAnalytics/tree/master/notebooks/OCR) by [@AKSHAYUBHAT](https://github.com/AKSHAYUBHAT). Build ----- The software has only been tested on Ubuntu 14.04 (x64). CUDA-enabled GPUs are required. To build the project, first install the latest versions of [Torch7](http://torch.ch), [fblualib](https://github.com/facebook/fblualib) and LMDB. Please follow their installation instructions respectively. On Ubuntu, lmdb can be installed by ``apt-get install liblmdb-dev``. To build the project, go to ``src/`` and execute ``sh build_cpp.sh`` to build the C++ code. If successful, a file named ``libcrnn.so`` should be produced in the ``src/`` directory.
613
LALIC-UFSCar/sense-vectors-analogies-pt
['word embeddings']
['Generating Sense Embeddings for Syntactic and Semantic Analogy for Portuguese']
sense2vec/evaluation/intrinsic/keyedvectorss2v.py mssg/evaluation/intrinsic/analogies.py sense2vec/evaluation/intrinsic/analogies.py corpora/preprocessing.py sense2vec/preprocessing/postagging.py clean_text Word2VecKeyedVectors Doc2VecKeyedVectors WordEmbeddingsKeyedVectors FastTextKeyedVectors Vocab BaseKeyedVectors main represent_sentence_nlpnet represent_doc represent_word_nlpnet lower sub str replace tag strip POSTagger append sents represent_sentence_nlpnet load str format iglob print chdir Path resolve
# Sense Embeddings for Syntactic and Semantic Analogy for Portuguese Implementation of Sense Embeddings for Syntactic and Semantic Analogy for Portuguese --- ## About the paper This repository contains the results obtained in a paper to be presented in <a href="http://comissoes.sbc.org.br/ce-pln/stil2019/">STIL 2019</a>. ``` Rodrigues, J. S. and Caseli, H. M. (2019). Generating Sense Embeddings for Syntactic and Semantic Analogy for Portuguese. STIL - Symposium in Information and Human Language Technology. Salvador, Bahia. ``` <a href="https://drive.google.com/open?id=1_VL-UTNxg-dBPFUVgMqvifCQb_JDbTUk">Trained embeddings models</a>
614
LIDS-UNICAMP/DISF
['superpixels', 'semantic segmentation']
['Superpixel Segmentation using Dynamic and Iterative Spanning Forest']
DISF_demo.py python3/setup.py
LIDS-UNICAMP/DISF
615
LIDS-UNICAMP/grabber
['semantic segmentation']
['Grabber: A tool to improve convergence in interactive image segmentation']
grabber/grabber.py grabber/__init__.py grabber/_tests/test_dock_widget.py grabber/_dock_widget.py setup.py grabber/anchors.py grabber/grabberwidget.py Anchors Grabber Path GrabberWidget napari_experimental_provide_dock_widget test_something_with_viewer _dock_widgets add_plugin_dock_widget make_napari_viewer register len
# Grabber: A Tool to Improve Convergence in Interactive Image Segmentation [![License](https://img.shields.io/pypi/l/grabber.svg?color=green)](https://github.com/LIDS-UNICAMP/grabber/raw/master/LICENSE) [![PyPI](https://img.shields.io/pypi/v/grabber.svg?color=green)](https://pypi.org/project/grabber) [![Python Version](https://img.shields.io/pypi/pyversions/grabber.svg?color=green)](https://python.org) [![tests](https://github.com/LIDS-UNICAMP/grabber/workflows/tests/badge.svg)](https://github.com/LIDS-UNICAMP/grabber/actions) [![codecov](https://codecov.io/gh/LIDS-UNICAMP/grabber/branch/master/graph/badge.svg)](https://codecov.io/gh/LIDS-UNICAMP/grabber) A tool for contour-based segmentation correction (2D only). This repository provides a demo code of the paper: > **Grabber: A Tool to Improve Convergence in Interactive Image Segmentation** > [Jordão Bragantini](https://jookuma.github.io/), Bruno Moura, [Alexandre X. Falcão](http://lids.ic.unicamp.br/), [Fábio A. M. Cappabianco](https://scholar.google.com/citations?user=qmH9VEEAAAAJ&hl=en&oi=ao)
616
LIVIAETS/extended_logbarrier
['stochastic optimization', 'weakly supervised segmentation', 'semantic segmentation']
['Constrained Deep Networks: Lagrangian Optimization via Log-Barrier Extensions']
report.py preprocess/gen_toy.py log_compare.py metrics.py dataloader.py layers.py plot.py utils.py hist.py gen_weak.py networks.py remap_values.py test.py augment.py moustache.py main.py scheduler.py losses.py bounds.py preprocess/slice_promise.py main process_name get_args save BoxBounds TagsPredictions ConstantBounds PredictionBounds PreciseTags PreciseUpper TagBounds PreciseBounds SliceDataset get_loaders PatientSampler get_args centroid_strat box_strat erosion_strat main weaken_img random_strat get_args run conv_block convBatch residualConv conv_block_3 maxpool conv_block_Asym conv_block_1 conv_block_3_3 upSampleConv conv interpolate downSampleConv conv_decod_block relu log_barrier ext_log_barrier_quadra quadratic ext_log_barrier_quadra_2 ext_log_barrier LogBarrierLoss CrossEntropy NaivePenalty do_epoch get_args setup run main get_args runInference get_args run Dummy ENet BottleNeckNormal_Asym Bottleneck UNet BasicBlock BottleNeckDownSamplingDilatedConv Conv_residual_conv BottleNeckDownSampling ResidualUNet weights_init BottleneckC DenseNet fcn8s ResNeXt BottleNeckNormal Transition BottleNeckDownSamplingDilatedConvLast resnext101 BottleNeckUpSampling get_args run main remap main display_metric get_args AddWeightLoss StealWeight DummyScheduler MultiplyT TestDistMap TestCentroid TestDice TestNumpyHaussdorf map_ save_images mmap_ simplex compose_acc depth compose uniq flatten_ union_sum probs2one_hot uncurry soft_centroid eq simplex2colors intersection iIoU augment_arr numpy_haussdorf get_center union class2one_hot one_hot uc_ one_hot2dist batch_soft_size sset haussdorf fast_np_class2one_hot augment meta_dice str2bool probs2class id_ inter_sum soft_size ndarray get_args noise gen_img main get_args save_slices get_p_id main norm_arr print mmap_ partial mkdir range save with_suffix zip print parse_args add_argument ArgumentParser data_loader bounds_class PatientSampler group_train list grp_regex training_folders __import__ getattr append partial Compose eval gen_dataset zip enumerate losses print folders fromarray uint8 ellipse Draw print astype verbose fromarray dtype uint8 print astype generate_binary_structure ellipse Draw where fromarray min max argwhere show base_folder save_subfolder imshow verbose Path mkdir save strategy map_ list asarray pprint verbose zip map_ grid linspace show columns set_title set_xlabel shape savefig nbins legend gca set_xlim tight_layout mean zip set_ylabel hist figure BatchNorm2d Sequential Conv2d PReLU BatchNorm2d Sequential Conv2d PReLU BatchNorm2d Sequential Conv2d PReLU BatchNorm2d Sequential Conv2d conv_block BatchNorm2d Sequential Conv2d activ insert append BatchNorm2d layer BatchNorm2d Sequential ConvTranspose2d MaxPool2d load use_sgd losses print weights __import__ Adam SGD apply parameters eval getattr append to loss_class network enumerate zero_grad reduce union_sum list set_postfix range detach update slice close mean eval zip tqdm_ enumerate join backward print inter_sum train step len batch_size compute_miou Path save dataset DataFrame exists list setup do_epoch csv compute_haussdorf in_memory copytree range get_loaders param_groups debug eval type items scheduler print float32 to_csv rmtree numpy list n_class range items list slice grp_regex print SliceDataset Compose len DataLoader to enumerate PatientSampler tqdm_ pred_folders get_args runInference set_xticklabels boxplot enumerate set_yticks set_xticks set_ylim xavier_normal_ normal_ data fill_ ResNeXt arange smooth stem ylabel ylim title curves_styles plot hline l_line rc min labels spline eval Path axises folders display_metric print mean argmax std enumerate len map_ float32 shape stack type einsum ones_like type float32 shape zeros numpy_haussdorf numpy range union_sum inter_sum shape argmax shape type unsqueeze int32 shape zeros put_along_axis shape class2one_hot probs2class zeros_like astype distance any bool range str with_suffix shape mkdir zip numpy imsave map_ size flip mirror fliplr map_ list flip dot shape wh range n asarray ellipse Draw with_suffix noise save clip seed max min astype float32 stem match str time sum GetSpacing map_ asarray augment shape ReadImage mkdir zip imread norm_arr range len uc_
LIVIAETS/extended_logbarrier
617
LahiruJayasinghe/DeepDOA
['denoising']
['RF-Based Direction Finding of UAVs Using DNN']
DenoisingAE.py get_csv_data.py main.py DNN_Ground_data_8sectors.py autoencoder corrupt kl_divergence train_DOA multilayer_perceptron corrupt get_predicted_angle HandleData autoencoder multilayer_perceptron getDAE corrupt cast float32 random_uniform add random_uniform kl_divergence transpose placeholder matmul shape reverse append astype square sqrt corrupt enumerate int tanh print Variable float32 reduce_mean zeros autoencoder Saver save xticks Session yticks run subplot show HandleData total_data legend range plot mean minimize print get_synthatic_data subplots_adjust global_variables_initializer next_batch array len relu corrupt matmul add import_meta_graph autoencoder restore latest_checkpoint print mean reset_default_graph Saver append global_variables_initializer array Session run
# DeepDOA An implementation of a Sparse Denoising Autoencoder (SDAE)-based Deep Neural Network (DNN) for direction finding (DF) of small unmanned aerial vehicles (UAVs). It is motivated by the practical challenges associated with classical DF algorithms such as MUSIC and ESPRIT. The proposed DF scheme is practical and low-complex in the sense that a phase synchronization mechanism, an antenna calibration mechanism, and the analytical model of the antenna radiation pattern are not essential. Also, the proposed DF method can be implemented using a single-channel RF receiver. For more details, please see our [Arxiv paper](https://arxiv.org/pdf/1712.01154.pdf). ### Whole Architecture: <img src="images/Whole_Architecture.PNG" width="500"> ### Architecture training phase: <img src="images/Training.PNG" width="500"> ### Dependencies - Tensorflow (recommended below 1.5)
618
LahiruJayasinghe/RUL-Net
['data augmentation']
['Temporal Convolutional Memory Networks for Remaining Useful Life Estimation of Industrial Machinery']
data_processing.py utils_laj.py model.py kink_RUL get_PHM08Data combine_FD001_and_FD003 compute_rul_of_one_file compute_rul_of_one_id get_CMAPSSData data_augmentation analyse_Data CNNLSTM get_predicted_expected_RUL get_RNNCell dense_layer model_summary conv_layer BatchNorm scoring_func trjectory_generator batch_generator plot_data append range len tolist max int compute_rul_of_one_id extend set append concat drop save values list read_table append fit_transform range replace compute_rul_of_one_file mean eval print to_csv MinMaxScaler std read_csv len read_table concatenate print compute_rul_of_one_file mean savetxt unique save std values drop combine_FD001_and_FD003 concat drop save max values show str list from_dict read_table title append range reset_index replace plot compute_rul_of_one_file shuffle copy mean unique print to_csv index figure randint std len show str get_PHM08Data plot print title figure get_CMAPSSData list read_table concat max range len max_pooling1d Saver get_PHM08Data placeholder reduce_sum get_CMAPSSData conv_layer get_RNNCell dense_layer square model_summary sqrt batch_generator as_list dynamic_rnn zero_state minimize print reshape float32 reduce_mean MultiRNNCell BasicRNNCell GLSTMCell LSTMCell LSTMBlockFusedCell DropoutWrapper append LayerNormBasicLSTMCell GRUCell zeros range randint int concatenate print ones reshape index copy unique append zeros range len show plot dirname makedirs exp argmax round
# RUL-Net Deep learning approach for estimation of Remaining Useful Life (RUL) of an engine This repo is dedicated to new architectures for estimating RUL using CMAPSS dataset and PHM08 prognostic challenge dataset The datasets are included in this repo or can be donwloaded from: https://ti.arc.nasa.gov/tech/dash/groups/pcoe/prognostic-data-repository/#turbofan For more details, please see our [Arxiv paper](https://arxiv.org/pdf/1810.05644.pdf). ## System Model ![Screenshot](screenshots/system_model.PNG) ## Dependencies tensorflow 1.8 numpy 1.14.4
619
Lambda-3/Indra
['semantic textual similarity']
['Indra: A Word Embedding and Semantic Relatedness Server']
indra-core/src/test/resources/annoy/retrieve.py indra-core/src/test/resources/annoy/makeindex.py do load AnnoyIndex
![](indra_logo.png) [![Build Status](https://travis-ci.org/Lambda-3/Indra.svg?branch=master)](https://travis-ci.org/Lambda-3/Indra) [![Chat](https://badges.gitter.im/Lambda-3/gitter.png)](https://gitter.im/Lambda-3/Lobby) # What is Indra? Indra is an efficient library and service to deliver word-embeddings and semantic relatedness to real-world applications in the domains of machine learning and natural language processing. It offers 60+ pre-build models in 15 languages and several model algorithms and corpora. Indra is powered by [spotify-annoy](https://github.com/spotify/annoy) delivering an efficient [approximate nearest neighbors](http://en.wikipedia.org/wiki/Nearest_neighbor_search#Approximate_nearest_neighbor) function. # Features * Efficient approximate nearest neighbors (powered by [spotify-annoy](https://github.com/spotify/annoy)); * 60+ pre-build models in 15 languages; * Permissive license for commercial use (MIT License);
620
Lambda-3/pyindra
['semantic textual similarity']
['Indra: A Word Embedding and Semantic Relatedness Server']
setup.py pyindra/__init__.py IndraException Indra NeighborsType
# The Python Indra Client ##### The official python client for the Indra word embedding and semantic relatedness server Indra is an efficient library and service to deliver word-embeddings and semantic relatedness to real-world applications in the domains of machine learning and natural language processing. It offers 60+ pre-build models in 14 languages and several model algorithms and corpora. Indra is powered by [spotify-annoy](https://github.com/spotify/annoy) delivering an efficient [approximate nearest neighbors](http://en.wikipedia.org/wiki/Nearest_neighbor_search#Approximate_nearest_neighbor) function. Indra server is available with MIT License in [this repository](https://github.com/Lambda-3/Indra).
621
LantaoYu/SeqGAN
['text generation']
['SeqGAN: Sequence Generative Adversarial Nets with Policy Gradient']
rollout.py discriminator.py sequence_gan.py dataloader.py generator.py target_lstm.py Gen_Data_loader Dis_dataloader linear highway Discriminator Generator ROLLOUT TARGET_LSTM as_list
# SeqGAN ## Requirements: * **Tensorflow r1.0.1** * Python 2.7 * CUDA 7.5+ (For GPU) ## Introduction Apply Generative Adversarial Nets to generating sequences of discrete tokens. ![](https://github.com/LantaoYu/SeqGAN/blob/master/figures/seqgan.png) The illustration of SeqGAN. Left: D is trained over the real data and the generated data by G. Right: G is trained by policy gradient where the final reward signal is provided by D and is passed back to the intermediate action value via Monte Carlo search. The research paper [SeqGAN: Sequence Generative Adversarial Nets with Policy Gradient](http://arxiv.org/abs/1609.05473) has been accepted at the Thirty-First AAAI Conference on Artificial Intelligence (AAAI-17).
622
LaoYang1994/SOGNet
['panoptic segmentation', 'instance segmentation', 'semantic segmentation']
['SOGNet: Scene Overlap Graph Network for Panoptic Segmentation']
sognet/rpn/setup.py sognet/config/parse_args.py sognet/dataset/cityscapes.py sognet/operators/functions/mod_deform_conv.py sognet/operators/modules/mask_roi.py sognet/bbox/sample_rois.py sognet/models/fcn.py sognet/lib/utils/metric.py sognet/operators/functions/proposal_target.py sognet/bbox/bbox_regression.py sognet/lib/utils/timer.py sognet/operators/functions/proposal_mask_target.py sognet/lib/nn/optimizer.py sognet/operators/modules/view.py sognet/dataset/ade20k.py sognet/lib/utils/logging.py sognet/dataset/json_dataset_city.py init_coco.py sognet/operators/modules/pyramid_proposal.py sognet/operators/modules/fpn_roi_pooling.py sognet/operators/modules/deform_conv.py sognet/operators/modules/proposal_mask_target.py sognet/lib/utils/data_parallel.py sognet/operators/functions/pyramid_proposal.py sognet/models/relation.py sognet/dataset/__init__.py sognet/operators/build_deform_conv.py sognet/nms/py_cpu_nms.py sognet/operators/modules/mask_removal.py sognet/operators/modules/mask_matching.py sognet/dataset/imdb.py sognet/models/__init__.py sognet/operators/build_mod_deform_conv.py tools/train_net.py sognet/lib/utils/callback.py sognet/operators/functions/roialign.py sognet/bbox/setup.py sognet/rpn/assign_anchor.py tools/test_net.py sognet/dataset/base_dataset.py sognet/operators/modules/fpn_roi_align.py sognet/operators/modules/unary_logits.py sognet/bbox/bbox_transform.py sognet/lib/utils/colormap.py sognet/models/sognet.py sognet/operators/functions/deform_conv.py sognet/operators/modules/proposal_target.py sognet/mask/mask_transform.py sognet/rpn/generate_anchors.py sognet/models/rpn.py sognet/operators/modules/roialign.py sognet/config/config.py sognet/dataset/json_dataset.py sognet/nms/nms.py sognet/models/fpn.py sognet/operators/build_roialign.py sognet/operators/modules/mod_deform_conv.py sognet/models/resnet.py sognet/nms/setup.py sognet/dataset/coco.py sognet/models/rcnn.py add_bbox_regression_targets compute_bbox_mask_targets_and_label expand_bbox_regression_targets compute_bbox_regression_targets compute_mask_and_label expand_boxes iou_transform clip_xyxy_to_image nonlinear_transform aspect_ratio flip_boxes filter_boxes unique_boxes nonlinear_pred xywh_to_xyxy soft_nms clip_boxes bbox_transform clip_tiled_boxes xyxy_to_xywh bbox_overlaps_py bbox_transform_inv clip_boxes_to_image iou_pred bbox_overlaps _compute_targets sample_rois _expand_bbox_targets compute_mask_and_label compute_assign_targets customize_compiler_for_nvcc custom_build_ext update_config parse_args ade20k PQStat BaseDataset PQStatCat Cityscapes coco imdb add_bbox_regression_targets extend_with_flipped_entries _compute_targets _merge_proposal_boxes_into_roidb _add_class_assignments _sort_proposals filter_for_training _filter_crowd_proposals JsonDataset add_proposals add_bbox_regression_targets extend_with_flipped_entries _compute_targets _merge_proposal_boxes_into_roidb _add_class_assignments _sort_proposals filter_for_training _filter_crowd_proposals JsonDataset add_proposals clip_grad Adam SGD Speedometer colormap DataParallel _check_balance create_logger IoUMetric AvgMetric AccWithIgnoreMetric EvalMetric timeit Timer add_mask_rcnn_blobs mask_overlap mask_to_bbox _expand_to_class_specific_mask_targets polys_to_mask flip_segms intersect_box_mask get_gt_masks polys_to_boxes mask_aggregation polys_to_mask_wrt_box FCNSubNet FCNHead CrossEntropyLoss2d FPN MaskRCNNLoss RCNNLoss RCNN MaskBranch RelationHead RelationLoss resnet_rcnn DCNBottleneck Bottleneck res_block ResNetBackbone get_params conv1 RPN RPNLoss resnet_101_sognet SOGNet resnet_50_sognet py_nms cpu_nms_wrapper py_nms_wrapper py_soft_nms_wrapper gpu_nms_wrapper py_cpu_nms find_in_path customize_compiler_for_nvcc custom_build_ext locate_cuda _create_module_dir _create_module_dir _create_module_dir DeformConvFunction ModDeformConvFunction ProposalMaskTargetFunction ProposalTargetFunction PyramidProposalFunction RoIAlignFunction DeformConv DeformConvWithOffset FPNRoIAlign FPNRoIPool MaskMatching PanopticGTGenerate MaskRemoval MaskROI ModDeformConvWithOffsetMask ModDeformConv ProposalMaskTarget ProposalTarget PyramidProposal RoIAlign MaskTerm SegTerm View add_rpn_blobs _get_rpn_blobs assign_anchor assign_pyramid_anchor generate_anchors _scale_enum get_field_of_anchors _whctrs unmap compute_targets _ratio_enum _generate_anchors _mkanchors find_in_path customize_compiler_for_nvcc custom_build_ext locate_cuda im_post im_detect sognet_test lr_poly adjust_learning_rate sognet_train lr_factor get_step_index print bbox_transform astype zeros float argmax bbox_overlaps min where shape unique resize zeros max range print astype float argmax bbox_overlaps compute_mask_and_label bbox_stds bbox_means print bbox_normalization_precomputed mean sqrt compute_bbox_regression_targets tile zeros array range len zeros bbox_weights class_agnostic shape min zeros float max range minimum maximum minimum maximum minimum maximum minimum maximum dot array unique transpose log exp astype shape zeros float zeros float astype shape ndarray maximum isinstance ndarray isinstance copy copy float32 uint8 ascontiguousarray minimum dtype exp astype shape zeros log transpose log zeros shape logical_and rcnn_feat_stride sqrt zeros enumerate minimum int fg_fraction add_mask_rcnn_blobs has_mask_head ones size _compute_targets hstack float32 choice dict batch_rois _expand_bbox_targets append round array bbox_reg_weights bbox_transform_inv zeros int shape append _compile compiler_so debug_mode add_argument parse_known_args cfg ArgumentParser update_config _merge_proposal_boxes_into_roidb _add_class_assignments _filter_crowd_proposals append range len items flip_segms extend copy append format info len _compute_targets astype zeros argmax bbox_overlaps dtype toarray csr_matrix astype bbox_overlaps zeros argmax max append enumerate iou toarray csr_matrix xyxy_to_xywh len max argmax toarray argsort list filter clamp_ reshape astype float32 warn_imbalance join basicConfig format setFormatter getLogger addHandler strftime StreamHandler Formatter setLevel INFO makedirs zeros astype range resize sum min max zeros min max min astype where array zeros max range len append _flip_rle frPyObjects sum array decode decode maximum append frPyObjects sum array min zeros max range len mask_size _expand_to_class_specific_mask_targets ones reshape hstack astype float32 copy polys_to_boxes array zeros argmax bbox_overlaps range polys_to_mask_wrt_box mask_size int range named_modules join named_parameters append maximum minimum append maximum minimum pathsep pjoin exists split find_in_path items pjoin pathsep dirname sep join reduce close accumulate split rpartition makedirs arange _unmap rpn_bbox_weights rpn_fg_fraction argmax rpn_batch_size rpn_clobber_positives generate_anchors transpose array meshgrid sum bbox_transform astype choice fill float empty int reshape zeros bbox_overlaps _unmap rpn_bbox_weights rpn_fg_fraction argmax rpn_batch_size max rpn_clobber_positives generate_anchors list transpose array append sum range concatenate bbox_transform anchors_cython astype choice sqrt fill float empty int print reshape zeros bbox_overlaps len items anchor_scales get_field_of_anchors has_fpn concatenate anchor_ratios rpn_feat_stride _get_rpn_blobs field_of_anchors zeros round array append enumerate num_cell_anchors arange rpn_fg_fraction argmax rpn_batch_size transpose rpn_straddle_thresh append sum unmap choice fill empty int compute_targets dict zeros bbox_overlaps field_size len vstack _ratio_enum array str generate_anchors int arange meshgrid reshape transpose FieldOfAnchors rcnn_feat_stride max_size ceil float ravel fill empty hstack sqrt _whctrs round _mkanchors _whctrs _mkanchors has_mask_head has_fcn_head append has_panoptic_head range len mask_size expand_boxes max decode hstack astype maximum min int32 resize append zeros array range model_prefix DataLoader Timer evaluate_ssegs im_post resize cuda open str vis_mask get_unified_pan_result num_classes evaluate_boxes exit pprint tic eval_only load_state_dict has_fcn_head has_rcnn append to next vis_all_mask range format has_mask_head astype eval pformat info __iter__ zip enumerate load join items toc weight_path makedirs extend evaluate_panoptic test_iteration parameters int32 evaluate_masks has_panoptic_head output_path split enumerate backbone_freeze_at callback allreduce_async backbone_fix_bn model_prefix zero_grad SGD DistributedOptimizer use_syncbn pretrained DataLoader adjust_learning_rate save div_ cuda has_rpn use_horovod str DistributedSampler fcn_with_roi_loss relation_loss_weight has_relation load_state_dict has_fcn_head has_rcnn broadcast_parameters to next append eval_data state_dict update get freeze_backbone format has_mask_head bbox_loss_weight begin_iteration get_params_lr mean eval resume pformat info __iter__ item zip keys panoptic_loss_weight enumerate load join items train_model backward extend set_epoch reset fcn_loss_weight train step has_panoptic_head add_scalar
# Attention!!! We have made the [detectron2-based code](https://github.com/LaoYang1994/SOGNet-Dev) public. But there are still some bugs in it. We will fix them as soon as possible. # SOGNet This repository is for [SOGNet: Scene Overlap Graph Network for Panoptic Segmentation](https://arxiv.org/abs/1911.07527) which has been accepted by AAAI2020 and won the Innovation Award in COCO 2019 challenge, by [Yibo Yang](https://zero-lab-pku.github.io/personwise/yangyibo/), [Hongyang Li](https://zero-lab-pku.github.io/personwise/lihongyang/), [Xia Li](https://zero-lab-pku.github.io/personwise/lixia/), Qijie Zhao, [Jianlong Wu](https://zero-lab-pku.github.io/personwise/wujianlong/), [Zhouchen Lin](https://zero-lab-pku.github.io/personwise/linzhouchen/) This repo is modified from [UPSNet](https://github.com/uber-research/UPSNet). We have been transfering the code into [detectron2](https://github.com/facebookresearch/detectron2) framework. Not finished yet. ## Introduction The panoptic segmentation task requires a unified result from semantic and instance segmentation outputs that may contain overlaps. However, current studies widely ignore modeling overlaps. In this study, we aim to model overlap relations among instances and resolve them for panoptic segmentation. Inspired by scene graph representation, we formulate the overlapping problem as a simplified case, named scene overlap graph. We leverage each object's category, geometry and appearance features to perform relational embedding, and output a relation matrix that encodes overlap relations. In order to overcome the lack of supervision, we introduce a differentiable module to resolve the overlap between any pair of instances. The mask logits after removing overlaps are fed into per-pixel instance id classification, which leverages the panoptic supervision to assist in the modeling of overlap relations. Besides, we generate an approximate ground truth of overlap relations as the weak supervision, to quantify the accuracy of overlap relations predicted by our method. Experiments on COCO and Cityscapes demonstrate that our method is able to accurately predict overlap relations, and outperform the state-of-the-art performance for panoptic segmentation. Our method also won the Innovation Award in COCO 2019 challenge. ![SOGNet](assets/sognet.png) ## Usage
623
Larryliu912/Vincent-2.0
['style transfer']
['A Neural Algorithm of Artistic Style']
Vincent/histsimilar.py Vincent/vincent.py Vincent/vincent_2.0.py Vincent/vgg.py Vincent/stylize.py make_regalur_image hist_similar calc_similar calc_similar_by_path stylize _tensor_size load_net _pool_layer net_preloaded _conv_layer unprocess preprocess generate_noise_image style_loss_func content_loss_func imread load_vgg_model save_image main imread imsave load_net Graph shape range len mean loadmat _pool_layer relu reshape transpose _conv_layer enumerate conv2d constant Variable random_normal float astype dstack astype imsave _conv2d_relu Variable zeros _avgpool loadmat sum stylize imresize imsave shape imread sum range len uint8 astype save
# Vincent-2.0 It is a Neural Network that can transfer a picture to amazing Vincent van Gogh's oil paintings. Here I try to implement the algorithm and neural network in the paper A Neural Algorithm of Artistic Style https://arxiv.org/pdf/1508.06576v2.pdf by Tensorflow and Python. In this paper, the authors claim a method to obtain a representation of the style of a picture and apply and combine this style into another picture. For Vincent, the main idea is: 1. Use the pre-trained classification network VGG 19 to extract the features in the different layers of the picture (The imagenet-vgg-verydeep-19.mat is needed to run this program, because it is too large so please download it by http://www.vlfeat.org/matconvnet/models/beta16/imagenet-vgg-verydeep-19.mat and put it in the document Vincent) 2. The style is in the low layer of the picture, the content is the in the high layer of the picture 3. Use the gradient descent to fine the image by the loss function 4. After iteration, we can keep a part of the content of the picture and apply the style of the other picture in this picture.
624
LaurantChao/VIP
['gaussian processes', 'stochastic optimization']
['Variational Implicit Processes']
import_libs.py validation.py test.py Main.py VIP_fun_speedup_recon_alpha_classic_validate.py
# Variational Implicit Processes This is an example code for the paper titled Variational Implicit Processes (ICML 2019) This code implememts VIP-BNN on a UCI dataset. To use this code: simply run Main.py minor differences from the paper might occur due to randomness. Dependencies: - sklearn - 0.19.0 - pandas - 0.22.0 - tensorflow - 1.4.0
625
LaurenceA/bayesfunc
['gaussian processes', 'data augmentation']
['Global inducing point variational posteriors for Bayesian neural networks and deep Gaussian processes']
bayesfunc/kernels_minimal.py bayesfunc/bconv2d.py bayesfunc/det.py bayesfunc/outputs.py bayesfunc/gp.py bayesfunc/dkp.py docs/conf.py bayesfunc/inducing.py bayesfunc/abstract_bnn.py examples/cifar10.py bayesfunc/transforms.py bayesfunc/wishart_dist.py bayesfunc/priors.py bayesfunc/prob_prog.py bayesfunc/general.py bayesfunc/wishart_layer.py bayesfunc/singular_cholesky.py bayesfunc/factorised_local_reparam.py examples/models/resnet8.py bayesfunc/__init__.py bayesfunc/random.py bayesfunc/factorised.py setup.py bayesfunc/conv_mm.py bayesfunc/lop.py uci/__init__.py AbstractConv2d AbstractLinear bconv2d conv_1x1 extract_patches_conv conv_mm batch_extract_patches_conv extract_patches_unfold DetLinear DetLinearWeights DetConv2d DetParam DetConv2dWeights InverseWishart SingularIWLayer IWLayer bartlett FactorisedLinear FactorisedConv2dWeights FactorisedParam FactorisedConv2d FactorisedLinearWeights FactorisedLRLinearWeights FactorisedLRConv2d FactorisedLRParam FactorisedLRLinear FactorisedParam FactorisedLRConv2dWeights AbstractLRLinear InducingAdd InducingWrapper Reduce KG DetBatchNorm2d Conv2d_2_FC WrapMod Bias MaxPool2d MultFeatures BiasFeature Sum unbatch AbstractBatchNorm2d clear_sample InducingRemove Cat2d get_sample_dict AdaptiveAvgPool2d MultKernel propagate batch AvgPool2d set_sample_dict WrapMod2d logpq _Conv2d_2_FC NormalLearnedScale BatchNorm2d Print KernelLIGP GIGP KernelGIGP GIConv2dWeights LILinearWeights rsample_logpq_weights_fc GILinear GILinearWeights GIConv2d GILinearFullPrec LILinear LIConv2d rsample_logpq_weights LIConv2dWeights Kernel ReluKernelFeatures FeaturesToKernel KernelFeatures CombinedKernel ReluKernelGram SqExpKernel SqExpKernelGram IdentityKernel KernelGram Inv TriangularMatrix PositiveDefiniteMatrix Product FullMatrix mvnormal_log_prob Matrix kron_prod Scale LowerTriangularMatrix trace_quad UpperTriangularMatrix Identity KFac mvnormal_log_prob_unnorm tests CategoricalOutput NormalOutput Output CutOutput DetScalePrior ScalePrior SpatialIWPrior IWPrior InsanePrior KFacIWPrior NealPrior FactorisedPrior VI_Normal VI_InverseWishart VI_Scale VI_Scalar VI_Gamma RandomLinear RandomParam RandomLinearWeights RandomConv2d RandomConv2dWeights singular_cholesky Blur DoG ConvTransform Identity InverseWishart Wishart bartlett IWLinear train test block net UCI Dataset view reshape transpose shape conv2d shape sum view reshape transpose expand shape conv2d pad permute view reshape transpose expand conv2d pad numel view extract_patches_conv unfold shape pad contiguous PositiveDefiniteMatrix Gamma arange randn LowerTriangularMatrix shape sqrt eye N tril InducingAdd InducingRemove hasattr modules hasattr modules named_modules _sample hasattr items detach clear_sample f set_sample_dict get_sample_dict contiguous GIGP DefaultKernel DefaultKernel GIGP InducingAdd InducingRemove randn squeeze transpose unsqueeze cholesky device cholesky_solve mvnormal_log_prob_unnorm sum full prior u exp transpose prec_L log_prec_lr log_prec_scaled randn cholesky transpose eye allclose ones device argmax backward train_samples squeeze zero_grad L logsumexp expand mean log floor Categorical step propagate len squeeze test_samples logsumexp expand mean argmax log Conv2d_2_FC AvgPool2d linear block Sequential conv2d ReLU AdaptiveAvgPool2d
# bayesfunc ## Installation Run: ```python python setup.py develop ``` which copies symlinks to your package directory. ## Tutorial Look at examples/simple.ipynb in the repo. ## Documentation
626
Lavender105/DFF
['object proposal generation', 'edge detection', 'semantic segmentation']
['CASENet: Deep Category-Aware Semantic Edge Detection', 'Dynamic Feature Fusion for Semantic Edge Detection']
pytorch-encoding/scripts/prepare_cityscapes.py pytorch-encoding/experiments/recognition/model/encnet.py pytorch-encoding/scripts/prepare_pcontext.py pytorch-encoding/encoding/nn/encoding.py pytorch-encoding/encoding/nn/customize.py pytorch-encoding/encoding/utils/log.py pytorch-encoding/encoding/nn/syncbn.py pytorch-encoding/experiments/recognition/model/mynn.py exps/visualize/__init__.py pytorch-encoding/encoding/__init__.py exps/datasets/base_sbd.py exps/models/base.py pytorch-encoding/encoding/datasets/ade20k.py pytorch-encoding/tests/unit_test/test_function.py pytorch-encoding/encoding/lib/cpu/setup.py pytorch-encoding/encoding/utils/pallete.py pytorch-encoding/encoding/models/psp.py pytorch-encoding/encoding/parallel.py pytorch-encoding/encoding/models/__init__.py pytorch-encoding/encoding/datasets/pcontext.py pytorch-encoding/encoding/models/model_zoo.py pytorch-encoding/encoding/lib/__init__.py pytorch-encoding/encoding/models/gcnet.py pytorch-encoding/experiments/recognition/dataset/minc.py pytorch-encoding/experiments/segmentation/train.py pytorch-encoding/encoding/nn/comm.py pytorch-encoding/scripts/prepare_coco.py pytorch-encoding/experiments/recognition/model/resnet.py exps/losses/customize.py exps/models/dff.py exps/visualize/visualize.py exps/train.py pytorch-encoding/encoding/models/model_store.py pytorch-encoding/encoding/models/encnet.py pytorch-encoding/encoding/utils/visualize.py pytorch-encoding/scripts/prepare_ade20k.py exps/datasets/sbd.py pytorch-encoding/experiments/recognition/main.py pytorch-encoding/encoding/datasets/base.py pytorch-encoding/tests/unit_test/test_module.py pytorch-encoding/encoding/utils/__init__.py pytorch-encoding/encoding/datasets/cityscapes.py pytorch-encoding/tests/unit_test/test_utils.py pytorch-encoding/experiments/recognition/dataset/cifar10.py pytorch-encoding/encoding/dilated/__init__.py pytorch-encoding/encoding/datasets/pascal_voc.py pytorch-encoding/encoding/utils/files_orig.py pytorch-encoding/encoding/utils/presets.py pytorch-encoding/encoding/dilated/resnet.py pytorch-encoding/experiments/segmentation/option.py pytorch-encoding/tests/lint.py pytorch-encoding/encoding/version.py pytorch-encoding/encoding/datasets/pascal_aug.py pytorch-encoding/setup.py pytorch-encoding/docs/source/conf.py pytorch-encoding/encoding/functions/encoding.py exps/datasets/__init__.py pytorch-encoding/encoding/utils/train_helper.py pytorch-encoding/encoding/datasets/__init__.py pytorch-encoding/encoding/models/casenet.py pytorch-encoding/encoding/utils/files.py pytorch-encoding/experiments/recognition/option.py pytorch-encoding/experiments/segmentation/demo.py pytorch-encoding/encoding/datasets/coco.py exps/option.py pytorch-encoding/scripts/prepare_pascal.py pytorch-encoding/encoding/models/base.py pytorch-encoding/experiments/recognition/model/deepten.py pytorch-encoding/encoding/lib/gpu/setup.py pytorch-encoding/scripts/prepare_minc.py pytorch-encoding/experiments/segmentation/test_models.py exps/models/__init__.py pytorch-encoding/encoding/utils/lr_scheduler.py pytorch-encoding/encoding/models/danet.py pytorch-encoding/encoding/nn/__init__.py pytorch-encoding/encoding/functions/customize.py exps/models/casenet.py exps/losses/__init__.py pytorch-encoding/encoding/functions/syncbn.py pytorch-encoding/encoding/nn/attention.py pytorch-encoding/encoding/functions/__init__.py pytorch-encoding/experiments/recognition/model/download_models.py exps/datasets/base_cityscapes.py pytorch-encoding/encoding/models/plain.py exps/datasets/cityscapes.py exps/test.py pytorch-encoding/encoding/models/fcn.py pytorch-encoding/experiments/recognition/model/encnetdrop.py pytorch-encoding/experiments/segmentation/test.py pytorch-encoding/encoding/utils/metrics.py Options eval_model test BaseDataset test_batchify_fn BaseDataset test_batchify_fn _get_cityscapes_pairs CityscapesEdgeDetection _get_sbd_pairs SBDEdgeDetection get_edge_dataset WeightedCrossEntropyWithLogits EdgeDetectionReweightedLosses_CPU EdgeDetectionReweightedLosses module_inference MultiEvalModule BaseNet flip_image resize_image pad_image crop_image CaseNet get_casenet get_dff DFF LocationAdaptiveLearner get_edge_model visualize_prediction apply_mask create_version_file develop install patched_make_field CallbackContext allreduce AllReduce DataParallelModel _criterion_parallel_apply execute_replication_callbacks Reduce patch_replication_callback DataParallelCriterion ADE20KSegmentation _get_ade20k_pairs BaseDataset test_batchify_fn _get_cityscapes_pairs CityscapesEdgeDetection COCOSegmentation VOCAugSegmentation VOCSegmentation ContextSegmentation get_segmentation_dataset get_edge_dataset ResNet resnet50 Bottleneck resnet152 conv3x3 resnet34 resnet18 BasicBlock resnet101 NonMaxSuppression scaled_l2 aggregate _aggregate pairwise_cosine _scaled_l2 _batchnormtrain batchnormtrain _sum_square sum_square module_inference MultiEvalModule BaseNet flip_image resize_image pad_image crop_image CaseNet get_casenet DANet get_danet DANetHead EncHead EncNet get_encnet_resnet50_ade EncModule get_encnet_resnet101_pcontext get_encnet get_encnet_resnet50_pcontext get_fcn_resnet50_pcontext FCNHead get_fcn_resnet50_ade FCN get_fcn get_gcnet Customized_Unit GCNet GCNetHead GCN get_model_file short_hash purge pretrained_model_list get_model PlainNet get_plain PlainNetHead PSPHead PSP get_psp_resnet50_ade get_psp get_edge_model CAM_Module PAM_Module SyncMaster FutureResult SlavePipe softmax_crossentropy WeightedCrossEntropyWithLogits SegmentationMultiLosses Mean EdgeDetectionReweightedChannelwiseLosses EdgeDetectionReweightedLosses_CPU WeightedChannelwiseCrossEntropyWithLogits EdgeDetectionReweightedChannelwiseLosses_CPU SegmentationLosses Sum Normalize View PyramidPooling GramMatrix EdgeDetectionReweightedLosses Encoding EncodingDrop UpsampleConv2d Inspiration BatchNorm3d SharedTensor _SyncBatchNorm BatchNorm1d BatchNorm2d download save_checkpoint mkdir check_sha1 download save_checkpoint mkdir check_sha1 create_logger LR_Scheduler SegmentationMetric batch_intersection_union batch_pix_accuracy pixel_accuracy intersection_and_union get_mask_pallete _get_voc_pallete load_image get_selabel_vector EMA visualize_prediction apply_mask class_specific_color main Options Dataloader Lighting find_classes MINCDataloder Dataloader make_dataset Net Net Net test EncDropLayer Bottleneck EncLayerV3 conv3x3 Basicblock EncBasicBlock EncBottleneck EncLayerV2 EncLayer Net Options test Trainer parse_args download_ade download_city parse_args parse_args install_coco_api download_coco parse_args download_minc parse_args download_voc download_aug install_pcontext_api parse_args download_ade filepath_enumerate LintHelper get_header_guard_dmlc main process test_aggregate_v2 test_non_max_suppression test_sum_square test_syncbn_func test_encoding_dist_inference test_encoding_dist test_aggregate test_scaled_l2 _assert_tensor_close _assert_tensor_close testSyncBN test_encoding test_all_reduce test_segmentation_metrics Options eval_model test BaseDataset test_batchify_fn _get_cityscapes_pairs CityscapesEdgeDetection _get_sbd_pairs SBDEdgeDetection get_edge_dataset WeightedCrossEntropyWithLogits EdgeDetectionReweightedLosses_CPU EdgeDetectionReweightedLosses module_inference MultiEvalModule BaseNet flip_image resize_image pad_image crop_image CaseNet get_casenet get_dff DFF LocationAdaptiveLearner get_edge_model visualize_prediction apply_mask create_version_file develop install patched_make_field CallbackContext allreduce AllReduce DataParallelModel _criterion_parallel_apply execute_replication_callbacks Reduce patch_replication_callback DataParallelCriterion ADE20KSegmentation _get_ade20k_pairs BaseDataset test_batchify_fn _get_cityscapes_pairs CityscapesEdgeDetection COCOSegmentation VOCAugSegmentation VOCSegmentation ContextSegmentation get_segmentation_dataset get_edge_dataset ResNet resnet50 Bottleneck resnet152 conv3x3 resnet34 resnet18 BasicBlock resnet101 NonMaxSuppression scaled_l2 aggregate _aggregate pairwise_cosine _scaled_l2 _batchnormtrain batchnormtrain _sum_square sum_square module_inference MultiEvalModule BaseNet flip_image resize_image pad_image crop_image CaseNet get_casenet DANet get_danet DANetHead EncHead EncNet get_encnet_resnet50_ade EncModule get_encnet_resnet101_pcontext get_encnet get_encnet_resnet50_pcontext get_fcn_resnet50_pcontext FCNHead get_fcn_resnet50_ade FCN get_fcn get_gcnet Customized_Unit GCNet GCNetHead GCN get_model_file short_hash purge pretrained_model_list get_model PlainNet get_plain PlainNetHead PSPHead PSP get_psp_resnet50_ade get_psp get_edge_model CAM_Module PAM_Module SyncMaster FutureResult SlavePipe softmax_crossentropy WeightedCrossEntropyWithLogits SegmentationMultiLosses Mean EdgeDetectionReweightedChannelwiseLosses EdgeDetectionReweightedLosses_CPU WeightedChannelwiseCrossEntropyWithLogits EdgeDetectionReweightedChannelwiseLosses_CPU SegmentationLosses Sum Normalize View PyramidPooling GramMatrix EdgeDetectionReweightedLosses Encoding EncodingDrop UpsampleConv2d Inspiration BatchNorm3d SharedTensor _SyncBatchNorm BatchNorm1d BatchNorm2d download save_checkpoint mkdir check_sha1 create_logger LR_Scheduler SegmentationMetric batch_intersection_union batch_pix_accuracy pixel_accuracy intersection_and_union get_mask_pallete _get_voc_pallete load_image get_selabel_vector EMA visualize_prediction apply_mask class_specific_color main Options Dataloader Lighting find_classes MINCDataloder make_dataset Net Net test EncDropLayer Bottleneck EncLayerV3 conv3x3 Basicblock EncBasicBlock EncBottleneck EncLayerV2 EncLayer Net Options test Trainer parse_args download_ade download_city install_coco_api download_coco download_minc download_voc download_aug install_pcontext_api download_ade filepath_enumerate LintHelper get_header_guard_dmlc main process test_aggregate_v2 test_non_max_suppression test_sum_square test_syncbn_func test_encoding_dist_inference test_encoding_dist test_aggregate test_scaled_l2 _assert_tensor_close testSyncBN test_encoding test_all_reduce test_segmentation_metrics load get_edge_dataset num_class get_edge_model model print Compose tqdm eval DataLoader resume load_state_dict append dataset cuda range enumerate makedirs resume_dir test isinstance zip join get_path_pairs join get_path_pairs flip_image evaluate size resize_ pad array range load CaseNet get_model_file load_state_dict NUM_CLASS load DFF get_model_file load_state_dict NUM_CLASS range where imsave transpose astype shape apply_mask zeros bool array range print join handle_item field_body label field_name list_type join isinstance _worker len start is_grad_enabled append range Lock list hasattr __data_parallel_replicate__ modules enumerate len replicate join get_path_pairs replace load_url ResNet load_state_dict load_url ResNet load_state_dict load ResNet load_state_dict get_model_file load ResNet load_state_dict get_model_file load ResNet load_state_dict is_cuda normalize load get_model_file DANet load_state_dict NUM_CLASS load EncNet get_model_file load_state_dict NUM_CLASS load get_model_file load_state_dict NUM_CLASS FCN load get_model_file GCNet load_state_dict NUM_CLASS get join remove format print check_sha1 expanduser download exists makedirs join remove endswith expanduser listdir lower load get_model_file PlainNet load_state_dict NUM_CLASS load PSP get_model_file load_state_dict NUM_CLASS save makedirs get join isdir print dirname abspath expanduser makedirs sha1 makedirs copyfile join setFormatter format FileHandler getLogger addHandler strftime StreamHandler localtime Formatter setLevel INFO makedirs sum max astype dtype max histogram astype sum asarray asarray histogram fromarray astype putpalette range int ANTIALIAS convert resize input_transform histc size zeros float range hsv_to_rgb ones class_specific_color uint32 model SGD DataParallel clf dataset ion cuda seed show getloader ylabel Dataloader savefig load_state_dict CrossEntropyLoss range parse format plot test Net eval import_module resume lr start_epoch manual_seed lr_step load lr_scheduler LR_Scheduler print xlabel parameters isfile train epochs len sort parameters net get_mask_pallete get_segmentation_model save get_segmentation_dataset format model_zoo zip join SegmentationMetric get_model add_argument ArgumentParser join download mkdir print join mkdir download mkdir rmtree system join download mkdir join download mkdir join download mkdir basename move rmtree system join normpath isfile append walk FileInfo sub startswith append RepositoryName project_name find process_python str process_cpp rsplit exclude_path ArgumentParser project exit stderr normpath parse_args process filetype walk filepath_enumerate set print_summary getwriter join getreader add_argument path StreamReaderWriter format aggregate Variable print gradcheck uniform_ scaled_l2 format Variable print gradcheck uniform_ format aggregate_v2 Variable print requires_grad_ gradcheck uniform_ _assert_tensor_close py_aggregate_v2 cuda detach format backward print encoding_dist requires_grad_ gradcheck mahalanobis_dist zero_ uniform_ _assert_tensor_close sum cuda detach encoding_dist_inference format backward Variable print grad requires_grad_ gradcheck mahalanobis_dist uniform_ _assert_tensor_close sum cuda detach format Variable print gradcheck uniform_ sum_square format batchnormtrain Variable print gradcheck uniform_ _test_nms format Variable print gradcheck uniform_ cuda data allreduce format print device_count gradcheck _assert_tensor_close range print _check_batchnorm_result patch_replication_callback double cuda range spacing batch_intersection_union print batch_pix_accuracy random mean unsqueeze randint matrix argmax long pixel_accuracy intersection_and_union
# Dynamic Feature Fusion for Semantic Edge Detection (DFF) Yuan Hu, Yunpeng Chen, Xiang Li and Jiashi Feng ![overview.png](https://github.com/Lavender105/DFF/blob/master/img/overview.png) ![visualization.png](https://github.com/Lavender105/DFF/blob/master/img/visualization.png) ### Video Demo We have released a demo video of DFF on [Youtube](https://youtu.be/wSCKTepMfhY) and [Bilibili](https://www.bilibili.com/video/av54650328/). ## Introduction The repository contains the entire pipeline (including data preprocessing, training, testing, visualization, evaluation and demo generation, etc) for DFF using Pytorch 1.0. We propose a novel dynamic feature fusion strategy for semantic edge detection. This is achieved by a proposed weight learner to infer proper fusion weights over multi-level features for each location of the feature map, conditioned on the specific input. We show that our model with the novel dynamic feature fusion is superior to fixed weight fusion and also the na¨ ıve location-invariant weight fusion methods, and we achieve new state-of-the-art on benchmarks Cityscapes and SBD. For more details, please refer to the [IJCAI2019](https://www.ijcai.org/proceedings/2019/0110.pdf) paper. We also reproduce CASENet in this repository, and actually achieve higher accuracy than the original [paper](https://arxiv.org/abs/1705.09759) .
627
LeMinhThong/blackbox-attack
['adversarial attack']
['Towards Evaluating the Robustness of Neural Networks']
boundary_attack.py blackbox_attack.py models.py batch_attack.py zoo_attack.py attack_untargeted fine_grained_binary_search initial_fine_grained_binary_search initial_fine_grained_binary_search_targeted attack_mnist fine_grained_binary_search_local attack_imgnet fine_grained_binary_search_targeted attack_targeted fine_grained_binary_search_local_targeted attack_single attack_cifar attack_untargeted fine_grained_binary_search attack_mnist fine_grained_binary_search_local attack_cifar10 fine_grained_binary_search_targeted attack_targeted fine_grained_binary_search_local_targeted attack_imagenet attack_untargeted fine_grained_binary_search_local fine_grained_binary_search boundary_attack_mnist save_model ToSpaceBGR train_cifar10 load_mnist_data ToRange255 load_model ImagenetTestDataset SimpleMNIST train_mnist IMAGENET show_image CIFAR10 test_cifar10 imagenettest load_imagenet_data load_cifar10_data MNIST train_simple_mnist test_mnist zoo_attack attack coordinate_ADAM sub_ randn cuda FloatTensor squeeze expand range predict initial_fine_grained_binary_search_targeted size fine_grained_binary_search_local_targeted manual_seed float type enumerate time norm print min clone max mul view FloatTensor predict_batch size resize_ clone min expand type cuda range view print predict_batch min expand sub_ randn cuda initial_fine_grained_binary_search FloatTensor squeeze expand range predict size manual_seed float type enumerate time norm print predict_batch fine_grained_binary_search_local min clone max mul view FloatTensor predict_batch size resize_ clone min expand type cuda range view print predict_batch min expand attack_untargeted print attack_targeted show_image numpy predict MNIST seed list format pop load_model print choice DataParallel eval is_available randint cuda range load_mnist_data len seed pop list format load_model print len choice DataParallel eval CIFAR10 is_available randint cuda range load_cifar10_data seed pop list format print IMAGENET choice randint imagenettest range len set fine_grained_binary_search_targeted sample zeros len enumerate fine_grained_binary_search set sample zeros len format load_model print DataParallel eval CIFAR10 is_available cuda load_cifar10_data len format print IMAGENET load_imagenet_data len enumerate MNIST attack_untargeted format load_model print predict DataParallel eval show_image is_available numpy cuda load_mnist_data enumerate flatten join print range MNIST DataLoader DataLoader CIFAR10 ImageFolder Compose Normalize DataLoader DataLoader Compose Normalize ImagenetTestDataset criterion model Variable backward print zero_grad Adam range parameters step CrossEntropyLoss enumerate criterion model Variable backward print zero_grad SGD range parameters is_available train step CrossEntropyLoss enumerate data model Variable print eval is_available max criterion model Variable backward print zero_grad SGD range parameters is_available train step CrossEntropyLoss enumerate data model Variable print eval is_available max save state_dict load load_state_dict sqrt power range reshape permutation scatter_ cuda view FloatTensor ones coordinate_ADAM from_numpy sum range size zero_ net norm Variable clamp print zeros numpy MNIST module load_model print predict_batch DataParallel eval DataLoader attack CIFAR10 is_available cuda enumerate load_mnist_data load_cifar10_data
# blackbox-attack ### About Implementations of the blackbox attack algorithms in Pytorch ### Model description There are two CNN models for MNIST dataset: a simple model and C&W model. Simple Model for MNIST: stride = 1, padding = 0 Layer 1: Conv2d 5x5x16, BatchNorm(16), ReLU, Max Pooling 2x2 Layer 2: Conv2d 5x5x32, BatchNorm(32), ReLU, Max Pooling 2x2 Layer 3: FC 10
628
Leandropassosjr/o2pf
['breast cancer detection']
['$\\text{O}^2$PF: Oversampling via Optimum-Path Forest for Breast Cancer Detection']
O2PF_oversampling.py print_table.py O2PF_oversamplingFromUndersampled.py O2PF PT
# o2pf paper O²PF: Oversampling via Optimum-Path Forest for Breast Cancer Detection official implementation
629
LeeDoYup/RobustSTL
['time series', 'anomaly detection']
['RobustSTL: A Robust Seasonal-Trend Decomposition Algorithm for Long Time Series']
l1.py sample_generator.py utils.py RobustSTL.py main.py l1 main _RobustSTL seasonality_extraction denoise_step adjustment check_converge_criteria RobustSTL trend_extraction generate_remainders generate_seasons get_random_choice sample_generation generate_anomalies get_change generate_trends get_season get_season_idx get_neighbor_range bilateral_filter get_neighbor_idx get_relative_trends get_toeplitz gels size Fi conelp matrix abs max update subplot list show plot sample_generation title figure zip RobustSTL enumerate list arange map array len concatenate ones reshape l1 matrix get_relative_trends array get_toeplitz len list arange map array len mean int len mean sqrt square print seasonality_extraction denoise_step adjustment check_converge_criteria trend_extraction print Pool map print print zeros random int get_season tile zeros get_random_choice zeros get_random_choice enumerate get_change generate_remainders int generate_seasons generate_anomalies generate_trends exp fabs get_neighbor_idx list min arange array list arange concatenate array len concatenate len
# RobustSTL: A Robust Seasonal-Trend Decomposition Algorithm for Long Time Series (AAAI 2019) This repository contains python (3.5.2) implementation of RobustSTL ([paper](https://arxiv.org/abs/1812.01767)) . Decomposing complex time series into trend, seasonality, and remainder components is an important task to facilitate time series anomaly detection and forecasting. RobustSTL extract trend using LAD loss with sparse regularization and non-local seasonal filtering. Compared to previous approaches (such as traditional STL), RobustSTL has advantages on 1) Ability to handle seasonality fluctuation and shift, and abrupt change in trend and reminder 2) robustness of data with anomalies 3) applicability on time series with long seasonality period.
630
LeeDoYup/TGGNet-keras
['time series']
['Demand Forecasting from Spatiotemporal Data with Graph Networks and Temporal-Guided Embedding']
models/TGNet_NYC.py models/model.py utils.py main.py output.py get_thrs get_atypical_idx atypical_index event_metric save_test_output holiday_marker model_output_chk flatten_result output_analysis mape_trs load_np_data data_loader get_min_max rmse_trs invlog_mape inverse_min_max min_max invlog_rmse mape invlog_rmse_tr10 scaler mae_t1 logscale mae_t2 inverse_logscale rmse invlog_mape_tr10 maa_trs BaseModel deconv_block gn_block TGNet int reshape int int arange print to_csv mape model_output_chk flatten_result DataFrame mape_trs print mape range rmse_trs values drop sum array min list columns T concatenate DataFrame reshape holiday_marker print rename zeros expand_dims argmax range list map range concatenate get_thrs columns list concatenate DataFrame reshape holiday_marker map rename expand_dims argmax array range enumerate len asarray print reshape mape rmse append join int load_np_data get_min_max scaler len print print exp astype average sqrt square mean abs average divide average sqrt exp cast greater exp cast greater exp exp subtract subtract concatenate
# TGGNet-keras Author's implementation of TGGNet. TGGNet: An efficient baseline for demand forecasting from spatiotemporal data with graph networks and temporal-guided embedding. Our model has about **20 times smaller number of trainable parameters** than a recent state-of-the-are demand forecasting model, [STDN](https://github.com/tangxianfeng/STDN), and competitive or better performances on NYC datasets. We do **not** use external data, such as meteorological data, event information, traffic flow, or news, and only focus on efficient extraction of complex spatiotemporal features in past demand patterns. If you want to combine external data sources in our model, you can do that. After a stack of layers, combine the feature maps by the same manner of drop-off volumes in this model. Our model not only learns autoregressive model of ordered sequence, but also **learns temporal contexts explicitly**. Finally, TGGNet learns **conditional autoregressive model on temporal contexts** of forecasting-targtar time.
631
LeeDoYup/TGNet-keras
['time series']
['Demand Forecasting from Spatiotemporal Data with Graph Networks and Temporal-Guided Embedding']
models/TGNet_NYC.py models/model.py utils.py main.py output.py get_thrs get_atypical_idx atypical_index event_metric save_test_output holiday_marker model_output_chk flatten_result output_analysis mape_trs load_np_data data_loader get_min_max rmse_trs invlog_mape inverse_min_max min_max invlog_rmse mape invlog_rmse_tr10 scaler mae_t1 logscale mae_t2 inverse_logscale rmse invlog_mape_tr10 maa_trs BaseModel deconv_block gn_block TGNet int reshape int int arange print to_csv mape model_output_chk flatten_result DataFrame mape_trs print mape range rmse_trs values drop sum array min list columns T concatenate DataFrame reshape holiday_marker print rename zeros expand_dims argmax range list map range concatenate get_thrs columns list concatenate DataFrame reshape holiday_marker map rename expand_dims argmax array range enumerate len asarray print reshape mape rmse append join int load_np_data get_min_max scaler len print print exp astype average sqrt square mean abs average divide average sqrt exp cast greater exp cast greater exp exp subtract subtract concatenate
# TGGNet-keras Author's implementation of TGGNet. TGGNet: An efficient baseline for demand forecasting from spatiotemporal data with graph networks and temporal-guided embedding. Our model has about **20 times smaller number of trainable parameters** than a recent state-of-the-are demand forecasting model, [STDN](https://github.com/tangxianfeng/STDN), and competitive or better performances on NYC datasets. We do **not** use external data, such as meteorological data, event information, traffic flow, or news, and only focus on efficient extraction of complex spatiotemporal features in past demand patterns. If you want to combine external data sources in our model, you can do that. After a stack of layers, combine the feature maps by the same manner of drop-off volumes in this model. Our model not only learns autoregressive model of ordered sequence, but also **learns temporal contexts explicitly**. Finally, TGGNet learns **conditional autoregressive model on temporal contexts** of forecasting-targtar time.
632
LeeRel1991/SFD
['face detection']
['S$^3$FD: Single Shot Scale-invariant Face Detector']
demo.py eval/AFW/afw_test.py eval/PASCAL_face/pascal_test.py eval/WIDER_FACE/wider_test.py sfd/utils/cv_plot.py sfd/sfd.py sfd/utils/__init__.py eval/FDDB/fddb_test.py sfd_api.py __init__.py sfd/__init__.py handle_image demo_video demo_image_folder IOUTracker iou track_iou SDF_API Main func bbox_vote write_to_txt multi_scale_test flip_test detect_face SFD Main func Main plot_detections Main func time format COLOR_BGR2RGB print min waitKey imshow detect plot_detections cvtColor len join glob print extend handle_image imread handle_image VideoCapture read open min max append max enumerate Transformer set_channel_swap set_mean reshape set_raw_scale preprocess set_transpose resize array column_stack detect_face row_stack detect_face flip zeros shape minimum maximum delete row_stack tile zeros sum max encode format write xrange list format putText map rectangle FONT_HERSHEY_PLAIN
# S³FD: Single Shot Scale-invariant Face Detector By [Shifeng Zhang](http://www.cbsr.ia.ac.cn/users/sfzhang/) ### Introduction S³FD is a real-time face detector, which performs superiorly on various scales of faces with a single deep neural network, especially for small faces. For more details, please refer to our [arXiv paper](https://arxiv.org/abs/1708.05237). ### Contents 1. [Preparation](#preparation) 2. [Eval](#eval) 3. [Train](#train) ### Preparation 1. Get the [SSD](https://github.com/weiliu89/caffe/tree/ssd) code. We will call the directory that you cloned Caffe into `$SFD_ROOT`
633
Leensman/VarDropPytorch
['sparse learning']
['Variational Dropout Sparsifies Deep Neural Networks']
examples/boston/boston_ard.py examples/boston/boston_baseline.py torch_ard/torch_ard.py examples/cifar/cifar_baseline.py examples/mnist/mnist_baseline.py examples/mnist/mnist_ard.py setup.py examples/cifar/cifar_ard.py torch_ard/__init__.py examples/models.py LeNet_MNIST LeNet DenseModelARD LeNetARD LeNetARD_MNIST DenseModel get_kl_weight train test get_kl_weight train test train test get_kl_weight train test ELBOLoss get_ard_reg _get_params_cnt LinearARD _get_dropped_params_cnt get_dropped_params_ratio Conv2dARD criterion model print get_kl_weight backward zero_grad mean item append step max enumerate print mean eval mkdir save get_dropped_params_ratio hasattr hasattr any hasattr
# Variational Dropout Sparsifies NN (Pytorch) [![license](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)](LICENSE) [![PyPI version](https://badge.fury.io/py/pytorch-ard.svg)](https://badge.fury.io/py/pytorch-ard) Make your neural network 300 times faster! Pytorch implementation of Variational Dropout Sparsifies Deep Neural Networks ([arxiv:1701.05369](https://arxiv.org/abs/1701.05369)). ## Description The discovered approach helps to train both convolutional and dense deep sparsified models without significant loss of quality. Additive Noise Reparameterization and the Local Reparameterization Trick discovered in the paper helps to eliminate weights prior's restrictions (<a href="https://www.codecogs.com/eqnedit.php?latex=\alpha\leq&space;1" target="_blank"><img src="https://latex.codecogs.com/gif.latex?\alpha\leq&space;1" title="\alpha\leq 1" /></a>) and achieve Automatic Relevance Determination (ARD) effect on (typically most) network's parameters. According to the original paper, authors reduced the number of parameters up to 280 times on LeNet architectures and up to 68 times on VGG-like networks with a negligible decrease of accuracy. Experiments with Boston dataset in this repository proves that: 99% of simple dense model were dropped using paper's ARD-prior without any significant loss of MSE. Moreover, this technique helps to significantly reduce overfitting and helps to not worry about model's complexity - all redundant parameters will be dropped automatically. Moreover, you can achieve any degree of regularization variating regularization factor tradeoff (see ***reg_factor*** variable in [boston_ard.py](examples/boston/boston_ard.py) and [cifar_ard.py](examples/cifar/cifar_ard.py) scripts) ## Usage ```python
634
Lees001/FastPhotoStyle
['image stylization']
['A Closed-form Solution to Photorealistic Image Stylization']
demo.py process_stylization_folder.py process_stylization_ade20k_ssn.py photo_smooth.py converter.py models.py download_models.py photo_gif.py demo_with_ade20k_ssn.py smooth_filter.py photo_wct.py process_stylization.py photo_wct_loader weight_assign segment_this_img download_file_from_google_drive save_response_content get_confirm_token VGGDecoder VGGEncoder GIFSmoothing Propagator PhotoWCT ReMapping stylization memory_limit_image_resize Timer overlay stylization visualize_result SegReMapping smooth_local_affine smooth_filter Parameter items float load load_state_dict padding_constant float transpose min astype float32 copy imgSize from_numpy shape dict unsqueeze round2nearest_multiple resize transform imread append get get_confirm_token save_response_content Session items startswith height print thumbnail BICUBIC width Canny uint8 ones dilate range zeros astype unique load _best_local_affine_kernel bytes Module namedtuple Stream numpy Program _reconstruction_best_kernel encode _bilateral_smooth_kernel cuda compile get_function fromarray uint8 transpose convert ascontiguousarray shape resize smooth_local_affine array clip
[![License CC BY-NC-SA 4.0](https://img.shields.io/badge/license-CC4.0-blue.svg)](https://raw.githubusercontent.com/NVIDIA/FastPhotoStyle/master/LICENSE.md) ![Python 2.7](https://img.shields.io/badge/python-2.7-green.svg) ![Python 3.5](https://img.shields.io/badge/python-3.5-green.svg) ## FastPhotoStyle ### License Copyright (C) 2018 NVIDIA Corporation. All rights reserved. Licensed under the CC BY-NC-SA 4.0 license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode). <img src="https://raw.githubusercontent.com/NVIDIA/FastPhotoStyle/master/teaser.png" width="800" title="Teaser results"> ### What's new
635
Lemma1/DPFE
['traffic prediction']
['Estimating multi-year 24/7 origin-destination demand using high-granular multi-source traffic data']
base.py pfe.py
## Estimating multi-year 24/7 origin-destination demand using high-granular multi-source traffic data Implemented by Wei Ma, advised by Sean Qian, Civil and environmental engineering, Carnegie Mellon University. ### Requirements - Python 2.7.13 - PyTorch 0.2.0_3 - Numpy 1.13.3 - Scipy 0.19.1 - NetworkX 1.11 - pickle - joblib 0.11
636
Leotju/MGAN
['pedestrian detection']
['Mask-Guided Attention Network for Occluded Pedestrian Detection']
mmdet/models/roi_extractors/__init__.py mmdet/__init__.py mmdet/core/mask/utils.py mmdet/core/bbox/bbox_target.py mmdet/core/bbox/samplers/pseudo_sampler.py eval/eval_demo.py mmdet/core/utils/misc.py mmdet/core/post_processing/bbox_nms.py mmdet/models/detectors/__init__.py mmdet/models/anchor_heads/__init__.py mmdet/models/utils/conv_module.py mmdet/core/bbox/assigners/__init__.py mmdet/core/bbox/assigners/base_assigner.py mmdet/datasets/builder.py mmdet/core/evaluation/eval_hooks.py mmdet/core/bbox/geometry.py mmdet/core/bbox/assigners/assign_result.py mmdet/models/necks/hrfpn.py mmdet/core/utils/dist_utils.py mmdet/datasets/loader/__init__.py mmdet/models/utils/conv_ws.py mmdet/ops/nms/__init__.py setup.py mmdet/core/evaluation/coco_utils.py mmdet/models/builder.py mmdet/utils/__init__.py mmdet/datasets/loader/build_loader.py mmdet/core/bbox/samplers/iou_balanced_neg_sampler.py mmdet/models/registry.py mmdet/datasets/__init__.py eval/coco.py mmdet/models/bbox_heads/convfc_bbox_head.py mmdet/core/evaluation/class_names.py mmdet/core/anchor/anchor_target.py tools/test.py mmdet/ops/roi_align/modules/roi_align.py mmdet/core/bbox/samplers/instance_balanced_pos_sampler.py mmdet/core/bbox/samplers/sampling_result.py mmdet/models/utils/norm.py mmdet/core/evaluation/recall.py mmdet/core/post_processing/merge_augs.py mmdet/models/utils/weight_init.py mmdet/core/fp16/__init__.py mmdet/models/bbox_heads/__init__.py eval/eval_MR_multisetup.py mmdet/models/utils/__init__.py mmdet/core/__init__.py mmdet/ops/roi_align/functions/roi_align.py city_cfgs/mgan_50_65.py mmdet/datasets/extra_aug.py mmdet/core/bbox/assign_sampling.py mmdet/models/detectors/mgan.py mmdet/ops/__init__.py mmdet/apis/inference.py mmdet/datasets/utils.py mmdet/core/fp16/hooks.py mmdet/models/backbones/vgg.py mmdet/core/bbox/samplers/base_sampler.py mmdet/ops/roi_align/__init__.py mmdet/core/bbox/transforms.py mmdet/ops/roi_align/gradcheck.py mmdet/models/backbones/__init__.py mmdet/core/bbox/assigners/max_iou_assigner.py mmdet/models/mgan_heads/mgan_head.py mmdet/models/bbox_heads/bbox_head.py mmdet/ops/roi_pool/__init__.py mmdet/ops/nms/nms_wrapper.py mmdet/ops/roi_pool/functions/roi_pool.py mmdet/apis/__init__.py mmdet/version.py mmdet/core/evaluation/mean_ap.py mmdet/models/roi_extractors/single_level.py mmdet/core/anchor/__init__.py mmdet/datasets/dataset_wrappers.py mmdet/datasets/registry.py mmdet/core/bbox/assigners/approx_max_iou_assigner.py mmdet/models/necks/__init__.py mmdet/core/anchor/anchor_generator.py mmdet/core/mask/mask_target.py mmdet/models/anchor_heads/anchor_head.py mmdet/core/post_processing/__init__.py mmdet/models/mgan_heads/__init__.py mmdet/models/necks/fpn.py mmdet/models/anchor_heads/rpn_head.py mmdet/models/__init__.py mmdet/core/bbox/samplers/__init__.py mmdet/core/bbox/samplers/combined_sampler.py tools/upgrade_model_version.py mmdet/models/detectors/base.py mmdet/core/bbox/samplers/ohem_sampler.py mmdet/apis/env.py mmdet/ops/roi_pool/gradcheck.py mmdet/core/fp16/decorators.py mmdet/datasets/custom.py mmdet/core/evaluation/bbox_overlaps.py mmdet/core/mask/__init__.py mmdet/core/fp16/utils.py mmdet/core/bbox/samplers/random_sampler.py mmdet/datasets/loader/sampler.py mmdet/utils/registry.py tools/coco_eval.py mmdet/core/anchor/guided_anchor_target.py mmdet/core/bbox/__init__.py mmdet/models/utils/scale.py mmdet/datasets/transforms.py mmdet/datasets/city.py mmdet/models/detectors/test_mixins.py tools/analyze_logs.py mmdet/ops/roi_pool/modules/roi_pool.py mmdet/core/evaluation/__init__.py mmdet/core/utils/__init__.py make_cuda_ext write_version_py readme get_version get_git_hash get_hash make_cython_ext COCO Params COCOeval _init_dist_pytorch _init_dist_slurm init_dist set_random_seed get_root_logger _init_dist_mpi _inference_generator show_result inference_detector _prepare_data init_detector _inference_single AnchorGenerator anchor_target unmap anchor_inside_flags images_to_levels anchor_target_single ga_loc_target ga_shape_target_single calc_region images_to_levels ga_shape_target assign_and_sample build_assigner build_sampler bbox_target_single expand_target bbox_target bbox_overlaps delta2bbox roi2bbox bbox_flip distance2bbox bbox2delta bbox_mapping bbox2result bbox_mapping_back bbox2roi ApproxMaxIoUAssigner AssignResult BaseAssigner MaxIoUAssigner BaseSampler CombinedSampler InstanceBalancedPosSampler IoUBalancedNegSampler OHEMSampler PseudoSampler RandomSampler SamplingResult bbox_overlaps get_classes imagenet_vid_classes voc_classes imagenet_det_classes coco_classes wider_face_classes coco_eval segm2json proposal2json fast_eval_recall xyxy2xywh results2json det2json CocoDistEvalRecallHook DistEvalmAPHook DistEvalHook CocoDistEvalmAPHook eval_map tpfp_imagenet print_map_summary average_precision get_cls_results tpfp_default plot_iou_recall set_recall_param print_recall_summary _recalls eval_recalls plot_num_recall force_fp32 auto_fp16 Fp16OptimizerHook wrap_fp16_model patch_forward_method patch_norm_fp32 cast_tensor_type mask_target mask_target_single split_combined_polys multiclass_nms merge_aug_scores merge_aug_masks merge_aug_bboxes merge_aug_proposals DistOptimizerHook allreduce_grads _allreduce_coalesced unmap tensor2imgs multi_apply build_dataset _concat_dataset CityDataset CustomDataset RepeatDataset ConcatDataset PhotoMetricDistortion Expand RandomCrop ExtraAugmentation ImageTransform BboxTransformNoClip MaskTransform SegMapTransform bbox_flip Numpy2Tensor BboxTransform to_tensor random_scale show_ann build_dataloader GroupSampler DistributedSampler DistributedGroupSampler build_shared_head build_detector build_loss build build_backbone build_roi_extractor build_head build_neck AnchorHead RPNHead VGG BBoxHead SharedFCBBoxHead ConvFCBBoxHead BaseDetector MGAN BBoxTestMixin RPNTestMixin MGANHead FPN HRFPN SingleRoIExtractor ConvModule build_conv_layer conv_ws_2d ConvWS2d build_norm_layer Scale xavier_init bias_init_with_prob uniform_init normal_init kaiming_init nms soft_nms RoIAlignFunction RoIAlign RoIPoolFunction RoIPool build_from_cfg Registry cal_train_time plot_curve load_json_logs main parse_args add_plot_parser add_time_parser main multi_gpu_test single_gpu_test collect_results main parse_args main convert decode _minimal_ext_cmd exists get_hash cythonize Extension format _init_dist_mpi set_start_method _init_dist_slurm _init_dist_pytorch int set_device init_process_group device_count int str format init_process_group set_device device_count getoutput seed manual_seed_all manual_seed basicConfig setLevel get_dist_info getLogger get_classes isinstance model load_checkpoint warn eval build_detector fromfile to cfg ImageTransform device shape unsqueeze img_transform _prepare_data imread cfg bool concat_list isinstance concatenate imshow_det_bboxes astype copy vstack randint imread multi_apply images_to_levels any sum range cat len append stack squeeze assign_and_sample zeros_like PseudoSampler pos_gt_bboxes size pos_weight anchor_inside_flags unmap sample new_zeros build_assigner assign pos_inds bbox2delta allowed_border neg_inds pos_bboxes assigner new_full clamp long new_full zeros_like calc_region size sqrt log2 floor full_like item append zeros float sum long range len multi_apply images_to_levels any append sum range cat len ga_assigner build_sampler ga_sampler PseudoSampler zeros_like reshape pos_gt_bboxes size unmap build_assigner assign pos_inds sample neg_inds pos_bboxes BaseAssigner isinstance BaseSampler isinstance build_sampler sampler build_assigner assign sample assigner multi_apply cat bbox2delta size new_zeros squeeze new_zeros clamp size min max stack unsqueeze div_ float log exp clamp size repeat expand_as view_as abs log addcmul Tensor ndarray isinstance clone bbox_flip new_full new_zeros append cat enumerate cpu append unique numpy clamp minimum T astype maximum float32 zeros range items eval is_str list format evaluate COCOeval print summarize is_str COCO accumulate getImgIds loadRes fast_eval_recall array enumerate load getAnnIds is_str mean getImgIds eval_recalls append zeros loadAnns array range len tolist dict append float xyxy2xywh range len dict append float xyxy2xywh range len decode dict append float xyxy2xywh range len dump format ndarray isinstance segm2json dict proposal2json det2json arange ones hstack maximum zeros sum range minimum zeros_like len argsort zeros bbox_overlaps range enumerate zeros_like len argsort bbox_overlaps zeros argmax max enumerate append zeros range len eps cumsum tuple maximum average_precision argsort enumerate print_map_summary vstack item zip append zeros range get_cls_results len get_classes table print len is_str AsciiTable append zeros range enumerate sum sort hstack copy zeros float argmax fliplr range enumerate array isinstance min set_recall_param print_recall_summary _recalls array append zeros bbox_overlaps range len arange table insert print size tolist AsciiTable append array enumerate show ndarray plot isinstance xlabel tolist axis ylabel figure show ndarray plot isinstance xlabel tolist axis ylabel figure hasattr patch_norm_fp32 modules half children isinstance half patch_forward_method float forward ndarray isinstance Iterable Tensor Mapping list map cat mask_size imresize size astype maximum new_zeros int32 device append to numpy range tolist append slice_list range len pop new_full sort copy nms_op new_zeros getattr append range cat nms nms_thr sort min clone max_num zip append bbox_mapping_back cat append mean bbox_mapping_back zip Tensor isinstance average mean array _take_tensors _flatten_dense_tensors zip _unflatten_dense_tensors OrderedDict all_reduce copy_ div_ append type values all_reduce _allreduce_coalesced get_world_size div_ uint8 transpose size astype ascontiguousarray append array range map get deepcopy isinstance append build_dataset range len isinstance _concat_dataset build_from_cfg RepeatDataset copy Tensor ndarray isinstance randint min max len show showAnns axis bgr2rgb imshow get get_dist_info DistributedSampler DataLoader DistributedGroupSampler isinstance dict conv_layer pop copy size view pop str setdefault norm_layer copy parameters _specify_ddp_gpu_num hasattr bias xavier_uniform_ xavier_normal_ weight constant_ hasattr bias normal_ weight constant_ hasattr bias uniform_ weight constant_ kaiming_uniform_ hasattr bias weight kaiming_normal_ constant_ float ndarray isinstance new_zeros Tensor to numpy is_cuda ndarray soft_nms_cpu isinstance Tensor numpy pop get items setdefault copy is_str format std print argmin mean array append argmax keys include_outliers enumerate arange backend max out show list title savefig legend gca append format plot concatenate cla keys enumerate json_logs switch_backend print style xlabel set_xticks set_style array len add_argument add_parser add_argument add_parser ArgumentParser add_plot_parser add_subparsers add_time_parser zip parse_args json_logs load_json_logs ann max_dets coco_eval add_argument result types ArgumentParser update show_result size ProgressBar enumerate eval append dataset range img_norm_cfg len update get_dist_info size collect_results ProgressBar eval append dataset range enumerate len rstrip tensor broadcast list get_dist_info mkdtemp encode append range dump format bytearray zip load join barrier extend rmtree mkdir_or_exist full str add_argument local_rank config model tmpdir launcher MMDistributedDataParallel cuda show get_dist_info build_detector fromfile build_dataset get dump CLASSES init_dist single_gpu_test build_dataloader wrap_fp16_model test results2json checkpoint load_checkpoint multi_gpu_test out MMDataParallel load pop items format replace search OrderedDict save in_file convert out_file
# Mask-Guided Attention Network for Occluded Pedestrian Detection Pedestrian detection framework as detailed in [arXiv report](https://arxiv.org/abs/1910.06160), accepted to ICCV 2019. ## Installation Our MGAN is based on [mmdetection](https://github.com/open-mmlab/mmdetection). Please check [INSTALL.md](https://github.com/open-mmlab/mmdetection/blob/master/docs/INSTALL.md) for installation instructions. ## Datasets You can download [CityScapes Datasets](https://www.cityscapes-dataset.com/).Put it in data folder. ## Testing The following commands will test the model on 1 GPU. ``` python tools/test.py city_cfgs/mgan_50_65.py models/50_65.pth --out result/50_65.pkl
637
Li-Chengyang/MSDS-RCNN
['pedestrian detection', 'semantic segmentation', 'autonomous driving']
['Multispectral Pedestrian Detection via Simultaneous Detection and Segmentation']
lib/utils/visualization.py lib/datasets/imdb.py lib/nets/vgg16.py lib/model/test.py lib/model/__init__.py lib/utils/nms.py lib/setup.py lib/model/bbox_transform.py lib/datasets/__init__.py lib/layer_utils/proposal_layer_combine.py lib/layer_utils/fusion_layer.py lib/datasets/factory.py tools/demo.py lib/nets/network.py lib/utils/__init__.py lib/nms/py_cpu_nms.py lib/model/nms_wrapper.py lib/layer_utils/generate_anchors.py lib/utils/timer.py lib/datasets/ds_utils.py lib/datasets/kaist.py tools/_init_paths.py lib/utils/blob.py lib/model/config.py lib/layer_utils/proposal_layer.py lib/layer_utils/snippets.py find_in_path customize_compiler_for_nvcc custom_build_ext locate_cuda unique_boxes xywh_to_xyxy validate_boxes xyxy_to_xywh filter_small_boxes get_imdb list_imdbs imdb kaist fusion_layer generate_anchors _scale_enum _whctrs _ratio_enum _mkanchors pad_rois proposal_layer proposal_layer_combine_bcn proposal_layer_combine_rpn generate_anchors_pre clip_boxes bbox_transform bbox_transform_inv cfg_from_list get_output_tb_dir cfg_from_file _merge_a_into_b get_output_dir nms im_detect_demo _get_image_blob _get_blobs Network vgg16 py_cpu_nms im_list_to_blob prep_im_for_blob nms Timer _draw_single_box draw_bounding_boxes parse_args vis_detections demo add_path pathsep pjoin exists split find_in_path items pjoin pathsep dirname sep append _compile compiler_so dot array unique exp vstack _ratio_enum array hstack sqrt _whctrs round _mkanchors _whctrs _mkanchors decode nms RPN_POST_NMS_TOP_N RPN_CONF_THRESH clip_boxes reshape VERBOSE hstack print bbox_transform_inv size RPN_NMS_THRESH RPN_PRE_NMS_TOP_N zeros POOL_PAD_RATIO ones clip_boxes rand hstack zeros decode nms RPN_POST_NMS_TOP_N print VERBOSE size hstack RPN_NMS_THRESH decode nms RPN_POST_NMS_TOP_N print VERBOSE size hstack RPN_NMS_THRESH generate_anchors arange reshape transpose astype float32 int32 meshgrid transpose log dtype exp astype shape zeros minimum maximum join EXP_DIR name abspath ROOT_DIR makedirs join EXP_DIR name abspath ROOT_DIR makedirs items ndarray isinstance type array _merge_a_into_b literal_eval zip split MAX_SIZE min astype float32 SCALES shape resize append im_list_to_blob float max _get_image_blob array test_image _get_blobs append maximum minimum zeros max range len min astype float32 shape resize float max append maximum minimum line Draw text rectangle ceil getsize fromarray int uint8 copy _draw_single_box xrange round array format subplots set_title text draw axis add_patch shape imshow vstack Rectangle toc join nms format vis_detections print total_time astype float32 tic im_detect_demo Timer imread DATA_DIR add_argument ArgumentParser insert
### Multispectral Pedestrian Detection via Simultaneous Detection and Segmentation Edited by Chengyang Li, Zhejiang University. Demo code of our paper [Multispectral Pedestrian Detection via Simultaneous Detection and Segmentation](https://arxiv.org/abs/1808.04818) by Chengyang Li, Dan Song, Ruofeng Tong and Min Tang. BMVC 2018. [[project link]](https://li-chengyang.github.io/home/MSDS-RCNN/). <img src="figures/overview.png" width="800px" height="400px"/> ### Demo 0. Prerequisites  Basic Tensorflow and Python package installation.  This code is tested on [Ubuntu14.04, tf1.2, Python2.7] and [Ubuntu16.04, tf1.11, Python3.5]. 1. Clone the repository
638
LiDan456/GAN-AD
['time series', 'anomaly detection']
['Real-valued (Medical) Time Series Generation with Recurrent Conditional GANs', 'Anomaly Detection with Generative Adversarial Networks for Multivariate Time Series']
Generate.py InvertGenerate.py tf_ops.py differential_privacy/dp_sgd/dp_optimizer/sanitizer.py Plot_Figure.py DR_discriminator.py plotting.py experiment_InvTry.py mod_core_rnn_cell_impl.py utils.py AD.py differential_privacy/privacy_accountant/tf/accountant.py RGAN.py PCA_test.py data_utils.py experiment.py eugenium_mmd.py differential_privacy/dp_sgd/dp_optimizer/utils.py mmd.py model.py eval.py differential_privacy/dp_sgd/dp_optimizer/dp_optimizer.py myADclass get_data get_samples_and_labels linear_marginal_likelihood swat_gen make_predict_labels swat_test get_batch swat_train load_resized_mnist_0_5 eICU_task GP scale_data changepoint sine_wave mnist get_batch_aaa load_resized_mnist linear normalise_data changepoint_pdf periodic_kernel changepoint_cristobal split invert sample_detection_R_D detection_logits dis_trained_model sample_detection CUSUM_det discriminator_o detection_statistic_R_D generator_o detection_statistic SPE my_kernel MMD_unbiased kernelwidth MMD_Diff_Var grbf kernelwidthPair MMD_3_Sample_Test model_memorisation train_CNN sample_distance assert_same_data view_reconstruction model_comparison TSTR_mnist error_per_sample view_interpolation TSTR_eICU view_digit view_fixed view_params view_latent_vary NIPS_toy_plot get_reconstruction_errors _mix_rbf_kernel _mmd2 median_pairwise_distance_o median_pairwise_distance rbf_mmd2_and_ratio mix_rbf_mmd2_and_ratio rbf_mmd2 mix_rbf_mmd2 _mmd2_and_ratio _mmd2_and_variance generator GAN_loss GAN_solvers train_epoch create_placeholders dump_parameters sample_Z sample_TT sample_T discriminator load_parameters MultiRNNCell _linear _enumerated_map_structure BasicRNNCell BasicLSTMCell InputProjectionWrapper _SlimRNNCell _checked_scope LSTMCell OutputProjectionWrapper EmbeddingWrapper DeviceWrapper LSTMStateTuple DropoutWrapper GRUCell ResidualWrapper SPE interpolate save_plot_interpolate plot_parameters visualise_latent save_mnist_plot_sample vary_latent_dimension nips_plot_sine plot_label nips_plot_rbf reconstruction_errors save_plot_sample view_mnist_eval visualise_at_epoch save_samples plot_sine_evaluation nips_plot_mnist save_plot_vary_dimension plot_trace save_plot_reconstruct Raw_plot_sensorI GS_plot Raw_plot_sensorII MMD_plot PC_Rate_plot Raw_plot GS_plotII Raw_plot_actuator GS_plotI dot sq_sum rgan_options_parser load_settings_from_file DPGradientDescentOptimizer AmortizedGaussianSanitizer NetworkParameters BuildNetwork SoftThreshold GenerateBinomialTable LayerParameters VaryRate BatchClipByL2norm GetTensorOpName ConvParameters AddGaussianNoise GaussianMomentsAccountant AmortizedAccountant MomentsAccountant DummyAccountant load print shape empty range load print reshape transpose PCA matmul range shape components_ empty explained_variance_ratio_ fit load print reshape transpose PCA matmul shape components_ empty range fit int items print reshape dict sqrt get_data shape zeros make_predict_labels max split sine_wave mnist swat_train load_resized_mnist linear print len GP item swat_gen swat swat_test mean vstack std reshape vstack fit seed items permutation print normalise_data dict scale_data ceil items print hstack dict zeros range reshape items item load reshape permutation print mnist print astype save array str mnist print astype save array T arange pi uniform sin append float array range exp reshape pi pdist sin squareform rvs det arange multivariate_normal print reshape rbf_kernel periodic_kernel logpdf zeros empty range det T reshape inv pi dot sqrt gamma empty log enumerate rvs normal arange partial reshape choice uniform eye zeros array range int min linspace logpdf append range enumerate int T randn range dstack round array swapaxes append abs max clip enumerate rvs int T arange partial concatenate print reshape inv min choice kernel dot linspace eye append zeros range list reshape float empty range count list reshape float empty range count list reshape absolute float empty range count sum reshape float empty range count sum reshape absolute float empty range count std print min mean float empty max range count reshape transpose identity matmul empty range reset_default_graph Session run _mix_rbf_kernel str get_variable open generator_o load_parameters load median_pairwise_distance_o norm minimize print reshape float32 diag_part reduce_mean global_variables_initializer load float32 placeholder discriminator_o reset_default_graph load_parameters open reshape exp set_trace einsum cdf partial min kernel sqrt diagonal kernelwidth MMD_Diff_Var sum diag kernelwidthPair T dot dict diagonal sum diag T transpose dot shape tile sum array transpose dot shape sqrt tile median sum array T ones kron dot sqrt median expand_dims sum array sum diag diagonal load seed load_resized_mnist print reshape median_pairwise_distance eICU_task choice split vstack scale_data item sample_trained_model MMD_3_Sample_Test open load assert_same_data print open sample_trained_model MMD_3_Sample_Test load str ks_2samp print argsort reconstruction_errors save_plot_sample item open invert median_pairwise_distance min float32 mean zeros range load str reshape save_mnist_plot_sample zeros sample_trained_model open load invert str sample_distance print median_pairwise_distance DataFrame save_plot_interpolate interpolate item append sample_trained_model open load vary_latent_dimension save_plot_vary_dimension append sample_trained_model range open load invert str visualise_latent save_plot_reconstruct sample_trained_model open load sample_Z save_plot_sample sample_trained_model range open load str plot_parameters load_parameters open norm exp print compile EarlyStopping Sequential fit predict add Dense MaxPooling2D Conv2D expand_dims Flatten Dropout clear_session save accuracy_score argmax sample_trained_model open str map precision_recall_fscore_support predict classification_report close tile item RandomForestClassifier view_mnist_eval join train_CNN print reshape write fit save accuracy_score sample_trained_model roc_auc_score open str map precision_score precision_recall_fscore_support append range predict recall_score classification_report close mean tile item join T print reshape write average_precision_score array fit load nips_plot_mnist item sample_trained_model open matmul diag_part unstack zip tensordot _mix_rbf_kernel _mix_rbf_kernel reduce_sum cast float32 trace sqrt maximum _mmd2_and_variance sq_sum float32 reduce_sum dot diag_part cast sqrt reshape einsum sqrt reshape einsum print normal float32 linspace load load len choice int get_batch len mean sample_Z range run generator reduce_mean discriminator sigmoid_cross_entropy_with_logits minimize print float32 placeholder reduce_mean GaussianMomentsAccountant AmortizedGaussianSanitizer float32 placeholder trainable_variables print len dict save run item get_variable_scope subplots plot close zfill clf savefig reshape save_mnist_plot_sample save_plot_sample argmax mode int subplots arange plot suptitle hsv_to_rgb close subplots_adjust set_ticks zfill clf savefig range subplots arange set_ticks set_visible clf tick_params set_title savefig dA range plot hsv_to_rgb set_xlim close dB int suptitle subplots_adjust set_facecolor set_ylim subplots set_title print set_xlim tight_layout set_visible hist savefig tick_params int subplots arange plot set_title close subplots_adjust set_ticks clf savefig range int subplots arange set_title plot suptitle hsv_to_rgb close subplots_adjust set_ticks zfill set_visible clf set_facecolor savefig tick_params range normal array linspace mean linspace abs array range rfft subplots vlines set_title close zfill mean set_ylabel hist savefig clf rfftfreq abs max len subplots arange D_loss set_ticks set_visible clf G_loss tick_params read_table set_xlabel twinx savefig legend set_color mmd2 epoch plot set_xlim close get_ylim set_label_coords ll real_ll set_ylabel dropna set_ylim zfill save int str subplots set_title suptitle reshape close subplots_adjust zfill imshow sqrt clf savefig argmax range print random close scatter savefig clf array range T subplots set_title matshow set_xlim tight_layout set_visible savefig set_ylim split int list subplot reshape axis tight_layout sqrt imshow title savefig zip enumerate str subplots arange plot reshape close set_visible clf set_facecolor savefig tick_params set_ylim len str subplots arange plot reshape close set_visible clf set_facecolor savefig tick_params set_ylim len str axis close imshow clf savefig subplots set_title plot close subplots_adjust clf savefig subplots set_title plot close subplots_adjust clf savefig subplots set_title plot close subplots_adjust clf savefig subplots arange set_title plot close subplots_adjust clf savefig range subplots arange set_title plot close subplots_adjust clf savefig range subplots arange set_title plot close subplots_adjust clf savefig range subplots arange set_title plot close subplots_adjust clf savefig range int subplots set_title plot grid PCA close set_ticks clf savefig explained_variance_ratio_ range set_ylim fit subplots set_title plot grid close clf savefig legend range add_argument ArgumentParser update load print keys open rsplit patch_size layer_parameters input_size with_bias weight_decay num_units projection_dimensions name matmul conv2d relu in_channels sqrt truncated_normal Variable reshape max_pool gradient_l2norm_bound num_outputs zeros bias_gradient_l2norm_bound conv_parameters zeros range ABCMeta
# -- Multivariate Anomaly Detection for Time Series Data with GANs -- # #GAN-AD This repository contains code for the paper, _[Anomaly Detection with Generative Adversarial Networks for Multivariate Time Series](https://arxiv.org/pdf/1809.04758.pdf)_, by Dan Li, Dacheng Chen, Jonathan Goh, and See-Kiong Ng. ## Overview We used generative adversarial networks (GANs) to do anomaly detection for time series data. The GAN framework was **R**GAN that taken from the paper, _[Real-valued (Medical) Time Series Generation with Recurrent Conditional GANs](https://arxiv.org/abs/1706.02633). Please refer to https://github.com/ratschlab/RGAN for the original code. ## Quickstart - Python3 - Sample generation
639
LiDan456/MAD-GANs
['time series', 'anomaly detection']
['Real-valued (Medical) Time Series Generation with Recurrent Conditional GANs', 'MAD-GAN: Multivariate Anomaly Detection for Time Series Data with Generative Adversarial Networks', 'Anomaly Detection with Generative Adversarial Networks for Multivariate Time Series']
differential_privacy/privacy_accountant/tf/accountant.py DR_discriminator.py data_utils.py AD_Invert.py eval.py tf_ops.py RGAN.py differential_privacy/dp_sgd/dp_optimizer/dp_optimizer.py plotting.py differential_privacy/dp_sgd/dp_optimizer/sanitizer.py eugenium_mmd.py differential_privacy/dp_sgd/dp_optimizer/utils.py mmd.py mod_core_rnn_cell_impl.py utils.py AD.py model.py myADclass myADclass kdd99 swat_birgan_test wadi_test get_batch swat_birgan get_samples_and_labels wadi get_data kdd99_test split swat swat_test invert anomaly_detection_plot detection_statistic_I dis_trained_model detection_Comb detection_D_I detection_R_I sample_detection detection_R_D_I CUSUM_det discriminator_o generator_o dis_D_model SPE detection_logits_I my_kernel MMD_unbiased kernelwidth MMD_Diff_Var grbf kernelwidthPair MMD_3_Sample_Test model_memorisation train_CNN sample_distance assert_same_data view_reconstruction model_comparison TSTR_mnist error_per_sample view_interpolation TSTR_eICU view_digit view_fixed view_params view_latent_vary NIPS_toy_plot get_reconstruction_errors _mix_rbf_kernel _mmd2 median_pairwise_distance_o median_pairwise_distance rbf_mmd2_and_ratio mix_rbf_mmd2_and_ratio rbf_mmd2 mix_rbf_mmd2 _mmd2_and_ratio _mmd2_and_variance generator GAN_loss GAN_solvers train_epoch display_batch_progression create_placeholders dump_parameters sample_Z sample_TT sample_T discriminator load_parameters MultiRNNCell _linear _enumerated_map_structure BasicRNNCell BasicLSTMCell InputProjectionWrapper _SlimRNNCell _checked_scope LSTMCell OutputProjectionWrapper EmbeddingWrapper DeviceWrapper LSTMStateTuple DropoutWrapper GRUCell ResidualWrapper interpolate save_plot_interpolate plot_parameters visualise_latent save_mnist_plot_sample vary_latent_dimension nips_plot_sine plot_label nips_plot_rbf reconstruction_errors save_plot_sample view_mnist_eval visualise_at_epoch save_samples plot_sine_evaluation nips_plot_mnist save_plot_vary_dimension save_samples_real plot_trace save_plot_reconstruct dot sq_sum rgan_options_parser load_settings_from_file DPGradientDescentOptimizer AmortizedGaussianSanitizer NetworkParameters BuildNetwork SoftThreshold GenerateBinomialTable LayerParameters VaryRate BatchClipByL2norm GetTensorOpName ConvParameters AddGaussianNoise GaussianMomentsAccountant AmortizedAccountant MomentsAccountant DummyAccountant print loadtxt transpose fit PCA reshape matmul shape empty components_ explained_variance_ratio_ max range open T print loadtxt reshape display_batch_progression shape cov empty max range open list asarray print loadtxt transpose fit PCA reshape matmul shape components_ empty max range open T print loadtxt reshape display_batch_progression shape cov empty max range open load print reshape shape empty max range load list asarray print reshape transpose PCA matmul shape components_ empty max range fit load print reshape transpose PCA matmul shape empty components_ explained_variance_ratio_ max range fit load list asarray print reshape transpose PCA matmul shape components_ empty max range fit int items print reshape dict sqrt get_data zeros make_predict_labels max split kdd99 wadi_test print len wadi kdd99_test item swat swat_test seed items permutation print normalise_data dict scale_data ceil int subplots arange plot suptitle reshape close subplots_adjust set_ticks zfill clf savefig range set_ylim list print reshape precision_recall_fscore_support zeros float abs range count list print reshape precision_recall_fscore_support zeros float abs range count list reshape precision_recall_fscore_support zeros float range count list print reshape zeros float abs range count list reshape absolute mean zeros float abs range count list reshape absolute mean zeros float range count sum reshape precision_recall_fscore_support float empty range count std print min mean float empty max range count reshape transpose identity matmul empty range load median_pairwise_distance_o _mix_rbf_kernel norm minimize print reshape float32 diag_part reduce_mean reset_default_graph generator_o run open global_variables_initializer load_parameters Session get_variable load float32 placeholder discriminator_o ConfigProto reset_default_graph load_parameters open load reshape float32 placeholder discriminator_o ConfigProto reset_default_graph load_parameters open reshape exp set_trace einsum cdf partial min kernel sqrt diagonal kernelwidth MMD_Diff_Var sum diag kernelwidthPair T dot dict diagonal sum diag T transpose dot shape tile sum array transpose dot shape sqrt tile median sum array T ones kron dot sqrt median expand_dims sum array sum diag diagonal load seed load_resized_mnist print reshape median_pairwise_distance eICU_task choice split vstack scale_data item sample_trained_model MMD_3_Sample_Test open load assert_same_data print open sample_trained_model MMD_3_Sample_Test load str ks_2samp print argsort reconstruction_errors save_plot_sample item open invert median_pairwise_distance min float32 mean zeros range load str reshape save_mnist_plot_sample zeros sample_trained_model open load invert str sample_distance print median_pairwise_distance DataFrame save_plot_interpolate interpolate item append sample_trained_model open load vary_latent_dimension save_plot_vary_dimension append sample_trained_model range open load invert str visualise_latent save_plot_reconstruct sample_trained_model open load sample_Z save_plot_sample sample_trained_model range open load str plot_parameters load_parameters open norm exp print compile EarlyStopping Sequential fit predict add Dense MaxPooling2D Conv2D expand_dims Flatten Dropout clear_session save accuracy_score argmax sample_trained_model open str map precision_recall_fscore_support predict classification_report close tile item RandomForestClassifier view_mnist_eval join train_CNN print reshape write fit save accuracy_score sample_trained_model roc_auc_score open str map precision_score precision_recall_fscore_support append range predict recall_score classification_report close mean tile item join T print reshape write average_precision_score array fit load nips_plot_mnist item sample_trained_model open matmul diag_part unstack zip tensordot _mix_rbf_kernel _mix_rbf_kernel reduce_sum cast float32 trace sqrt maximum _mmd2_and_variance sq_sum float32 reduce_sum dot diag_part cast sqrt reshape einsum sqrt reshape einsum print normal float32 linspace load load len choice int get_batch len mean sample_Z range run generator reduce_mean discriminator sigmoid_cross_entropy_with_logits minimize print float32 placeholder reduce_mean GaussianMomentsAccountant AmortizedGaussianSanitizer float32 placeholder int str chr write flush trainable_variables print len dict save run item get_variable_scope subplots plot close zfill clf savefig reshape save_mnist_plot_sample save_plot_sample argmax mode int subplots arange plot suptitle hsv_to_rgb close subplots_adjust set_ticks zfill clf savefig range subplots arange set_ticks set_visible clf tick_params set_title savefig dA range plot hsv_to_rgb set_xlim close dB int suptitle subplots_adjust set_facecolor set_ylim subplots set_title print set_xlim tight_layout set_visible hist savefig tick_params int subplots arange plot set_title close subplots_adjust set_ticks clf savefig range int subplots arange set_title plot suptitle hsv_to_rgb close subplots_adjust set_ticks zfill set_visible clf set_facecolor savefig tick_params range normal array linspace mean linspace abs array range rfft subplots vlines set_title close zfill mean set_ylabel hist savefig clf rfftfreq abs max len subplots arange D_loss set_ticks set_visible clf G_loss tick_params read_table set_xlabel twinx savefig legend set_color mmd2 epoch plot set_xlim close get_ylim set_label_coords ll real_ll set_ylabel dropna set_ylim save save int str subplots set_title suptitle reshape close subplots_adjust zfill imshow sqrt clf savefig argmax range print random close scatter savefig clf array range T subplots set_title matshow set_xlim tight_layout set_visible savefig set_ylim split int list subplot reshape axis tight_layout sqrt imshow title savefig zip enumerate str subplots arange plot reshape close set_visible clf set_facecolor savefig tick_params set_ylim len str subplots arange plot reshape close set_visible clf set_facecolor savefig tick_params set_ylim len str axis close imshow clf savefig add_argument ArgumentParser update load print keys open rsplit patch_size layer_parameters input_size with_bias weight_decay num_units projection_dimensions name matmul conv2d relu in_channels sqrt truncated_normal Variable reshape max_pool gradient_l2norm_bound num_outputs zeros bias_gradient_l2norm_bound conv_parameters zeros range ABCMeta
# -- Multivariate Anomaly Detection for Time Series Data with GANs -- # # MAD-GAN This repository contains code for the paper, _[MAD-GAN: Multivariate Anomaly Detection for Time Series Data with Generative Adversarial Networks](https://arxiv.org/pdf/1901.04997.pdf)_, by Dan Li, Dacheng Chen, Jonathan Goh, and See-Kiong Ng. MAD-GAN is a refined version of GAN-AD at _[Anomaly Detection with Generative Adversarial Networks for Multivariate Time Series](https://arxiv.org/pdf/1809.04758.pdf)_ The code can be found at https://github.com/LiDan456/GAN-AD (We are still working on this topic, will upload the completed version later...) ## Overview We used generative adversarial networks (GANs) to do anomaly detection for time series data. The GAN framework was **R**GAN, whihc was taken from the paper, _[Real-valued (Medical) Time Series Generation with Recurrent Conditional GANs](https://arxiv.org/abs/1706.02633). Please refer to https://github.com/ratschlab/RGAN for the original code. ## Quickstart
640
LiYingwei/ghost-network
['adversarial attack']
['Learning Transferable Adversarial Examples via Ghost Networks']
nets/inception_v3.py nets/resnet_v2_152.py nets/resnet_v2_101.py nets/inception_v4.py data.py networks/core/resnet_v2_50.py nets/inception_resnet_v2.py networks/core/ens3_inception_v3.py networks/core/inception_resnet_v2.py networks/core/resnet_v2_101.py networks/core/ens4_inception_v3.py nets/inception_utils.py networks/core/inception_v3.py networks/core/inception_v4.py networks/network.py networks/core/resnet_v2_152.py eval.py networks/core/ens_inception_resnet_v2.py config.py attack.py nets/resnet_v2_50.py Attacker save_images DatasetMetadata PNGDataFlow AvgMetric Evaluator inception_resnet_v2_arg_scope inception_resnet_v2 inception_resnet_v2_base block8 block35 block17 inception_arg_scope inception_v3 _reduced_kernel_size_for_small_input inception_v3_arg_scope inception_v3_base inception_v4 block_reduction_b inception_v4_base block_inception_b block_inception_c block_reduction_a block_inception_a resnet_v2_50 resnet_v2_200 resnet_v2_101 resnet_v2_block resnet_v2_152 bottleneck resnet_v2 resnet_v2_50 resnet_v2_200 resnet_v2_101 resnet_v2_block resnet_v2_152 bottleneck resnet_v2 resnet_v2_50 resnet_v2_200 resnet_v2_101 resnet_v2_block resnet_v2_152 bottleneck resnet_v2 restore model _preprocess _get_model optimistic_restore join save zip batch_norm as_list network_fn _preprocess reshape float32 _get_model reduce_mean import_module cast argmax equal optimistic_restore import_module checkpoint_path restore sorted NewCheckpointReader Saver get_variable_to_shape_map
# Learning Transferable Adversarial Examples via Ghost Networks ## Introduction This repository contains the code for paper [Learning Transferable Adversarial Examples via Ghost Networks](https://arxiv.org/abs/1812.03413). In this paper, we propose Ghost Networks to efficiently learn transferable adversarial examples. The key principle of ghost networks is to perturb an existing model, which potentially generates a huge set of diverse models. Those models are subsequently fused by longitudinal ensemble. Both steps almost require no extra time and space consumption. Experiment shows this method could consistently gain additional transferability for iteration-based method (such as I-FGSM and MI-FGSM). ![demo](demo.png) ## Extension To improve the transferability further, we
641
LianaWang/TextRay
['scene text detection']
['TextRay: Contour-based Geometric Modeling for Arbitrary-shaped Scene Text Detection']
curve/ops/geometry/setup.py curve/ops/geometry/__init__.py curve/tools/viz.py curve/core/bbox/samplers/base_sampler.py curve/core/evaluation/__init__.py curve/models/losses/content_loss.py curve/core/anchor/__init__.py experiments/CTW_cheby/config.py curve/datasets/pipelines/loading.py experiments/Pretrain_Total/config.py curve/core/bbox/assigners/__init__.py curve/datasets/pipelines/formating.py curve/core/__init__.py curve/ops/geometry/functions/geometry.py curve/core/anchor/radius_target.py curve/core/bbox/samplers/__init__.py curve/apis/train.py curve/tools/train.py curve/core/anchor/cheby_target.py curve/models/losses/__init__.py curve/tools/generate_total_json.py curve/tools/fuse_conv_bn.py curve/datasets/ICDAR.py curve/core/bbox/transforms.py curve/core/bbox/samplers/random_sampler.py curve/datasets/pipelines/transforms.py curve/apis/__init__.py curve/tools/generate_ctw_json.py experiments/Pretrain_CTW/config.py curve/core/bbox/samplers/weighted_sampler.py curve/core/bbox/assigners/center_assigner.py curve/ops/bbox_overlap/setup.py curve/models/anchor_heads/anchor_head.py curve/datasets/__init__.py curve/models/plugins/conv_dulr.py curve/ops/geometry/functions/poly_nms.py curve/core/bbox/__init__.py curve/datasets/ArT.py curve/tools/test.py curve/core/anchor/fourier_target.py curve/datasets/CTW1500.py curve/models/__init__.py curve/models/plugins/__init__.py curve/ops/polylabel.py curve/core/anchor/offset_target.py experiments/Total_cheby/config.py curve/core/bbox/samplers/sampling_result.py curve/pkl2json.py curve/core/bbox/assign_sampling.py curve/datasets/TotalText.py curve/datasets/pipelines/__init__.py curve/models/detectors/curve_rpn.py curve/models/anchor_heads/rpn_head.py curve/models/detectors/__init__.py curve/ops/__init__.py curve/models/anchor_heads/__init__.py curve/datasets/MSRA.py curve/core/evaluation/TextDistEvalHook.py curve/datasets/curve_utils.py curve/core/bbox/assigners/max_iou_assigner.py _dist_train _non_dist_train build_optimizer train_detector cheby_anchor_target cheby_target_single fourier_anchor_target fourier_target_single offset_anchor_target offset_target_single radius_target_single radius_anchor_target assign_and_sample build_assigner build_sampler offset2bbox bbox2radius bbox2fori bbox2cheby cheby2bbox fori2bbox reconstruct_fourier radius2bbox clip2img get_uniform_points_fast reconstruct_cheby get_uniform_points f_series bbox2offset CenterAssigner MaxIoUAssigner CurveBaseSampler CurveRandomSampler CurveSamplingResult CurveWeightedSampler TextDistEvalHook ArTDataset CTW1500 sample_contour inner_center expand_twelve cart_coord find_principle cheby_fit polar_coord rotate_cheby_fit rotate_fourier_fit poly_fit fourier_fit ICDAR MSRA TotalText DefaultCurveFormatBundle ToCurveDataContainer LoadCurveAnnotations CurveRandomCrop CurveExpand CurveSegResizeFlipPadRescale CurveRandomFlip CurveMinIoURandomCrop CurveResize CurveRandomRotate CurvePad CurveAnchorHead RadiusAnchorHead FourierAnchorHead OffsetAnchorHead ChebyAnchorHead OffsetRPNHead RadiusRPNHead FourierRPNHead ChebyRPNHead CurveRPNHead OffsetRPN ChebyRPN FourierRPN CurveRPN RadiusRPN PolyRPN ContentLoss content_loss ConvDU ConvLR polylabel MyCell iou_cuda pip_cuda poly_soft_nms_cpu bbox_olp poly_soft_nms main fuse_module fuse_conv_bn parse_args _text_to_bboxes _convert _text_to_bboxes _convert multi_gpu_test single_gpu_test collect_results main parse_args main parse_args is_clockwise denormalize image_from_tensor plot_offset_bboxes plot_cheby_bboxes pop get hasattr endswith search copy named_parameters getattr append optim module log_level _non_dist_train get_root_logger _dist_train workflow MMDistributedDataParallel DistSamplerSeedHook cuda run total_epochs issubclass build_optimizer checkpoint_config work_dir get val load_from resume_from register_training_hooks resume info type optimizer DistOptimizerHook TextDistEvalHook lr_config DistEvalmAPHook CocoDataset load_checkpoint register_hook CocoDistEvalmAPHook Runner log_config Fp16OptimizerHook workflow cuda run total_epochs build_optimizer checkpoint_config work_dir optimizer_config get load_from resume_from register_training_hooks resume optimizer lr_config load_checkpoint Runner log_config Fp16OptimizerHook multi_apply flatten images_to_levels any permute NoneList append sum range cat len bbox2cheby anchor_inside_flags build_assigner assign pos_gt_skeleton allowed_border cuda assign_and_sample pos_inds pos_bboxes PseudoSampler size pos_weight unmap new_zeros pos_gt_cheby sample assigner neg_inds multi_apply flatten images_to_levels any permute NoneList append sum range cat len anchor_inside_flags build_assigner assign pos_gt_skeleton allowed_border cuda assign_and_sample pos_inds pos_bboxes bbox2fori PseudoSampler size pos_weight unmap new_zeros pos_gt_cheby sample assigner neg_inds multi_apply flatten images_to_levels any permute NoneList append sum range cat len anchor_inside_flags build_assigner assign allowed_border cuda assign_and_sample pos_gt_bboxes pos_inds pos_bboxes PseudoSampler size pos_weight unmap new_zeros sample bbox2offset assigner norm reshape neg_inds multi_apply flatten images_to_levels any permute NoneList append sum range cat len anchor_inside_flags build_assigner assign pos_gt_skeleton allowed_border cuda assign_and_sample pos_gt_bboxes pos_inds pos_bboxes PseudoSampler size pos_weight unmap new_zeros sample assigner bbox2radius neg_inds BaseAssigner isinstance BaseSampler isinstance build_sampler sampler build_assigner assign sample assigner int norm clamp size log mean unsqueeze cuda div_ float max range cat detach int exp size clip2img cpu zeros float range norm view clamp mean unsqueeze div_ float cuda log cat detach exp clip2img unsqueeze cpu zeros float cuda norm clamp new_zeros mean unsqueeze div_ float log cat detach norm clamp new_zeros mean unsqueeze div_ float log cat detach f_series mm cuda repeat range reshape roll zeros numpy range len mean reshape exp new_zeros clip2img unsqueeze reconstruct_cheby cpu float cuda exp reconstruct_fourier mean clip2img unsqueeze cpu zeros float cuda cos pi device sin mm cuda minimum maximum sqrt arctan2 cos sin append zeros range len polar_coord intersection Polygon print reshape rint cos pi type linspace sin append LineString array range len list Polygon argmin pi zip polar_coord argmax array append int min chebfit hstack find_principle array vstack linspace append max enumerate chebfit hstack array linspace append max int fft concatenate min hstack find_principle array vstack append max enumerate fft concatenate hstack array append max hstack polyfit array linspace append max zeros sum abs size reconstruct_fourier where f_series mm cuda y MyCell bounds min h heappop heappush x list remove decay_func cat cpu argmax range append area buffer intersection zeros range len ndarray isinstance from_numpy Tensor poly_soft_nms_cpu detach Parameter eps reshape running_mean bias sqrt weight running_var named_children isinstance print fuse_conv_bn Conv2d Identity add_argument ArgumentParser config fuse_module save_checkpoint init_detector parse_args out checkpoint array split join format Polygon reshape polylabel readlines dict shape append _text_to_bboxes array range len hstack tolist split update show_result size ProgressBar eval append dataset range enumerate len update get_dist_info size collect_results ProgressBar eval append dataset range enumerate len rstrip tensor broadcast list get_dist_info mkdtemp encode append range dump format bytearray zip load join barrier extend rmtree mkdir_or_exist full str local_rank model tmpdir coco_eval launcher MMDistributedDataParallel ann_file cuda show list_from_file get_dist_info len tolist build_detector fromfile build_dataset append range get dump format CLASSES init_dist single_gpu_test build_dataloader wrap_fp16_model test json_out eval results2json int join print load_checkpoint coco fuse_conv_bn dict multi_gpu_test MMDataParallel set_random_seed localtime autoscale_lr abspath setLevel train_detector seed strftime get_root_logger work_dir val ERROR resume_from info read gpus text mkdir_or_exist denormalize interpolate uint8 isinstance reshape transpose astype Tensor numpy print dot roll Polygon reshape plot reshape plot
LianaWang/TextRay
642
LiangZhangUMN/PSSE-via-DNNs
['time series']
['Real-time Power System State Estimation and Forecasting via Deep Neural Networks']
State-Forecasting/model.py simple_test.py get_plots.py State-Forecasting/RNN v2v.py model.py plt_bus rmse st_lav_psse lav_psse huber_loss_mean st_activation huber_loss nn1_psse nn1_8H_psse rmse simplified_rpln_fase rnn_plnet_fase stack_rnn_fase pretrained_rnn_plnet_fase lstm_dinput_fase rnn_fase lav_psse huber_loss_mean st_activation huber_loss ANN_fase lstm_fase nn0_psse nn1_psse nn1_8H_psse sqrt sum range hold subplot list str plot xlabel ylabel title set_xticks figure legend gca range abs square sign Model load_weights adam Input compile Model load_weights adam Input compile add Model load_weights adam Input compile add Model load_weights adam Input compile Model load_weights adam Input compile SimpleRNN Sequential add Dense load_weights adam compile Sequential add Dense adam LSTM compile Sequential add Dense adam TimeDistributed LSTM compile Dropout SimpleRNN Sequential add Dense load_weights adam compile add Model load_weights adam Input compile add Model load_weights adam Input compile SimpleRNN Sequential add Dense load_weights adam compile SGD Model load_weights Input compile
# PSSE-via-DNNs A Keras implementation of our paper: L. Zhang, G. Wang, and G. B. Giannakis, “Real-time power system state estimation and forecasting via deep neural networks,” arXiv:1811.06146, Nov. 2018. [Online] available: https://arxiv.org/abs/1811.06146 If you find the code useful, please cite our paper. The data for 118- and 57-bus systems can be downloaded from https://drive.google.com/drive/folders/1pAquFM2PPiWtleehXLLCxjsOnpvtB4QU?usp=sharing. To train the model and obtain estimation performance, please put the aforementioned data in the root file, and run simple_test.py. To get plots, please run the get_plots.py. Please feel free to play with your own data.
643
LibraryOfCongress/newspaper-navigator
['optical character recognition']
['The Newspaper Navigator Dataset: Extracting And Analyzing Visual Content from 16 Million Historic Newspaper Pages in Chronicling America']
process_beyond_words_dataset.py news_navigator_app/forms.py news_navigator_app/preprocessing/params.py news_navigator_app/preprocessing/download_metadata.py news_navigator_app/flaskapp.py generate_visualization.py rescale add_annotation add_image train_and_predict perform_search view serve_metadata search load_data get_annotations search_results get_prediction about DataSearchForm MLSearchForm process_years chunk download_url append append load lower range len DataSearchForm args append int train_and_predict perform_search args len Pagination lower get_annotations get_page_args append zeros array range split get int list sorted len reversed Pagination get_page_args append range split get int split range len seed arange concatenate ones fit shuffle LogisticRegression len seed int train_and_predict perform_search MLSearchForm Pagination lower get_annotations get_page_args append args int make_response copy getvalue OrderedDict DictWriter writeheader writerows split append StringIO keys range len HiddenField StringField SelectField HiddenField StringField SelectField ceil float range append len get str remove print concat download_url keys to_dict append to_list array range len
# *Newspaper Navigator* ## By Benjamin Charles Germain Lee (2020 Library of Congress Innovator in Residence) <i>This project is an experiment and there is no active development and/or maintenance of the codebase. Fork at your own risk! In the unlikely event that there are further updates, the LC Labs team will announce it through our communication channels. Sign up for our listserv on labs.loc.gov, follow us on Twitter @LC_Labs, and watch #NewspaperNavigator . </i> ## Introduction The goal of *Newspaper Navigator* is to re-imagine searching over the visual content in [*Chronicling America*](https://chroniclingamerica.loc.gov/about/). The project consists of two stages: - Creating the [*Newspaper Navigator* dataset](https://news-navigator.labs.loc.gov/) by extracting headlines, photographs, illustrations, maps, comics, cartoons, and advertisements from 16.3 million historic newspaper pages in Chronicling America using emerging machine learning techniques. In addition to the visual content, the dataset includes captions and other relevant text derived from the METS/ALTO OCR, as well as image embeddings for fast similarity querying. - Creating an [exploratory search application](https://news-navigator.labs.loc.gov/search) for the *Newspaper Navigator* dataset in order to enable new ways for the American public to navigate Chronicling America. This repo contains the code for both steps of the project, as well as a list of *Newspaper Navigator* resources. ## Updates **Update (09/10/2020):**
644
LightDXY/GreedyFool
['adversarial attack']
['GreedyFool: Distortion-Aware Sparse Adversarial Attack']
inception_v3.py generators.py nips_gd.py options.py nips_black_gd.py data_loader.py load_img McDataset define Res_ResnetGenerator ResnetGenerator ResnetBlock Weight_ResnetGenerator Weight_Res_ResnetGenerator BasicConv2d conv3x3 conWeight_ResnetGenerator get_scheduler EX_Weight_Res_ResnetGenerator weights_init BasicBlock NLayerDiscriminator InceptionB InceptionC InceptionAux BasicConv2d InceptionD InceptionE InceptionA Inception3 inception_v3 BaseOptions convert hasattr fill_ in_channels bias normal_ sqrt float __name__ LambdaLR ReduceLROnPlateau StepLR UnetGeneratorSC ResnetGenerator UnetGenerator weights_init RecursiveUnetGenerator cuda load_url Inception3 load_state_dict
GreedyFool ============================ Implemention of GreedyFool: Distortion-Aware Sparse Adversarial Attack (NIPS2020) Setup ----- * Install ``python`` -- This repo is tested with ``3.6`` * Install ``PyTorch version >= 1.0.0, torchvision >= 0.2.1`` * Download Inception-v3 pretrained model from ``https://download.pytorch.org/models/inception_v3_google-1a9a5a14.pth`` and move it to ``./pretrain/`` Adversarial Attack
645
LiliMeng/3D-ResNets-PyTorch
['action recognition']
['Can Spatiotemporal 3D CNNs Retrace the History of 2D CNNs and ImageNet?']
utils/eval_ucf101.py utils/video_jpg.py opts.py models/resnext.py train.py datasets/hmdb51.py dataset.py datasets/moments.py models/wide_resnet.py models/densenet.py utils/ucf101_json.py utils.py utils/eval_kinetics.py datasets/activitynet.py models/pre_act_resnet.py temporal_transforms.py test.py utils/kinetics_json.py datasets/ucf101.py utils/eval_hmdb51.py utils/hmdb51_json.py mean.py utils/n_frames_ucf101_hmdb51.py utils/moments_json.py datasets/kinetics.py main.py target_transforms.py model.py utils/n_frames_kinetics.py utils/n_frames_moments.py utils/video_jpg_ucf101_hmdb51.py utils/fps.py validation.py spatial_transforms.py models/resnet.py utils/video_jpg_kinetics.py get_training_set get_test_set get_validation_set get_std get_mean generate_model parse_opts MultiScaleCornerCrop CenterCrop MultiScaleRandomCrop ToTensor Compose Scale Normalize RandomHorizontalFlip CornerCrop ClassLabel VideoID Compose TemporalBeginCrop LoopPadding TemporalCenterCrop TemporalRandomCrop calculate_video_results test calculate_accuracy AverageMeter Logger load_value_file modify_frame_indices get_class_labels load_annotation_data video_loader get_end_t make_dataset ActivityNet accimage_loader get_default_image_loader get_default_video_loader make_untrimmed_dataset pil_loader get_video_names_and_annotations get_class_labels load_annotation_data video_loader make_dataset accimage_loader HMDB51 get_default_image_loader get_default_video_loader pil_loader get_video_names_and_annotations get_class_labels load_annotation_data video_loader make_dataset accimage_loader Kinetics get_default_image_loader get_default_video_loader pil_loader get_video_names_and_annotations get_class_labels Moments load_annotation_data video_loader make_dataset accimage_loader get_default_image_loader get_default_video_loader pil_loader get_video_names_and_annotations UCF101 get_class_labels load_annotation_data video_loader make_dataset accimage_loader get_default_image_loader get_default_video_loader pil_loader get_video_names_and_annotations get_fine_tuning_parameters DenseNet densenet201 densenet169 densenet264 _DenseLayer _DenseBlock _Transition densenet121 conv3x3x3 get_fine_tuning_parameters resnet50 downsample_basic_block resnet152 PreActivationBasicBlock resnet34 resnet200 PreActivationBottleneck resnet18 PreActivationResNet resnet101 conv3x3x3 get_fine_tuning_parameters ResNet downsample_basic_block resnet50 Bottleneck resnet152 resnet34 resnet200 resnet18 resnet10 BasicBlock resnet101 ResNeXtBottleneck conv3x3x3 get_fine_tuning_parameters resnet50 downsample_basic_block ResNeXt resnet152 resnet101 conv3x3x3 get_fine_tuning_parameters WideBottleneck resnet50 downsample_basic_block WideResNet HMDBclassification compute_video_hit_at_k get_blocked_videos KINETICSclassification compute_video_hit_at_k UCFclassification compute_video_hit_at_k convert_hmdb51_csv_to_activitynet_json get_labels convert_csv_to_dict load_labels convert_kinetics_csv_to_activitynet_json convert_csv_to_dict load_labels convert_kinetics_csv_to_moments_json convert_csv_to_dict class_process class_process class_process load_labels convert_ucf101_csv_to_activitynet_json convert_csv_to_dict class_process class_process video_path UCF101 Moments ActivityNet Kinetics HMDB51 annotation_path video_path UCF101 Moments n_val_samples ActivityNet Kinetics HMDB51 annotation_path video_path UCF101 ActivityNet Kinetics annotation_path HMDB51 get_fine_tuning_parameters in_features densenet264 DataParallel ft_begin_index resnet34 resnet152 cuda load_state_dict resnet200 resnet101 resnet18 format resnet50 resnet10 n_finetune_classes Linear load densenet169 densenet201 print pretrain_path densenet121 parse_args set_defaults add_argument ArgumentParser topk size mean stack append range update time format model print Variable cpu AverageMeter size eval softmax calculate_video_results append range enumerate len topk view size t eq join format image_loader append exists get_default_image_loader append enumerate append items list format append join format items list format join get_class_labels deepcopy load_annotation_data print modify_frame_indices len load_value_file ceil max range append get_video_names_and_annotations sort listdir items list format join get_class_labels deepcopy load_annotation_data print modify_frame_indices len load_value_file get_end_t ceil max range append get_video_names_and_annotations int min print partial DenseNet DenseNet DenseNet DenseNet append format range named_parameters data isinstance FloatTensor Variable zero_ avg_pool3d cuda cat PreActivationResNet PreActivationResNet PreActivationResNet PreActivationResNet PreActivationResNet PreActivationResNet ResNet ResNet ResNet ResNet ResNet ResNet ResNet ResNeXt ResNeXt ResNeXt WideResNet reset_index size tolist mean unique zeros values enumerate Request urlopen format ceil join read_csv append listdir range len append join listdir update get_labels convert_csv_to_dict read_csv update load_labels convert_csv_to_dict print append range len print load_labels update convert_csv_to_dict join int print sort append listdir split update load_labels convert_csv_to_dict format call mkdir splitext exists
# 3D ResNets for Action Recognition ## Update (2018/2/21) Our paper "Can Spatiotemporal 3D CNNs Retrace the History of 2D CNNs and ImageNet?" is accepted to CVPR2018! We update the paper information. ## Update (2018/01/16) We uploaded some of fine-tuned models on UCF-101 and HMDB-51. * ResNeXt-101 fine-tuned on UCF-101 (split1) * ResNeXt-101 (64 frame inputs) fine-tuned on UCF-101 (split1) * ResNeXt-101 fine-tuned on HMDB-51 (split1) * ResNeXt-101 (64 frame inputs) fine-tuned on HMDB-51 (split1)
646
LiliMeng/3D-ResNets-Pytorch-ImageNet-Moments
['action recognition']
['Can Spatiotemporal 3D CNNs Retrace the History of 2D CNNs and ImageNet?']
utils/eval_ucf101.py utils/video_jpg.py opts.py models/resnext.py train.py models/i3res.py datasets/hmdb51.py dataset.py datasets/moments.py models/wide_resnet.py models/densenet.py utils/ucf101_json.py utils.py utils/eval_kinetics.py datasets/activitynet.py models/inflate.py models/pre_act_resnet.py temporal_transforms.py test.py utils/kinetics_json.py datasets/ucf101.py utils/eval_hmdb51.py utils/hmdb51_json.py mean.py utils/n_frames_ucf101_hmdb51.py utils/moments_json.py datasets/kinetics.py main.py target_transforms.py model.py utils/n_frames_kinetics.py utils/n_frames_moments.py utils/video_jpg_ucf101_hmdb51.py utils/fps.py validation.py spatial_transforms.py models/resnet.py utils/video_jpg_kinetics.py get_training_set get_test_set get_validation_set get_std get_mean generate_model parse_opts MultiScaleCornerCrop CenterCrop MultiScaleRandomCrop ToTensor Compose Scale Normalize RandomHorizontalFlip CornerCrop ClassLabel VideoID Compose TemporalBeginCrop LoopPadding TemporalCenterCrop TemporalRandomCrop calculate_video_results test calculate_accuracy AverageMeter Logger load_value_file modify_frame_indices get_class_labels load_annotation_data video_loader get_end_t make_dataset ActivityNet accimage_loader get_default_image_loader get_default_video_loader make_untrimmed_dataset pil_loader get_video_names_and_annotations get_class_labels load_annotation_data video_loader make_dataset accimage_loader HMDB51 get_default_image_loader get_default_video_loader pil_loader get_video_names_and_annotations get_class_labels load_annotation_data video_loader make_dataset accimage_loader Kinetics get_default_image_loader get_default_video_loader pil_loader get_video_names_and_annotations get_class_labels Moments load_annotation_data video_loader make_dataset accimage_loader get_default_image_loader get_default_video_loader pil_loader get_video_names_and_annotations UCF101 get_class_labels load_annotation_data video_loader make_dataset accimage_loader get_default_image_loader get_default_video_loader pil_loader get_video_names_and_annotations get_fine_tuning_parameters DenseNet densenet201 densenet169 densenet264 _DenseLayer _DenseBlock _Transition densenet121 Bottleneck3d inflate_downsample inflate_reslayer I3ResNet inflate_batch_norm inflate_pool inflate_conv inflate_linear conv3x3x3 get_fine_tuning_parameters resnet50 downsample_basic_block resnet152 PreActivationBasicBlock resnet34 resnet200 PreActivationBottleneck resnet18 PreActivationResNet resnet101 conv3x3x3 get_fine_tuning_parameters ResNet downsample_basic_block resnet50 Bottleneck resnet152 resnet34 resnet200 resnet18 resnet10 BasicBlock resnet101 ResNeXtBottleneck conv3x3x3 get_fine_tuning_parameters resnet50 downsample_basic_block ResNeXt resnet152 resnet101 conv3x3x3 get_fine_tuning_parameters WideBottleneck resnet50 downsample_basic_block WideResNet HMDBclassification compute_video_hit_at_k get_blocked_videos KINETICSclassification compute_video_hit_at_k UCFclassification compute_video_hit_at_k convert_hmdb51_csv_to_activitynet_json get_labels convert_csv_to_dict load_labels convert_kinetics_csv_to_activitynet_json convert_csv_to_dict load_labels convert_kinetics_csv_to_moments_json convert_csv_to_dict class_process class_process class_process load_labels convert_ucf101_csv_to_activitynet_json convert_csv_to_dict class_process class_process video_path UCF101 Moments ActivityNet Kinetics HMDB51 annotation_path video_path UCF101 Moments n_val_samples ActivityNet Kinetics HMDB51 annotation_path video_path UCF101 ActivityNet Kinetics annotation_path HMDB51 load deepcopy format get_fine_tuning_parameters I3ResNet print resnet50 in_features pretrain_path DataParallel ft_begin_index sample_duration load_state_dict resnet101 cuda n_finetune_classes Linear parse_args set_defaults add_argument ArgumentParser topk size mean stack append range update time format model print Variable cpu AverageMeter size eval softmax calculate_video_results append range enumerate len topk view size t eq join format image_loader append exists get_default_image_loader append enumerate append items list format append join format items list format join get_class_labels deepcopy load_annotation_data print modify_frame_indices len load_value_file ceil max range append get_video_names_and_annotations sort listdir items list format join get_class_labels deepcopy load_annotation_data print modify_frame_indices len load_value_file get_end_t ceil max range append get_video_names_and_annotations int min print partial DenseNet DenseNet DenseNet DenseNet append format range named_parameters append Bottleneck3d inflate_batch_norm inflate_conv Sequential data Parameter out_channels Conv3d in_channels bias repeat zeros Parameter in_features bias repeat out_features Linear BatchNorm3d num_features _check_input_dim AvgPool2d isinstance MaxPool2d AvgPool3d MaxPool3d data isinstance FloatTensor Variable zero_ avg_pool3d cuda cat PreActivationResNet PreActivationResNet PreActivationResNet PreActivationResNet PreActivationResNet PreActivationResNet ResNet ResNet ResNet ResNet ResNet ResNet ResNet ResNeXt ResNeXt ResNeXt WideResNet reset_index size tolist mean unique zeros values enumerate Request urlopen format ceil join read_csv append listdir range len append join listdir update get_labels convert_csv_to_dict read_csv update load_labels convert_csv_to_dict print append range len print load_labels update convert_csv_to_dict join int print sort append listdir split update load_labels convert_csv_to_dict format call mkdir splitext exists
# 3D ResNets for Action Recognition ## Update (2018/2/21) Our paper "Can Spatiotemporal 3D CNNs Retrace the History of 2D CNNs and ImageNet?" is accepted to CVPR2018! We update the paper information. ## Update (2018/01/16) We uploaded some of fine-tuned models on UCF-101 and HMDB-51. * ResNeXt-101 fine-tuned on UCF-101 (split1) * ResNeXt-101 (64 frame inputs) fine-tuned on UCF-101 (split1) * ResNeXt-101 fine-tuned on HMDB-51 (split1) * ResNeXt-101 (64 frame inputs) fine-tuned on HMDB-51 (split1)
647
LinZhuoChen/SGNet
['semantic segmentation']
['Spatial Information Guided Convolution for Real-Time RGBD Semantic Segmentation']
utils/dirs.py graphs/ops/functions/deform_conv.py utils/utils.py graphs/ops/build.py graphs/models/SGNet/SGNet_fps.py utils/metrics.py agents/__init__.py data/transform/__init__.py utils/config.py agents/sgnet_agent.py graphs/models/SGNet/SGNet_Res50_fps.py graphs/ops/modules/__init__.py utils/misc.py graphs/ops/libs/build.py graphs/ops/build_modulated.py graphs/models/SGNet/SGNet_Res50.py graphs/ops/modules/s_conv.py graphs/models/SGNet/SGNet_ASPP.py graphs/models/SGNet/SGNet_ASPP_fps.py data/nyudv2.py graphs/ops/libs/_ext/__init__.py utils/log.py utils/__init__.py graphs/ops/functions/__init__.py graphs/ops/libs/residual.py utils/optim.py agents/base.py data/transform/rgbd_transform.py main.py graphs/ops/functions/modulated_dcn_func.py graphs/ops/libs/__init__.py graphs/models/SGNet/SGNet.py graphs/ops/libs/misc.py graphs/ops/libs/dense.py utils/encoding.py graphs/ops/libs/bn.py graphs/ops/modules/deform_conv.py graphs/ops/libs/functions.py main BaseAgent SGNetAgent NYUDataset_val_full make_dataset_fromlst FixedResize CenterCrop ToTensor Normalize_PIL2numpy_depth2xyz RandomGaussianBlur FixedResize_image RandomHorizontalFlip FixScaleCrop CenterCrop_image ToTensor_SUN RandomScaleCrop ResNet conv3x3 Bottleneck SGNet ASPPModule SGNet ResNet Bottleneck conv3x3 ASPPModule SGNet ResNet Bottleneck conv3x3 ResNet conv3x3 Bottleneck SGNet ResNet conv3x3 Bottleneck SGNet ResNet conv3x3 Bottleneck SGNet DeformConvFunction deform_conv_function DeformRoIPoolingFunction ModulatedDeformConvFunction InPlaceABNSyncWrapper ABN InPlaceABNSync InPlaceABNWrapper InPlaceABN _pair DenseModule _act_forward _count_samples _broadcast_shape InPlaceABNSync _check_contiguous InPlaceABN _reduce _check _act_backward GlobalAvgPool2d IdentityResidualBlock _import_symbols DeformConv ModulatedDeformConv ASPPModule_Adaptive SConv_feature SConv_test SConv_xyz SConv_depth SConv process_config get_config_from_json create_dirs CallbackContext allreduce AllReduce DataParallelModel _criterion_parallel_apply execute_replication_callbacks Reduce patch_replication_callback DataParallelCriterion Log Visualizer setup_logging IOUMetric cls_accuracy AverageMeter AverageMeterList timeit print_cuda_statistics set_bn_momentum lr_poly_epoch lr_poly_exp adjust_learning_rate_warmup adjust_learning_rate set_bn_eval predict_multiscale decode_predictions uint82bin get_currect_time inv_preprocess decode_labels labelcolormap expand_model_dict get_palette get_confusion_matrix predict_whole get_metric maybe_download config agent_class add_argument finalize ArgumentParser parse_args process_config run ResNet DeformConvFunction _pair isinstance fn append size enumerate size enumerate slope elu_cuda _check leaky_relu_cuda elu_inv_cuda leaky_relu_backward_cuda elu_backward_cuda slope _check leaky_relu_cuda dir _wrap_function getattr append callable format print create_dirs get_config_from_json pprint exp_name makedirs join isinstance _worker len start is_grad_enabled append range Lock list hasattr __data_parallel_replicate__ modules enumerate len replicate RotatingFileHandler setFormatter format getLogger WARNING addHandler StreamHandler Formatter DEBUG setLevel INFO topk size t eq expand_as append sum max format getLogger call device_count __version__ version info current_device num_steps learning_rate lr_poly_exp min_learining_rate power max num_steps learning_rate lr_poly_exp warmup_steps min_learining_rate power max eval __name__ __name__ append uint82bin range uint8 load new labelcolormap shape zeros numpy array range enumerate argmax load isinstance concatenate new labelcolormap shape append zeros numpy array range enumerate uint8 astype shape zeros numpy range bincount zeros astype range format now nanmean sum diag isinstance transpose from_numpy Upsample cuda net data zoom copy shape predict_whole zeros float range join format urlretrieve write getenv expanduser makedirs list range keys replace
<!-- PROJECT LOGO --> <br /> <h3 align="center">Spatial information guided Convolution for Real-Time RGBD Semantic Segmentation</h3> <p align="center"> Lin-Zhuo Chen, Zheng Lin, Ziqin Wang, Yong-Liang Yang and Ming-Ming Cheng <br /> <a href="https://linzhuo.xyz/sgnet/"><strong>⭐ Project Home »</strong></a> <br /> <!-- <a href="https://arxiv.org/pdf/2004.04534.pdf" target="_black">[PDF]</a>
648
LinaMaudlej/Weighted-Smoothing
['adversarial defense']
['Smoothed Inference for Adversarially-Trained Models']
src/attacks/pgd_fgsmk.py src/models/resnet_cpni_smooth_predict.py src/run_attack.py src/layers.py src/logger.py src/train.py results analysis/kpredictions_draw.py results analysis/boris_charts.py src/models/resnet_smooth_predict.py src/models/resnet_cpni_smooth_expectation_predict.py src/run.py src/models/resnet_pni_expectation_attack.py src/models/resnet_pni_smooth_predict.py src/run_attack_transfer.py src/models/resnet_cpni_smooth_logits.py src/cifar_data.py src/util/cross_entropy.py src/models/resnet.py results analysis/lina_chart.py src/models/resnet_cpni_expectation_attack.py results analysis/basic_charts.py src/attacks/expectation_pgd_fgsmk.py src/attacks/fgsm.py results analysis/boris_stats_b.py src/attacks/transfer.py results analysis/boris_stats.py results analysis/threshold_draw.py results analysis/close_draw.py src/models/resnet_pni.py src/attacks/attack.py src/models/resnet_pni_colored.py clean_test_res clean_test_res clean_test_res clean_test_res clean_test_res clean_test_res clean_test_res clean_test_res get_loaders NoisedLinear NoisedConv2DColored lowrank_multivariate_sample NoisedConv2D CsvLogger gen_attack adv_train test correct save_checkpoint attack train main get_args check_hyper main get_args optimize_hyper check_hyper get_args train_network adv_train_network_alpha adv_train_network main Attack EPGD_FGSMk FGSM PGD_FGSMk Transfer resnet44_cifar resnet110_cifar resnet1202_cifar resnet1001_cifar PreActBasicBlock ResNet_Cifar Bottleneck resnet164_cifar preact_resnet110_cifar resnet20_cifar conv3x3 preact_resnet1001_cifar resnet32_cifar PreActBottleneck BasicBlock resnet56_cifar PreAct_ResNet_Cifar preact_resnet164_cifar resnet44_cifar resnet110_cifar resnet1202_cifar resnet1001_cifar PreActBasicBlock ResNet_Cifar Bottleneck resnet164_cifar preact_resnet110_cifar resnet20_cifar conv3x3 preact_resnet1001_cifar resnet32_cifar PreActBottleneck BasicBlock resnet56_cifar PreAct_ResNet_Cifar preact_resnet164_cifar resnet44_cifar resnet110_cifar resnet1202_cifar resnet1001_cifar PreActBasicBlock ResNet_Cifar Bottleneck resnet164_cifar preact_resnet110_cifar resnet20_cifar conv3x3 preact_resnet1001_cifar resnet32_cifar PreActBottleneck BasicBlock resnet56_cifar PreAct_ResNet_Cifar preact_resnet164_cifar resnet44_cifar resnet110_cifar resnet1202_cifar resnet1001_cifar PreActBasicBlock ResNet_Cifar Bottleneck resnet164_cifar preact_resnet110_cifar resnet20_cifar conv3x3 preact_resnet1001_cifar resnet32_cifar PreActBottleneck BasicBlock resnet56_cifar PreAct_ResNet_Cifar preact_resnet164_cifar resnet110_cifar Bottleneck FilterByThresholdSoftmax BasicBlock resnet1202_cifar ResNet_Cifar resnet164_cifar resnet20_cifar resnet32_cifar preact_resnet1001_cifar resnet1001_cifar PreActBasicBlock ResNet_Cifar_FilteredMonteCarlo preact_resnet110_cifar FilterByThreshold PreActBottleneck FilterByThresholdKPredictions preact_resnet164_cifar resnet44_cifar conv3x3 FilterByThresholdSoftmaxTop2 resnet56_cifar PreAct_ResNet_Cifar resnet44_cifar resnet110_cifar resnet1202_cifar resnet1001_cifar PreActBasicBlock ResNet_Cifar Bottleneck resnet164_cifar preact_resnet110_cifar resnet20_cifar conv3x3 preact_resnet1001_cifar resnet32_cifar PreActBottleneck BasicBlock resnet56_cifar PreAct_ResNet_Cifar preact_resnet164_cifar resnet44_cifar resnet110_cifar resnet1202_cifar resnet1001_cifar PreActBasicBlock ResNet_Cifar Bottleneck resnet164_cifar preact_resnet110_cifar resnet20_cifar conv3x3 preact_resnet1001_cifar resnet32_cifar PreActBottleneck BasicBlock resnet56_cifar PreAct_ResNet_Cifar preact_resnet164_cifar resnet44_cifar resnet110_cifar resnet1202_cifar resnet1001_cifar PreActBasicBlock ResNet_Cifar Bottleneck resnet164_cifar preact_resnet110_cifar resnet20_cifar conv3x3 preact_resnet1001_cifar resnet32_cifar PreActBottleneck BasicBlock resnet56_cifar PreAct_ResNet_Cifar preact_resnet164_cifar resnet44_cifar resnet110_cifar resnet1202_cifar resnet1001_cifar PreActBasicBlock ResNet_Cifar Bottleneck resnet164_cifar preact_resnet110_cifar resnet20_cifar conv3x3 preact_resnet1001_cifar resnet32_cifar PreActBottleneck BasicBlock resnet56_cifar PreAct_ResNet_Cifar preact_resnet164_cifar resnet44_cifar resnet110_cifar resnet1202_cifar resnet1001_cifar PreActBasicBlock ResNet_Cifar Bottleneck resnet164_cifar preact_resnet110_cifar resnet20_cifar conv3x3 preact_resnet1001_cifar resnet32_cifar PreActBottleneck BasicBlock resnet56_cifar PreAct_ResNet_Cifar preact_resnet164_cifar _is_long onehot CrossEntropyLoss cross_entropy match load RandomSampler DataLoader BatchSampler Normalize dataset SequentialSampler normal format clip_grad_norm_ forward_backward zero_grad write tqdm dataset parameters correct item step enumerate len format clip_grad_norm_ zero_grad write tqdm parameters adv_forward_backward correct linspace set_alpha item train step enumerate len int format generate_sample len write tqdm eval correct dataset enumerate generate_sample tqdm eval append adv_method enumerate int format write eval dataset len type_as eq item expand_as append max predict copyfile join save float64 float16 ArgumentParser save seed str set_device pni strftime mclogits mcepredict results_dir parse_args save_path mceattack CIFAR10 manual_seed join cpni print add_argument float32 randint mcpredict makedirs data workers batch_size SGD MultiStepLR alphad_i modules save dataset abs max argmax str gen_attack noise_list alphaf_w Adam load_state_dict attack append iterations_list sum alphaf_i CrossEntropyLoss range eps format get_loaders save_path alphad_w gen_adv vote_thresh mean resume alpha net enumerate load join learning_rate cpni isdir isinstance print k_predic parameters isfile std close_pred_thresh data workers batch_size SGD MultiStepLR alphad_i modules save dataset abs m_train max gen_attack num_classes alphaf_w Adam load_state_dict attack width noise_sd sum alphaf_i CrossEntropyLoss eps format get_args get_loaders save_path alphad_w gen_adv vote_thresh mean m_test check_hyper_params resume check_hyper alpha trange net load join learning_rate cpni isdir isinstance print smoothing k_predic parameters repeat isfile std close_pred_thresh data workers batch_size SGD MultiStepLR dataset argmax str adv_train Adam epochs load_state_dict attack append iterations_list sum CrossEntropyLoss range eps format get_loaders start_epoch resume item trange net enumerate load join log_interval learning_rate cpni isdir print isfile step tepgd width update smootht trans optimize_hyper optimize_hyper_params update trans evaluate save_params train_network adv_train_network_alpha val_batch_size adv_data adv argv CsvLogger adv_w zero_start test start_epoch log_interval evaluate adv_train_network epochs plot_progress format write_text print write test mean save_checkpoint modules alpha trange train step save_checkpoint alphad_i modules abs max adv_method plot_progress alphaf_w adv_train alphaf_i format alphad_w test mean alpha trange write_text isinstance write step std plot_progress format write_text concatenate adv_train write test save_checkpoint set_alpha trange step ResNet_Cifar ResNet_Cifar ResNet_Cifar ResNet_Cifar ResNet_Cifar ResNet_Cifar ResNet_Cifar ResNet_Cifar PreAct_ResNet_Cifar PreAct_ResNet_Cifar PreAct_ResNet_Cifar ResNet_Cifar_FilteredMonteCarlo FilterByThresholdSoftmax FilterByThresholdSoftmaxTop2 FilterByThresholdKPredictions ResNet_Cifar_FilteredMonteCarlo FilterByThresholdSoftmax FilterByThresholdSoftmaxTop2 FilterByThresholdKPredictions ResNet_Cifar_FilteredMonteCarlo FilterByThresholdSoftmax FilterByThresholdSoftmaxTop2 FilterByThresholdKPredictions ResNet_Cifar_FilteredMonteCarlo FilterByThresholdSoftmax FilterByThresholdSoftmaxTop2 FilterByThresholdKPredictions ResNet_Cifar_FilteredMonteCarlo FilterByThresholdSoftmax FilterByThresholdSoftmaxTop2 FilterByThresholdKPredictions ResNet_Cifar_FilteredMonteCarlo FilterByThresholdSoftmax FilterByThresholdSoftmaxTop2 FilterByThresholdKPredictions ResNet_Cifar_FilteredMonteCarlo FilterByThresholdSoftmax FilterByThresholdSoftmaxTop2 FilterByThresholdKPredictions ResNet_Cifar_FilteredMonteCarlo FilterByThresholdSoftmax FilterByThresholdSoftmaxTop2 FilterByThresholdKPredictions ResNet_Cifar_FilteredMonteCarlo FilterByThresholdSoftmax FilterByThresholdSoftmaxTop2 FilterByThresholdKPredictions ResNet_Cifar_FilteredMonteCarlo FilterByThresholdSoftmax FilterByThresholdSoftmaxTop2 FilterByThresholdKPredictions ResNet_Cifar_FilteredMonteCarlo FilterByThresholdSoftmax FilterByThresholdSoftmaxTop2 FilterByThresholdKPredictions list size scatter_ masked_fill_ unsqueeze zero_ max log_softmax size mean masked_fill_ eq unsqueeze _is_long float sum
# Weighted-Smoothing Deep Learning Project 236781. Paper: https://arxiv.org/pdf/1911.07198.pdf Repo: https://github.com/yanemcovsky/SIAM # Implementation folders and what is implemented #### src/run_attack.py The basic implementation for the flags inputs: --vote_thresh --k_predic --close_pred_thresh
649
LinyangLee/BERT-Attack
['adversarial attack']
['BERT-ATTACK: Adversarial Attack Against BERT Using BERT']
bertattack.py batch_run.py runCommand myThread get_sim_embed _get_masked evaluate get_data_cls _tokenize get_bpe_substitues get_substitues dump_features attack get_important_scores run_attack Feature load append int enumerate split append lower tokenize split append range len _get_masked size SequentialSampler DataLoader numpy TensorDataset softmax append tensor to argmax encode_plus cat len int _convert_id_to_token get_bpe_substitues size zip append exp view sort size mean c_loss append tensor to convert_tokens_to_string range CrossEntropyLoss tensor argmax max encode_plus topk sorted squeeze get_important_scores append to size get_substitues softmax convert_tokens_to_string enumerate seq deepcopy _tokenize len print float format semantic_sim append dump print open from_pretrained use_bpe ArgumentParser output_dir str tgt_path k parse_args to get_sim_embed threshold_pred_score mlm_path start num_label evaluate print end get_data_cls add_argument dump_features data_path
LinyangLee/BERT-Attack
650
LitianD/Joint_RE
['relation extraction']
['A Novel Cascade Binary Tagging Framework for Relational Triple Extraction']
models/bert.py run.py models/subjectmodel.py utils/data_loader.py utils/metric.py datasets/2019_Baidu_RE/label_generate.py datasets/2019_Baidu_RE/data_generate.py models/objectmodel.py models/__init__.py config.py utils/tokenizer.py Trainer BERT gather_nd ObjectModel SubJectModel CustomDataset to_tuple collate_wrapper seq_padding CustomBatch load_data find_head_idx partial_match extract_items metric BERTTokenizer list view range len append tuple load seed list print shuffle to_tuple RANDOM_SEED open range len print write dumps close set tqdm extract_items iter open join view zip reshape convert_tokens_to_ids object_model set add repeat numpy split device append to subject_model tokenize enumerate len
# Joint_RE A pytorch version of ACL 2020 paper "A Novel Cascade Binary Tagging Framework for Relational Triple Extraction" ![](/img/model.png) ## 运行步骤 ### 1.基于NTY数据集 1. 安装相关依赖 2. 解压/datasets/NYT/NYT_normal_dataset.zip 3. 创建目录/pretrained_models/bert-base-cased/ 4. 下载pytorch的bert模型,放入上述目录(下载链接见百度网盘)
651
LiuHaiTao01/DLVKL
['gaussian processes']
['Deep Kernel Learning']
DLVKL/kernels.py DLVKL/utils.py DLVKL/layers.py DLVKL/param.py DLVKL/models.py DLVKL/likelihoods.py DLVKL/broadcasting_lik.py demo_binary.py demo_dim_reduction.py DLVKL/nn.py DLVKL/settings.py demo_regression.py DLVKL/integrators.py KERNEL gridParams KERNEL KERNEL BroadcastingLikelihood EulerMaruyama Kernel RBF Matern12 Matern52 Matern32 SVGP_Layer SVGP_Z_Layer Layer Bernoulli MultiClass_SoftMax Gaussian inv_probit log_bernoulli MultiClass Likelihood RobustMax DLVKL_NSDE_base DLVKL GP DLVKL_NSDE mlp_share he_initializer xavier_initializer mlp_share_t Param Settings reparameterize pca meshgrid T linspace transpose jitter cholesky reshape matmul eigh reduce_mean cast gather
Deep Latent-Variable Kernel Learning ==== This is the python implementation of the model proposed in our paper [deep latent-variable kernel learning](https://arxiv.org/abs/2005.08467). Deep kernel learning ([DKL](https://arxiv.org/abs/1511.02222)) leverages the connection between Gaussian process (GP) and neural networks (NN) to build an end-to-end, hybrid model. It combines the capability of NN to learn rich representations under massive data and the non-parametric property of GP to achieve automatic calibration. However, the deterministic encoder may weaken the model calibration of the following GP part, especially on small datasets, due to the free latent representation. We therefore present a complete deep latent-variable kernel learning (DLVKL) model wherein the latent variables perform **stochastic encoding** for regularized representation. Theoretical analysis however indicates that the DLVKL with \textit{i.i.d.} prior for latent variables suffers from **posterior collapse** and degenerates to a constant predictor. Hence, we further improve the DLVKL from two aspects: (i) the **complicated variational posterior through neural stochastic differential equations (NSDE)** to reduce the divergence gap, and (ii) the **hybrid prior taking knowledge from both the SDE prior and the posterior** to arrive at a flexible trade-off. Intensive experiments imply that the DLVKL-NSDE performs similarly to the well calibrated GP on small datasets, and outperforms existing deep GPs on large datasets. The model is implemented based on [GPflow 1.3.0](https://github.com/GPflow/GPflow), [DiffGP](https://github.com/hegdepashupati/differential-dgp) and tested using Tensorflow 1.15.0. The demos for regression, binary classification, and dimensionality reduction are provided. The readers can run the demo files like ``` python demo_regression --model DLVKL ```
652
Liumihan/CRNN_kreas
['optical character recognition', 'scene text recognition']
['An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition']
src/run.py src/vgg_bgru_ctc.py src/data_generator.py src/resnet_bgru_ctc.py src/train.py src/dicts.py src/utils.py src/resnet18_blstm.py src/predict.py src/vgg_blstm_ctc.py main DataGenerator_by_filename DataGenerator get_dict PredictLabels PredictLabels_by_filename main model conv_block main identity_block model main train_model main closure ctc_loss_layer generate_dict extract_300w find_the_inner_dot find_the_max_label_length check_acc find_the_max_label_length_txt generate_txt_file fake_ctc_loss generate_train_test_file main check_acc_by_filename model main model get_data DataGenerator_txt print get_value resize open expand_dims imread range predict format COLOR_BGR2GRAY readlines close load_weights listdir enumerate join int ctc_decode print zeros full cvtColor len get_value resize expand_dims imread range predict format COLOR_BGR2GRAY load_weights listdir enumerate join int ctc_decode print zeros full cvtColor len print Model Input summary model conv_block l2 he_normal identity_block summary train_model str time format items check_acc write len strftime close localtime PredictLabels open DataGenerator print EarlyStopping fit_generator ReduceLROnPlateau ModelCheckpoint compile ctc_batch_cost items items readlines close open print listdir range len print listdir enumerate len print readlines close open len format COLOR_BGR2GRAY ones morphologyEx waitKey where imshow moveWindow shape MORPH_CLOSE zeros GaussianBlur range cvtColor str write close listdir open join int remove readlines len write close sample open add listdir set join format imwrite print readlines write close imread open find_the_max_label_length_txt
# CRNN_kreas **文本识别分为两部分:文本定位与文本序列识别。这个repo主要是做的后者。** 这是一个基于CRNN的文本序列识别项目,目前正在测试数字串的识别。之后会加入更多的文字识别。 其中src文件夹下面存储的是源码,data下面存储的是数据,predicted_results下面存的是当前在测试集上面的测试结果。 在300w+的中文数据集上训练之后,得到了0.99的精度.(整个label都预测正确才认为正确) #### File Description | File | Description | | ------------------ | -------------------------- | | vgg_bgru_ctc.py | 网络模型文件 | | vgg_blstm_ctc.py | 网络模型文件 |
653
Liumihan/CRNN_pytorch
['optical character recognition', 'scene text recognition']
['An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition']
crnn/data/dataset.py train.py crnn/models/crnn.py crnn/utils.py evaluate.py crnn/config.py crnn/models/vgg_blstm.py check_acc weights_init Config show_image ctc_decode RandomConvert TextDataset read_from_txt ToTensor CharClasses Gray Rescale ZeroMean Bilstm CRNN Bilstm VggBlstm ctc_decode tqdm DataLoader crnn_model zip to numpy isinstance Conv2d bias weight kaiming_normal_ constant_ remove t numpy append argmax show subplot uint8 str set_title squeeze astype imshow figure numpy
# CRNN_pytorch **文本识别分为两部分:文本定位与文本序列识别。这个repo主要是做的后者。** 这是一个基于CRNN的文本序列识别项目。 在300w+的中文数据集上训练之后,得到了0.95的精度.(整个label都预测正确才认为正确) 我还做了一个基于keras的项目: https://github.com/Liumihan/CRNN_kreas 个人认为keras对于新手来说更好上手,但是灵活性不够。所以自己又迁移到了pytorch上来。 #### File Description | File | Description | | :------------------- | -------------------- |
654
LizhengMathAi/svgd
['stochastic optimization']
['SVGD: A Virtual Gradients Descent Method for Stochastic Optimization']
math_question/math_so.py math_question/gen_tex.py experiments/mlp_sgd.py experiments/resnet_momentum.py ops/ops.py math_question/ops.py experiments/vgg_sgd.py lemma/test_ralay.py experiments/ops.py experiments/resnet_adam.py experiments/vgg_so.py math_question/math_gd.py experiments/cifar10.py experiments/gen_tex.py experiments/mlp_so.py experiments/mlp_rmsprop.py lemma/lemma.py lemma/test.py experiments/resnet_sgd.py experiments/vgg_rmsprop.py experiments/resnet_rmsprop.py lemma/gen_tex.py math_question/math_adagrad.py experiments/vgg_adam.py experiments/resnet_so.py experiments/mlp_adam.py ops/so_test.py Cifar10 gen_train_op fc_layer bn_layer gen_loss gen_accuracy main inference gen_train_op fc_layer bn_layer gen_loss gen_accuracy main inference gen_train_op fc_layer bn_layer gen_loss gen_accuracy main inference gen_train_op fc_layer bn_layer gen_loss gen_accuracy main inference gradients identity matmul max_pool grad_transform conv2d gen_train_op fc_layer bn_layer gen_loss gen_accuracy conv_layer main inference residual_block flat gen_train_op fc_layer bn_layer gen_loss gen_accuracy conv_layer main inference residual_block flat gen_train_op fc_layer bn_layer gen_loss gen_accuracy conv_layer main inference residual_block flat gen_train_op fc_layer bn_layer gen_loss gen_accuracy conv_layer main inference residual_block flat gen_train_op fc_layer bn_layer gen_loss gen_accuracy conv_layer main inference residual_block flat gen_train_op fc_layer vgg_block bn_layer gen_loss gen_accuracy main inference conv_layer gen_train_op fc_layer vgg_block bn_layer gen_loss gen_accuracy main inference conv_layer gen_train_op fc_layer vgg_block bn_layer gen_loss gen_accuracy main inference conv_layer gen_train_op fc_layer vgg_block bn_layer gen_loss gen_accuracy main inference conv_layer grad_transform matmul identity gradients plu_solve gradients batch_norm kronecker_product identity reduce_argmax reduce_sum max_pool reduce_inner_product conv2d add_n reduce_double_inner_product bias_add plu mat_mul identity_test add_n_test conv2d_test plu_test batch_norm_test argmax_test reduce_double_inner_product_test max_pool_test reduce_inner_product_test kronecker_product_test mat_mul_test bias_add_test plu_solve_test main reduce_sum_test Variable moments REGULARIZATION_LOSSES truncated_normal Variable reduce_sum matmul add_to_collection abs gen_train_op print float32 placeholder gen_loss gen_accuracy int64 inference sum trainable_variables gradients s __len__ get_attr Variable square reduce_mean UPDATE_OPS add_to_collection assign REGULARIZATION_LOSSES truncated_normal Variable bn_layer relu reduce_sum conv2d add_to_collection abs pad avg_pool range flat vgg_block reduce_mean max_pool grad_transform transpose inputs matmul __len__ identity_test add_n_test conv2d_test plu_test batch_norm_test argmax_test reduce_double_inner_product_test max_pool_test reduce_inner_product_test kronecker_product_test mat_mul_test bias_add_test plu_solve_test reduce_sum_test
# svgd ## Introduction Codes for paper "[SVGD: A VIRTUAL GRADIENTS DESCENT METHOD FOR STOCHASTIC OPTIMIZATION](https://arxiv.org/abs/1907.04021)". ## Compile & Experiments Generate the library `ops.so`. ```bash # Environment Required: # ubuntu 16.04, cuda-9.0, python 3.5, tensorflow-gpu 1.8.0 svgd/ops/src$ bash builid.sh # compiling ops.cc & ops.cu.cc svgd/ops$ python so_test.py # test custom ops and kernels
655
LogAnalysisTeam/loglizer
['anomaly detection']
['Anomaly Detection using Autoencoders in High Performance Computing Systems']
loglizer/dataloader.py loglizer/models/DecisionTree.py loglizer/models/InvariantsMiner.py loglizer/models/PCA.py setup.py loglizer/models/DeepLogLAT.py loglizer/models/IsolationForest.py loglizer/preprocessing.py loglizer/models/SVM.py loglizer/models/__init__.py loglizer/models/LR.py loglizer/models/DeepLog.py loglizer/models/LogClustering.py loglizer/utils.py slice_hdfs load_BGL bgl_preprocess_data save_for_fulltext_detection _split_data load_HDFS Vectorizer FeatureExtractor Iterator metrics DecisionTree DeepLog DeepLogLAT InvariantsMiner IsolationForest LogClustering LR PCA SVM int hstack arange shuffle slice_hdfs endswith DataFrame values iterrows list apply OrderedDict save_for_fulltext_detection _split_data pjoin append sum format set info keys load items set_index to_csv timestamp findall to_dict read_csv format info append DataFrame enumerate len int shuffle pjoin save info len load list format isfile arange zip apply bgl_preprocess_data shape _split_data save_for_fulltext_detection pjoin info sum array read_csv savez_compressed list format tuple map set savetxt pjoin mkdir info append range values len precision_recall_fscore_support
<p align="center"> <a href="https://github.com/logpai"> <img src="https://github.com/logpai/logpai.github.io/blob/master/img/logpai_logo.jpg" width="425"></a></p> # Changes by Log Analysis Team * Oct 5, 2020 * added our own implementation of DeepLog named DeepLogLAT * Sep 21, 2020 * added support for BGL dataset (Marek Souček) * uses `logging` instead of `print()` * added `setup.py` to make the package installable # loglizer **Loglizer is a machine learning-based log analysis toolkit for automated anomaly detection**.
656
LokiVKlokeNaAndoke/hackathon_traffic_light
['multiple object tracking']
['Simple Online and Realtime Tracking']
yolo_model/utils/datasets.py yolo_model/utils/layers.py yolo_model/utils/adabound.py yolo_model/utils/google_utils.py video_detection.py yolo_model/utils/parse_config.py yolo_model/utils/utils.py yolo_model/detect.py yolo_model/models.py yolo_model/utils/torch_utils.py yolo_model/sort.py main.py toggle_traffic_light_color detect_traffic_lights coordinates video_feed toggle_traffic_light_detect traffic_light_coordinates main root_redirect default_route generate_image_binary set_detect_traffic_light set_traffic_color set_detect_traffic_color traffic_color set_traffic set_line line_intersection capture_images_continually detect create_model BBox YOLOLayer load_darknet_weights get_yolo_layers Darknet create_modules save_weights KalmanBoxTracker iou_batch linear_assignment Sort convert_bbox_to_z associate_detections_to_trackers convert_x_to_bbox parse_args AdaBoundW AdaBound LoadWebcam reduce_img_size exif_size letterbox cutout augment_hsv LoadStreams create_folder LoadImages load_mosaic recursive_dataset2bmp imagelist2folder random_affine load_image convert_images2bmp LoadImagesAndLabels gdrive_download upload_blob download_blob Swish MishImplementation SwishImplementation make_divisible MixConv2d MemoryEfficientSwish Concat Mish HardSwish WeightedFeatureFusion MemoryEfficientMish FeatureConcat Flatten parse_model_cfg parse_data_cfg initialize_weights find_modules fuse_conv_and_bn model_info load_classifier scale_img init_seeds select_device time_synchronized ModelEMA compute_ap check_git_status plot_images plot_evolution_results output_to_target scale_coords plot_results plot_one_box xywh2xyxy labels_to_image_weights smooth_BCE plot_results_overlay init_seeds compute_loss ap_per_class fitness build_targets plot_wh_methods coco80_to_coco91_class check_file get_yolo_layers print_mutation load_classes FocalLoss apply_classifier non_max_suppression strip_optimizer plot_targets_txt create_backbone coco_single_class_labels print_model_biases plot_lr_scheduler xyxy2xywh box_iou wh_iou labels_to_class_weights kmean_anchors coco_class_count clip_coords plot_test_txt plot_labels crop_images_random bbox_iou coco_only_people set_line map set_traffic map set_detect_traffic_light set_detect_traffic_color set_traffic_color seed VideoCapture read Thread create_model load_classes start release run CAP_PROP_POS_FRAMES tuple FONT_HERSHEY_SIMPLEX most_common map append range update set traffic_color items read time line Sort print reshape putText rectangle array len print time imencode append array inRange bitwise_and intersects range len half Darknet eval load_state_dict select_device zeros float transpose ascontiguousarray unsqueeze numpy append time_synchronized to round enumerate non_max_suppression MixConv2d Sequential ModuleList tensor WeightedFeatureFusion YOLOLayer Parameter list Swish view MaxPool2d append LeakyReLU sum na reversed add_module float FeatureConcat enumerate pop isinstance print ZeroPad2d extend bias Conv2d Mish any Upsample BatchNorm2d Dropout name numel bias copy_ running_mean zip running_var weight view_as enumerate lapjv minimum expand_dims maximum float sqrt iou_batch linear_assignment concatenate reshape astype where stack int32 append empty enumerate add_argument ArgumentParser size imread max img_size resize dtype arange COLOR_HSV2BGR astype COLOR_BGR2HSV uniform cvtColor split concatenate len copy img_size random_affine append load_image full clip enumerate copyMakeBorder isinstance min resize BORDER_CONSTANT warpAffine T tan ones reshape maximum pi getRotationMatrix2D uniform eye clip len int bbox_ioa min array randint max create_folder replace imwrite glob tqdm resize imread max create_folder replace imwrite glob tqdm imread suffix replace imwrite system tqdm imread walk create_folder rmtree exists makedirs time remove print endswith system exists blob format get_bucket print Client upload_from_filename blob format get_bucket print Client download_to_filename isnumeric rstrip reshape strip startswith append sep split dict sep strip split manual_seed print device_count range len type modules replace print named_parameters profile sum enumerate print zeros eval Parameter interpolate seed print decode glob isfile bincount int astype concatenate sum array len max clip_coords clamp_ compute_ap cumsum argsort unique interp sum range enumerate concatenate trapz accumulate linspace interp sum flip clamp min pi t pow atan max t prod box_area prod dtype zeros_like build_targets clamp sigmoid t gr smooth_BCE type full_like bbox_iou hyp BCEWithLogitsLoss cat enumerate T zeros_like ones repeat yolo_layers append float long cat enumerate nms time t xywh2xyxy float sum max cat enumerate print na yolo_layers view load print save load parameters print save sorted glob print reshape zeros enumerate len sorted all glob reshape print enumerate int sorted imwrite glob min tqdm randint imread max sorted replace glob copyfile tqdm rmtree any exists makedirs kmeans random shapes fitness max clip all ones append range LoadImagesAndLabels print_results zip print labels tqdm repeat Tensor std print tuple loadtxt system savetxt unique keys values len argmax transpose clone scale_coords ascontiguousarray shape unsqueeze resize append xyxy2xywh long enumerate int isinstance append Tensor numpy enumerate putText rectangle LINE_AA max exp arange plot xlabel ylabel tight_layout ylim savefig figure legend xlim numpy imwrite plot_one_box resize max COLOR_BGR2RGB transpose shape ceil astype enumerate int T isinstance putText min rectangle isfile Tensor numpy full cvtColor plot xlabel ylabel tight_layout savefig append step range set_aspect subplots loadtxt hist hist2d savefig xyxy2xywh T subplots set_title hist savefig legend ravel range subplots set_xlabel scatter hist set_ylabel savefig ravel subplot max items plot print loadtxt rc title savefig figure fitness enumerate T sorted subplots set_title plot replace glob savefig nan legend ravel range T sorted subplots set_title plot glob system savefig nan legend ravel range
# hackathon_traffic_light ## Тема: обнаружение проезда на красный свет Детекция происходит в несколько этапов: 1. YOLO для всех объектов на картинке и выделить только машины 2. Найти траекторию движения машин с помощью какой-то математики (https://arxiv.org/pdf/1602.00763.pdf) 3. Проверить пересечения траекторий машин и линий дороги перед светофором Обнаруженные машины нужно как-то отобразить пользователю (для целей демонстрации). Ещё было бы неплохо по фоткам нарушивших машин определять номер автомобиля. ## Реализовано - [x] Обнаружение машин на видео
657
LouieYang/deep-photo-styletransfer-tf
['style transfer']
['Deep Photo Style Transfer']
photo_style.py deep_photostyle.py closed_form_matting.py smooth_local_affine.py vgg19/vgg.py getLaplacian getlaplacian1 main affine_loss stylize load_seg rgb2bgr save_result print_loss bgr2rgb gram_matrix content_loss total_variation_loss style_loss smooth_local_affine Vgg19 broadcast_to list csr_matrix transpose identity matmul shape sum diags range grey_erosion int T reshape inv repeat zeros ravel array shape transpose tocoo max_iter fromarray stylize uint8 join serial init_image_path transpose convert ascontiguousarray shape save output_image array clip constant _extract_mask resize append expand_dims array range len reshape transpose matmul as_list constant format squared_difference print multiply resize_bilinear greater avg_pool gram_matrix pad reduce_mean cond zip append float range len get_shape reduce_sum reshape transpose unstack fromarray uint8 clip save max_iter join serial format print save_result enumerate load_seg getLaplacian Session run to_float max_iter ScipyOptimizerInterface sparse_tensor_dense_matmul conv4_2 squeeze style_weight transpose save_result apply_gradients unstack content_loss expand_dims range style_loss serial affine_loss format partial lbfgs rgb2bgr astype stack compute_gradients ConfigProto float tv_weight enumerate join time constant deepcopy minimize print Variable reshape convert float32 AdamOptimizer style_seg_path affine_weight content_seg_path total_variation_loss global_variables_initializer array content_weight _best_local_affine_kernel InOut float32 shape int32 _reconstruction_best_kernel zeros _bilateral_smooth_kernel SourceModule get_function
# deep-photo-styletransfer-tf This is a pure Tensorflow implementation of [Deep Photo Styletransfer](https://arxiv.org/abs/1703.07511), the torch implementation could be found [here](https://github.com/luanfujun/deep-photo-styletransfer) This implementation support [L-BFGS-B](https://www.tensorflow.org/api_docs/python/tf/contrib/opt/ScipyOptimizerInterface) (which is what the original authors used) and [Adam](https://www.tensorflow.org/api_docs/python/tf/train/AdamOptimizer) in case the ScipyOptimizerInterface incompatible when Tensorflow upgrades to higher version. This implementation may seem to be a little bit simpler thanks to Tensorflow's [automatic differentiation](https://en.wikipedia.org/wiki/Automatic_differentiation) Additionally, there is no dependency on MATLAB thanks to another [repository](https://github.com/martinbenson/deep-photo-styletransfer/blob/master/deep_photo.py) computing Matting Laplacian Sparse Matrix. Below is example of transferring the photo style to another photograph. <p align="center"> <img src="./some_results/best5.png" width="512"/> <img src="./examples/readme_examples/intar5.png" width="290"/> </p> ## Disclaimer
658
LouieYang/stroke-controllable-fast-style-transfer
['style transfer']
['Stroke Controllable Fast Style Transfer with Adaptive Receptive Fields']
netdef.py train.py pack_model.py inference_style_transfer.py utils.py vgg19/vgg.py model.py DataLoader Model _residual_block _instance_norm _conv_layer _conv_init_vars gram_matrix _conv_tranpose_layer shortcut_interpolation main build_parser load_image save_image mkdir_if_not_exists unpreprocess rgb2bgr Vgg19 bgr2rgb preprocess tanh _residual_block _conv_layer _conv_tranpose_layer cond conv2d _instance_norm _conv_init_vars relu _conv_layer Variable zeros moments ones conv2d_transpose reshape _instance_norm _conv_init_vars shape Variable truncated_normal reshape transpose matmul add_argument ArgumentParser serial join checkpoint_dir basename format finetune_model print style train mkdir_if_not_exists Model parse_args ConfigProto build_parser Session continue_train int isinstance size convert crop resize float max fromarray uint8 clip save makedirs
# Stroke Controllable Fast Style Transfer This repository contains the public release of the Python implementation of **Stroke Controllable Fast Style Transfer with Adaptive Receptive Fields** [[arXiv]](https://arxiv.org/abs/1802.07101) <!--[**Stroke Controllable Fast Style Transfer with Adaptive Receptive Fields**](https://arxiv.org/abs/1802.07101)--> Yongcheng Jing*, Yang Liu*, [Yezhou Yang](https://yezhouyang.engineering.asu.edu/), Zunlei Feng, [Yizhou Yu](http://i.cs.hku.hk/~yzyu/), [Dacheng Tao](https://sydney.edu.au/engineering/people/dacheng.tao.php), [Mingli Song](http://person.zju.edu.cn/en/msong) If you use this code or find this work useful for your research, please cite: ``` @inproceedings{jing2018stroke, title={Stroke Controllable Fast Style Transfer with Adaptive Receptive Fields}, author={Jing, Yongcheng and Liu, Yang and Yang, Yezhou and Feng, Zunlei and Yu, Yizhou and Tao, Dacheng and Song, Mingli},
659
Lu-Hsuan/A-Neural-Algorithm-of-Artistic-Style
['style transfer']
['A Neural Algorithm of Artistic Style']
model_loss.py NST.py get_total_loss get_feature_represent get_content_loss get_style_loss high_pass_x_y postprocess_array get_gram_matrix creat_model total_variation_loss preprocess_array train train_step VGG19 Model get_feature_represent float64 astype astype clip reshape transpose output shape get_layer append square reduce_sum transpose matmul range get_gram_matrix get_content_loss get_style_loss high_pass_x_y apply_gradients gradient zip show train_step print postprocess_array imshow array range
# A-Neural-Algorithm-of-Artistic-Style ## Image Style Transform ### A-Neural-Algorithm-of-Artistic-Style : https://arxiv.org/abs/1508.06576 ### Use method python NST.py --data_path="your context image" --style_path="your style image" --out_path="image save path" ### Main principle ![method](https://github.com/Lu-Hsuan/A-Neural-Algorithm-of-Artistic-Style/blob/master/style_transform_process.png)
660
LubdaMax/Data-Science-1
['text summarization']
['WikiHow: A Large Scale Text Summarization Dataset']
Evaluation/evaluate.py Naive Bayes/training_and_evaluation_bayes.py Pre-Processing & EDA/cnn EDA.py Naive Bayes/add_indep_vars.py Pre-Processing & EDA/process_full_wikihow.py Naive Bayes/add_indep_vars_cnn.py Pre-Processing & EDA/cnn preprocessing.py Evaluation/descriptive_stats.py TextRank/TR_Summarizer.py get_summ_wiki get_hist get_bayes_summaries get_summ_art get_summ get_summ_wiki create_summ_TR eval_summ get_summ pos pickle_save add_indep Relative_pos main_concept TF_ISF named_entity centroid_similarity_s2s_cohesion rel_s_lenght pos pickle_save add_indep Relative_pos main_concept TF_ISF named_entity centroid_similarity_s2s_cohesion rel_s_lenght eval_summ create_frame stepwsie_select get_summ_wiki create_summ_NB_wiki create_summ_NB_cnn get_summ bag_of_words apply_lemmatization apply_stemming remove_stopwords vector_representation generate_output_summ remove_numbers graph_representation remove_punctuation pagerank append array range len sent_tokenize append array range len append array range len sent_tokenize append array range len show subplots set_title set_xlabel axvline mean hist boxplot append join range print Rouge append get_scores DataFrame range len linspace range RegexpTokenizer stem words log set lower append PorterStemmer tokenize range to_frame len range len get_vectors vstack PorterStemmer max RegexpTokenizer stem append sum range get_cosine_sim words set lower tokenize cosine_similarity zeros array to_frame len load sp range load int min sp append max range len pos print len Relative_pos main_concept TF_ISF named_entity centroid_similarity_s2s_cohesion range rel_s_lenght dump cwd close joinpath open Series len astype append DataFrame range in_Summary max GaussianNB create_frame print len average_precision_score append train_test_split argmax array range predict fit load dump cwd close len drop joinpath append range predict open load dump cwd close len drop joinpath append range predict open get_summ_wiki create_summ_NB_wiki create_summ_NB_cnn get_summ sub maketrans translate join word_tokenize words set append join word_tokenize lemmatize WordNetLemmatizer append join word_tokenize stem append PorterStemmer word_tokenize range append list word_tokenize keys T DataFrame fit_transform items list sorted from_scipy_sparse_matrix append range
# Data-Science-1 Team: Winfo The Wikihow raw data has to be downloaded manually (see Datasets below). CNN data is partially provided (portion of 1000 texts used). All other files are available and working. * Preprocessing CNN: cnn preprocessing.py * Preprocessing Wikihow: process_full_wikihow.py * TextRank Algorithm: TR_Summarizer.py * Naive Bayes Algorithm: wikihow: add_independ_vars.py; cnn: add_indep_vars_cnn.py; training and evaulation in one file * Evaluation TextRank: evaluate.py * Evaluation Naive Bayes: in Naive Bayes folder (training_and_evaluation_bayes.py)
661
LuckyDC/SFT_REID
['person re identification']
['Spectral Feature Transformation for Person Re-identification']
utils/iterators.py train.py symbols/symbol_resnet_s16.py eval.py symbols/symbol_vgg.py utils/extract.py utils/memonger.py utils/augmentor.py operators/triplet_loss.py utils/misc.py utils/re_ranking_ranklist.py post_processing/post_clustering.py symbols/symbol_resnet.py post_processing/k_reciprocal.py utils/debug.py utils/components.py symbols/symbol_inception_bn.py utils/evaluation.py build_network TripletLossProp TripletLoss get_symbol InceptionFactoryB ConvFactory InceptionFactoryA get_symbol residual_unit resnet get_symbol residual_unit resnet get_symbol Pad CenterCrop Lambda ToTensor Compose PadTo RandomVerticalFlip Resize RandomCrop Normalize RandomHorizontalFlip RandomErase Cast ColorJitter nca_loss label_to_square euclidean_distances triplet_hard_loss AMSoftmaxOutput normalize_cut my_classifier sft_module backward_debug DebugProp forward_debug Debug DebugOperator compute_ap eval_rank_list eval_feature extract_feature EvalIterator get_test_iterator TrainIterator get_train_iterator is_param search_plan make_mirror_plan get_cost prod DotDict clean_immediate_checkpoints CustomAccuracy CustomCrossEntropy euclidean_dist re_ranking get Pooling sft_module Variable concat triplet_hard_loss extend AMSoftmaxOutput tile append my_classifier Flatten Convolution Activation BatchNorm Pooling ConvFactory Concat Pooling ConvFactory Concat Pooling Variable InceptionFactoryB ConvFactory InceptionFactoryA BatchNorm Convolution Activation _set_attr Pooling Variable Convolution BatchNorm residual_unit Activation range len resnet Convolution Activation broadcast_add relu transpose dot eye expand_dims clip broadcast_equal transpose expand_dims broadcast_axis L2Normalization dot softmax FullyConnected Variable BatchNorm LeakyReLU L2Normalization SoftmaxOutput one_hot euclidean_distances relu label_to_square min max transpose squeeze BlockGrad dot mean batch_dot expand_dims sum broadcast_div exp label_to_square eye sum update update decode __code__ dumps update decode __code__ dumps zeros any range compute_ap list clip arange sum not_equal print logical_and equal tqdm argsort mean L2Normalization zeros range array asnumpy compute_ap list clip arange sum not_equal print logical_and tqdm mean zeros range equal len concatenate Batch append forward asnumpy TrainIterator Compose Resize RandomCrop RandomHorizontalFlip append RandomErase Cast EvalIterator Compose endswith list_outputs list zip __copy__ _set_attr is_param infer_shape_partial get_internals attr max enumerate simple_bind int print sort sqrt make_mirror_plan get_cost range append get __delitem__ __setitem__ join remove basename int glob T inf dot broadcast_to clip minimum list exp zeros_like concatenate transpose astype float32 tqdm mean int32 unique append zeros sum max range len
# Spectral Feature Transformation for Person Re-identification ### Preparation 1. Satisfy the dependency of the program. The program is developed on MXNet 1.3.1 and Python 3.5. You can install dependency as follow: ```bash pip3 -r requirement.txt ``` 2. Create directories to store logs or checkpoints. ```bash
662
LuckyDC/generalizing-reid
['person re identification']
['Generalizing Person Re-Identification by Camera-Aware Invariance Learning and Cross-Domain Mixup']
layers/loss/center_loss.py engine/engine.py engine/metric.py models/model.py layers/__init__.py configs/default/__init__.py layers/module/reverse_grad.py utils/misc.py layers/loss/nca_loss.py train.py data/__init__.py layers/module/block_grad.py configs/default/strategy.py utils/eval_model.py utils/fig.py extract.py data/sampler.py utils/tsne.py utils/dist_utils.py utils/rank_vis.py utils/fp16_utils.py data/dataset.py layers/loss/triplet_loss.py layers/module/exemplar_linear.py utils/mod_utils.py engine/__init__.py utils/calc_acc.py configs/default/dataset.py eval.py utils/curve.py layers/loss/nn_loss.py layers/loss/am_softmax.py utils/eval_cmc.py models/resnet.py train CrossDataset ImageListFile ImageFolder RandomIdentitySampler CrossDatasetDistributedSampler CrossDatasetRandomSampler get_train_loader get_cross_domain_train_loader collate_fn get_test_loader create_eval_engine create_train_engine AutoKVMetric IgnoreAccuracy ScalarMetric get_trainer AMSoftmaxLoss CenterLoss NCALoss NNLoss normalize euclidean_dist TripletLoss hard_example_mining BlockGradFunction BlockGrad ExemplarLinearFunc ExemplarLinear ReverseGradFunction ReverseGrad Model conv1x1 resnext50_32x4d ResNet resnet50 resnext101_32x8d Bottleneck resnet152 conv3x3 _resnet resnet34 resnet18 BasicBlock resnet101 calc_acc reduce_tensor compute_ap eval_rank_list eval_feature eval_model autolabel norm_convert_float network_to_half one_hot clone_without_grad rank_vis get_train_loader getLogger SGD MultiStepLR get_test_loader DistributedDataParallel destroy_process_group num_id setLevel cuda run basicConfig initialize addHandler num_cam device_count Model prefix get_cross_domain_train_loader init_process_group StreamHandler pformat info root INFO join parameters get_trainer is_initialized source_dataset makedirs insert list zip RandomErasing DistributedSampler Compose extend RandomSampler ImageFolder is_initialized DataLoader RandomHorizontalFlip append ColorJitter RandomErasing CrossDatasetDistributedSampler CrossDatasetRandomSampler isinstance Compose extend CrossDataset ImageFolder is_initialized DataLoader RandomHorizontalFlip append ColorJitter join Compose ImageListFile ImageFolder DataLoader dirname current_device device Engine current_device device ModelCheckpoint create_eval_engine getLogger add_event_handler create_train_engine AutoKVMetric Timer WARN setLevel EPOCH_COMPLETED expand_as t sqrt addmm_ expand data ne view size min squeeze expand t eq gather max ResNet load_state_dict load_state_dict_from_url sum type round view all_reduce clone zeros any range compute_ap arange clip list ndarray logical_and from_numpy normalize to sum range mean info equal isinstance not_equal tqdm argsort zeros compute_ap list clip arange sum not_equal logical_and tqdm mean info zeros range equal len model concatenate print get_test_loader append numpy cuda eval_feature get_x text float get_width get_height float children isinstance zeros unsqueeze scatter_ Parameter deepcopy data named_parameters getattr setattr split arange strip logical_not resize xticks yticks subplot list basename COLOR_BGR2RGB squeeze tolist logical_and len set_linewidth imshow savefig set_color gca isin imread range format close tight_layout equal not_equal tqdm argsort logical_or figure cvtColor makedirs
# Generalizing Person Re-identification Implementation of ECCV2020 paper [*Generalizing Person Re-Identification by Camera-Aware Instance Learning and Cross-Domain Mixup*](https://www.ecva.net/papers/eccv_2020/papers_ECCV/html/2329_ECCV_2020_paper.php). ## Dependencies * python 3.6 * pytorch 1.3 * [apex](https://github.com/NVIDIA/apex) * [ignite](https://github.com/pytorch/ignite) 0.2.0 ## Preparation Download and extract Market-1501, DukeMTMC-reID, CUHK03 and MSMT17. Replace the root paths of corresponding datasets in the config file `configs/default/dataset.py`.
663
LuminosoInsight/semeval-discriminatt
['relation extraction']
['Luminoso at SemEval-2018 Task 10: Distinguishing Attributes Using Text Corpora and Relational Knowledge']
discriminatt/data.py scripts/build_phrases_db.py scripts/build_wp_db.py discriminatt/classifier.py discriminatt/wikipedia.py discriminatt/phrases.py setup.py discriminatt/wordnet.py discriminatt/semeval-data/trial/evaluation.py discriminatt/standalone_sme.py RelatednessClassifier MultipleFeaturesClassifier AttributeClassifier AttributeExample get_external_data_filename read_blind_semeval_data get_result_filename read_semeval_data read_search_queries get_semeval_data_filename phrase_weight word_count phrase_count StandaloneSMEModel wikipedia_connected_conceptnet_nodes get_wordnet_connected_words get_wordnet_entries get_adjacent wordnet_connected_conceptnet_nodes get_reasonable_synsets f1_score add_phrase build_phrases_database add_word build_wp_database add_entry attrib int AttributeExample open get_semeval_data_filename append bool split AttributeExample get_semeval_data_filename split append open get_external_data_filename defaultdict range format execute cursor fetchall execute cursor fetchall fetchall cursor add set execute standardized_concept_uri append lemmas lookup synset get_reasonable_synsets lower append get_wordnet_entries tokenize extend append get_wordnet_connected_words standardized_concept_uri float values execute execute execute execute execute
This is Luminoso's entry to SemEval-2018 task 10, "[Capturing Discriminative Attributes](https://competitions.codalab.org/competitions/17326)". It uses information from ConceptNet, WordNet, Wikipedia, and Google Ngrams as inputs to a simple linear classifier. This code corresponds to run 3, a late entry to fix a show-stopping bug in producing the test results. Run 3 achieved a test F-score of 73.68%, and can be found as our entry on the [post-evaluation leaderboard](https://competitions.codalab.org/competitions/17326#results) on CodaLab. The confidence interval of this score overlaps with the high score of 75%. ## Input data The input data is [available on Zenodo](https://zenodo.org/record/1183358). Download the
664
Luoyadan/MAH-Pytorch
['image retrieval']
['Collaborative Learning for Extremely Low Bit Asymmetric Hashing']
cascade_NUS_WIDE.py flat_NUS_WIDE.py utils/processing_NUSWIDE_data.py utils/data_loader.py cascade_FLICKR.py flat_FLICKR.py utils/calc_hr.py flat_CIFAR_10.py utils/adsh_loss.py utils/subset_sampler.py cascade_CIFAR_10.py utils/cnn_model.py utils/processing_Flickr_data.py utils/data_processing.py calc_sim _save_record encoding_onehot _logging adsh_algo _record adjusting_learning_rate encode _dataset calc_loss calc_sim _save_record encoding_onehot _logging adsh_algo _record adjusting_learning_rate encode _dataset calc_loss calc_sim _save_record encoding_onehot _logging adsh_algo _record adjusting_learning_rate encode _dataset calc_loss calc_sim _save_record encoding_onehot _logging adsh_algo _record adjusting_learning_rate encode _dataset calc_loss calc_sim _save_record encoding_onehot _logging adsh_algo _record adjusting_learning_rate encode _dataset calc_loss calc_sim _save_record encoding_onehot _logging adsh_algo _record adjusting_learning_rate encode _dataset calc_loss ADSHLoss calc_topMap calc_prerec calc_map calc_hammingDist CNNNet CNNExtractNet CrossNet collate_fn CocoDataset get_loader DatasetProcessingMS_COCO DatasetProcessingNUS_WIDE DatasetProcessingFlickr Crossmodal DatasetProcessingCIFAR_10 SubsetSampler join setFormatter getLogger addHandler StreamHandler Formatter mkdir setLevel INFO FileHandler view FloatTensor size scatter_ zero_ encoding_onehot Compose Normalize load_label DatasetProcessingCIFAR_10 sum type FloatTensor dot transpose sum num_samples model Variable zeros numpy cuda enumerate param_groups batch_size calc_sim model zero_grad SGD DataParallel DataLoader numpy linspace arch cuda max_iter CNNNet str step ylabel from_numpy ADSHLoss calc_prerec append encode calc_topMap range setdiff1d plot size eval adjusting_learning_rate info manual_seed gamma SubsetSampler _dataset enumerate calc_loss adsh_loss time learning_rate join backward Variable xlabel _save_record num_samples min dot parameters index_select figure calc_map zeros train epochs array gpu DatasetProcessingFlickr DatasetProcessingNUS_WIDE dot transpose asarray astype float32 where argsort mean linspace sum range calc_hammingDist reshape astype float32 precision_recall_curve calc_hammingDist asarray astype float32 where argsort mean linspace sum range calc_hammingDist list sort stack zip long enumerate DataLoader CocoDataset
# MAH-Pytorch PyTorch implementation of our paper "Collaborative Learning for Extremely Low Bit Asymmetric Hashing" [[Link]](https://arxiv.org/abs/1809.09329). ## Preparation ### Dependencies - Python 2.7 - PyTorch (version >= 0.4.1) ### Datasets - CIFAR download the CIFAR-10 Matlab version [[Link]](https://www.cs.toronto.edu/~kriz/cifar.html) then run the script ```shell matlab ./data/CIFAR-10/SaveFig.m
665
LuxxxLucy/Active-Decision-Set-Induction
['active learning']
['An Active Approach for Model Interpretation']
competition_methods_explanation/active_methods_bottom_up/anchor/anchor_image.py competition_methods_explanation/passive_methods/brs.py competition_methods_explanation/active_methods_bottom_up/anchor/anchor_explanation.py competition_methods_explanation/passive_methods/ids.py competition_methods_explanation/active_methods_top_down/dtextract_cart/utils.py competition_methods_explanation/active_methods_top_down/dt.py competition_methods_explanation/active_methods_bottom_up/explanation.py competition_methods_explanation/active_methods_bottom_up/anchor/anchor_text.py structure.py competition_methods_explanation/active_methods_top_down/mcts_core/tree.py competition_methods_explanation/active_methods_top_down/dtextract_cart/core.py core.py competition_methods_explanation/passive_methods/cn2.py competition_methods_explanation/active_methods_bottom_up/utils.py run.py competition_methods_explanation/active_methods_bottom_up/pre-compute-explanation.py competition_methods_explanation/passive_methods/IDS/apyori.py cache_bit.py competition_methods_explanation/passive_methods/sbrl/utils.py utils.py competition_methods_explanation/passive_methods/IDS/IDS_deterministic_local.py competition_methods_explanation/active_methods_top_down/dtextract_cart/active_cart.py competition_methods_explanation/passive_methods/brl.py prepare_blackbox.py competition_methods_explanation/passive_methods/IDS/utils.py competition_methods_explanation/active_methods_bottom_up/cn2anchor.py competition_methods_explanation/active_methods_bottom_up/anchor/anchor_tabular.py competition_methods_explanation/passive_methods/sbrl/rule_list.py objective.py competition_methods_explanation/active_methods_bottom_up/anchor/utils.py model.py competition_methods_explanation/active_methods_bottom_up/anchor/anchor_base.py competition_methods_explanation/passive_methods/IDS/IDS_smooth_local.py approach.py competition_methods_explanation/active_methods_top_down/mcts_core/core.py competition_methods_explanation/passive_methods/BRS/util.py competition_methods_explanation/active_methods_top_down/dtextract_cart/cart.py competition_methods_explanation/passive_methods/sbrl/sbrl.py competition_methods_explanation/active_methods_bottom_up/sp_anchor.py competition_methods_explanation/passive_methods/sbrl/train.py competition_methods_explanation/passive_methods/sbrl/__init__.py competition_methods_explanation/passive_methods/BRS/model.py prepare_dataset.py competition_methods_explanation/passive_methods/IDS/setup.py explain_tabular Cache_Rule_Bit Cache_Condition_Bit sampling_criteria sample_new_instances get_symmetric_difference uniform_sampling get_incorrect_cover_ruleset core_init bayesian_objective extend_rule simple_objective best_and_second_best_action get_recall get_correct_cover_ruleset ADS_Learner max_rule_length overlap objective train_classifier prepare_german_dataset prepare_diabetes_risk_dataset prepare_pima_dataset prepare_compas_dataset prepare_adult_dataset prepare_2d_sinusoidal_dataset train_test_split_data deepcopy_decision_set Decision_Set_Learner Rule Condition Action uniform_enlarge_dataset rule_to_string estimated_enlarge_dataset label_with_blackbox ruleset_predict compute_metrics rule_to_string_BRS_compat data_table_from_dataframe encoder_from_datatable bds_ruleset_predict cn2anchorsd_tabular cn2anchor_tabular Explanation explain_one_instance_anchor submodular_pick_anchor discretizer_from_dataset load_dataset_dataframe Bunch preprocess_dataset Rule rule_to_string Condition encoder_from_dataset AnchorBaseBeam matrix_subset AnchorExplanation AnchorImage id_generator AnchorTabularExplainer id_generator AnchorText Bunch replace_binary_values load_csv_dataset Neighbors perturb_sentence load_dataset unicode map_array_values explain_tabular_no_query compute_metrics_dt explain_tabular Active_CART CART sampling_new_instance_from_distribution uniform_sampling IntegerConstraint create_constraint check_input_constraints extend_rule scotts_factor sampling_new_instance_uniform gaussian_mixture create_constraints ContinuousConstraint create_sampler Rule rule_to_string Condition Rule compute_coverage Node Condition diverse_filter_sorted Tree UCT UCB1 explain_tabular compute_metrics_sbrl compute_metrics_brs explain_tabular cn2_tabular cn2sd_tabular explain_tabular compute_metrics_ids getConfusion extract_rules find_lt BRS accumulate log_betabin log_gampoiss predict table_to_binary_df gen_ordered_statistics gen_support_records create_next_candidates apriori TransactionManager load_transactions dump_as_json main parse_args filter_ordered_statistics dump_as_two_item_tsv func_evaluation rule max_rule_length createrules deterministic_local_search run_apriori overlap overlap sample_random_set func_evaluation rule max_rule_length smooth_local_search createrules estimate_omega_for_element get_cover_condition_ run_apriori get_cover_condition compute_OPT rules_convert Rule rule_str2rule print_rule Clause BayesianRuleList _swig_repr swig_import_helper train_sbrl _swig_setattr_nondynamic _swig_getattr _swig_setattr train_sbrl categorical2pysbrl_data categorical2transactions rule_satisfied get_fim_method itemset2feature_categories before_save transactions2freqitems initialize_synthetic_dataset update_current_solution set_description best_and_second_best_action ADS_Learner seed str basicConfig initialize generate_synthetic_instances update_best_solution domain generate_action_space range update debug Table blackbox close info N_iter_max clear print set_parameters output tqdm update_actions current_solution X len seed print domain make_column_transformer X fit count_nonzero stack any zeros equal sum conditions stack any log_betabin append zeros log_gampoiss ravel equal len deepcopy sorted conditions is_discrete attributes Condition append enumerate column_stack get_symmetric_difference concatenate print changed_rule sample_new_for_one_rule changed_rule extend_rule reduce equal reduce equal reduce equal max enumerate append get_length get_correct_cover max_rule_length len union set add append target_class_idx range enumerate MLPClassifier print XGBClassifier Y RandomForestClassifier make_column_transformer Pipeline X fit from_numpy train_test_split X Y seed f_binarized Domain arange Table sample flatten domain stack train_test_split_data meshgrid vectorize seed data_table_from_dataframe read_csv seed data_table_from_dataframe read_csv train_test_split_data seed columns print astype shape data_table_from_dataframe train_test_split_data read_csv enumerate drop seed rename data_table_from_dataframe train_test_split_data read_csv seed columns rename data_table_from_dataframe train_test_split_data read_csv print domain from_numpy print set sum max len zeros reduce ones lt min logical_and reduce selectors gt zeros max columns df2table len make_column_transformer X fit join class_var name selectors attributes join class_var conditions name attributes int value uniform_sampling concatenate core_init print Rule extend_rule from_numpy domain is_continuous attributes black_box int namedtuple concatenate sampler from_numpy domain black_box array X create_sampler seed value Table domain is_continuous attributes Y cn2anchor_explainer blackbox X fit data open seed len feature_names append labels_validation union range dump class_names labels_train set AnchorTabularExplainer categorical_names enumerate load discretizer_from_dataset validation train fit seed discretizer_from_dataset data explain_instance class_names labels_train train exp_map feature_names Explanation AnchorTabularExplainer type categorical_names fit get_loc preprocess_dataset values Bunch delete LabelEncoder classes_ values seed list QuartileDiscretizer ShuffleSplit append discretize names bincount range update class_names hstack astype choice unique filter_fn pop deepcopy min labels transform array fit data sorted ColumnTransformer keys categorical_names fit_transform data sorted QuartileDiscretizer feature_names DecileDiscretizer keys min list digits ascii_uppercase items copy join load_csv_dataset set genfromtxt Bunch delete LabelEncoder classes_ seed list QuartileDiscretizer ShuffleSplit discretize append names bincount range update hstack astype fun choice unique filter_fn pop deepcopy items min labels transform array fit ones text index set choice binomial nlp unicode zeros sum array enumerate Tree Y output_all fit print set sum max len arange uniform_sampling concatenate exp_normalize sampler evaluate_data extend_rule choice nonzero zeros score_samples uniform_sampling extend_rule create_constraint check_input_constraints append range len zeros logical_and array logical_not fill empty len covariance T RandomState gaussian_kde check_input_constraints _build_cache logical_or create_constraints sum array len sorted prod array astype BayesianRuleList print set sum max len rules_convert BRS print set sum max len seed cn2_explainer Table domain Y blackbox X fit seed Table domain cn2sd_explainer Y blackbox X fit Discretize func_evaluation drop list smooth_local_search run_apriori disc set table_to_frame EqualFreq createrules print set sum max len next func iter print format bisect_left int lgamma print append zip dot sum array len concat astype enumerate recurse threshold value children_left children_right append argmax Discretize EntropyMDL table_to_frame disc Y get_dummies drop add sorted set get initial_candidates frozenset _create_next_candidates set add calc_support items combinations sorted frozenset support difference calc_support len get get create list _filter_ordered_statistics _gen_ordered_statistics _gen_support_records add_argument ArgumentParser get reader dump _asdict write linesep _replace format write support linesep lift confidence ordered_statistics get _parse_args output _load_transactions output_func _apriori chain str list columns items apriori append range append rule split get_correct_cover max_rule_length class_label set add append union range len str remove func_evaluation print set add append argmax union range len get_cover_condition_ apply add uniform range set sample_random_set var remove func_evaluation add sqrt append range len add set uniform range len str remove get_correct_cover get_cover print tqdm set add estimate_omega_for_element append range compute_OPT len value itemset Rule min index attributes is_continuous Condition append float max split join str format is_default clauses output append argmax int split append Clause find lstrip get __setattr__ get __repr__ array isinstance dirname abspath makedirs hasattr int arange astype before_save rule_satisfied get_fim_method unique append max transactions2freqitems append append int find int list set append zip
# ACTIVE Decision Set Induction from Machine Learning Model This contains the code of "An Active Approach for Model Interpretation". NeurIPS 2019 Workshop on Human centric machine learning. https://arxiv.org/abs/1910.12207 Note that, the code are used for reproduce the experiments and is not organized very well. Basically, this is a repo for __decision set__ induction from machine learning model. This is a model-agnostic approach that could be used to infer human-readable patterns from any blackbox model (classifier). By human-readable patterns, I mean If-THEN rules. For reproducibility and open science, competition methods (baselines) are re-implemented or adopted and are included in this repo. It should be easy to reproduce everything. ## Requirements I assume you use anaconda. * `python3.6.3
666
LvWilliam/EWTH_Loss
['person re identification']
['The Dilemma of TriHard Loss and an Element-Weighted TriHard Loss for Person Re-Identification']
BoT/baseline.py AGW/triplet_loss.py BoT/__init__.py BoT/triplet_loss.py BoT/trainer.py AGW/baseline.py weights_init_classifier weights_init_kaiming Baseline WeightedRegularizedTriplet hard_example_mining softmax_weights euclidean_dist CrossEntropyLabelSmooth TripletLoss normalize normalize weights_init_classifier weights_init_kaiming Baseline create_supervised_trainer_with_center create_supervised_trainer do_train create_supervised_evaluator do_train_with_center affine bias kaiming_normal_ weight __name__ constant_ bias normal_ weight __name__ constant_ expand_as t sqrt addmm_ expand data ne view size min squeeze expand t mean eq gather max exp sum to DataParallel to DataParallel items Engine DataParallel to attach CHECKPOINT_PERIOD DEVICE Timer getLogger add_event_handler MAX_EPOCHS EVAL_PERIOD NAME create_supervised_trainer attach info LOG_PERIOD ModelCheckpoint create_supervised_evaluator OUTPUT_DIR EPOCH_COMPLETED run CHECKPOINT_PERIOD DEVICE Timer create_supervised_trainer_with_center CENTER_LOSS_WEIGHT getLogger add_event_handler MAX_EPOCHS EVAL_PERIOD NAME attach info LOG_PERIOD ModelCheckpoint create_supervised_evaluator OUTPUT_DIR EPOCH_COMPLETED run
# The Dilemma of TriHard Loss and an Element-Weighted TriHard Loss for Person Re-Identification All the proposed losses in this paper are implemented on [Bag of Tricks and A Strong Baseline for Deep Person Re-identification (BoT)](https://github.com/michuanhaohao/reid-strong-baseline) and [Deep Learning for Person Re-identification: A Survey and Outlook (AGW)](https://github.com/mangye16/ReID-Survey). ## Requirements See [README of BoT](https://github.com/michuanhaohao/reid-strong-baseline/blob/master/README.md) and [README of AGW](https://github.com/mangye16/ReID-Survey/blob/master/README.md) for requirements. ## Training The models in this paper are trained on BoT and AGW with ResNet50 as the backbone. But a few modifications are needed to make to the baselines. ### Bag of Tricks (BoT) All the experiments are conducted without center loss, which is optional in BoT. All the required files are in folder `BoT`. To train the network with losses in this paper, replace
667
Lvcrezia77/PRODEN
['stochastic optimization']
['Progressive Identification of True Labels for Partial-Label Learning']
datasets/mnist.py cifar_models/convnet.py utils/utils_loss.py cifar_models/__init__.py utils/models.py utils/utils_algo.py datasets/cifar10.py cifar_models/resnet.py main.py datasets/fashion.py datasets/kmnist.py main adjust_learning_rate evaluate convnet ResNet Bottleneck conv3x3 resnet BasicBlock cifar10 read_label_file get_int fashion read_image_file read_label_file get_int mnist read_image_file linear mlp check_integrity binarize_class download_url partialize partial_loss param_groups data model float eval softmax to max zero_grad SGD DataLoader adjust_learning_rate mlp convnet to range detach net enumerate evaluate backward linear print partial_loss parameters resnet ep train step reshape len astype float32 OneHotEncoder from_numpy fit sum clone range eye md5 hexdigest join urlretrieve print expanduser makedirs transpose size clone softmax log
# PRODEN This is the code for the paper: Progressive Identification of True Labels for Partial-Label Learning Jiaqi Lv, Miao Xu, Lei Feng, Gang Niu, Xin Geng, Masashi Sugiyama To be presented at ICML 2020. ## Setups All code was developed and tested on a single machine equiped with a NVIDIA Tesla V100 GPU. The environment is as bellow: - Python 3.6.8 - Numpy 1.16.4 - Cuda 10.1.168 ## Quick Start
668
LynetteXing1991/HRAN
['response generation']
['Hierarchical Recurrent Attention Network for Response Generation']
fake_attention_recurrent.py configurations_base.py afterprocess.py double_image.py train.py SimplePrinting.py match_functions.py attention.py double.py SequenceGenerator.py stream.py search.py model_with_l.py GRU.py preprocess.py visualize_attention.py main.py learning_rate_halver.py attention_with_posTagging.py sampling.py get_valid_status.py checkpoint.py compute_bleu.py attention_with_l.py afterprocesser SequenceContentAttention AttentionRecurrent SequenceContentAttention_3d SequenceContentAttention AttentionRecurrent_withL SequenceContentAttention_withExInput SequenceContentAttention_withExInput_3d AttentionRecurrent main hierarchical_s2sa_chinese_100w_withL FakeAttentionRecurrent main get_log GRU DotMatchFunction SumMatchFunction SumMatchFunction_posTag CatMatchFunction ShallowEnergyComputer GeneralMatchFunction BidirectionalEncoder Decoder InitializableFeedforwardSequence SentenceEncoder LookupFeedbackWMT15 BidirectionalWMT15 BeamSearch SequenceGenerator SimplePrinting readline print match terminate float Popen listdir max show join sorted list items plot endswith get_log legend append listdir
LynetteXing1991/HRAN
669
MARSLab-UMN/TiltedImageSurfaceNormal
['data augmentation']
['Surface Normal Estimation of Tilted Images via Spatial Rectifier']
losses.py dataset_loader/dataset_loader_nyud.py data.py train_test_surface_normal.py dataset_loader/dataset_loader_kinectazure.py warping_2dof_alignment.py inference_surface_normal.py network/spatial_rectifier_networks.py network/fpn_architecture.py network/dorn_architecture.py utils.py dataset_loader/dataset_loader_scannet.py model.py dataset_loader/dataset_loader_custom.py data_augmentation create_dataset_loader parsing_configurations saving_rgb_tensor_to_file forward_cnn create_network Normalize create_dataset_loader log saving_normal_tensor_to_file compute_surface_normal_angle_error create_network forward_cnn parsing_configurations accumulate_prediction_error check_nan_ckpt log_normal_stats log Warping2DOFAlignment CustomDataset KinectAzureDataset NYUD_Dataset ScannetDataset Rectified2DOF Full2DOF SceneUnderstandingModule FullImageEncoder ResNet DORNBN SceneUnderstandingModuleBN weights_init DORN ChannelReduction DFPN PFPN ASPPPooling SimpleUpsample weights_init ASPP ResNetPyramids SpatialRectifierDFPN SpatialRectifierPFPN SpatialRectifier SpatialRectifierDORN Rectified2DOF ScannetDataset DataLoader Full2DOF NYUD_Dataset KinectAzureDataset ranf view pi repeat vstack warp_all_with_gravity_center_aligned cuda range parse_args add_argument ArgumentParser print write flush cpu uint8 imsave cpu normalize uint8 imsave cat view CustomDataset SpatialRectifierPFPN DFPN PFPN DORNBN SpatialRectifier SpatialRectifierDFPN SpatialRectifierDORN DORN cuda cnn clamp mean cosine_similarity float sum acos detach numpy concatenate isnan sum data named_parameters print log isinstance Module fill_ out_channels Conv2d normal_ sqrt weight kaiming_normal_ zero_ xavier_normal_ BatchNorm2d ConvTranspose2d Linear
# Surface Normal Estimation of Tilted Images via Spatial Rectifier This repository contains the source code for our paper: **Surface Normal Estimation of Tilted Images via Spatial Rectifier** Tien Do, Khiem Vuong, Stergios I. Roumeliotis, and Hyun Soo Park European Conference on Computer Vision (ECCV), 2020 (*Spotlight*) [Homepage](https://www.khiemvuong.com/TiltedImageSurfaceNormal/) | [Arxiv](https://arxiv.org/pdf/2007.09264.pdf) # Abstract In this paper, we present a spatial rectifier to estimate surface normals of tilted images. Tilted images are of particular interest as more visual data are captured by arbitrarily oriented sensors such as body-/robot-mounted cameras. Existing approaches exhibit bounded performance on predicting surface normals because they were trained using gravity-aligned images. Our two main hypotheses are: (1) visual scene layout is indicative of the gravity direction; and (2) not all surfaces are equally represented by a learned estimator due to the structured distribution of the training data, thus, there exists a transformation for each tilted image that is more responsive to the learned estimator than others. We design a spatial rectifier that is learned to transform the surface normal distribution of a tilted image to the rectified one that matches the gravity-aligned training data distribution. Along with the spatial rectifier, we propose a novel truncated angular loss that offers a stronger gradient at smaller angular errors and robustness to outliers. The resulting estimator outperforms the state-of-the-art methods including data augmentation baselines not only on ScanNet and NYUv2 but also on a new dataset called Tilt-RGBD that includes considerable roll and pitch camera motion. # Installation Guide Our code can be run inside either *nvidia-docker* **or** *conda environment*. However, **we highly recommend that
670
MASILab/SLANT_brain_seg
['brain segmentation']
['Spatially Localized Atlas Network Tiles Enables 3D Whole Brain Segmentation from Limited Data', '3D Whole Brain Segmentation using Spatially Localized Atlas Network Tiles']
matlab/torchsrc/models/ClssNet_svm.py matlab/torchsrc/models/ResNet.py matlab/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn32s/net.py matlab/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn8s/solve.py python/torchsrc/ext/fcn.berkeleyvision.org/siftflow_layers.py matlab/torchsrc/ext/fcn.berkeleyvision.org/siftflow-fcn32s/solve.py matlab/subjectlist.py matlab/torchsrc/models/fc_densenet.py matlab/torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-color-d/net.py matlab/torchsrc/trainer.py python/torchsrc/imgloaders/__init__.py matlab/torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-color-hha/solve.py matlab/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn8s-atonce/solve.py python/torchsrc/ext/fcn.berkeleyvision.org/voc_helper.py matlab/torchsrc/ext/fcn.berkeleyvision.org/siftflow-fcn16s/net.py python/torchsrc/__init__.py matlab/torchsrc/imgloaders/imgloader_CT_3D.py matlab/torchsrc/ext/fcn.berkeleyvision.org/voc_helper.py matlab/torchsrc/ext/fcn.berkeleyvision.org/pascalcontext-fcn32s/net.py python/torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-color-hha/solve.py python/torchsrc/ext/fcn.berkeleyvision.org/siftflow-fcn32s/net.py matlab/torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-color/solve.py matlab/torchsrc/ext/fcn.berkeleyvision.org/infer.py matlab/torchsrc/models/fcn32s_BN.py matlab/torchsrc/models/ResNetClss.py matlab/torchsrc/models/Unet_online.py matlab/torchsrc/ext/fcn.berkeleyvision.org/pascalcontext-fcn8s/net.py python/torchsrc/ext/fcn.berkeleyvision.org/siftflow-fcn32s/solve.py python/torchsrc/models/Unet3D.py matlab/torchsrc/ext/fcn.berkeleyvision.org/score.py matlab/torchsrc/models/Unet3D.py matlab/torchsrc/utils/util.py python/torchsrc/ext/fcn.berkeleyvision.org/siftflow-fcn16s/net.py matlab/torchsrc/ext/fcn.berkeleyvision.org/pascalcontext-fcn32s/solve.py python/torchsrc/ext/fcn.berkeleyvision.org/score.py matlab/torchsrc/ext/fcn.berkeleyvision.org/siftflow-fcn8s/solve.py python/subjectlist.py python/torchsrc/imgloaders/imgloader_CT_3D.py matlab/torchsrc/models/__init__.py matlab/torchsrc/__init__.py matlab/torchsrc/models/ResUnet.py matlab/torchsrc/models/MTL_ResNet.py matlab/torchsrc/models/MTL_GCN.py matlab/torchsrc/models/ResNetClss_svm.py matlab/torchsrc/models/gcn.py python/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn32s/solve.py python/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn-alexnet/solve.py matlab/test.py matlab/torchsrc/ext/fcn.berkeleyvision.org/pascalcontext-fcn16s/net.py python/torchsrc/ext/fcn.berkeleyvision.org/siftflow-fcn8s/net.py python/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn8s/net.py matlab/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn16s/solve.py matlab/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn-alexnet/solve.py python/torchsrc/models/vnet.py matlab/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn32s/solve.py matlab/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn8s-atonce/net.py matlab/torchsrc/models/Unet.py matlab/torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-color-d/solve.py matlab/torchsrc/ext/fcn.berkeleyvision.org/voc_layers.py python/torchsrc/ext/fcn.berkeleyvision.org/pascalcontext-fcn8s/net.py python/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn16s/net.py matlab/torchsrc/ext/fcn.berkeleyvision.org/surgery.py python/torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-color-d/solve.py matlab/torchsrc/models/Unet3D_origin.py matlab/torchsrc/ext/fcn.berkeleyvision.org/pascalcontext-fcn16s/solve.py python/torchsrc/ext/fcn.berkeleyvision.org/pascalcontext-fcn32s/net.py python/torchsrc/utils/image_pool.py matlab/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn-alexnet/net.py python/train.py python/torchsrc/utils.py python/torchsrc/ext/fcn.berkeleyvision.org/infer.py python/torchsrc/ext/fcn.berkeleyvision.org/pascalcontext-fcn32s/solve.py matlab/torchsrc/models/MTL_BN.py python/torchsrc/ext/fcn.berkeleyvision.org/pascalcontext_layers.py python/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn8s/solve.py python/torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-color/solve.py python/torchsrc/utils/util.py matlab/torchsrc/ext/fcn.berkeleyvision.org/siftflow-fcn8s/net.py matlab/torchsrc/ext/fcn.berkeleyvision.org/siftflow-fcn32s/net.py python/torchsrc/ext/fcn.berkeleyvision.org/pascalcontext-fcn16s/net.py matlab/torchsrc/models/fcn32s.py python/torchsrc/ext/fcn.berkeleyvision.org/siftflow-fcn8s/solve.py matlab/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn16s/net.py python/torchsrc/ext/fcn.berkeleyvision.org/voc_layers.py matlab/torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-hha/solve.py python/torchsrc/ext/fcn.berkeleyvision.org/pascalcontext-fcn16s/solve.py python/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn32s/net.py matlab/torchsrc/utils.py matlab/torchsrc/models/ClssNet.py matlab/torchsrc/models/base_model.py matlab/torchsrc/ext/fcn.berkeleyvision.org/siftflow-fcn16s/solve.py matlab/torchsrc/ext/fcn.berkeleyvision.org/siftflow_layers.py python/torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-hha/net.py matlab/torchsrc/ext/fcn.berkeleyvision.org/pascalcontext_layers.py python/torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-color/net.py matlab/torchsrc/models/pix2pix_model.py matlab/torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-hha/net.py python/torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-color-d/net.py matlab/torchsrc/models/vnet.py python/torchsrc/models/__init__.py matlab/torchsrc/models/DeconvNet.py matlab/torchsrc/models/Unet_BN.py python/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn16s/solve.py python/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn8s-atonce/net.py python/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn8s-atonce/solve.py python/torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-color-hha/net.py matlab/torchsrc/ext/fcn.berkeleyvision.org/nyud_layers.py python/torchsrc/trainer.py matlab/torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-color/net.py python/torchsrc/ext/fcn.berkeleyvision.org/siftflow-fcn16s/solve.py python/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn-alexnet/net.py matlab/torchsrc/imgloaders/__init__.py matlab/torchsrc/models/VggResClssNet.py matlab/torchsrc/imgloaders/imgloader_CT_3D_allpiece.py python/torchsrc/imgloaders/imgloader_CT_3D_allpiece.py python/torchsrc/ext/fcn.berkeleyvision.org/nyud_layers.py matlab/torchsrc/ext/fcn.berkeleyvision.org/pascalcontext-fcn8s/solve.py matlab/torchsrc/models/networks.py matlab/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn8s/net.py python/torchsrc/ext/fcn.berkeleyvision.org/pascalcontext-fcn8s/solve.py matlab/torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-color-hha/net.py matlab/torchsrc/models/vgg.py matlab/torchsrc/utils/image_pool.py python/torchsrc/ext/fcn.berkeleyvision.org/surgery.py python/test.py python/torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-hha/solve.py get_sub_list get_sub_from_txt print_network mkdir save_images weighted_mse_loss l1_normloss Trainer cross_entropy2d saveOneImg sub2ind get_distance dice_loss l1_smooth_normloss dice_l2 l2_normloss weighted_center write_log mkdir dice_error l2_normloss_all l2_normloss_new prior_loss l2_normloss_compete ind2sub dice_loss_3d mse_loss dice_loss_norm label_accuracy_score _fast_hist NYUDSegDataLayer PASCALContextSegDataLayer seg_tests compute_hist do_seg_tests fast_hist SIFTFlowSegDataLayer transplant upsample_filt expand_score interp voc VOCSegDataLayer SBDDSegDataLayer fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool make_net modality_fcn max_pool fcn conv_relu fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool pytorch_loader pytorch_loader_allpiece BaseModel get_upsample_filter ClssNet ClssNet_svm get_upsample_filter DeconvNet ConvBlock get_upsample_filter _score_layer FCN32s fcdensenet67 fcdensenet_tiny FCDenseNet DenseBlock fcdensenet103 fcdensenet56 fcdensenet103_nodrop fcdensenet56_nodrop FCNGCN Refine GCN FCNUpBlock MTL_BN get_upsample_filter _score_layer MTL_GCN Refine GCN MTL_ResNet50 DeconvBottleneck MTL_ResNet Bottleneck MTL_ResNet101 get_norm_layer GANLoss ResnetGenerator ResnetBlock define_D UnetGenerator UnetSkipConnectionBlock weights_init print_network NLayerDiscriminator define_G Pix2PixModel ResNet DeconvBottleneck Bottleneck ResNet50 ResNet101 resnet50 ResNetClss Bottleneck resnet152 conv3x3 resnet34 resnet18 BasicBlock resnet101 resnet34_svm ResNetClss_svm resnet50_svm resnet18_svm Bottleneck resnet152_svm conv3x3 BasicBlock resnet101_svm ResUnet50 ResNet DeconvBottleneck Bottleneck ResUnet101 UNet3D UNet3D UNetUpBlock UNetConvBlock Unet_BN UNetUpBlock UNetConvBlock Unet_online VGG16 VggResClssNet DownTransition UpTransition _make_nConv InputTransition passthrough ContBatchNorm3d LUConv VNet ELUCons OutputTransition ImagePool print_numpy varname diagnose_network mkdirs mkdir info save_image tensor2im get_sub_list get_sub_from_txt print_network mkdir print_network mkdir sub2ind save_images weighted_center dice_l2 Trainer ind2sub mkdir dice_loss_3d saveOneImg label_accuracy_score _fast_hist NYUDSegDataLayer PASCALContextSegDataLayer seg_tests compute_hist do_seg_tests fast_hist SIFTFlowSegDataLayer transplant upsample_filt expand_score interp voc VOCSegDataLayer SBDDSegDataLayer fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool make_net modality_fcn max_pool fcn conv_relu fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool pytorch_loader pytorch_loader_allpiece UNet3D DownTransition UpTransition _make_nConv InputTransition passthrough ContBatchNorm3d LUConv VNet ELUCons OutputTransition ImagePool print_numpy varname diagnose_network mkdirs mkdir info save_image tensor2im get_sub_list get_sub_from_txt print_network mkdir save_images weighted_mse_loss l1_normloss Trainer cross_entropy2d saveOneImg sub2ind get_distance dice_loss l1_smooth_normloss dice_l2 l2_normloss weighted_center write_log mkdir dice_error l2_normloss_all l2_normloss_new prior_loss l2_normloss_compete ind2sub dice_loss_3d mse_loss dice_loss_norm label_accuracy_score _fast_hist NYUDSegDataLayer PASCALContextSegDataLayer seg_tests compute_hist do_seg_tests fast_hist SIFTFlowSegDataLayer transplant upsample_filt expand_score interp voc VOCSegDataLayer SBDDSegDataLayer fcn conv_relu make_net max_pool modality_fcn pytorch_loader pytorch_loader_allpiece BaseModel get_upsample_filter ClssNet ClssNet_svm get_upsample_filter DeconvNet ConvBlock _score_layer FCN32s fcdensenet67 fcdensenet_tiny FCDenseNet DenseBlock fcdensenet103 fcdensenet56 fcdensenet103_nodrop fcdensenet56_nodrop FCNGCN Refine GCN FCNUpBlock MTL_BN get_upsample_filter _score_layer MTL_GCN MTL_ResNet50 DeconvBottleneck MTL_ResNet Bottleneck MTL_ResNet101 get_norm_layer GANLoss ResnetGenerator ResnetBlock define_D UnetGenerator UnetSkipConnectionBlock weights_init print_network NLayerDiscriminator define_G Pix2PixModel ResNet DeconvBottleneck Bottleneck ResNet50 ResNet101 resnet50 ResNetClss Bottleneck resnet152 conv3x3 resnet34 resnet18 BasicBlock resnet101 resnet34_svm ResNetClss_svm resnet50_svm resnet18_svm resnet152_svm conv3x3 BasicBlock resnet101_svm ResUnet50 ResNet DeconvBottleneck ResUnet101 UNet3D UNet3D UNetUpBlock UNetConvBlock Unet_BN UNetUpBlock UNetConvBlock Unet_online VGG16 VggResClssNet DownTransition UpTransition _make_nConv InputTransition passthrough ContBatchNorm3d LUConv VNet ELUCons OutputTransition ImagePool print_numpy varname diagnose_network mkdirs mkdir info save_image tensor2im get_sub_list get_sub_from_txt print_network print_network mkdir sub2ind save_images weighted_center dice_l2 Trainer ind2sub dice_loss_3d saveOneImg label_accuracy_score _fast_hist NYUDSegDataLayer PASCALContextSegDataLayer seg_tests compute_hist do_seg_tests fast_hist SIFTFlowSegDataLayer transplant upsample_filt expand_score interp voc VOCSegDataLayer SBDDSegDataLayer fcn conv_relu make_net max_pool modality_fcn pytorch_loader pytorch_loader_allpiece UNet3D DownTransition UpTransition _make_nConv InputTransition passthrough ContBatchNorm3d LUConv VNet ELUCons OutputTransition ImagePool print_numpy varname diagnose_network mkdirs mkdir info save_image tensor2im glob join sort append readlines close open append split makedirs print parameters join imsave astype Threshold list size expand add m meshgrid sum range euclidean weighted_center shape numpy unravel_index argmax range append size sum softmax size sum softmax log_softmax size nll_loss view cuda criterion pow mul sum cuda criterion cuda criterion mul criterion size expand masked_fill_ le sum cuda l2_normloss l2_normloss_compete range len remove get_distance replace write close range open numpy range saveOneImg weighted_center Variable sqrt pow abs cuda data view FloatTensor size squeeze copy_ dot sum max is_cuda size sum softmax view cuda criterion reshape nanmean zip zeros sum diag fromarray join uint8 channels astype mkdir save zeros forward print do_seg_tests iter share_with net format print channels compute_hist sum diag print params range flat len print shape upsample_filt data num Convolution Python data pool2 SoftmaxWithLoss score relu2_2 relu3_2 relu2_1 relu1_2 conv_relu relu5_1 relu7 pool1 drop7 relu5_3 relu4_2 pool4 relu6 relu5_2 upscore drop6 Convolution Deconvolution relu4_3 score_fr label relu1_1 crop relu4_1 NetSpec max_pool relu3_1 relu3_3 pool5 pool3 Dropout depth color Concat Convolution conv_relu Dropout max_pool score_fused score_frhha modality_fcn score_frcolor Eltwise fuse_pool4 score_pool4 score_pool4c upscore16 upscore2 score_pool3c fuse_pool3 score_pool3 upscore8 upscore_pool4 fuse_pool4_geo score_sem score_fr_geo score_pool4_semc sem score_pool4_geoc upscore2_sem upscore16_sem score_fr_sem geo fuse_pool4_sem upscore16_geo score_pool4_geo score_pool4_sem score_geo upscore2_geo upscore_geo upscore_sem score_pool3_sem score_pool3_semc fuse_pool3_geo upscore_pool4_geo score_pool3_geo upscore8_geo score_pool3_geoc upscore_pool4_sem fuse_pool3_sem upscore8_sem norm2 norm1 relu2 relu1 LRN relu4 dict relu3 relu5 scale_pool3 scale_pool4 Scale abs load_url load_state_dict MTL_ResNet normal_ __name__ fill_ print BatchNorm2d partial InstanceNorm2d get_norm_layer print ResnetGenerator UnetGenerator apply cuda get_norm_layer print apply NLayerDiscriminator cuda load_url ResNet load_state_dict load_url load_state_dict load_url ResNetClss load_state_dict load_url ResNetClss load_state_dict load_url ResNetClss load_state_dict load_url ResNetClss load_state_dict load_url ResNetClss load_state_dict load_url ResNetClss_svm load_state_dict load_url ResNetClss_svm load_state_dict load_url ResNetClss_svm load_state_dict load_url ResNetClss_svm load_state_dict load_url ResNetClss_svm load_state_dict load_url ResNet load_state_dict load_url load_state_dict load_url load_state_dict pop vgg16 append LUConv range transpose numpy print parameters fromarray save print join search print float64 flatten astype mkdir
# SLANT: Deep Whole Brain High Resolution Segmentation ### [[PyTorch]](https://github.com/MASILab/SLANTbrainSeg/tree/master/python) [[project page]](https://github.com/MASILab/SLANTbrainSeg/) [[NeuroImage paper]](https://arxiv.org/pdf/1903.12152.pdf) [[MICCAI paper]](https://arxiv.org/pdf/1806.00546.pdf) A T1 MRI scan can be segmented to 133 labels based on BrainCOLOR protocol(http://braincolor.mindboggle.info/protocols/). <img src="https://github.com/MASILab/SLANTbrainSeg/blob/master/screenshot/test_volume_result.jpg" width="600px"/> It has been implemented as a single Docker. ```diff - Please cite the following MICCAI/NeuroImage paper, if you used the SLANT whole brain segmentation. ``` The papers can be found [SLANT](https://arxiv.org/pdf/1806.00546.pdf),[NeuroImage](https://www.sciencedirect.com/science/article/pii/S1053811919302307), whole full citation are Yuankai Huo, Zhoubing Xu, Yunxi Xiong, Katherine Aboud, Parasanna Parvathaneni, Shunxing Bao, Camilo Bermudez, Susan M. Resnick, Laurie E. Cutting, and Bennett A. Landman. "3D whole brain segmentation using spatially localized atlas network tiles"
671
MASILab/SLANTbrainSeg
['brain segmentation']
['Spatially Localized Atlas Network Tiles Enables 3D Whole Brain Segmentation from Limited Data', '3D Whole Brain Segmentation using Spatially Localized Atlas Network Tiles']
matlab/torchsrc/models/ClssNet_svm.py matlab/torchsrc/models/ResNet.py matlab/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn32s/net.py matlab/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn8s/solve.py python/torchsrc/ext/fcn.berkeleyvision.org/siftflow_layers.py matlab/torchsrc/ext/fcn.berkeleyvision.org/siftflow-fcn32s/solve.py matlab/subjectlist.py matlab/torchsrc/models/fc_densenet.py matlab/torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-color-d/net.py matlab/torchsrc/trainer.py python/torchsrc/imgloaders/__init__.py matlab/torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-color-hha/solve.py matlab/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn8s-atonce/solve.py python/torchsrc/ext/fcn.berkeleyvision.org/voc_helper.py matlab/torchsrc/ext/fcn.berkeleyvision.org/siftflow-fcn16s/net.py python/torchsrc/__init__.py matlab/torchsrc/imgloaders/imgloader_CT_3D.py matlab/torchsrc/ext/fcn.berkeleyvision.org/voc_helper.py matlab/torchsrc/ext/fcn.berkeleyvision.org/pascalcontext-fcn32s/net.py python/torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-color-hha/solve.py python/torchsrc/ext/fcn.berkeleyvision.org/siftflow-fcn32s/net.py matlab/torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-color/solve.py matlab/torchsrc/ext/fcn.berkeleyvision.org/infer.py matlab/torchsrc/models/fcn32s_BN.py matlab/torchsrc/models/ResNetClss.py matlab/torchsrc/models/Unet_online.py matlab/torchsrc/ext/fcn.berkeleyvision.org/pascalcontext-fcn8s/net.py python/torchsrc/ext/fcn.berkeleyvision.org/siftflow-fcn32s/solve.py python/torchsrc/models/Unet3D.py matlab/torchsrc/ext/fcn.berkeleyvision.org/score.py matlab/torchsrc/models/Unet3D.py matlab/torchsrc/utils/util.py python/torchsrc/ext/fcn.berkeleyvision.org/siftflow-fcn16s/net.py matlab/torchsrc/ext/fcn.berkeleyvision.org/pascalcontext-fcn32s/solve.py python/torchsrc/ext/fcn.berkeleyvision.org/score.py matlab/torchsrc/ext/fcn.berkeleyvision.org/siftflow-fcn8s/solve.py python/subjectlist.py python/torchsrc/imgloaders/imgloader_CT_3D.py matlab/torchsrc/models/__init__.py matlab/torchsrc/__init__.py matlab/torchsrc/models/ResUnet.py matlab/torchsrc/models/MTL_ResNet.py matlab/torchsrc/models/MTL_GCN.py matlab/torchsrc/models/ResNetClss_svm.py matlab/torchsrc/models/gcn.py python/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn32s/solve.py python/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn-alexnet/solve.py matlab/test.py matlab/torchsrc/ext/fcn.berkeleyvision.org/pascalcontext-fcn16s/net.py python/torchsrc/ext/fcn.berkeleyvision.org/siftflow-fcn8s/net.py python/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn8s/net.py matlab/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn16s/solve.py matlab/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn-alexnet/solve.py python/torchsrc/models/vnet.py matlab/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn32s/solve.py matlab/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn8s-atonce/net.py matlab/torchsrc/models/Unet.py matlab/torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-color-d/solve.py matlab/torchsrc/ext/fcn.berkeleyvision.org/voc_layers.py python/torchsrc/ext/fcn.berkeleyvision.org/pascalcontext-fcn8s/net.py python/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn16s/net.py matlab/torchsrc/ext/fcn.berkeleyvision.org/surgery.py python/torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-color-d/solve.py matlab/torchsrc/models/Unet3D_origin.py matlab/torchsrc/ext/fcn.berkeleyvision.org/pascalcontext-fcn16s/solve.py python/torchsrc/ext/fcn.berkeleyvision.org/pascalcontext-fcn32s/net.py python/torchsrc/utils/image_pool.py matlab/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn-alexnet/net.py python/train.py python/torchsrc/utils.py python/torchsrc/ext/fcn.berkeleyvision.org/infer.py python/torchsrc/ext/fcn.berkeleyvision.org/pascalcontext-fcn32s/solve.py matlab/torchsrc/models/MTL_BN.py python/torchsrc/ext/fcn.berkeleyvision.org/pascalcontext_layers.py python/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn8s/solve.py python/torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-color/solve.py python/torchsrc/utils/util.py matlab/torchsrc/ext/fcn.berkeleyvision.org/siftflow-fcn8s/net.py matlab/torchsrc/ext/fcn.berkeleyvision.org/siftflow-fcn32s/net.py python/torchsrc/ext/fcn.berkeleyvision.org/pascalcontext-fcn16s/net.py matlab/torchsrc/models/fcn32s.py python/torchsrc/ext/fcn.berkeleyvision.org/siftflow-fcn8s/solve.py matlab/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn16s/net.py python/torchsrc/ext/fcn.berkeleyvision.org/voc_layers.py matlab/torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-hha/solve.py python/torchsrc/ext/fcn.berkeleyvision.org/pascalcontext-fcn16s/solve.py python/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn32s/net.py matlab/torchsrc/utils.py matlab/torchsrc/models/ClssNet.py matlab/torchsrc/models/base_model.py matlab/torchsrc/ext/fcn.berkeleyvision.org/siftflow-fcn16s/solve.py matlab/torchsrc/ext/fcn.berkeleyvision.org/siftflow_layers.py python/torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-hha/net.py matlab/torchsrc/ext/fcn.berkeleyvision.org/pascalcontext_layers.py python/torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-color/net.py matlab/torchsrc/models/pix2pix_model.py matlab/torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-hha/net.py python/torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-color-d/net.py matlab/torchsrc/models/vnet.py python/torchsrc/models/__init__.py matlab/torchsrc/models/DeconvNet.py matlab/torchsrc/models/Unet_BN.py python/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn16s/solve.py python/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn8s-atonce/net.py python/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn8s-atonce/solve.py python/torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-color-hha/net.py matlab/torchsrc/ext/fcn.berkeleyvision.org/nyud_layers.py python/torchsrc/trainer.py matlab/torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-color/net.py python/torchsrc/ext/fcn.berkeleyvision.org/siftflow-fcn16s/solve.py python/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn-alexnet/net.py matlab/torchsrc/imgloaders/__init__.py matlab/torchsrc/models/VggResClssNet.py matlab/torchsrc/imgloaders/imgloader_CT_3D_allpiece.py python/torchsrc/imgloaders/imgloader_CT_3D_allpiece.py python/torchsrc/ext/fcn.berkeleyvision.org/nyud_layers.py matlab/torchsrc/ext/fcn.berkeleyvision.org/pascalcontext-fcn8s/solve.py matlab/torchsrc/models/networks.py matlab/torchsrc/ext/fcn.berkeleyvision.org/voc-fcn8s/net.py python/torchsrc/ext/fcn.berkeleyvision.org/pascalcontext-fcn8s/solve.py matlab/torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-color-hha/net.py matlab/torchsrc/models/vgg.py matlab/torchsrc/utils/image_pool.py python/torchsrc/ext/fcn.berkeleyvision.org/surgery.py python/test.py python/torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-hha/solve.py get_sub_list get_sub_from_txt print_network mkdir save_images weighted_mse_loss l1_normloss Trainer cross_entropy2d saveOneImg sub2ind get_distance dice_loss l1_smooth_normloss dice_l2 l2_normloss weighted_center write_log mkdir dice_error l2_normloss_all l2_normloss_new prior_loss l2_normloss_compete ind2sub dice_loss_3d mse_loss dice_loss_norm label_accuracy_score _fast_hist NYUDSegDataLayer PASCALContextSegDataLayer seg_tests compute_hist do_seg_tests fast_hist SIFTFlowSegDataLayer transplant upsample_filt expand_score interp voc VOCSegDataLayer SBDDSegDataLayer fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool make_net modality_fcn max_pool fcn conv_relu fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool pytorch_loader pytorch_loader_allpiece BaseModel get_upsample_filter ClssNet ClssNet_svm get_upsample_filter DeconvNet ConvBlock get_upsample_filter _score_layer FCN32s fcdensenet67 fcdensenet_tiny FCDenseNet DenseBlock fcdensenet103 fcdensenet56 fcdensenet103_nodrop fcdensenet56_nodrop FCNGCN Refine GCN FCNUpBlock MTL_BN get_upsample_filter _score_layer MTL_GCN Refine GCN MTL_ResNet50 DeconvBottleneck MTL_ResNet Bottleneck MTL_ResNet101 get_norm_layer GANLoss ResnetGenerator ResnetBlock define_D UnetGenerator UnetSkipConnectionBlock weights_init print_network NLayerDiscriminator define_G Pix2PixModel ResNet DeconvBottleneck Bottleneck ResNet50 ResNet101 resnet50 ResNetClss Bottleneck resnet152 conv3x3 resnet34 resnet18 BasicBlock resnet101 resnet34_svm ResNetClss_svm resnet50_svm resnet18_svm Bottleneck resnet152_svm conv3x3 BasicBlock resnet101_svm ResUnet50 ResNet DeconvBottleneck Bottleneck ResUnet101 UNet3D UNet3D UNetUpBlock UNetConvBlock Unet_BN UNetUpBlock UNetConvBlock Unet_online VGG16 VggResClssNet DownTransition UpTransition _make_nConv InputTransition passthrough ContBatchNorm3d LUConv VNet ELUCons OutputTransition ImagePool print_numpy varname diagnose_network mkdirs mkdir info save_image tensor2im get_sub_list get_sub_from_txt print_network mkdir print_network mkdir sub2ind save_images weighted_center dice_l2 Trainer ind2sub mkdir dice_loss_3d saveOneImg label_accuracy_score _fast_hist NYUDSegDataLayer PASCALContextSegDataLayer seg_tests compute_hist do_seg_tests fast_hist SIFTFlowSegDataLayer transplant upsample_filt expand_score interp voc VOCSegDataLayer SBDDSegDataLayer fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool make_net modality_fcn max_pool fcn conv_relu fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool pytorch_loader pytorch_loader_allpiece UNet3D DownTransition UpTransition _make_nConv InputTransition passthrough ContBatchNorm3d LUConv VNet ELUCons OutputTransition ImagePool print_numpy varname diagnose_network mkdirs mkdir info save_image tensor2im get_sub_list get_sub_from_txt print_network mkdir save_images weighted_mse_loss l1_normloss Trainer cross_entropy2d saveOneImg sub2ind get_distance dice_loss l1_smooth_normloss dice_l2 l2_normloss weighted_center write_log mkdir dice_error l2_normloss_all l2_normloss_new prior_loss l2_normloss_compete ind2sub dice_loss_3d mse_loss dice_loss_norm label_accuracy_score _fast_hist NYUDSegDataLayer PASCALContextSegDataLayer seg_tests compute_hist do_seg_tests fast_hist SIFTFlowSegDataLayer transplant upsample_filt expand_score interp voc VOCSegDataLayer SBDDSegDataLayer fcn conv_relu make_net max_pool modality_fcn pytorch_loader pytorch_loader_allpiece BaseModel get_upsample_filter ClssNet ClssNet_svm get_upsample_filter DeconvNet ConvBlock _score_layer FCN32s fcdensenet67 fcdensenet_tiny FCDenseNet DenseBlock fcdensenet103 fcdensenet56 fcdensenet103_nodrop fcdensenet56_nodrop FCNGCN Refine GCN FCNUpBlock MTL_BN get_upsample_filter _score_layer MTL_GCN MTL_ResNet50 DeconvBottleneck MTL_ResNet Bottleneck MTL_ResNet101 get_norm_layer GANLoss ResnetGenerator ResnetBlock define_D UnetGenerator UnetSkipConnectionBlock weights_init print_network NLayerDiscriminator define_G Pix2PixModel ResNet DeconvBottleneck Bottleneck ResNet50 ResNet101 resnet50 ResNetClss Bottleneck resnet152 conv3x3 resnet34 resnet18 BasicBlock resnet101 resnet34_svm ResNetClss_svm resnet50_svm resnet18_svm resnet152_svm conv3x3 BasicBlock resnet101_svm ResUnet50 ResNet DeconvBottleneck ResUnet101 UNet3D UNet3D UNetUpBlock UNetConvBlock Unet_BN UNetUpBlock UNetConvBlock Unet_online VGG16 VggResClssNet DownTransition UpTransition _make_nConv InputTransition passthrough ContBatchNorm3d LUConv VNet ELUCons OutputTransition ImagePool print_numpy varname diagnose_network mkdirs mkdir info save_image tensor2im get_sub_list get_sub_from_txt print_network print_network mkdir sub2ind save_images weighted_center dice_l2 Trainer ind2sub dice_loss_3d saveOneImg label_accuracy_score _fast_hist NYUDSegDataLayer PASCALContextSegDataLayer seg_tests compute_hist do_seg_tests fast_hist SIFTFlowSegDataLayer transplant upsample_filt expand_score interp voc VOCSegDataLayer SBDDSegDataLayer fcn conv_relu make_net max_pool modality_fcn pytorch_loader pytorch_loader_allpiece UNet3D DownTransition UpTransition _make_nConv InputTransition passthrough ContBatchNorm3d LUConv VNet ELUCons OutputTransition ImagePool print_numpy varname diagnose_network mkdirs mkdir info save_image tensor2im glob join sort append readlines close open append split makedirs print parameters join imsave astype Threshold list size expand add m meshgrid sum range euclidean weighted_center shape numpy unravel_index argmax range append size sum softmax size sum softmax log_softmax size nll_loss view cuda criterion pow mul sum cuda criterion cuda criterion mul criterion size expand masked_fill_ le sum cuda l2_normloss l2_normloss_compete range len remove get_distance replace write close range open numpy range saveOneImg weighted_center Variable sqrt pow abs cuda data view FloatTensor size squeeze copy_ dot sum max is_cuda size sum softmax view cuda criterion reshape nanmean zip zeros sum diag fromarray join uint8 channels astype mkdir save zeros forward print do_seg_tests iter share_with net format print channels compute_hist sum diag print params range flat len print shape upsample_filt data num Convolution Python data pool2 SoftmaxWithLoss score relu2_2 relu3_2 relu2_1 relu1_2 conv_relu relu5_1 relu7 pool1 drop7 relu5_3 relu4_2 pool4 relu6 relu5_2 upscore drop6 Convolution Deconvolution relu4_3 score_fr label relu1_1 crop relu4_1 NetSpec max_pool relu3_1 relu3_3 pool5 pool3 Dropout depth color Concat Convolution conv_relu Dropout max_pool score_fused score_frhha modality_fcn score_frcolor Eltwise fuse_pool4 score_pool4 score_pool4c upscore16 upscore2 score_pool3c fuse_pool3 score_pool3 upscore8 upscore_pool4 fuse_pool4_geo score_sem score_fr_geo score_pool4_semc sem score_pool4_geoc upscore2_sem upscore16_sem score_fr_sem geo fuse_pool4_sem upscore16_geo score_pool4_geo score_pool4_sem score_geo upscore2_geo upscore_geo upscore_sem score_pool3_sem score_pool3_semc fuse_pool3_geo upscore_pool4_geo score_pool3_geo upscore8_geo score_pool3_geoc upscore_pool4_sem fuse_pool3_sem upscore8_sem norm2 norm1 relu2 relu1 LRN relu4 dict relu3 relu5 scale_pool3 scale_pool4 Scale abs load_url load_state_dict MTL_ResNet normal_ __name__ fill_ print BatchNorm2d partial InstanceNorm2d get_norm_layer print ResnetGenerator UnetGenerator apply cuda get_norm_layer print apply NLayerDiscriminator cuda load_url ResNet load_state_dict load_url load_state_dict load_url ResNetClss load_state_dict load_url ResNetClss load_state_dict load_url ResNetClss load_state_dict load_url ResNetClss load_state_dict load_url ResNetClss load_state_dict load_url ResNetClss_svm load_state_dict load_url ResNetClss_svm load_state_dict load_url ResNetClss_svm load_state_dict load_url ResNetClss_svm load_state_dict load_url ResNetClss_svm load_state_dict load_url ResNet load_state_dict load_url load_state_dict load_url load_state_dict pop vgg16 append LUConv range transpose numpy print parameters fromarray save print join search print float64 flatten astype mkdir
# SLANT: Deep Whole Brain High Resolution Segmentation ### [[PyTorch]](https://github.com/MASILab/SLANTbrainSeg/tree/master/python) [[project page]](https://github.com/MASILab/SLANTbrainSeg/) [[NeuroImage paper]](https://arxiv.org/pdf/1903.12152.pdf) [[MICCAI paper]](https://arxiv.org/pdf/1806.00546.pdf) A T1 MRI scan can be segmented to 133 labels based on BrainCOLOR protocol(http://braincolor.mindboggle.info/protocols/). <img src="https://github.com/MASILab/SLANTbrainSeg/blob/master/screenshot/test_volume_result.jpg" width="600px"/> It has been implemented as a single Docker. ```diff - Please cite the following MICCAI/NeuroImage paper, if you used the SLANT whole brain segmentation. ``` The papers can be found [SLANT](https://arxiv.org/pdf/1806.00546.pdf),[NeuroImage](https://www.sciencedirect.com/science/article/pii/S1053811919302307), whole full citation are Yuankai Huo, Zhoubing Xu, Yunxi Xiong, Katherine Aboud, Parasanna Parvathaneni, Shunxing Bao, Camilo Bermudez, Susan M. Resnick, Laurie E. Cutting, and Bennett A. Landman. "3D whole brain segmentation using spatially localized atlas network tiles"
672
MASILab/SSNet
['semantic segmentation']
['Splenomegaly Segmentation using Global Convolutional Kernels and Conditional Generative Adversarial Networks']
torchsrc/models/VggResClssNet.py torchsrc/datasets/apc/base.py torchsrc/models/SSNet.py torchsrc/models/Unet_online.py torchsrc/ext/fcn.berkeleyvision.org/voc-fcn8s/net.py torchsrc/ext/fcn.berkeleyvision.org/voc-fcn8s-atonce/solve.py torchsrc/datasets/__init__.py torchsrc/ext/fcn.berkeleyvision.org/siftflow-fcn16s/solve.py torchsrc/models/fc_densenet.py torchsrc/ext/fcn.berkeleyvision.org/voc-fcn32s/solve.py generate_sublist.py torchsrc/ext/fcn.berkeleyvision.org/pascalcontext-fcn16s/net.py torchsrc/__init__.py torchsrc/models/MTL_ResNet.py torchsrc/datasets/voc.py torchsrc/models/vgg.py torchsrc/models/DeconvNet.py img_loader.py torchsrc/models/MTL_GCN.py torchsrc/models/ResUnet.py torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-color-d/net.py torchsrc/models/fcn32s.py torchsrc/models/__init__.py torchsrc/models/Unet_BN.py torchsrc/utils/util.py torchsrc/trainer.py torchsrc/ext/fcn.berkeleyvision.org/pascalcontext-fcn8s/net.py torchsrc/ext/fcn.berkeleyvision.org/voc-fcn-alexnet/solve.py torchsrc/ext/fcn.berkeleyvision.org/pascalcontext-fcn32s/solve.py torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-color-hha/solve.py torchsrc/datasets/apc/jsk.py torchsrc/ext/fcn.berkeleyvision.org/siftflow-fcn16s/net.py torchsrc/ext/fcn.berkeleyvision.org/surgery.py torchsrc/models/pix2pix_model.py torchsrc/ext/fcn.berkeleyvision.org/voc_helper.py torchsrc/ext/fcn.berkeleyvision.org/infer.py torchsrc/models/fcn32s_BN.py torchsrc/models/MTL_BN.py torchsrc/models/ResNetClss.py torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-color-hha/net.py torchsrc/ext/fcn.berkeleyvision.org/score.py torchsrc/ext/fcn.berkeleyvision.org/siftflow_layers.py torchsrc/models/ResNetFCN.py torchsrc/datasets/apc/rbo.py torchsrc/ext/fcn.berkeleyvision.org/pascalcontext-fcn8s/solve.py torchsrc/ext/fcn.berkeleyvision.org/voc-fcn8s-atonce/net.py torchsrc/datasets/apc/mit_training.py torchsrc/models/ResNetClss_svm.py torchsrc/datasets/apc/v1.py torchsrc/datasets/apc/v2.py train_all.py torchsrc/ext/fcn.berkeleyvision.org/voc-fcn-alexnet/net.py torchsrc/ext/fcn.berkeleyvision.org/voc-fcn16s/solve.py torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-color/solve.py torchsrc/models/ResNet.py torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-color-d/solve.py torchsrc/datasets/apc/v3.py torchsrc/models/base_model.py torchsrc/utils/image_pool.py torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-hha/solve.py torchsrc/models/gcn.py torchsrc/ext/fcn.berkeleyvision.org/nyud_layers.py torchsrc/ext/fcn.berkeleyvision.org/voc-fcn8s/solve.py torchsrc/ext/fcn.berkeleyvision.org/siftflow-fcn8s/net.py torchsrc/ext/fcn.berkeleyvision.org/pascalcontext_layers.py torchsrc/ext/fcn.berkeleyvision.org/pascalcontext-fcn16s/solve.py torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-hha/net.py torchsrc/models/networks.py torchsrc/ext/fcn.berkeleyvision.org/siftflow-fcn8s/solve.py torchsrc/models/ClssNet.py torchsrc/datasets/apc/__init__.py torchsrc/ext/fcn.berkeleyvision.org/voc-fcn32s/net.py torchsrc/models/Unet.py torchsrc/ext/fcn.berkeleyvision.org/voc-fcn16s/net.py torchsrc/ext/fcn.berkeleyvision.org/siftflow-fcn32s/net.py torchsrc/models/hnet2Dkernel.py torchsrc/utils.py torchsrc/ext/fcn.berkeleyvision.org/voc_layers.py torchsrc/models/ClssNet_svm.py torchsrc/models/hnet.py Reshape_atlases.py torchsrc/ext/fcn.berkeleyvision.org/nyud-fcn32s-color/net.py torchsrc/datasets/apc/mit_benchmark.py torchsrc/ext/fcn.berkeleyvision.org/pascalcontext-fcn32s/net.py torchsrc/ext/fcn.berkeleyvision.org/siftflow-fcn32s/solve.py dir2list_folds dir2list mkdir get_subs normalizeImage img_loader mkdir filter mkdir save_images weighted_mse_loss l1_normloss Trainer cross_entropy2d saveOneImg sub2ind get_distance dice_loss l1_smooth_normloss l2_normloss weighted_center write_log mkdir l2_normloss_all l2_normloss_new prior_loss l2_normloss_compete ind2sub mse_loss dice_loss_norm label_accuracy_score _fast_hist SBDClassSeg VOCClassSegBase VOC2011ClassSeg VOC2012ClassSeg APC2016Base APC2016jsk bin_id_from_scene_dir ids_from_scene_dir APC2016mit_benchmark APC2016mit_training APC2016rbo APC2016V1 APC2016V2 APC2016V3 NYUDSegDataLayer PASCALContextSegDataLayer seg_tests compute_hist do_seg_tests fast_hist SIFTFlowSegDataLayer transplant upsample_filt expand_score interp voc VOCSegDataLayer SBDDSegDataLayer fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool make_net modality_fcn max_pool fcn conv_relu fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool fcn conv_relu make_net max_pool BaseModel get_upsample_filter ClssNet ClssNet_svm get_upsample_filter DeconvNet ConvBlock get_upsample_filter _score_layer FCN32s fcdensenet67 fcdensenet_tiny FCDenseNet DenseBlock fcdensenet103 fcdensenet56 fcdensenet103_nodrop fcdensenet56_nodrop FCNGCN Refine GCN FCNGCNHuo Refine GCN FCNGCNHuo2D Refine GCN FCNUpBlock MTL_BN get_upsample_filter _score_layer MTL_GCN Refine GCN MTL_ResNet50 DeconvBottleneck MTL_ResNet Bottleneck MTL_ResNet101 get_norm_layer GANLoss ResnetGenerator ResnetBlock define_D UnetGenerator UnetSkipConnectionBlock weights_init print_network NLayerDiscriminator define_G Pix2PixModel ResNet DeconvBottleneck Bottleneck ResNet50 ResNet101 resnet50 ResNetClss Bottleneck resnet152 conv3x3 resnet34 resnet18 BasicBlock resnet101 resnet34_svm ResNetClss_svm resnet50_svm resnet18_svm Bottleneck resnet152_svm conv3x3 BasicBlock resnet101_svm ResNetFCN GCN ResUnet50 ResNet DeconvBottleneck Bottleneck ResUnet101 SSNet Refine GCN UNetUpBlock UNetConvBlock Unet_BN UNetUpBlock UNetConvBlock Unet_online VGG16 VggResClssNet ImagePool print_numpy varname diagnose_network mkdirs mkdir info save_image tensor2im makedirs join replace sort readlines write close split append listdir exists open join replace sort readlines write close get_subs split append listdir open readlines close open append split max min astype range append range len join imsave astype Threshold list size expand add m meshgrid sum range euclidean weighted_center shape numpy unravel_index argmax range append size sum softmax size sum softmax log_softmax size nll_loss view cuda criterion pow mul sum cuda criterion cuda criterion mul criterion size expand masked_fill_ le sum cuda l2_normloss l2_normloss_compete range len remove get_distance replace write close range open numpy range saveOneImg weighted_center Variable sqrt pow abs cuda reshape nanmean zip zeros sum diag array array join format count read expanduser fromarray join uint8 channels astype mkdir save zeros forward print do_seg_tests iter share_with net format print channels compute_hist sum diag print params range flat len print shape upsample_filt data num Convolution Python data pool2 SoftmaxWithLoss score relu2_2 relu3_2 relu2_1 relu1_2 conv_relu relu5_1 relu7 pool1 drop7 relu5_3 relu4_2 pool4 relu6 relu5_2 upscore drop6 Convolution Deconvolution relu4_3 score_fr label relu1_1 crop relu4_1 NetSpec max_pool relu3_1 relu3_3 pool5 pool3 Dropout depth color Concat Convolution conv_relu Dropout max_pool score_fused score_frhha modality_fcn score_frcolor Eltwise fuse_pool4 score_pool4 score_pool4c upscore16 upscore2 score_pool3c fuse_pool3 score_pool3 upscore8 upscore_pool4 fuse_pool4_geo score_sem score_fr_geo score_pool4_semc sem score_pool4_geoc upscore2_sem upscore16_sem score_fr_sem geo fuse_pool4_sem upscore16_geo score_pool4_geo score_pool4_sem score_geo upscore2_geo upscore_geo upscore_sem score_pool3_sem score_pool3_semc fuse_pool3_geo upscore_pool4_geo score_pool3_geo upscore8_geo score_pool3_geoc upscore_pool4_sem fuse_pool3_sem upscore8_sem norm2 norm1 relu2 relu1 LRN relu4 dict relu3 relu5 scale_pool3 scale_pool4 Scale abs load_url load_state_dict MTL_ResNet normal_ __name__ fill_ print BatchNorm2d partial InstanceNorm2d get_norm_layer print ResnetGenerator UnetGenerator apply cuda get_norm_layer print apply NLayerDiscriminator cuda print parameters load_url ResNet load_state_dict load_url load_state_dict load_url ResNetClss load_state_dict load_url ResNetClss load_state_dict load_url ResNetClss load_state_dict load_url ResNetClss load_state_dict load_url ResNetClss load_state_dict load_url ResNetClss_svm load_state_dict load_url ResNetClss_svm load_state_dict load_url ResNetClss_svm load_state_dict load_url ResNetClss_svm load_state_dict load_url ResNetClss_svm load_state_dict load_url ResNet load_state_dict load_url load_state_dict load_url load_state_dict pop vgg16 transpose numpy print parameters fromarray save print join search print float64 flatten astype mkdir
# SSNet Paper: https://arxiv.org/abs/1712.00542 ## Example Code for Training - Train the model ``` python train_all.py --input_dir=/data/mcr/huoy1/DeepInCyte/Data2D/2labels --os_dir=/scratch/huoy1/projects/DeepLearning/InCyte_Deep_revision1 --network=504 --epoch=51 --batchSize_lmk=12 --batchSize_clss=12 --viewName=view1 --loss_fun=Dice_norm --GAN=True --LSGAN=True --fold=2 ```
673
MCG-NJU/CRCNN-Action
['action detection', 'action recognition']
['Context-Aware RCNN: A Baseline for Action Detection in Videos']
lib/models/resnet_helper.py lib/datasets/data_input_helper.py lib/datasets/epic.py lib/utils/ava_evaluation/np_box_mask_list.py lib/datasets/ava.py lib/core/config.py lib/utils/ava_evaluation/np_box_list_ops.py lib/utils/lr_policy.py lib/utils/bn_helper.py lib/utils/ava_evaluation/np_box_ops.py lib/datasets/ava_data_input.py lib/utils/c2.py lib/utils/ava_evaluation/standard_fields.py lib/datasets/image_processor.py tools/feature_loader.py lib/models/resnet_video_helper.py lib/datasets/avabox_data_input.py lib/datasets/epic_data_input.py lib/models/attention_helper.py lib/utils/ava_evaluation/per_image_evaluation.py lib/models/model_builder_video.py lib/datasets/avabox.py lib/utils/checkpoints.py lib/utils/ava_evaluation/label_map_util.py lib/utils/ava_evaluation/np_box_list.py lib/utils/misc.py lib/models/lfb_helper.py lib/utils/metrics.py lib/utils/collections.py lib/utils/timer.py lib/utils/ava_eval_helper.py tools/train_net.py lib/datasets/coordinator.py lib/datasets/dataloader.py lib/datasets/charades.py tools/evaluate_actions.py tools/test_net.py lib/datasets/dataset_helper.py lib/utils/ava_evaluation/metrics.py lib/datasets/charades_data_input.py lib/models/nonlocal_helper.py lib/models/resnet_video.py lib/models/head_helper.py lib/datasets/jhmdb.py tools/lfb_loader.py tools/test_net_get_feature.py lib/utils/ava_evaluation/np_box_mask_list_ops.py lib/utils/ava_evaluation/object_detection_evaluation.py lib/datasets/avascene.py lib/utils/ava_evaluation/np_mask_ops.py lib/datasets/execution_context.py merge_dicts cfg_from_list cfg_from_file assert_and_infer_cfg print_cfg load_boxes_and_labels sec_to_frame get_num_boxes_used get_keyframe_indices AvaDataset sample_lfb load_boxes_and_labels get_box_indices sec_to_frame get_num_boxes_used get_keyframe_indices AvaboxDataset sample_lfb create_data_input construct_label_array scale_box scale_box_xy _init_pool _load_and_process_images get_clip_from_source _shutdown_pools load_boxes_and_labels sec_to_frame get_num_boxes_used get_keyframe_indices sample_lfb AvasceneDataset create_data_input construct_label_array scale_box _init_pool get_clip_from_source _load_and_process_images _shutdown_pools sample_train_idx aggregate_labels sample_center_of_segments get_lfb_frames CharadesDataset sample_lfb create_data_input construct_label_array _init_pool get_clip_from_source _load_and_process_images _shutdown_pools Coordinator coordinated_put coordinated_get DataLoader get_input_db load_image_lists get_sequence convert_to_batch color_augmentation_list images_and_boxes_preprocessing _shutdown_pools _create_execution_context images_preprocessing_avabox retry_load_images ensure_memcached get_sequence sample_verb_lfb frame_to_sec time_to_sec sample_noun_lfb sec_to_frame get_annotations_for_lfb_frames is_empty_list load_annotations filename_to_frame_id EpicDataset create_data_input _init_pool get_clip_from_source _load_and_process_images _shutdown_pools ExecutionContext horizontal_flip_list flip_boxes lighting_list CHW2HWC center_crop spatial_shift_crop_list random_crop_list color_jitter_list crop_boxes scale scale_boxes pad_image contrast_list grayscale saturation_list color_normalization clip_boxes_to_image random_short_side_scale_jitter_list clip_box_to_image HWC2CHW blend brightness_list load_boxes_and_labels JHMDBDataset get_box_indices get_num_boxes_used get_keyframe_indices spatial_attention_block OSME_block global_self_attention MSNL_block CBAM_C_block SE_block NLCore nl_pre_act NLCore_T1_unshared add_global_pooling full_image_pool add_roi_head roi_pool_avgpool roi_pool add_basic_head roi_pood_with_res5 NTC_to_NCT11 add_fbo_max_head RoIFeatureTransform get_lfb_blob pre_act Temporal_RoIFeatureTransform add_fbo_nl_head_withlfb NLLayers add_fbo_head NLCore prepare_lfb add_fbo_avg_head NLCore_avg add_fbo_nl_head prepare_nl_input _get_lr_change_ratio create_model add_inputs ModelBuilder add_parameter_update_ops add_nonlocal_group add_nonlocal spacetime_nonlocal res_stage_nonlocal _add_shortcut_3d _generic_residual_block_3d res_stage_nonlocal_group bottleneck_transformation_3d obtain_arc create_model obtain_arc create_resnet_video_branch write_results evaluate_ava_from_files get_ava_eval_data read_exclusions run_evaluation make_image_key read_labelmap read_csv evaluate_ava BatchNormHelper get_detectron_ops_lib import_detectron_ops remove_spatial_bn_layers convert_model load_and_convert_caffe2_cls_model save_model_params remove_momentum get_checkpoint_directory remove_non_param_fields initialize_params_from_file resume_from create_and_get_checkpoint_directory find_checkpoint get_checkpoint_resume_file load_model_from_params_file initialize_master_gpu_model_params load_model_from_params_file_for_test broadcast_parameters AttrDict lr_func_step lr_func_steps_with_lrs get_lr_at_iter lr_func_steps_with_relative_lrs lr_func_steps_with_decay get_lr_func get_step_index eval_ava_score_file combine_ava_multi_crops get_multi_gpu_outputs merge_ava_3shift_score_files get_batch_size_from_workspace sigmoid get_ava_mini_groundtruth get_json_stats_dict compute_multi_gpu_topk_accuracy compute_topk_correct_hits mean_ap_metric sum_multi_gpu_blob MetricsCalculator merge_ava_score_files generate_random_seed get_total_test_iters check_nan_losses scoped_name save_net_proto get_crop_size get_flops_params get_gpu_stats print_net show_flops_params get_model_proto_directory print_model_param_shape get_batch_size log_json_stats unscope_name Timer create_category_index_from_labelmap create_category_index create_class_agnostic_category_index get_max_label_map_index _validate_label_map get_label_map_dict convert_label_map_to_categories load_labelmap compute_average_precision compute_cor_loc compute_precision_recall BoxList multi_class_non_max_suppression sort_by_field iou clip_to_window _update_valid_indices_by_removing_high_iou_boxes concatenate filter_scores_greater_than _copy_extra_fields area SortOrder ioa change_coordinate_frame prune_non_overlapping_boxes prune_outside_window scale intersection gather non_max_suppression BoxMaskList multi_class_non_max_suppression sort_by_field iou concatenate filter_scores_greater_than area ioa box_list_to_box_mask_list intersection gather prune_non_overlapping_masks non_max_suppression iou area ioa intersection iou area ioa intersection OpenImagesDetectionEvaluator WeightedPascalDetectionEvaluator DetectionEvaluator ObjectDetectionEvaluator ObjectDetectionEvaluation WeightedPascalInstanceSegmentationEvaluator PascalInstanceSegmentationEvaluator PascalDetectionEvaluator PerImageEvaluation DetectionResultFields BoxListFields InputDataFields TfExampleFields get_training_action_freq softmax evaluate_actions main compute_top_k_verbs_or_nouns compute_top_k_actions construct_ava_lfb construct_lfb get_features load_feature_map write_lfb construct_frame_level_lfb construct_ava_lfb get_lfb construct_lfb get_features write_lfb load_lfb main get_test_name test_net test_one_crop main test main train create_wrapper pformat info WINDOW_SIZE LFB_MAX_NUM_FEAT_PER_STEP STEP_SIZES append range len AttrDict items isinstance literal_eval type merge_dicts literal_eval zip split keys values info info append keys range len WINDOW_SIZE LFB_MAX_NUM_FEAT_PER_STEP min choice zeros range enumerate len info append keys range len zeros get map_async convert_to_batch USE_SCENE_LOSS reshape astype float32 int32 zip append zeros range array ENABLE_SCENE_FEAT_BANK len uniform array uniform array SCALE_XY TRAIN_BOX_SCALES TEST_BOX_SCALES shape images_and_boxes_preprocessing IMG_LOAD_RETRY range scale_box astype CONCAT_GLOBAL_FEAT copy stack deepcopy int ERASE_BACKGROUND_EXP reshape scale_box_xy clip_box_to_image images_preprocessing_avabox retry_load_images len pools SCALE_BOX randint int float round append append LFB_CLIPS_PER_SECOND range len int format float warm append LFB_CLIPS_PER_SECOND round array set debug put JHMDBDataset AvasceneDataset dict defaultdict range len str GetInstance all range warn sleep reshape astype float32 RANDOM_CROP horizontal_flip_list concatenate random_short_side_scale_jitter_list shape color_augmentation_list random_crop_list horizontal_flip_list concatenate spatial_shift_crop_list clip_boxes_to_image random_short_side_scale_jitter_list shape color_augmentation_list SCALE random_crop_list scale_boxes lighting_list color_jitter_list format c_float BATCH_SIZE namedtuple pools RawArray NUM_LFB_FEAT shared_data_lists info VIDEO_LENGTH Pool keys range append len join format close info values enumerate split randint ANNOTATIONS join warn set info ANNOTATION_DIR len append filename_to_frame_id keys VERB_LFB_CLIPS_PER_SECOND WINDOW_SIZE append zeros array range int WINDOW_SIZE NOUN_LFB_FRAMES_PER_SECOND min MAX_NUM_FEATS_PER_NOUN_LFB_FRAME astype warn float32 shape info append zeros float range range pad copy minimum maximum minimum maximum flip_boxes shape append swapaxes int randint crop_boxes ceil int ceil int int float floor resize int float floor int uniform floor float round normal reshape repeat append sum array range copy grayscale uniform blend append blend shape uniform append zeros grayscale mean blend uniform fill append permutation arange saturation_list append brightness_list range contrast_list len ReduceSum Softmax Reshape ConvNd Sigmoid ReduceMean ReduceMax Mul spatial_attention_block ReduceSum Reshape Transpose MaxPool FC_OUT_DIM SE_block ReduceMax append AveragePool BRANCH_NUM FC range Mul R MaxPool Relu ExpandDims Sigmoid AveragePool FC Mul R MaxPool Relu ExpandDims Copy Sigmoid Sum AveragePool FC PRE_ACT_LN Softmax Reshape PRE_ACT Scale ConvNd nl_pre_act SCALE BatchMatMul Dropout Softmax Reshape PRE_ACT Scale ConvNd Sigmoid nl_pre_act SCALE append BatchMatMul range Dropout PRE_SUM Reshape MaxPool Relu Split Sum WITH_GLOBAL NUM_LAYERS Squeeze NLCore append AveragePool T1_unshared pool_func range NLCore_T1_unshared SCALE_LIST PRE_SUM Reshape Relu Sum Squeeze NLCore ReduceMax AveragePool MaxPool add_global_pooling GLOBAL_POOLING_TYPE WINDOW_SIZE Reshape add_fbo_nl_head_withlfb LFB_MAX_NUM_FEAT_PER_STEP Split Concat Copy Squeeze add_fbo_head append Dropout append add_fbo_head roi_pool_func isinstance RoIFeatureTransform Reshape MaxPool XFORM_RESOLUTION Squeeze AveragePool add_global_pooling GLOBAL_POOLING_TYPE Reshape VIDEO_LENGTH Temporal_RoIFeatureTransform Reshape res_stage_nonlocal _generic_residual_block_3d XFORM_RESOLUTION VIDEO_LENGTH AveragePool WIDTH_PER_GROUP NUM_GROUPS RoIFeatureTransform Reshape XFORM_RESOLUTION Squeeze AveragePool Reshape Transpose prepare_lfb get_lfb_blob prepare_nl_input append NLLayers HEAD_NUM Concat INPUT_TRANS prepare_lfb LFB_TRANS range prepare_nl_input get_lfb_blob get_lfb_blob RoIAlign RoIFeatureTransform Split ExpandDims Squeeze append range PRE_ACT_LN pre_act pre_act Reshape PRE_ACT ConvNd NL_avg_TRANS_OUT ReduceMean Dropout PRE_SUM Relu NUM_LAYERS NLCore Sum NLCore_avg range Dropout LATENT_DIM INPUT_REDUCE_DIM ConvNd LFB_DIM Dropout LATENT_DIM ConvNd MODEL_NAME get_blob_names _blobs_queue_name max AffineNd StopGradient Softmax Reshape Add Div ConstantFill MaxPool USE_BN Scale ConvNd SpatialBN BatchMatMul ReduceBackSum Sum spacetime_nonlocal int Reshape Transpose spacetime_nonlocal Sum conv_op Relu_ info Sum trans_func _add_shortcut_3d Relu_ int format add_nonlocal Reshape Transpose astype _generic_residual_block_3d TEST_MODE append range CONCAT_GLOBAL_MID_NL len int format Reshape Transpose astype _generic_residual_block_3d TEST_MODE add_nonlocal_group append range CONCAT_GLOBAL_MID_NL len VIDEO_LENGTH int range append DATASET LAYER_MOD Softmax SoftmaxWithLoss TRANS_FUNC MaxPool res_stage_nonlocal SpatialBN out_pred box_blob SigmoidCrossEntropyLoss Sigmoid AveragePool create_resnet_video_branch get_batch_size WIDTH_PER_GROUP GLOBAL_BOX_DECOUPLE_NET GLOBAL_POOLING_TYPE Reshape add_roi_head Split Copy VIDEO_ARC_CHOICE Sum MULTI_LABEL CONV5_STRIDE FC add_global_pooling DILATIONS_IN_CONV4 DILATIONS_AFTER_CONV5 format StopGradient head_func DEPTH _generic_residual_block_3d Relu OTHER_LOSS_UNSHARED_DP Concat res_stage_nonlocal_group NUM_GPUS GLOBAL_FEAT_STOP_GRAD Squeeze FREEZE_BACKBONE USE_SOFTMAX_LOSS info PERSON_SCORES_FUSION PERSON_LOSS_SCORES_FUSION ENABLE_SCENE_FEAT_BANK obtain_arc AffineNd ERASE_BACKGROUND_EXP add_fbo_nl_head_withlfb NUM_CLASSES Max CONV4_STRIDE ConvNd Scale global_blob USE_AFFINE add_basic_head NUM_GROUPS Dropout DATASET LAYER_MOD TRANS_FUNC MaxPool res_stage_nonlocal SpatialBN get_batch_size GLOBAL_BRANCH_ARC WIDTH_PER_GROUP CONV5_STRIDE DILATIONS_IN_CONV4 DILATIONS_AFTER_CONV5 format StopGradient DEPTH _generic_residual_block_3d Relu res_stage_nonlocal_group FREEZE_BACKBONE info obtain_arc AffineNd CONV4_STRIDE ConvNd USE_AFFINE NUM_GROUPS defaultdict set set read_exclusions read_csv run_evaluation read_labelmap join time write_results get_ava_eval_data run_evaluation info DIR len evaluate add_single_ground_truth_image_info add_single_detected_image_info pprint info PascalDetectionEvaluator int defaultdict tolist append round range enumerate time info join format print path exists get_detectron_ops_lib InitOpsLibrary int join format replace get_checkpoint_directory sort append listdir get_checkpoint_directory listdir initialize_params_from_file info sorted sqrt append keys find endswith keys remove_momentum remove_spatial_bn_layers range remove_non_param_fields join format load_and_convert_caffe2_cls_model get_checkpoint_directory info keys range len convert_model format RESET_START_ITER PARAMS_FILE initialize_params_from_file resume_from RESUME info int format RESUME_FROM_BATCH_SIZE BATCH_SIZE info join DIR abspath get_checkpoint_directory makedirs format GetAllParams RESET_START_ITER Blobs NUM_GPUS ROOT_GPU_ID OrderedDict params info float range str format GetAllParams NUM_GPUS ROOT_GPU_ID FetchBlob GetParams info append range unscope_name format initialize_master_gpu_model_params broadcast_parameters info str format ROOT_GPU_ID FetchBlob info unscope_name WARMUP_END_ITER WARMUP_START_LR float32 get_step_index get_step_index get_step_index STEPS enumerate LR_POLICY keys range zeros sum range time format multiply astype average_precision_score mean vstack info zeros sum roc_auc_score format reshape NUM_GPUS ROOT_GPU_ID FetchBlob float range format SHOW_FEAT print reshape NUM_GPUS ROOT_GPU_ID shape FetchBlob softmax append range NUM_GPUS range ROOT_GPU_ID NUM_GPUS range ROOT_GPU_ID update get_computed_metrics BATCH_SIZE DATASET_SIZE get_gpu_stats DETECTION_SCORE_THRESH_EVAL TEST_MULTI_CROP_SCALES append merge_ava_3shift_score_files merge_ava_score_files join eval_ava_score_file replace info join eval_ava_score_file info join evaluate_ava_from_files EVAL_GT_FILENAME ENABLED ANNOTATION_DIR format error NUM_GPUS ROOT_GPU_ID isnan FetchBlob range _exit join DIR abspath makedirs format dumps info str join format name get_model_proto_directory info Proto format ROOT_GPU_ID shape FetchBlob GetParams info str format GetAllParams Name op ROOT_GPU_ID shape info input type range unscope_name len communicate Popen split format get_flops_params info int format input len op ROOT_GPU_ID shape is_gradient_op info get_batch_size float type prod range append split seed RNG_SEED item name id display_name item info append range _validate_label_map item id load_labelmap max convert_label_map_to_categories load_labelmap argsort cumsum astype concatenate maximum sum range len get_coordinates add_field get_extra_fields size BoxList get_field get_field argsort get sort_by_field arange iou filter_scores_greater_than squeeze logical_and num_boxes append expand_dims full range get add_field sort_by_field zeros_like filter_scores_greater_than concatenate reshape BoxList num_boxes get_field range append non_max_suppression get add_field array_split get_extra_fields hstack BoxList get_field get array_split _copy_extra_fields hstack area astype BoxList fmax int32 fmin greater_equal ioa gather array amax get array_split reshape hstack where logical_not max add_field get_extra_fields BoxList shape vstack get_field astype int32 BoxList get _copy_extra_fields scale get_field get_extra_fields add_field max BoxMaskList get_extra_fields get_field append get_masks BoxMaskList greater_equal ioa gather array amax append minimum transpose maximum shape zeros split expand_dims area intersection expand_dims area intersection sum arange zeros float range info info tolist outer argsort shape zip unravel_index zeros float sum range exp max get_training_action_freq softmax info compute_top_k_verbs_or_nouns sum compute_top_k_actions parse_args add_argument evaluate_actions ArgumentParser format NUM_GPUS ROOT_GPU_ID FetchBlob append range int squeeze tolist len info append round range NAME_LIST OUT_DIR join info construct_ava_lfb TEST_ITERS get_features Timer NAME_LIST PROF_DAG CreateNet name LOAD_LFB_PATH tic ModelBuilder load_model_from_params_file_for_test append ResetWorkspace range write_lfb format RunNetOnce get_total_test_iters build_model input_db ENABLED print_net info start_data_loader net toc join param_init_net system construct_lfb shutdown_data_loader RunNet diff squeeze range info zip join LOAD_LFB_PATH info DIR construct_frame_level_lfb _lfb_frames _annotations get_features Timer WRITE_LFB PROF_DAG CreateNet name tic ModelBuilder load_model_from_params_file_for_test append ResetWorkspace range write_lfb format RunNetOnce get_total_test_iters build_model input_db print_net info start_data_loader net toc param_init_net LOAD_LFB system construct_lfb shutdown_data_loader RunNet diff DETECTION_SCORE_THRESH_EVAL info min TEST_MULTI_CROP range TEST_MULTI_CROP_SCALES NUM_TEST_CLIPS_FINAL_EVAL isfile get_test_name MODEL_PARAMS_FILE combine_ava_multi_crops get_lfb test_one_crop warning log_final_metrics Timer CROP_SHIFT seed GlobalInit PROF_DAG CreateNet name tic ModelBuilder calculate_and_log_all_metrics_test load_model_from_params_file_for_test ResetWorkspace finalize_metrics get_lfb MetricsCalculator range get_total_test_iters RunNetOnce format build_model shutdown_data_loader PARAMS_FILE print_net show_flops_params info start_data_loader print_cfg net toc param_init_net time RNG_SEED save_net_proto system MODEL_PARAMS_FILE RunNet cfg_from_list cfg_from_file exit config_file assert_and_infer_cfg print_help opts import_detectron_ops test_net GlobalInit FULL_EVAL_DURING_TRAINING generate_random_seed NUM_TEST_CLIPS_DURING_TRAINING load_feature_map getLogger DETECTION_SCORE_THRESH_TRAIN MODEL_PARAMS_FILE DIR test print_cfg Timer param_init_net PROF_DAG CreateNet RunNetOnce DATA_TYPE build_model save_net_proto ModelBuilder start_data_loader net MetricsCalculator generate_random_seed check_nan_losses getLogger MAX_ITER DETECTION_SCORE_THRESH_TRAIN COMPUTE_PRECISE_BN create_bn_aux_model get_checkpoint_resume_file log_final_metrics compute_and_update_bn_stats GlobalInit FULL_EVAL_DURING_TRAINING full_map save_model_params name create_and_get_checkpoint_directory tic load_model_from_params_file UpdateWorkspaceLr calculate_and_log_all_metrics_test get_json_stats_dict finalize_metrics get_lfb range SummaryWriter format NUM_TEST_CLIPS_DURING_TRAINING get_total_test_iters compute_and_log_best shutdown_data_loader ENABLED print_net show_flops_params info log_json_stats test_net TEST_AFTER_TRAIN toc join calculate_and_log_all_metrics_train create_wrapper system BatchNormHelper reset MODEL_PARAMS_FILE RunNet DIR add_scalar train
# Context-aware RCNNs: a Baseline for Action Detection in Videos Source code for the following paper([arXiv link](https://arxiv.org/abs/2007.09861)): Context-aware RCNNs: a Baseline for Action Detection in Videos Jianchao Wu, Zhanghui Kuang, Limin Wang, Wayne Zhang, Gangshan Wu in ECCV 2020 Our implementation is based on [Video-long-term-feature-banks](https://github.com/facebookresearch/video-long-term-feature-banks). ## Prepare dataset Please follow [LFB](https://github.com/facebookresearch/video-long-term-feature-banks/blob/master/DATASET.md) on how to prepare AVA dataset. ## Prepare environment Please follow [LFB](https://github.com/facebookresearch/video-long-term-feature-banks/blob/master/INSTALL.md) on how to prepare Caffe2 environment.
674
MEDAL-IITB/Fast_WSI_Color_Norm
['whole slide images']
['Fast GPU-Enabled Color Normalization for Digital Pathology']
main.py Estimate_W.py Run_StainSep.py Run_ColorNorm.py
# Fast_WSI_Color_Norm Codes for Fast GPU-Enabled Color Normalization of Whole Slide Images in Digital Pathology This repository hosts python codes for Fast GPU-Enabled Color Normalization of Whole slide Images(WSI) in computational pathology. Please cite both papers if you use this code: @article{ramakrishnan_fast_2019, title = {Fast {GPU}-{Enabled} {Color} {Normalization} for {Digital} {Pathology}}, url = {http://arxiv.org/abs/1901.03088}, urldate = {2019-01-11},
675
MELALab/nela-gt
['misinformation']
['NELA-GT-2021: A Large Multi-Labelled News Dataset for The Study of Misinformation in News Articles']
load-sqlite3.py load-json.py load-labels.py main main main execute_query execute_query_pandas sorted print add_argument dict path dirname ArgumentParser input parse_args walk len fetchall connect read_sql_query connect execute_query join execute_query_pandas
# NELA-GT repository This repository contains usage examples for the NELA-GT-2020 data set with Python 3. # (NEW) NELA-GT-2021 If you use this dataset in your work, please cite us as follows: <br> ``` @misc{ gruppi2020nelagt2021, title={NELA-GT-2021: A Large Multi-Labelled News Dataset for The Study of Misinformation in News Articles}, author={Maurício Gruppi and Benjamin D. Horne and Sibel Adalı}, year={2021},
676
MGIMM/Wasserstein-Random-Forests
['causal inference']
['Wasserstein Random Forests and Applications in Heterogeneous Treatment Effects']
setup.py __init__.py test/test.py obj_func obj_func2
# Wasserstein-Random-Forests A Random Forests-based conditional distribution estimator: (X_i,Y_i; 1<= i <= n) + WRF estimate L(Y | X = x) for each x in Supp(X). <img src="fig/multimodal.png" height="500" /> ## Installation and Dependencies ### Dependencies **WassersteinRandomForest** is based on `NumPy` and `Cython`. So, make sure these packages are installed. For example, you can install them with `pip`: ``` pip3 install setuptools numpy cython
677
MIDA-group/sdt
['template matching']
['Stochastic Distance Transform']
sdt.py test_empty_set_2d _grid_diameter _knn_query det_sdt_multiset_naive test_singleton_set_2d test_singleton_set_3d test_empty_set_3d sum_pool point_set_to_multiset compute_k _array_grid main det_sdt or_pool int _grid_diameter ones reshape size min astype cKDTree shape point_set_to_multiset compute_k _array_grid full ceil power float array range int convolve ones tuple astype ndim isclose _grid_diameter ones reshape transpose sort astype square size power shape point_set_to_multiset sqrt nonzero _array_grid zeros sum array range ones range ndim ones len query dot clip zeros _grid_diameter det_sdt shape _grid_diameter print shape zeros det_sdt zeros _grid_diameter det_sdt shape _grid_diameter print shape zeros det_sdt seed test_empty_set_2d time print tuple test_singleton_set_2d distance_transform_edt sum_pool compute_k float det_sdt full len
# Project: sdt Python/NumPy/SciPy implementation of the deterministic version of the Stochastic Distance Transform (SDT). (Ref: https://arxiv.org/abs/1810.08097) The SDT is a tunably noise-insensitive distance transform (a distance map from all elements of an image domain to its nearest object element). Both binary and integer-valued images are supported, where the integer-valued images act as multisets. # License The SDT implementation is licensed under the permissive MIT license. # Author/Copyright Written by (and copyright reserved for) Johan Ofverstedt.
678
MIPT-Oulu/mCTSegmentation
['semantic segmentation']
['Deep-Learning for Tidemark Segmentation in Human Osteochondral Tissues Imaged with Micro-computed Tomography']
code/utils.py code/oof_inference.py code/evaluate_metrics.py code/create_cropped_dataset.py code/train.py code/visualization.py code/build_hdf.py code/generate_pictures_and_tables.py worker_saver make_surf_vol init_scheduler init_metadata parse_train_args gen_image_id numpy2vtk visualize_stack imwrite list squeeze save_every imread pre_processed_ds_path range glob findContours astype moments enumerate join uint8 int isdir sort filter zeros makedirs copy shape zeros argmax max range split update join list GlobalKVS glob sort grades map apply dataset DataFrame read_csv merge GlobalKVS parse_args add_argument ArgumentParser SetScalars float64 SetSpacing astype shape numpy_to_vtk vtkImageData SetExtent SetBlendModeToComposite SetFocalPoint SetScalarOpacity SetRenderWindow ResetCamera SetAmbient Start SetInterpolationTypeToLinear ShadeOn shape SetViewUp SetInteractorStyle SetDiffuse AddVolume SetMapper AddRenderer SetInputData SetColor Update vtkInteractorStyleTrackballCamera numpy2vtk SetSize AddRGBPoint vtkPiecewiseFunction SetSpecular SetPosition vtkOpenGLGPUVolumeRayCastMapper AddPoint Render vtkVolume SetBackground Azimuth vtkRenderWindowInteractor vtkRenderer vtkColorTransferFunction vtkRenderWindow
# Deep-Learning for Tidemark Segmentation in Human Osteochondral Tissues Imaged with Micro-computed Tomography The codes and the dataset. ArXiv pre-print: https://arxiv.org/abs/1907.05089 (c) Aleksei Tiulpin, University of Oulu, 2019. ## About In this paper we introduced a new dataset for biomedical image segmentation. We tackled the problem of segmenting tidemark in human ostechondral samples stained with PTA contrast agent. We imaged the samples with two different contrast agents (PTA and CA4+) and eventually co-registered the imaging results. The method described above allowed us to obtain the calcified tissue masks as it is well visible in CA4+ in contrast to PTA. We used U-Net with minor modifications and benchmarked several loss functions: cross entropy,
679
MJ1021/kcm-code
['data augmentation']
['Kernel-convoluted Deep Neural Networks with Data Augmentation']
KCM_implementation_01152021/Binary/main.py KCM_implementation_01152021/Multi/models/resnext.py KCM_implementation_01152021/Multi/utils.py KCM_implementation_01152021/Binary/model.py KCM_implementation_01152021/Multi/models/resnet.py KCM_implementation_01152021/Multi/models/vgg.py KCM_implementation_01152021/Binary/trainer.py KCM_implementation_01152021/Multi/train_kcm.py KCM_implementation_01152021/Multi/models/densenet3.py KCM_implementation_01152021/Multi/models/googlenet.py KCM_implementation_01152021/Multi/models/__init__.py KCM_implementation_01152021/Multi/models/densenet.py KCM_implementation_01152021/Multi/train_rev.py KCM_implementation_01152021/Multi/models/mobilenet.py KCM_implementation_01152021/Multi/models/lenet.py KCM_implementation_01152021/Multi/models/alldnet.py KCM_implementation_01152021/Binary/utils.py KCM_implementation_01152021/Multi/models/densenet_efficient_multi_gpu.py print_and_write cifar10_classifier twomoon_classifier Trainer PrepareData_cifar10 LoadAndSplitData mixup_data PrepareData_twomoon BuildModel mixup_criterion test adjust_learning_rate mixup_data train checkpoint mixup_criterion test adjust_learning_rate mixup_data train checkpoint format_time init_params progress_bar get_mean_and_std AllDNet DenseNet201 DenseNet161 DenseNet121 Transition DenseNet Bottleneck densenet_cifar DenseNet169 test_densenet DenseNet3 TransitionBlock BottleneckBlock DenseBlock DenseNet190 BasicBlock create_multi_gpu_storage _EfficientBatchNorm DenseNetEfficientMulti TransitionBlock EfficientDensenetBottleneck _DenseLayer _EfficientCat DenseNet190 _DenseBlock _EfficientReLU _SharedAllocation _EfficientDensenetBottleneckFn _EfficientConv2d GoogLeNet Inception LeNet Block MobileNet test PreActBlock ResNet ResNet18 Bottleneck ResNet34 ResNet101 test conv3x3 ResNet50 PreActBottleneck BasicBlock ResNet152 Block ResNeXt29_4x64d ResNeXt ResNeXt29_2x64d test_resnext ResNeXt29_32x4d ResNeXt29_8x64d VGG print write minimum arange size transpose astype float32 randperm append zeros tensor cuda range len beta data mixup_criterion backward print step zero_grad map progress_bar N_kcm alpha mixup_data range max net enumerate len eval seed str model print name mkdir save param_groups lr print DataLoader div_ zeros range len normal constant isinstance kaiming_normal Conv2d bias modules BatchNorm2d weight Linear int time join format_time write append range flush len int randn Variable print densenet_cifar net device_count range MobileNet randn Variable print size net ResNet18 randn Variable print size ResNeXt29_2x64d net
### Introduction Data augmentation (DA) has been widely used to alleviate overfitting issues and robustness to adversarial examples in deep learning. In particular, trained deep models using the Mixup-generated samples (Mixup; Zhang et al. 2018) have demonstrated superb performances in supervised classification. In this work, we focus on the role of DA. In this view, the Mixup method encourages the models to satisfy the linearity constraint implicitly, which presents the models' smoothness. In this thesis, we build models that explicitly bring desirable constraints of smoothness. We propose kernel-convoluted models (KCM) where the smoothness constraint is explicitly imposed by locally averaging all shifted original functions with a kernel function. Besides, we extend it to incorporate Mixup into KCM. For more details, we refer to our paper (https://arxiv.org/abs/2012.02521v2). This repository contains the experiments used for the results in the paper. ### Others We categorize implementations into a type of problem: binary classification and multi-class classification. Experimental details, including requirements, are summarized in each folder.
680
MKLab-ITI/FIVR-200K
['video retrieval']
['FIVR: Fine-grained Incident Video Retrieval']
evaluation.py download_dataset.py calculate_similarities.py download_video plot_pr_curve evaluate download YoutubeDL show arange plot xlabel grid ylabel xlim tight_layout ylim figure xticks yticks sorted format count print viewitems set precision_recall_curve lrange intersection append sum max len
# FIVR-200K <img src="https://raw.githubusercontent.com/MKLab-ITI/FIVR-200K/master/banner.png" width="100%"> An annotated dataset of YouTube videos designed as a benchmark for Fine-grained Incident Video Retrieval. The dataset comprises 225,960 videos associated with 4,687 Wikipedia events and 100 selected video queries. Project Website: [[link](http://ndd.iti.gr/fivr/)] Paper: [[publisher](https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=8668422)] [[arXiv](https://arxiv.org/abs/1809.04094)] [[pdf](https://arxiv.org/pdf/1809.04094.pdf)] ## Installation * Clone this repo: ```bash git clone https://github.com/MKLab-ITI/FIVR-200K cd FIVR-200K
681
ML-KULeuven/SAR-PU
['selection bias']
['Beyond the Selected Completely At Random Assumption for Learning from Positive and Unlabeled Data']
make_km_lib.py sarpu/sarpu/data_extending.py lib/km/km/Kernel_MPE_grad_threshold.py sarpu/sarpu/labeling_mechanisms.py sarpu/sarpu/__main__.py sarpu/sarpu/experiments.py sarpu/sarpu/data_processing.py sarpu/setup.py sarpu/sarpu/evaluation.py sarpu/sarpu/paths_and_names.py sarpu/sarpu/PUmodels.py lib/km/setup.py sarpu/sarpu/pu_learning.py lib/tice/tice/tice.py sarpu/sarpu/input_output.py sarpu/sarpu/__init__.py lib/tice/setup.py wrapper get_distance_curve find_nearest_valid_distribution compute_best_rbf_kernel_width mpe low_c max_bepp generate_folds tice subsetsThroughDT main pick_delta _generate_attribute_values generate_attributes generate_extended_data keep_k_most_common binarize prp_tpfptnfn f1_score_tpfptnfn fp accuracy precision_tpfptnfn rec2_tpfptnfn fn tn tp accuracy_tpfntnfn expected_loglikelihood label_frequency tpfptnfn recall_tpfptnfn evaluate_all evaluate_classification copy_if_possible parse_settings train_and_evaluate evaluate_propensity_scores summarize_results parse_model parse_cl_atts read_data label_data SimpleLabeling _calc_s BaseLabelingMechanism _save_propensity_model_and_labels parse_labeling_model partition_path propensity_labeling_path processed_data_path partitions_data_path original_data_path classlabels_fname propensity_model_path experiment_results_path experiment_info_path experiment_method_result_path_nolabel data_fname propensity_scores_path experiment_propensity_model_path experiment_result_folder_path propensity_base_path labelings_data_path experiment_classifier_path partition_name experiment_method_result_folder_path data_path propensity_fname classlabels_path LogisticRegressionPU BasePU pu_learn_sar_e pu_learn_scar_c loglikelihood_probs initialize_simple pu_learn_sar_em NoFeaturesModel LimitedFeaturesModel pu_learn_neg slope expectation_y push train_eval summarize outdir print_help main label parse_propensity_attributes coneqp ones spmatrix dot zeros matrix range concatenate find_nearest_valid_distribution sqrt array append max T exp concatenate dot sqrt tile logspace median sum find_nearest_valid_distribution sqrt max concatenate get_distance_curve concatenate min compute_best_rbf_kernel_width sqrt mpe array genfromtxt data ArgumentParser max open count str list delta parse_args range max_bepp close zip nbIts vars float flush time bitarray add_argument min labels write tice out len sqrt float count list bitarray max range low_c generate_folds subsetsThroughDT append float sum max range len map heappush set add heappop zip splitCrit count seed partition_path generate_attributes read_data concatenate partitions_data_path copy data_path savetxt append classlabels_path range makedirs DataFrame KMeans pivot_table uniform sum fit_predict seed enumerate zeros_like choice drop set tolist copy recall_tpfptnfn precision_tpfptnfn prp_tpfptnfn recall_tpfptnfn sum propensity_labeling_path partition_path pu_learn_sar_e evaluate_all pu_learn_sar_em classification_attributes propensity_model_path experiment_results_path experiment_info_path open list read_data ramaswamy propensity_attributes propensity_scores_path experiment_propensity_model_path classification_model_type choice mean predict_proba pu_learn_neg experiment_classifier_path load pu_learn_scar_c time parse_settings NoFeaturesModel experiment_method_result_folder_path print bitarray data_path tice randint classlabels_path makedirs join iglob experiment_method_result_folder_path rmtree next copytree experiment_method_result_path_nolabel split split prp_tpfptnfn mean_squared_error f1_score_tpfptnfn astype precision_tpfptnfn rec2_tpfptnfn mean_absolute_error average_precision_score mean accuracy_tpfntnfn log_loss tpfptnfn abs recall_tpfptnfn roc_auc_score prp_tpfptnfn mean_squared_error f1_score_tpfptnfn precision_tpfptnfn rec2_tpfptnfn mean_absolute_error mean accuracy_tpfntnfn tpfptnfn abs recall_tpfptnfn evaluate_classification evaluate_propensity_scores iterrows T format print from_csv experiment_results_path to_csv read_csv append experiment_info_path DataFrame parse_labeling_model list sorted loadtxt tuple map set append seed read_data labelings_data_path _save_propensity_model_and_labels parse_labeling_model makedirs tuple match group map seed propensity_labeling_path format print _calc_s propensity_scores propensity_scores_path savetxt propensity_model_path range fit time LimitedFeaturesModel astype LogisticRegressionPU fit ones_like time LimitedFeaturesModel astype LogisticRegressionPU fit ones_like time LimitedFeaturesModel astype LogisticRegressionPU fit LogisticRegressionPU slope abs max push initialize_simple append range loglikelihood_probs LimitedFeaturesModel concatenate astype predict_proba time NoFeaturesModel average zeros expectation_y fit size sum predict_proba fit asarray transpose matmul mean range print list map split int label_data bool print parse_propensity_attributes int bool print train_and_evaluate parse_propensity_attributes parse_labeling_model print summarize_results int print experiment_method_result_folder_path parse_propensity_attributes parse_labeling_model train_eval summarize outdir print_help label
This repository contains the code that was used in the paper ``Beyond the Selected Completely At Random Assumption for Learning from Positive and Unlabeled Data'' https://arxiv.org/abs/1809.03207 # Install Make virtual environment with python 3 and activate it: ```console $ virtualenv -p python3 env_sarpu $ source env_sarpu/bin/activate ``` Install required packages, the sar pu code and other local libraries. The KM library is downloaded from the original source and made into a python package, compatible with python 3. ```console (env_sarpu) $ pip install -r requirements.txt
682
MLBazaar/AutoBazaar
['automl']
['The Machine Learning Bazaar: Harnessing the ML Ecosystem for Effective System Development']
docs/conf.py autobazaar/pipeline.py autobazaar/utils.py autobazaar/__init__.py autobazaar/search.py setup.py autobazaar/__main__.py ABPipeline PipelineSearcher UnsupportedProblem StopSearch log_times restore_dots make_keras_picklable _walk make_dumpable ensure_dir remove_dots encode_score _run get_version _get_commit _insert_test_result _box_print _get_metric _list _get_dataset_paths ArgumentParser _format_exception _test_pipeline _search_pipeline _get_datasets _score_datasets _insert_test _load_targets _search _prepare_search _update_test main _score_predictions _score_dataset _get_parser _path_type transform fit_transform LabelEncoder makedirs int items defaultdict ndarray isinstance bool_ float tolist integer bool isoformat floating items isinstance dict transform Model _run _get_commit join join join PipelineSearcher D3MDS _get_dataset_paths join format print D3MDS _get_dataset_paths format set_index describe print _get_metric any _get_dataset_paths encode_score str format __name__ print format len utcnow insert_one update_one insert_one utcnow copy test_id _insert_test_result _box_print utcnow db _test_pipeline _search_pipeline checkpoints splits template _insert_test input append budget update format copy tuner_type _update_test test_id collect _score_predictions output rmtree problem checkpoints timeout print _get_datasets exit get_db strftime make_keras_picklable db iterrows to_csv _score_dataset copy report append reindex DataFrame read_csv merge to_string format print _score_datasets _prepare_search reindex values test_id get_stats all print exit datasets getattr input reindex empty to_string format set_index print _get_datasets to_csv report reindex add_argument add_parser ArgumentParser set_defaults add_subparsers enable exit print_help verbose _get_parser logging_setup parse_args logfile
<p align="left"> <img width=15% src="https://dai.lids.mit.edu/wp-content/uploads/2018/06/Logo_DAI_highres.png" alt=“AutoBazaar” /> <i>An open source project from Data to AI Lab at MIT.</i> </p> [![Development Status](https://img.shields.io/badge/Development%20Status-2%20--%20Pre--Alpha-yellow)](https://pypi.org/search/?c=Development+Status+%3A%3A+2+-+Pre-Alpha) [![PyPi](https://img.shields.io/pypi/v/autobazaar.svg)](https://pypi.python.org/pypi/autobazaar) [![Tests](https://github.com/MLBazaar/AutoBazaar/workflows/Run%20Tests/badge.svg)](https://github.com/MLBazaar/AutoBazaar/actions?query=workflow%3A%22Run+Tests%22+branch%3Amaster) [![Downloads](https://pepy.tech/badge/autobazaar)](https://pepy.tech/project/autobazaar) # AutoBazaar * License: [MIT](https://github.com/MLBazaar/AutoBazaar/blob/master/LICENSE)
683
MLBazaar/BTB
['automl']
['The Machine Learning Bazaar: Harnessing the ML Ecosystem for Effective System Development']
tests/selection/test_selector.py tests/selection/test_uniform.py btb/selection/custom_selector.py btb/tuning/__init__.py tests/selection/test_custom_selector.py tests/selection/test_recent.py tests/integration/test_tuning.py benchmark/btb_benchmark/tuning_functions/hyperopt.py btb/tuning/hyperparams/base.py btb/tuning/tuners/base.py tests/tuning/acquisition/test_expected_improvement.py btb/tuning/hyperparams/categorical.py btb/tuning/tuners/__init__.py benchmark/btb_benchmark/kubernetes.py benchmark/btb_benchmark/challenges/randomforest.py benchmark/btb_benchmark/__init__.py btb/selection/selector.py tests/tuning/metamodels/test_gaussian_process.py btb/tuning/metamodels/base.py benchmark/btb_benchmark/tuning_functions/__init__.py tests/tuning/hyperparams/test_boolean.py btb/tuning/tuners/gaussian_process.py tests/selection/test_best.py docs/conf.py benchmark/btb_benchmark/challenges/mlchallenge.py btb/tuning/acquisition/predicted_score.py benchmark/btb_benchmark/challenges/bohachevsky.py tests/selection/test_pure.py btb/selection/__init__.py benchmark/btb_benchmark/challenges/__init__.py benchmark/btb_benchmark/tuning_functions/smac.py tests/tuning/acquisition/test_predicted_score.py btb/__init__.py tests/tuning/hyperparams/test_numerical.py btb/tuning/acquisition/__init__.py benchmark/btb_benchmark/results.py benchmark/btb_benchmark/challenges/xgboost.py benchmark/btb_benchmark/challenges/datasets.py benchmark/btb_benchmark/challenges/branin.py btb/selection/pure.py btb/tuning/hyperparams/numerical.py btb/tuning/metamodels/__init__.py tests/tuning/hyperparams/test_base.py benchmark/setup.py benchmark/btb_benchmark/__main__.py btb/selection/ucb1.py tests/integration/test_session.py tests/selection/test_hierarchical.py btb/tuning/hyperparams/boolean.py btb/selection/uniform.py tests/test_session.py benchmark/btb_benchmark/main.py btb/selection/hierarchical.py btb/session.py tests/tuning/tuners/test_uniform.py benchmark/btb_benchmark/challenges/sgd.py btb/tuning/acquisition/expected_improvement.py tests/tuning/tuners/test_base.py tests/tuning/metamodels/test_base.py btb/selection/best.py benchmark/btb_benchmark/challenges/challenge.py btb/selection/recent.py tests/tuning/hyperparams/test_categorical.py benchmark/btb_benchmark/tuning_functions/ax.py btb/tuning/hyperparams/__init__.py benchmark/btb_benchmark/tuning_functions/skopt.py btb/tuning/metamodels/gaussian_process.py btb/tuning/tuners/uniform.py setup.py benchmark/btb_benchmark/challenges/rosenbrock.py tests/tuning/test_tunable.py benchmark/btb_benchmark/tuning_functions/btb.py tests/selection/test_ucb1.py tests/tuning/tuners/test_gaussian_process.py btb/tuning/acquisition/base.py btb/tuning/tunable.py github_dependency _get_extra_setup _upload_to_s3 _df_to_csv_str run_dask_function _import_function _generate_cluster_spec main _get_parser run_on_kubernetes _evaluate_tuners_on_challenge get_math_challenge_instance run_benchmark _as_list _challenges_as_list _get_tuners_dict summarize_results benchmark _evaluate_tuner_on_challenge _get_challenges_list progress LogProgressBar _get_all_challenge_names get_z_scores write_results load_results get_exclusive_wins get_wins add_sheet get_summary main _run _summary _get_parser Bohachevsky Branin Challenge get_dataset_names MLChallenge RandomForestChallenge Rosenbrock SGDChallenge XGBoostChallenge convert_hyperparameters adapt_scoring_function ax_optimize gcptuner make_btb_tuning_function gpeituner uniformtuner gcpeituner _tuning_function gptuner _search_space_from_dict _make_minimize_function _hyperopt_tuning_function hyperopt_tpe skopt_gp_hedge skopt_PI skopt_EI _make_minimize_function _skopt_tuning_function skopt_LCB _dimension_space_from_dict smac_smac4hpo_ei smac_smac4hpo_pi smac_smac4hpo_lcb _adapt_scoring_function _get_optimizer_params smac_hb4ac _smac_tuning_function _parse_params _create_config_space get_all_tuning_functions BTBSession BestKReward BestKVelocity CustomSelector HierarchicalByAlgorithm PureBestKVelocity RecentKVelocity RecentKReward Selector UCB1 Uniform Tunable BaseAcquisition ExpectedImprovementAcquisition PredictedScoreAcquisition BaseHyperParam BooleanHyperParam CategoricalHyperParam IntHyperParam FloatHyperParam NumericalHyperParam BaseMetaModel GaussianProcessMetaModel GaussianCopulaProcessMetaModel BaseTuner StopTuning BaseMetaModelTuner GPTuner GCPEiTuner GPEiTuner GCPTuner UniformTuner TestBTBSession BTBSessionTest test_tuning_minimize test_tuning TestBestKVelocity TestBestKReward TestCustomSelector TestHierarchicalByAlgorithm TestPureBestKVelocity TestRecentKVelocity TestRecentKReward TestSelector TestUCB1 TestUniform TestTunable assert_called_with_np_array TestExpectedImprovementAcquisition assert_called_with_np_array TestPredictedScoreAcquisition TestBaseHyperParam TestBooleanHyperParam assert_called_with_np_array TestCategoricalHyperParam TestIntHyperParam TestFloatHyperParam TestBaseMetaModel TestGaussianCopulaProcessMetaModel TestGaussianProcessMetaModel TestBaseMetaModelTuner TestBaseTuner TestGaussianProcessTuner TestGaussianCopulaProcessTuner TestGaussianCopulaProcessExpectedImprovementTuner TestGaussianProcessExpectedImprovementTuner TestUniformTuner join import_module split get join format append get _get_extra_setup join format dumps sub put_object client get from_dict isinstance adapt makedirs _upload_to_s3 to_csv Client get_versions dirname scale _import_function _generate_cluster_spec run CoreV1Api print create_namespaced_pod load_kube_config Configuration _generate_cluster_spec set_default add_argument ArgumentParser basicConfig print exit namespace create_pod verbose print_help run_dask_function _get_parser parse_args tabulate run_on_kubernetes tuner hasattr evaluate utcnow info get_tunable_hyperparameters append items _evaluate_tuner_on_challenge info getLogger LogProgressBar futures_of compute _evaluate_tuners_on_challenge from_records persist extend rename progress pivot get make_btb_tuning_function get_all_tuning_functions _as_list info callable any sample append challenge_class isinstance to_csv _get_tuners_dict benchmark info _get_challenges_list write_results load_results dict round replace sum mean std DataFrame items summary_function sort_values items columns reset_index set_column write to_excel append max enumerate len columns add_format ExcelWriter add_sheet get_summary save basicConfig tabulate detailed_output print ERROR CRITICAL run_benchmark output_path challenge_types iterations verbose challenges sample setLevel max_rows tuners input summarize_results output add_parser set_defaults add_subparsers filterwarnings action int items min append float max convert_hyperparameters adapt_scoring_function from_dict record tuner_class scoring_function propose max range items uniformint min choice uniform max _search_space_from_dict _make_minimize_function fmin Trials items list Real min Integer Categorical append max _make_minimize_function _dimension_space_from_dict gp_minimize get items bool CategoricalHyperparameter min ConfigurationSpace UniformFloatHyperparameter add_hyperparameter max UniformIntegerHyperparameter dict items update _create_config_space Scenario _adapt_scoring_function object inf Tunable record GPTuner random propose range Tunable record GPTuner random propose range assert_array_equal zip
<p align="left"> <img width="15%" src="https://dai.lids.mit.edu/wp-content/uploads/2018/06/Logo_DAI_highres.png" alt="BTB" /> <i>An open source project from Data to AI Lab at MIT.</i> </p> ![](https://raw.githubusercontent.com/MLBazaar/BTB/master/docs/images/BTB-Icon-small.png) A simple, extensible backend for developing auto-tuning systems. [![Development Status](https://img.shields.io/badge/Development%20Status-2%20--%20Pre--Alpha-yellow)](https://pypi.org/search/?c=Development+Status+%3A%3A+2+-+Pre-Alpha) [![PyPi Shield](https://img.shields.io/pypi/v/baytune.svg)](https://pypi.python.org/pypi/baytune) [![Travis CI Shield](https://travis-ci.com/MLBazaar/BTB.svg?branch=master)](https://travis-ci.com/MLBazaar/BTB) [![Coverage Status](https://codecov.io/gh/MLBazaar/BTB/branch/master/graph/badge.svg)](https://codecov.io/gh/MLBazaar/BTB)
684
MLBazaar/MLBlocks
['automl']
['The Machine Learning Bazaar: Harnessing the ML Ecosystem for Effective System Development']
docs/conf.py mlblocks/mlblock.py tests/features/test_fit_predicr_args.py tests/test_mlblock.py mlblocks/mlpipeline.py mlblocks/__init__.py mlblocks/discovery.py setup.py tests/features/test_pipeline_loading.py tests/test_mlpipeline.py tests/features/test_partial_outputs.py tests/test_discovery.py _load_json _find_annotations _search_annotations _load _load_entry_points find_pipelines add_primitives_path find_primitives get_primitives_paths get_pipelines_paths load_primitive _add_lookup_path load_pipeline _match add_pipelines_path MLBlock import_object MLPipeline test__load_primitive_success test__add_lookup_path_do_nothing test__load_primitive_value_error test__load_json_path test_add_pipelines_path test__match_no_match test_add_primitives_path test__find_annotations test__match_list test_find_primitives test__add_lookup_path test__load_entry_points_entry_points test__load_pipeline_value_error test__search_annotations test__load_success test__match_sublevel test_get_pipelines_paths test__match_multiple_keys test_get_primitives_paths test_find_pipelines test__match_dict test__add_lookup_path_exception test__load_entry_points_no_entry_points test__load_pipeline_success test__load_value_error test__match_root test__match_list_no_match dummy_function TestImportObject TestMLBlock DummyClass TestMLPipline get_mlblock_mock test_fit_predict_args_in_init TestPartialOutputs almost_equal TestMLPipeline insert abspath _add_lookup_path debug _add_lookup_path debug load iter_entry_points list isinstance extend append _load_entry_points join isfile split range len _load get_primitives_paths _load get_pipelines_paths update join isdir dict abspath listdir exists compile isinstance split update items list sorted _search_annotations dict loader values rsplit import_module isinstance _add_lookup_path uuid4 str _add_lookup_path abspath abspath add_primitives_path abspath add_pipelines_path _load_entry_points _load_entry_points EntryPoint get_primitives_paths assert_called_once_with get_pipelines_paths _load assert_called_once_with assert_called_once_with load_primitive assert_called_once_with assert_called_once_with load_pipeline _search_annotations join abspath _match _match _match _match _match _match _match assert_called_once_with Mock _find_annotations return_value find_primitives dict load_primitive assert_called_once_with assert_called_once_with find_pipelines load_pipeline return_value predict MLPipeline items assert_almost_equal isinstance
<p align="left"> <a href="https://dai.lids.mit.edu"> <img width=15% src="https://dai.lids.mit.edu/wp-content/uploads/2018/06/Logo_DAI_highres.png" alt="DAI-Lab" /> </a> <i>An Open Source Project from the <a href="https://dai.lids.mit.edu">Data to AI Lab, at MIT</a></i> </p> <p align="left"> <img width=20% src="https://dai.lids.mit.edu/wp-content/uploads/2018/06/mlblocks-icon.png" alt=“MLBlocks” /> </p> <p align="left">
685
MLRG-CEFET-RJ/stconvs2s
['weather forecasting']
['STConvS2S: Spatiotemporal Convolutional Sequence to Sequence Network for Weather Forecasting']
model/ablation/spatial_block.py model/temporal_block.py tool/train_evaluate.py model/baselines/conv2plus1d.py model/ablation/__init__.py model/baselines/conv3d.py model/ablation/temporal_block.py model/baselines/predrnn.py model/generator_block.py model/baselines/__init__.py tool/dataset.py model/baselines/convlstm.py model/baselines/mim.py model/spatial_block.py model/ablation/stconvs2s.py arima.py main.py notebooks/settings.py tool/loss.py model/stconvs2s.py ml_builder.py model/baselines/encoder-decoder3d.py tool/utils.py run_arima get_dataset_file create_test_sequence rmse get_arguments log_mean_std get_arguments run MLBuilder TemporalGeneratorBlock SpatialBlock Model STConvS2S_C STConvS2S_R RNet TemporalCausalBlock TemporalReversedBlock SpatialBlock SpatialBlock_NoChannelIncrease AblationSTConvS2S_R_NotFactorized ModelInverted RNetNotFactorized AblationSTConvS2S_R_NoChannelIncrease Conv3DCausalBlock AblationSTConvS2S_NoTemporal AblationSTConvS2S_C_Inverted AblationSTConvS2S_NoCausalConstraint AblationSTConvS2S_R_Inverted AblationSTConvS2S_C_NoChannelIncrease Model AblationSTConvS2S_C_NotFactorized TemporalReversedBlock_NoChannelIncrease TemporalBlock TemporalReversedBlock TemporalCausalBlock_NoChannelIncrease TemporalCausalBlock RNet Conv2Plus1D Conv2Plus1Block Conv3D Conv3DBlock ConvLSTMCell STConvLSTM ConvLSTM UpsampleBlock Endocer_Decoder3D DownsampleBlock MIM MIMS MIMBlock SpatioTemporalLSTMCell PredRNN SpatioTemporalLSTMCell get_param_value Splitter NetCDFDataset RMSELoss EarlyStopping Evaluator Trainer Util add_argument ArgumentParser append range len flush print fit predict create_test_sequence any SARIMAX unique zip append values len print to_readable_time append range log_mean_std run_model type_operation print
# STConvS2S: Spatiotemporal Convolutional Sequence to Sequence Network for weather forecasting > *UPDATE: new code released with changes in our architecture. Please see the [release notes](https://github.com/MLRG-CEFET-RJ/stconvs2s/releases) for details (Nov/2020)* This repository has the open source implementation of a new architecture termed STConvS2S. To sum up, our approach (STConvS2S) uses only 3D convolutional neural network (CNN) to tackle the sequence-to-sequence task using spatiotemporal data. We compare our results with state-of-the-art architectures. Details in the [article published in Neurocomputing, Elsevier](https://doi.org/10.1016/j.neucom.2020.09.060) ([arXiv](https://arxiv.org/abs/1912.00134) versions). ![STConvS2S architecture](/image/stconvs2s.png) ## Requirements Mainly, our code uses Python 3.6 and PyTorch 1.0. See [config/environment.yml](https://github.com/MLRG-CEFET-RJ/stconvs2s/blob/master/config/environment.yml) for other requirements. To install packages with the same version as we executed our experiments, run the code below: ``` cd config ./create-env.sh
686
MLStruckmann/mutation-misery
['smac']
['On the Performance of Differential Evolution for Hyperparameter Tuning']
evolution/write_results.py evolution/reproduction.py evolution/model_nn.py evolution/data_prep.py evolution/selection.py evolution/main.py evolution/population.py evolution/config.py data_prep main get_result generate_population train_population mating evolve_generation log_write LabelBinarizer load_iris transform train_test_split StandardScaler fit_transform data n_population_start print generate_population selection_parameter evolve_generation train_population evolution_steps model_parameter_space range format print predict_classes EarlyStopping Sequential add Dense accuracy_score compile fit print format range append format print append enumerate get_result len format print choice sample append range len str log_write format mating print extend sample round max range len savetxt
# Mutation Misery Hyperparameter selection for machine learning models remains one of the most critical parts in data science projects. It is a widely researched field in science that still has lots of potential for improvement. Among classical methods like grid search, random search and Bayesian optimization other algorithms have been tested to improve results and yield higher efficiencies. One of them is the hyperparameter optimization based on evolutionary algorithms which has already proved to be more successful than e.g. Bayesian optimization in some cases [1]. It is based on Darwins’ evolution theory and comprises the reproduction via cross selection and the survival of fittest individuals in a population.
687
MOhammedJAbi/Imsat
['unsupervised image classification', 'data augmentation']
['Learning Discrete Representations via Information Maximizing Self-Augmented Training']
calculate_dist.py Deep_RIM.py Imsat.py Compute_entropy entropy Net bestMap kl Compute_entropy entropy MyDataset enc_aux_noubs loss_unlabeled upload_nearest_dist Net distance kl compute_accuracy vat sum softmax net len print __len__ unique zeros max range view randn Variable backward grad requires_grad_ distance prop_eps normalize to network range vat astype float32 compute Munkres logical_and append zeros float sum range len
Overview Pytorch code to reproduce the results of the clustring algorithms: Information Maximizing Self-Augmented Training with Virtual Adversarial Training (IMSAT-Vat) and Deep Regularized Information Maximization (Deep_RIM) proposed in [1]. The adoped data set is MNIST. The implementation in [1] is based on Chainer. [1] Weihua Hu, Takeru Miyato, Seiya Tokui, Eiichi Matsumoto and Masashi Sugiyama. Learning Discrete Representations via Information Maximizing Self-Augmented Training. In ICML, 2017. Available at http://arxiv.org/abs/1702.08720 Dependencies Package version used: python 3.6.6 torch 0.4.1 Train model: To run Deep_RIM $ python Deep_RIM.py
688
MQSchleich/SatelliteGAN
['image stylization']
['Copy the Old or Paint Anew? An Adversarial Framework for (non-) Parametric Image Stylization']
spatial_gan/convert_pickle.py spatial_gan/data_io.py spatial_gan/sgan.py spatial_gan/config.py spatial_gan/tools.py spatial_gan/demo_generation.py Config zx_to_npx convert get_texture_iter image_to_tensor save_tensor tensor_to_image mosaic_tile sample_texture SGAN sharedX create_dir TimePrint get_texture_iter expanduser zx_to_npx len load transpose transpose transpose len randint zeros listdir range open fromarray save tensor_to_image gen_depth print save_tensor shape uniform offsetLoss generate zeros range save_tensor uniform replace generate makedirs
# SatelliteGAN Ported the Zalando GAN for Python 3 - https://github.com/zalandoresearch/spatial_gan # Paper "Copy the Old or Paint Anew? An Adversarial Framework for (non-) Parametric Image Stylization" available at http://arxiv.org/abs/1811.09236.
689
MSergeyV/Adaptive-dropout-with-Rademacher-complexity
['sparse learning']
['Variational Dropout Sparsifies Deep Neural Networks']
Models.py utils.py iterate_minibatches Radamacher_Regularization_p_inf_q_1 VariationalDropout ComplexModel compute_loss Flatten load_mnist download_cifar load_cifar10 unpickle permutation arange range len net probs isinstance clamp sqrt shape modules abs max log Linear join urlretrieve extractall mkdir open join list print astype map download_cifar train_test_split unpickle seed load int format permutation print system append imread listdir array
# ADAPTIVE DROPOUT WITH RADEMACHER COMPLEXITY REGULARIZATION This is the project for BMML (Bayesian Methods in Machine Learning) course in Skoltech In this project we will analyze Adaptive dropout with Radamacher complexity regularization. As for the main article we use https://openreview.net/pdf?id=S1uxsye0Z. Authors propose a novel framework to adaptively adjust the dropout rates for the deep neural network based on a Rademacher complexity bound. Our plan is the following: 0) Understand the model 1) Reproduce experiments on Mnist dataset 2) Reproduce experiments on Cifar dataset 3) Compare results with the the approach, duscussed in the article Variational Dropout Sparsifies Deep Neural Networks (https://arxiv.org/pdf/1701.05369.pdf ) Our team: Makarychev Sergey, Rozhnov Alexander.
690
MSusik/Inhibited-softmax
['sentiment analysis', 'out of distribution detection']
['Inhibited Softmax for Uncertainty Estimation in Neural Networks']
models_code/sentiment.py models_code/vae.py utilities/topk.py utilities/metric.py utilities/text_preprocessing.py models_code/utilities.py models_code/cifar.py models_code/bayesbybackprop.py models_code/experiments.py models_code/mnist.py test_bbp size_aware_mean BBPMovie gaussian scale_mixture_prior combined_loss BBPCifar log_gaussian train_bbp MLPBBPLayer BBPMnist Cifar ISCifar load_data load_svhn test_eval_variational softmax2d correlation_test_error_uncertainty load_omniglot correlation_test_error_uncertainty_variational random_generator not_mnist_predictions non_distribution softmax2d_ensemble load_cifar_bw sigmoid softmax prediction_variational load_lfw test_eval load_notmnist not_mnist_prediction_variational MCMnist MinOfTwo ISMnist Mnist test perform_training load_data train Activation Movie perform_training_sentiment train_sentiment test_sentiment ISMovie generator_out_of_matrix dump_results Results create_model load_model show_decoded_latent_space train_autoencoder plot_latent_space VAE show_decoder_quality create_latent_space_results_is show_encoded_decoded_images loss_function test_autoencoder create_latent_space_results_mc predictive_entropy entropy expected_entropy mutual_information fill_embedded_matrix preprocess_sentiment_df get_occurences get_indices_from_text embed_reviews preprocess_other_dataset top_k_accuracy_score sqrt exp pi gaussian sum W_rho_s scale_mixture_prior b_rho_s W_mu log_likelihood_function b_mu log_gaussian b size_aware_mean W format view model Variable backward print dataset zero_grad combined_loss item train step cuda enumerate len argmax format view model Variable print concatenate eval append accuracy_score numpy cuda enumerate DataLoader CIFAR10 DataLoader SVHN exp max exp print reshape shape any exp print reshape shape any predictive_entropy roc_curve average_precision_score precision_recall_curve argmax roc_auc_score predictive_entropy roc_curve average_precision_score mean precision_recall_curve argmax roc_auc_score DataLoader ImageFolder DataLoader ImageFolder DataLoader CIFAR10 Compose DataLoader ImageFolder manual_seed Softmax view Variable eval stack softmax append model_ numpy cuda enumerate Softmax view model Variable eval stack softmax append numpy cuda range enumerate Softmax view model Variable eval stack softmax append numpy cuda range enumerate concatenate roc_curve average_precision_score precision_recall_curve zeros roc_auc_score view model Variable eval numpy append argmax cuda enumerate softmax2d view model Variable eval stack append numpy cuda range enumerate format view model Variable backward print dataset zero_grad loss_function item step cuda enumerate len argmax format Softmax view model Variable print concatenate eval append accuracy_score numpy cuda enumerate test save train range state_dict MNIST arange shuffle format view model Variable backward print zero_grad loss_function item generator_out_of_matrix train step cuda enumerate len argmax format Softmax view model Variable print concatenate eval append generator_out_of_matrix accuracy_score numpy cuda enumerate train_sentiment test_sentiment save range state_dict parameters cuda optimizer class_ load cuda load_state_dict class_ Results dump open add_ mul_ view binary_cross_entropy format view model Variable backward print dataset zero_grad loss_function item train step cuda enumerate len format model Variable print eval cuda enumerate show add_subplot axis gray imshow title figure zip ceil float enumerate len model Variable reshape show_encoded_decoded_images zeros cuda arange expected_entropy view Variable predictive_entropy tqdm mutual_information stack meshgrid zeros numpy cuda range append arange view Variable tqdm eval meshgrid numpy cuda range append LogNorm flatten title scatter set_visible figure savefig range values arange concatenate reshape add_subplot axis tqdm imshow savefig figure meshgrid numpy range predictive_entropy expected_entropy remove_stopwords lower sub zeros split enumerate load_glove_text apply iterrows print name zeros split dump format get_indices_from_text print cleared_text tqdm save split open zeros len load get_indices_from_text save zeros open argsort shape argmax range
MSusik/Inhibited-softmax
691
MVIG-SJTU/AlphAction
['action detection']
['Asynchronous Interaction Aggregation for Action Detection']
alphaction/dataset/datasets/evaluation/ava/pascal_evaluation/label_map_util.py detector/tracker/utils/datasets.py alphaction/dataset/datasets/evaluation/ava/pascal_evaluation/np_box_list_ops.py alphaction/dataset/datasets/evaluation/ava/pascal_evaluation/np_box_mask_list.py alphaction/utils/logger.py detector/tracker/tracker/matching.py alphaction/structures/memory_pool.py alphaction/dataset/transforms/video_transforms.py alphaction/structures/bounding_box.py alphaction/layers/roi_pool_3d.py alphaction/dataset/samplers/iteration_based_batch_sampler.py detector/yolo/util.py detector/yolo/cam_demo.py detector/tracker/utils/parse_config.py detector/yolo/video_demo_half.py detector/apis.py detector/tracker/tracker/multitracker.py alphaction/layers/softmax_focal_loss.py alphaction/dataset/transforms/build.py alphaction/modeling/nonlocal_block.py detector/yolo/darknet.py alphaction/dataset/datasets/__init__.py alphaction/dataset/datasets/evaluation/ava/ava_eval.py alphaction/solver/lr_scheduler.py alphaction/solver/build.py alphaction/config/paths_catalog.py setup.py alphaction/dataset/datasets/evaluation/ava/pascal_evaluation/np_box_list.py alphaction/dataset/datasets/ava.py detector/tracker/utils/log.py detector/yolo/bbox.py alphaction/dataset/datasets/evaluation/ava/pascal_evaluation/np_box_mask_list_ops.py alphaction/dataset/transforms/__init__.py alphaction/utils/random_seed.py alphaction/dataset/datasets/evaluation/ava/pascal_evaluation/standard_fields.py alphaction/modeling/poolers.py detector/tracker/utils/io.py detector/yolo/video_demo.py alphaction/layers/batch_norm.py tools/ava/csv2COCO.py alphaction/engine/inference.py detector/yolo/detect.py detector/yolo_cfg.py alphaction/utils/model_serialization.py alphaction/modeling/backbone/backbone.py alphaction/modeling/roi_heads/action_head/inference.py detector/nms/nms_wrapper.py alphaction/modeling/roi_heads/action_head/roi_action_predictors.py alphaction/dataset/datasets/concat_dataset.py demo/demo.py detector/tracker/preprocess.py detector/tracker/utils/evaluation.py alphaction/dataset/datasets/evaluation/ava/pascal_evaluation/np_mask_ops.py alphaction/dataset/transforms/object_transforms.py alphaction/utils/comm.py alphaction/dataset/collate_batch.py alphaction/config/__init__.py alphaction/modeling/detector/action_detector.py detector/tracker/utils/utils.py alphaction/dataset/samplers/distributed.py demo/action_predictor.py alphaction/modeling/roi_heads/action_head/IA_structure.py alphaction/modeling/backbone/i3d.py detector/tracker/utils/nms.py alphaction/utils/video_decode.py alphaction/modeling/detector/__init__.py alphaction/modeling/roi_heads/roi_heads_3d.py demo/visualizer.py alphaction/modeling/registry.py alphaction/modeling/roi_heads/action_head/metric.py detector/yolo_api.py detector/tracker/utils/visualization.py tools/ava/process_ava_videos.py detector/yolo/preprocess.py alphaction/modeling/roi_heads/action_head/loss.py alphaction/modeling/backbone/slowfast.py alphaction/modeling/utils.py alphaction/modeling/common_blocks.py alphaction/utils/checkpoint.py alphaction/dataset/datasets/evaluation/ava/pascal_evaluation/object_detection_evaluation.py alphaction/dataset/datasets/evaluation/ava/pascal_evaluation/metrics.py detector/tracker_cfg.py alphaction/utils/metric_logger.py alphaction/dataset/datasets/evaluation/ava/pascal_evaluation/per_image_evaluation.py alphaction/layers/roi_align_3d.py alphaction/utils/registry.py alphaction/dataset/build.py alphaction/dataset/samplers/__init__.py test_net.py detector/tracker/utils/timer.py demo/video_detection_loader.py detector/tracker/utils/kalman_filter.py alphaction/dataset/datasets/evaluation/__init__.py alphaction/layers/__init__.py alphaction/engine/trainer.py alphaction/layers/sigmoid_focal_loss.py alphaction/utils/IA_helper.py detector/tracker/models.py detector/tracker/tracker/basetrack.py alphaction/dataset/__init__.py alphaction/modeling/backbone/__init__.py detector/nms/__init__.py alphaction/dataset/datasets/evaluation/ava/pascal_evaluation/np_box_ops.py alphaction/modeling/roi_heads/action_head/action_head.py alphaction/config/defaults.py alphaction/modeling/roi_heads/action_head/roi_action_feature_extractor.py detector/tracker_api.py alphaction/dataset/datasets/evaluation/ava/__init__.py alphaction/utils/c2_model_loading.py alphaction/dataset/samplers/grouped_batch_sampler.py train_net.py alphaction/solver/__init__.py make_cuda_ext get_extensions make_cython_ext main main train run_test DatasetCatalog make_data_sampler _quantize make_data_loader make_batch_data_sampler build_dataset _compute_aspect_ratios BatchCollator batch_different_videos NpInfoDict AVAVideoDataset NpBoxDict ConcatDataset evaluate do_ava_evaluation write_csv print_time prepare_for_ava_detection read_exclusions evaluate_predictions_on_ava make_image_key decode_image_key read_labelmap read_csv ava_evaluation create_category_index_from_labelmap create_category_index create_class_agnostic_category_index get_max_label_map_index _validate_label_map get_label_map_dict convert_label_map_to_categories load_labelmap compute_average_precision compute_cor_loc compute_precision_recall BoxList multi_class_non_max_suppression sort_by_field iou clip_to_window _update_valid_indices_by_removing_high_iou_boxes concatenate filter_scores_greater_than _copy_extra_fields area SortOrder ioa change_coordinate_frame prune_non_overlapping_boxes prune_outside_window scale intersection gather non_max_suppression BoxMaskList multi_class_non_max_suppression sort_by_field iou concatenate filter_scores_greater_than area ioa box_list_to_box_mask_list intersection gather prune_non_overlapping_masks non_max_suppression iou area ioa intersection iou area ioa intersection OpenImagesDetectionEvaluator WeightedPascalDetectionEvaluator DetectionEvaluator ObjectDetectionEvaluator ObjectDetectionEvaluation WeightedPascalInstanceSegmentationEvaluator PascalInstanceSegmentationEvaluator PascalDetectionEvaluator PerImageEvaluation DetectionResultFields BoxListFields InputDataFields TfExampleFields DistributedSampler GroupedBatchSampler IterationBasedBatchSampler build_transforms build_object_transforms PickTop Resize Compose RandomHorizontalFlip SlowFastCrop Identity Compose ToTensor Resize TemporalCrop RandomHorizontalFlip Normalize ColorJitter compute_on_dataset_1stage _accumulate_predictions_from_multiple_gpus compute_on_dataset_2stage inference compute_on_dataset val_in_train do_train FrozenBatchNorm3d _FrozenBatchNorm FrozenBatchNorm2d FrozenBatchNorm1d ROIAlign3d _ROIAlign3d _ROIPool3d ROIPool3d SigmoidFocalLoss sigmoid_focal_loss _SigmoidFocalLoss SoftmaxFocalLoss _SoftmaxFocalLoss softmax_focal_loss Conv3dBN ResBlock Bottleneck ResNLBlock NLBlock Pooler3d make_3d_pooler pad_sequence prepare_pooled_feature cat build_i3d_resnet_backbone build_backbone build_slowfast_resnet_backbone I3D get_model_cfg FastPath SlowPath get_slow_model_cfg SlowFast LateralBlock get_fast_model_cfg ActionDetector build_detection_model Combined3dROIHeads build_3d_roi_heads build_roi_action_head ROIActionHead InteractionBlock separate_batch_per_person ParallelIAStructure unfuse_batch_num make_ia_structure fuse_batch_num DenseSerialIAStructure IAStructure init_layer separate_roi_per_person SerialIAStructure PostProcessor make_roi_action_post_processor make_roi_action_loss_evaluator ActionLossComputation ActionAccuracyComputation make_roi_action_accuracy_evaluator MLPFeatureExtractor make_roi_action_feature_extractor make_roi_action_predictor FCPredictor make_optimizer make_lr_scheduler WarmupMultiStepLR HalfPeriodCosStepLR BoxList MemoryPool load_c2_format _load_c2_pickled_weights _rename_weights ActionCheckpointer Checkpointer synchronize get_world_size reduce_dict _get_global_gloo_group all_reduce all_gather get_rank gather _serialize_to_tensor is_main_process _pad_to_largest_tensor has_memory has_person has_object _block_set setup_tblogger setup_logger SmoothedValue MetricLogger strip_prefix_if_present load_state_dict align_and_update_state_dicts set_seed _register_generic Registry av_decode_video AVAPredictorWorker convert_boxlist AVAPredictor main Resize VideoDetectionLoader AVAVisualizer cv2_video_info BaseDetector get_detector Tracker YOLODetector nms soft_nms YOLOLayer create_grids load_darknet_weights Darknet create_modules save_weights EmptyLayer Upsample prep_frame prep_image letterbox_image BaseTrack TrackState merge_matches linear_assignment gate_cost_matrix iou_distance embedding_distance ious _indices_to_matches STrack joint_stracks sub_stracks remove_duplicate_stracks JDETracker LoadVideo letterbox JointDataset LoadImages collate_fn random_affine LoadImagesAndLabels Evaluator unzip_objs write_results read_mot_results read_results KalmanFilter get_logger parse_model_cfg parse_data_cfg Timer compute_ap scale_coords plot_results plot_one_box xywh2xyxy float3 init_seeds ap_per_class build_targets_max strip_optimizer_from_checkpoint model_info load_classes soft_nms non_max_suppression decode_delta return_torch_unique_index decode_delta_map pooling_nms encode_delta build_targets_thres xyxy2xywh mkdir_if_missing weights_init_normal bbox_iou generate_anchor plot_tracking plot_trajectory tlwhs_to_tlbrs get_color resize_image plot_detections confidence_filter_cls pred_corner_coord sanity_fix write bbox_iou confidence_filter get_abs_coord arg_parse prep_image get_test_input write get_test_input MaxPoolStride1 parse_cfg Darknet create_modules EmptyLayer Upsample ReOrgLayer DetectionLayer test_net prep_image letterbox_image prep_frame inp_to_image prep_image_pil get_im_dim write_results dynamic_write_results write_results_half count_parameters convert2cpu load_classes predict_transform unique count_learnable_parameters predict_transform_half arg_parse prep_image get_test_input write arg_parse prep_image get_test_input write csv2COCOJson main genCOCOJson main multiprocess_wrapper slice_movie_yuv cythonize Extension format glob join dirname abspath ArgumentParser make_data_loader opts OUTPUT_DIR ActionCheckpointer IA_STRUCTURE set_device get_pretty_env_info get_rank freeze parse_args to inference TEST merge_from_file format build_detection_model init_process_group synchronize config_file setup_logger WEIGHT merge_from_list info zip has_memory enumerate load join add_argument makedirs local_rank len CHECKPOINT_PERIOD DistributedDataParallel do_train make_data_loader device OUTPUT_DIR make_optimizer ActionCheckpointer IA_STRUCTURE EVAL_PERIOD to TEST update build_detection_model WEIGHT has_memory MemoryPool load make_lr_scheduler join zip synchronize makedirs inference make_data_loader empty_cache OUTPUT_DIR module TEST enumerate len seed skip_val set_seed close distributed no_head tfboard setup_tblogger run_test transfer_weight adjust_lr train get IA_STRUCTURE ConcatDataset ACTION_THRESH getattr FRAME_NUM factory has_object append BOX_THRESH FRAME_SAMPLE_RATE SequentialSampler RandomSampler list sorted map copy get_video_info append float range len BatchSampler IterationBasedBatchSampler GroupedBatchSampler _quantize _compute_aspect_ratios format build_object_transforms IA_STRUCTURE make_data_sampler MAX_ITER get_world_size NUM_WORKERS BatchCollator DataLoader make_batch_data_sampler has_object SIZE_DIVISIBILITY build_transforms build_dataset VIDEOS_PER_BATCH DatasetCatalog append int list tuple copy_ zero_ zip ceil dict __name__ isinstance AVAVideoDataset prepare_for_ava_detection join pformat info action_thresh get_video_info convert where make_image_key resize numpy clip enumerate reader add set make_image_key open int set add startswith append open int time defaultdict reader print_time name make_image_key append float open time print_time time info time write_csv print_time PascalDetectionEvaluator read_labelmap read_exclusions evaluate add_single_ground_truth_image_info add_single_detected_image_info pformat info read_csv len info getLogger item name id display_name item info append range _validate_label_map item id load_labelmap max convert_label_map_to_categories load_labelmap argsort cumsum astype concatenate maximum sum range len get_coordinates add_field get_extra_fields size BoxList get_field get_field argsort get sort_by_field arange iou filter_scores_greater_than squeeze logical_and num_boxes append expand_dims full range get add_field sort_by_field zeros_like filter_scores_greater_than concatenate reshape BoxList num_boxes get_field range append non_max_suppression get add_field array_split get_extra_fields hstack BoxList get_field get array_split _copy_extra_fields hstack area astype BoxList fmax int32 fmin greater_equal ioa gather array amax get array_split reshape hstack where logical_not max add_field get_extra_fields BoxList shape vstack get_field astype int32 BoxList get _copy_extra_fields scale get_field get_extra_fields add_field max BoxMaskList get_extra_fields get_field append get_masks BoxMaskList greater_equal ioa gather array amax append minimum transpose maximum shape zeros split expand_dims area intersection expand_dims area intersection sum arange HUE_JITTER COLOR_JITTER VAL_JITTER ALPHA Identity MIN_SIZE_TEST Compose MIN_SIZE_TRAIN FRAME_NUM ColorJitter Normalize MAX_SIZE_TRAIN MAX_SIZE_TEST TO_BGR SAT_JITTER SLOW_JITTER TAU FRAME_SAMPLE_RATE Compose update tqdm dict device get_rank to device dataset str update_list all_gather get_rank to update format synchronize get_world_size timedelta info zip MemoryPool enumerate time tqdm dict len compute_on_dataset_2stage eval compute_on_dataset_1stage update list sorted getLogger warning gather keys str time format join getLogger synchronize get_world_size device _accumulate_predictions_from_multiple_gpus timedelta save info compute_on_dataset dataset len median getLogger model zero_grad save tensor str MetricLogger update_list all_gather to sum update add_field format val_in_train timedelta item info zip MemoryPool pop items time enumerate backward add_scalar clone reduce_dict global_avg train step len synchronize zip inference train module add_scalar float apply int float apply Pooler3d POOLER_RESOLUTION POOLER_SCALE POOLER_TYPE POOLER_SAMPLING_RATIO new_full size enumerate add_field detach BoxList zip append split SlowFast I3D int CONV_BODY format FRAME_NUM append range int CONV_BODY format FRAME_NUM TAU ALPHA CONV_BODY format int FRAME_NUM TAU append Combined3dROIHeads zip size cat device append zeros enumerate len size device append zeros enumerate len size size normal_ weight constant_ bias PostProcessor NUM_PERSON_MOVEMENT_CLASSES ActionLossComputation NUM_OBJECT_MANIPULATION_CLASSES NUM_PERSON_MOVEMENT_CLASSES NUM_PERSON_INTERACTION_CLASSES named_modules isinstance WEIGHT_DECAY_BIAS SGD add named_parameters set BASE_LR WEIGHT_DECAY_BN IA_LR_FACTOR BIAS_LR_FACTOR WEIGHT_DECAY SCHEDULER format getLogger OrderedDict from_numpy info max _load_c2_pickled_weights _rename_weights _get_global_gloo_group barrier get_world_size from_buffer dumps get_backend device to get_world_size all_gather tensor max zeros cat _serialize_to_tensor _get_global_gloo_group loads zip append max _pad_to_largest_tensor max zip _get_global_gloo_group loads get_rank _serialize_to_tensor _pad_to_largest_tensor get_world_size get_world_size list from_iterable I_BLOCK_LIST _block_set I_BLOCK_LIST _block_set I_BLOCK_LIST _block_set setFormatter join getLogger addHandler StreamHandler strftime localtime Formatter DEBUG setLevel FileHandler join SummaryWriter makedirs max list sorted format view getLogger tuple tolist shape info keys enumerate len OrderedDict items sorted keys strip_prefix_if_present align_and_update_state_dicts state_dict seed manual_seed Random add_field size BoxList get_field fields bbox mode duration input_path AVAVisualizer set_start_method device send send_track count AVAPredictorWorker progress_bar set_sharing_strategy terminate sleep webcam video_path realtime start read print write tqdm output_path get VideoCapture CAP_PROP_FRAME_HEIGHT CAP_PROP_FPS CAP_PROP_FRAME_COUNT CAP_PROP_FRAME_WIDTH release ndarray isinstance new_zeros Tensor to numpy is_cuda ndarray soft_nms_cpu isinstance Tensor numpy pop int YOLOLayer batch_norm Sequential ZeroPad2d MaxPool2d add_module Conv2d ModuleList EmptyLayer Upsample append LeakyReLU sum enumerate nA view anchors stride stack float close system numel bias copy_ running_mean zip fromfile running_var weight view_as enumerate open tofile close seen zip open enumerate BORDER_CONSTANT copyMakeBorder min resize float imread unsqueeze copy letterbox_image letterbox_image unsqueeze copy OrderedDict New list asarray tuple set coo_matrix nonzero zip range tuple range set linear_sum_assignment column_stack zeros bbox_ious ascontiguousarray ious asarray cdist reshape maximum zeros enumerate covariance asarray inf gating_distance mean enumerate append track_id get track_id start_frame iou_distance where zip append frame_id BORDER_CONSTANT copyMakeBorder min resize float max T tan ones reshape random cos pi copy getRotationMatrix2D maximum eye sin abs warpPerspective clip stack zip zeros max range len format dirname info makedirs dict isfile reshape zip setFormatter getLogger addHandler StreamHandler Formatter DEBUG setLevel rstrip strip open startswith append split dict strip split makedirs seed manual_seed_all manual_seed split open replace print named_parameters sum enumerate putText rectangle max data normal_ __name__ constant_ clamp float min clone compute_ap concatenate cumsum argsort unique append sum concatenate size maximum sum range clamp min expand unsqueeze max max return_torch_unique_index view sort unsqueeze long cuda unique floor range prod log cat len max view clamp encode_delta unsqueeze bbox_iou range cuda generate_anchor cat len arange to repeat meshgrid float cat len log exp decode_delta view contiguous shape repeat generate_anchor max_pool2d float float32 uint8 cpu_soft_nms ascontiguousarray nms_op xywh2xyxy unsqueeze getattr soft_nms numpy enumerate long range load replace save subplot sorted T plot glob title figure legend range copy float max resize int format putText tuple ascontiguousarray copy map FONT_HERSHEY_PLAIN rectangle get_color zeros abs max enumerate int zip tuple map copy get_color circle format asarray putText copy FONT_HERSHEY_PLAIN rectangle max enumerate unsqueeze print clamp shape unsqueeze float cat cuda device to shape contiguous new int format tuple putText choice rectangle FONT_HERSHEY_PLAIN Variable transpose cuda resize float imread resize add_argument ArgumentParser rstrip lstrip open append split format MaxPoolStride1 print BatchNorm2d DetectionLayer split int full view size convert from_buffer contiguous ByteTensor div resize tobytes open squeeze numpy transpose is_cuda exp arange view FloatTensor size contiguous sigmoid unsqueeze device meshgrid to cuda len imread new from_numpy shape copy_ numpy write_results clone isinstance data view fill_ contiguous new size squeeze shape unsqueeze nonzero unique bbox_iou append max range cat data exp arange view size contiguous half sigmoid unsqueeze HalfTensor device meshgrid to cuda len fill_ contiguous new size squeeze half shape unsqueeze nonzero bbox_iou max range cat join time format list itertuples print size tqdm from_iterable append range read_csv len join time format list print size tqdm from_iterable range csv_path json_path rfind movie_list img_root csv2COCOJson genCOCOJson min_json_path int join basename format read append decode communicate remove wait len open PIPE round range Popen makedirs process_num clip_root dict imap_unordered append movie_root listdir Pool
# AlphAction AlphAction aims to detect the actions of multiple persons in videos. It is **the first open-source project that achieves 30+ mAP (32.4 mAP) with single model on AVA dataset.** This project is the official implementation of paper [Asynchronous Interaction Aggregation for Action Detection](https://arxiv.org/abs/2004.07485) (**ECCV 2020**), authored by Jiajun Tang*, Jin Xia* (equal contribution), Xinzhi Mu, [Bo Pang](https://bopang1996.github.io/), [Cewu Lu](http://mvig.sjtu.edu.cn/) (corresponding author). <br/> <div align="center">
692
MVIG-SJTU/DIRV
['human object interaction detection']
['DIRV: Dense Interaction Region Voting for End-to-End Human-Object Interaction Detection']
test_vcoco.py utils/utils.py utils/sync_batchnorm/replicate.py utils/sync_batchnorm/unittest.py efficientnet/model.py utils/visual_hico.py utils/sync_batchnorm/batchnorm_reimpl.py test_hico-det.py utils/timer.py train.py efficientdet/help_function.py efficientdet/utils.py efficientnet/utils_extra.py utils/vsrl_eval.py efficientdet/config.py utils/sync_batchnorm/__init__.py utils/visual.py utils/sync_batchnorm/batchnorm.py Generate_HICO_detection.py efficientnet/utils.py efficientdet/dataset.py utils/apply_prior.py efficientdet/vcoco_dataset.py coco_eval.py demo.py efficientnet/__init__.py efficientdet/model.py efficientdet/loss.py efficientdet/hico_det_dataset.py backbone.py utils/sync_batchnorm/comm.py efficientdet/hoi_model.py EfficientDetBackbone evaluate_coco _eval img_detect fetch_location_score calc_iou test target_object_dist xy_to_wh hoi_match calc_ioa save_HICO Generate_HICO_detection img_detect fetch_location_score calc_iou transform_action_hico test transform_class_id target_object_dist xy_to_wh hoi_match calc_ioa img_detect fetch_location_score calc_iou test target_object_dist xy_to_wh hoi_match calc_ioa freeze_backbone get_args freeze_bn_backbone freeze_bn_object_detection save_checkpoint train Params freeze_object_detection ModelWithLoss Normalizer collater CocoDataset Resizer Augmenter single_ioa single_inter single_union transform_action to_onehot single_iou HICO_DET_Dataset Union_Branch Instance_Branch calc_iou regression_loss Instance_Loss FocalLoss union_regression_loss Union_Loss calc_ioa nms Classifier BiFPN count_parameters EfficientNet Regressor SeparableConvBlock BBoxTransform ClipBoxes Anchors Normalizer contrast_enhance collater brightness_enhance Resizer sharpness_enchance draw_bbox color_enhance randomColor Augmenter VCOCO_Dataset EfficientNet MBConvBlock Swish drop_connect get_model_params SwishImplementation round_repeats Identity efficientnet_params MemoryEfficientSwish load_pretrained_weights BlockDecoder get_same_padding_conv2d round_filters Conv2dDynamicSamePadding efficientnet Conv2dStaticSamePadding MaxPool2dStaticSamePadding apply_prior Timer postprocess CustomDataParallel postprocess_dense display aspectaware_resize_padding replace_w_sync_bn get_last_weights postprocess_dense_union_flip preprocess_video variance_scaling_ postprocess_hoi init_weights preprocess postprocess_dense_union postprocess_hoi_flip invert_affine visual visual_demo visual_hico _load_vcoco get_overlap clip_xyxy_to_image voc_ap VCOCOeval _sum_ft convert_model patch_sync_batchnorm SynchronizedBatchNorm2d _unsqueeze_ft _SynchronizedBatchNorm SynchronizedBatchNorm1d SynchronizedBatchNorm3d BatchNorm2dReimpl SyncMaster FutureResult SlavePipe execute_replication_callbacks CallbackContext DataParallelWithCallback patch_replication_callback TorchTestCase postprocess int remove BBoxTransform dump exists model half from_numpy tqdm preprocess ClipBoxes permute append float cuda range open evaluate COCOeval print summarize accumulate loadRes expand_dims where expand_dims where zeros xy_to_wh expand_dims stack sum flip_test where argmax max calc_ioa exp argmin transform_action append sum range target_object_dist stack apply_prior enumerate T calc_iou zeros array len flip_test preprocess stack permute cuda cat load BBoxTransform img_detect float16 half requires_grad_ eval ClipBoxes load_state_dict cuda visual_demo EfficientDetBackbone int items print tolist min zfill savemat append range len load join remove save_HICO makedirs open zeros range transform_class_id int join visual_hico splitext tic format iglob average_time join int toc print zfill visual enumerate extend len parse_args add_argument ArgumentParser parameters __name__ parameters eval modules eval modules num_gpus freeze_bn_backbone model endswith freeze_bn_object_detection zero_grad patch_replication_callback SGD DataLoader ReduceLROnPlateau save_checkpoint accumulate_batch Params cuda max CustomDataParallel len Adam apply head_only load_state_dict log_path append saved_path range state_dict SummaryWriter format Compose close mean init_weights load_weights lr item float add_scalars num_epochs ModelWithLoss enumerate load int items backward print get_last_weights AdamW makedirs add_scalar parameters filter freeze_object_detection step EfficientDetBackbone VCOCO_Dataset HICO_DET_Dataset join isinstance save saved_path state_dict ones from_numpy stack permute max enumerate zeros array min max min max zeros arange len unsqueeze clamp min max unsqueeze clamp min max clamp where t pow stack le abs log clamp where t pow stack le abs log f shuffle uniform enhance uniform enhance uniform enhance uniform enhance deepcopy uint8 imwrite astype COLOR_RGB2BGR rectangle numpy range cvtColor len int min_depth depth_divisor width_coefficient max depth_coefficient floor decode GlobalParams efficientnet efficientnet_params startswith _replace pop format print load_url load_state_dict range len int float32 shape resize zeros regressBoxes clipBoxes permute append batched_nms max range int format imwrite putText makedirs astype FONT_HERSHEY_SIMPLEX waitKey imshow rectangle float range len eps affine num_features setattr named_children SynchronizedBatchNorm2d dir momentum running_mean bias weight getattr running_var glob print data named_modules kaiming_uniform_ isinstance variance_scaling_ Conv2d bias zero_ constant_ _calculate_fan_in_and_fan_out float sqrt regressBoxes nms clipBoxes permute append batched_nms max range clipBoxes permute append cuda range regressBoxes nms max arange reshape clipBoxes permute append batched_nms cuda range cat regressBoxes nms clipBoxes clone permute append batched_nms max range cat regressBoxes reshape clipBoxes clone permute append cuda range cat items tuple text axis zfill set add_axes shape imshow add add_patch figure Rectangle savefig get_cmap imread items tuple text axis add_patch set add_axes shape imshow add savefig figure Rectangle get_cmap imread join text axis close zfill add_patch add_axes shape imshow savefig mkdir figure Rectangle imread range enumerate len T print reshape range len minimum maximum minimum maximum concatenate size maximum sum range eps num_features affine isinstance named_children momentum running_mean add_module DataParallel DataParallelWithCallback zip running_var module sync_module detach list hasattr __data_parallel_replicate__ modules enumerate len replicate
# DIRV: Dense Interaction Region Voting for End-to-End Human-Object Interaction Detection <div align="center"> <img src="compare.png", width="600"> </div> Official code implementation for the paper "DIRV: Dense Interaction Region Voting for End-to-End Human-Object Interaction Detection" (AAAI 2021) [paper](https://arxiv.org/abs/2010.01005). The code is developed based on the architecture of [zylo117/Yet-Another-EfficientDet-Pytorch](https://github.com/zylo117/Yet-Another-EfficientDet-Pytorch). We also follow some data pre-processing and model evaluation methods in [BigRedT/no_frills_hoi_det](https://github.com/BigRedT/no_frills_hoi_det) and [vt-vl-lab/iCAN](https://github.com/vt-vl-lab/iCAN). We sincerely thank the authors for the excellent work.
693
Mael-zys/PSENet
['optical character recognition', 'scene text detection', 'curved text detection']
['Shape Robust Text Detection with Progressive Scale Expansion Network', 'Shape Robust Text Detection with Progressive Scale Expansion Network']
test_ic15_water.py test_ic15_water_ms.py generate_pretrain.py util/statistic.py test_totaltest_water.py util/tf.py pypse.py train_total.py util/event.py train_ic15.py eval_ic13.py dataset/total_loader.py metrics.py util/feature.py det_ic13/script.py test_ctw1500.py util/proc.py util/rand.py util/neighbour.py util/caffe_.py models/__init__.py util/t.py util/dtype.py dataset/icdar2015_loader.py util/ml.py util/str_.py change_total.py evaluate_ic13/script.py det_ic13/rrc_evaluation_funcs_1_1.py util/log.py test_ic15.py util/test.py pse/.ycm_extra_conf.py pse/__init__.py util/misc.py eval/ic15/rrc_evaluation_funcs_v2.py pse/__main__.py util/__init__.py util/logger.py dataset/ctw1500_test_loader.py util/mask.py util/url.py eval/ic15/rrc_evaluation_funcs_v1.py test_ic13_water.py dataset/ctw1500_loader.py test_ctw1500_water.py eval/ctw1500/eval_ctw1500.py eval/ctw1500/file_util.py util/thread_.py evaluate_ic13/rrc_evaluation_funcs_1_1.py models/fpn_resnet.py util/np.py test_ic13.py util/dec.py util/io_.py util/mod.py train_ctw1500.py dataset/icdar2015_test_loader.py eval/ic15/rrc_evaluation_funcs.py eval/ic15/script.py util/cmd.py util/img.py dataset/__init__.py util/plt.py test_mlt17_water.py eval/ic15/file_util.py cvt_total_text eval_model debug test write_result_as_txt extend_3c polygon_from_points runningScore pse debug test write_result_as_txt extend_3c polygon_from_points debug test write_result_as_txt extend_3c polygon_from_points debug test write_result_as_txt extend_3c polygon_from_points debug test write_result_as_txt extend_3c polygon_from_points debug test write_result_as_txt extend_3c polygon_from_points debug test write_result_as_txt extend_3c polygon_from_points debug test write_result_as_txt extend_3c polygon_from_points debug test write_result_as_txt extend_3c polygon_from_points debug test write_result_as_txt extend_3c polygon_from_points cal_kernel_score dice_loss ohem_batch adjust_learning_rate save_checkpoint ohem_single main cal_text_score train cal_kernel_score dice_loss ohem_batch adjust_learning_rate save_checkpoint ohem_single main cal_text_score train cal_kernel_score dice_loss ohem_batch adjust_learning_rate save_checkpoint ohem_single main cal_text_score train get_img random_crop shrink get_bboxes random_rotate random_scale dist random_horizontal_flip scale CTW1500Loader perimeter get_img CTW1500TestLoader scale IC15Loader get_img random_crop shrink get_bboxes random_rotate random_scale dist random_horizontal_flip scale perimeter get_img IC15TestLoader scale get_img random_crop shrink get_bboxes random_rotate random_scale dist random_horizontal_flip scale perimeter totalLoader validate_point_inside_bounds load_zip_file_keys validate_clockwise_points validate_lines_in_file decode_utf8 print_help get_tl_dict_values get_tl_dict_values_from_array main_validation get_tl_line_values load_zip_file get_tl_line_values_from_file_contents validate_tl_line main_evaluation evaluation_imports evaluate_method default_evaluation_params validate_data get_union get_gt get_pred get_intersection write_file_not_cover write_file read_file read_dir write_file_not_cover write_file read_file read_dir validate_point_inside_bounds load_zip_file_keys validate_clockwise_points validate_lines_in_file decode_utf8 print_help main_validation get_tl_line_values load_zip_file get_tl_line_values_from_file_contents validate_tl_line main_evaluation evaluation_imports evaluate_method default_evaluation_params validate_data validate_point_inside_bounds load_zip_file_keys validate_clockwise_points validate_lines_in_file decode_utf8 print_help get_tl_dict_values get_tl_dict_values_from_array main_validation get_tl_line_values load_zip_file get_tl_line_values_from_file_contents validate_tl_line main_evaluation evaluation_imports evaluate_method default_evaluation_params validate_data ResNet resnet50 Bottleneck resnet152 conv3x3 resnet34 resnet18 BasicBlock resnet101 GetCompilationInfoForFile IsHeaderFile MakeRelativePathsInFlagsAbsolute FlagsForFile DirectoryOfThisScript pse get_data get_params draw_log Cmd print_calling_in_short_for_tf timeit print_calling print_test print_calling_in_short is_tuple int is_number is_str cast is_list double wait_key hog get_contour_min_area_box blur imwrite get_rect_iou black get_value put_text bgr2rgb get_roi render_points bgr2gray get_contour_region_iou resize convex_hull draw_contours get_contour_rect_box get_shape set_value is_in_contour is_valid_jpg move_win get_contour_region_in_rect fill_bbox imshow apply_mask random_color_3 imread bilateral_blur find_contours points_to_contours maximize_win rect_area rgb2bgr contour_to_points ds_size points_to_contour eq_color find_two_level_contours get_wh average_blur rgb2gray get_contour_region_in_min_area_rect rotate_point_by_90 white filter2D is_white translate get_contour_area rectangle min_area_rect rect_perimeter get_rect_points rotate_about_center gaussian_blur circle get_dir search is_dir dump_mat read_h5_attrs exists get_filename cd join_path load_mat get_file_size get_absolute_path cat dir_mat dump_json create_h5 dump pwd copy is_path mkdir ls open_h5 load remove write_lines read_h5 make_parent_dir find_files read_lines get_date_str init_logger plot_overlap savefig Logger LoggerMonitor find_black_components find_white_components init_params AverageMeter mkdir_p get_mean_and_std kmeans try_import_by_name add_ancester_dir_to_path import_by_name is_main get_mod_by_name add_to_path load_mod_from_path n2 _in_image count_neighbours get_neighbours n1 n1_count n8 n2_count n4 norm2_squared smooth flatten empty_list norm2 sum_all angle_with_x has_infty sin arcsin norm1 eu_dist iterable is_2D shuffle cos_dist chi_squared_dist clone is_empty has_nan has_nan_or_infty show plot_solver_data line show_images get_random_line_style to_ROI draw imshow rectangle hist maximize_figure set_subtitle save_image get_pid kill wait_for_pool get_pool cpu_count set_proc_name ps_aux_grep shuffle normal randint sample D E join index_of find_all is_none_or_empty ends_with remove_all remove_invisible to_lowercase starts_with is_str int_array_to_str contains to_uppercase split replace_all add_noise crop_into get_latest_ckpt get_init_fn gpu_config Print is_gpu_available min_area_rect focal_loss_layer_initializer get_variable_names_in_checkpoint sum_gradients get_all_ckpts get_update_op get_variables_to_train focal_loss get_iter get_available_gpus wait_for_checkpoint get_current_thread ThreadPool create_and_start ProcessPool is_alive get_current_thread_name download argv cit get_count exit sit cvt_total_text eval_model debug test write_result_as_txt extend_3c polygon_from_points runningScore pse debug test write_result_as_txt extend_3c polygon_from_points debug test write_result_as_txt extend_3c polygon_from_points cal_kernel_score dice_loss ohem_batch adjust_learning_rate save_checkpoint ohem_single main cal_text_score train cal_kernel_score dice_loss ohem_batch adjust_learning_rate save_checkpoint ohem_single main cal_text_score train get_img random_crop shrink get_bboxes random_rotate random_scale dist random_horizontal_flip scale CTW1500Loader perimeter get_img CTW1500TestLoader scale IC15Loader IC15TestLoader totalLoader validate_point_inside_bounds load_zip_file_keys validate_clockwise_points validate_lines_in_file decode_utf8 print_help get_tl_dict_values get_tl_dict_values_from_array main_validation get_tl_line_values load_zip_file get_tl_line_values_from_file_contents validate_tl_line main_evaluation evaluation_imports evaluate_method default_evaluation_params validate_data get_union get_gt get_pred get_intersection write_file_not_cover write_file read_file read_dir write_file_not_cover write_file read_file read_dir validate_point_inside_bounds load_zip_file_keys validate_clockwise_points validate_lines_in_file decode_utf8 print_help main_validation get_tl_line_values load_zip_file get_tl_line_values_from_file_contents validate_tl_line main_evaluation evaluation_imports evaluate_method default_evaluation_params validate_data get_tl_dict_values get_tl_dict_values_from_array ResNet resnet50 Bottleneck resnet152 conv3x3 resnet34 resnet18 BasicBlock resnet101 GetCompilationInfoForFile IsHeaderFile MakeRelativePathsInFlagsAbsolute FlagsForFile DirectoryOfThisScript pse get_data get_params draw_log Cmd print_calling_in_short_for_tf timeit print_calling print_test print_calling_in_short is_tuple int is_number is_str cast is_list double wait_key hog get_contour_min_area_box blur imwrite get_rect_iou black get_value put_text bgr2rgb get_roi render_points bgr2gray get_contour_region_iou resize convex_hull draw_contours get_contour_rect_box get_shape set_value is_in_contour is_valid_jpg move_win get_contour_region_in_rect fill_bbox imshow apply_mask random_color_3 imread bilateral_blur find_contours points_to_contours maximize_win rect_area rgb2bgr contour_to_points ds_size points_to_contour eq_color find_two_level_contours get_wh average_blur rgb2gray get_contour_region_in_min_area_rect rotate_point_by_90 white filter2D is_white translate get_contour_area rectangle min_area_rect rect_perimeter get_rect_points rotate_about_center gaussian_blur circle get_dir search is_dir dump_mat read_h5_attrs exists get_filename cd join_path load_mat get_file_size get_absolute_path cat dir_mat dump_json create_h5 dump pwd copy is_path mkdir ls open_h5 load remove write_lines read_h5 make_parent_dir find_files read_lines get_date_str init_logger plot_overlap savefig Logger LoggerMonitor find_black_components find_white_components init_params AverageMeter mkdir_p get_mean_and_std kmeans try_import_by_name add_ancester_dir_to_path import_by_name is_main get_mod_by_name add_to_path load_mod_from_path n2 _in_image count_neighbours get_neighbours n1 n1_count n8 n2_count n4 norm2_squared smooth flatten empty_list norm2 sum_all angle_with_x has_infty sin arcsin norm1 eu_dist iterable is_2D shuffle cos_dist chi_squared_dist clone is_empty has_nan has_nan_or_infty show plot_solver_data line show_images get_random_line_style to_ROI draw imshow rectangle hist maximize_figure set_subtitle save_image get_pid kill wait_for_pool get_pool cpu_count set_proc_name ps_aux_grep shuffle normal randint sample D E join index_of find_all is_none_or_empty ends_with remove_all remove_invisible to_lowercase starts_with is_str int_array_to_str contains to_uppercase split replace_all add_noise crop_into get_latest_ckpt get_init_fn gpu_config Print is_gpu_available min_area_rect focal_loss_layer_initializer get_variable_names_in_checkpoint sum_gradients get_all_ckpts get_update_op get_variables_to_train focal_loss get_iter get_available_gpus wait_for_checkpoint get_current_thread ThreadPool create_and_start ProcessPool is_alive get_current_thread_name download argv cit get_count exit sit print join float tqdm remove chdir print rmtree getoutput reshape concatenate imwrite concatenate print makedirs append range len join_path tuple write_lines append enumerate int T empty DataLoader save resnet152 cuda exists OrderedDict load_state_dict resnet101 state_dict format resnet50 resume mkdir flush load items print rmtree parameters IC15TestLoader isfile connectedComponents get transpose copy put shape Queue zeros range len makedirs range len model sign resize max RETR_TREE pypse shape append range min_kernel_area synchronize findContours astype debug copy write_result_as_txt mean eval img_paths scale enumerate time uint8 drawContours binary_th CHAIN_APPROX_SIMPLE Variable reshape float32 sigmoid CTW1500TestLoader zeros watershed connectedComponents COLOR_GRAY2BGR subtract cvtColor Cmd minAreaRect boxPoints min array tolist float int sort min astype sum concatenate ohem_single append float numpy range sigmoid sum view mean update astype int32 get_scores numpy update astype int32 get_scores numpy model zero_grad runningScore cuda cal_kernel_score step append cal_text_score sum range update format size astype ohem_batch item float flush enumerate time criterion backward Variable print AverageMeter numpy len param_groups lr join save SGD DataLoader adjust_learning_rate save_checkpoint Logger resnet152 cuda hasattr load_state_dict resnet101 append module range pretrain resnet50 close schedule lr resume CTW1500Loader flush optimizer checkpoint join load print parameters n_epoch train set_names makedirs IC15Loader imread int asarray remove_all append read_lines split range copy len warpAffine random getRotationMatrix2D range len max resize max min choice resize array min where randint max range len range PyclipperOffset int JT_ROUND area min append AddPath array perimeter ET_CLOSEDPOLYGON Execute len write exit group match namelist append ZipFile group match namelist append ZipFile validate_tl_line decode_utf8 replace split get_tl_line_values validate_point_inside_bounds int replace validate_clockwise_points group match float validate_point_inside_bounds validate_clockwise_points append float range len append int range len replace argsort append get_tl_line_values split argsort get_tl_dict_values append range len update default_evaluation_params_fn validate_data_fn writestr items write dumps close dict print_help evaluate_method_fn ZipFile makedirs update default_evaluation_params_fn validate_data_fn print exit dict load_zip_file validate_lines_in_file area xmin ymax one_to_one_match many_to_one_match decode_utf8 append range xmax import_module load_zip_file empty get_tl_line_values_from_file_contents float items ymin namedtuple int8 one_to_many_match Rectangle zeros center_distance len print append split append int asarray split area append sort walk replace read close open join makedirs close write open join makedirs close write open decode BOM_UTF8 replace startswith encode iteritems compute_ap polygon_from_points get_intersection_over_union get_pred rectangle_to_polygon get_intersection load_url ResNet load_state_dict load_url ResNet load_state_dict ResNet load_url load_state_dict keys state_dict ResNet load_url load_state_dict keys state_dict ResNet load_url load_state_dict keys state_dict append join startswith IsHeaderFile compiler_flags_ exists compiler_flags_ GetCompilationInfoForFile compiler_working_dir_ MakeRelativePathsInFlagsAbsolute DirectoryOfThisScript cpse array net Solver isinstance append net Solver isinstance show int get_random_line_style plot print readlines smooth len contains eval get_absolute_path save_image plt legend append float open isinstance debug waitKey ord bgr2rgb get_absolute_path wait_key namedWindow isinstance destroyAllWindows move_win rgb2bgr WINDOW_NORMAL imread maximize_win get_absolute_path rgb2bgr make_parent_dir moveWindow setWindowProperty WND_PROP_FULLSCREEN enumerate get_shape get_shape min max drawContours boundingRect get_contour_rect_box minAreaRect BoxPoints int0 get_shape get_contour_rect_box warpAffine int BoxPoints transpose hstack getRotationMatrix2D dot get_roi minAreaRect points_to_contour black draw_contours shape to_contours draw_contours assert_equal asarray range GaussianBlur bilateralFilter putText int32 FONT_HERSHEY_SIMPLEX get_shape int tuple warpAffine get_wh float32 cos deg2rad getRotationMatrix2D dot sin abs array _get_area transpose _get_inter zeros range len findContours asarray copy findContours copy pointPolygonTest convexHull randint asarray xrange zip minAreaRect empty points_to_contour get_absolute_path makedirs get_dir mkdir get_absolute_path get_dir mkdir get_absolute_path get_absolute_path get_absolute_path is_dir get_absolute_path expanduser startswith chdir get_absolute_path append listdir get_absolute_path ends_with get_absolute_path open get_absolute_path make_parent_dir get_absolute_path get_absolute_path get_absolute_path savemat make_parent_dir get_absolute_path getsize get_absolute_path get_absolute_path make_parent_dir get_absolute_path get_absolute_path get_absolute_path join_path extend ls is_dir get_absolute_path find_files append get_absolute_path make_parent_dir now setFormatter basicConfig print join_path addHandler make_parent_dir StreamHandler get_date_str Formatter setLevel asarray arange plot numbers enumerate len pop black set_root insert copy get_neighbours N4 shape get_new_root get_root xrange append set_visited is_visited print DataLoader div_ zeros range len normal constant isinstance kaiming_normal Conv2d bias modules BatchNorm2d weight Linear makedirs asarray warn flatten append enumerate insert join_path add_to_path get_dir __import__ import_by_name get_absolute_path get_filename append _in_image append _in_image append _in_image append _in_image norm2 zip shape asarray extend len pi asarray asarray reshape flatten sqrt shape xrange shape asarray has_infty has_nan enumerate len show asarray join_path flatten linspace figure save_image load show val_accuracies plot training_losses val_losses training_accuracies figure legend range len Rectangle add_patch full_screen_toggle get_current_fig_manager add_line Line2D linspace show_images show set_title set_subtitle axis colorbar bgr2rgb imshow maximize_figure subplot2grid append save_image enumerate get_absolute_path savefig imsave make_parent_dir set_xlim set_ylim suptitle maximize_figure randint len Pool join close setproctitle print get_pid Cmd append int split Cmd flatten flatten append pop list tuple to_lowercase is_str enumerate list tuple to_lowercase is_str enumerate to_lowercase findall replace replace_all binomial list_local_devices get_checkpoint_state is_dir get_absolute_path model_checkpoint_path get_checkpoint_state all_model_checkpoint_paths int get_latest_ckpt is_none_or_empty latest_checkpoint print get_model_variables startswith info append extend get_collection TRAINABLE_VARIABLES get_latest_ckpt NewCheckpointReader get_variable_to_shape_map dtype set_shape py_func ConfigProto ones_like zeros_like sigmoid_cross_entropy_with_logits float32 where reduce_sum sigmoid pow cast stop_gradient name reduce_mean add_n histogram zip append scalar UPDATE_OPS get_collection start Thread setName print urlretrieve st_size stat show_images get_count imwrite get_count imwrite asarray
# Shape Robust Text Detection with Progressive Scale Expansion Network ## Requirements * Python 3.6 * PyTorch v0.4.1+ * pyclipper * Polygon2 * OpenCV 3.4 (for c++ version pse) * opencv-python 3.4 ## Introduction Progressive Scale Expansion Network (PSENet) is a text detector which is able to well detect the arbitrary-shape text in natural scene.
694
MahdiHajibabaei/unified-embedding
['speaker recognition']
['Unified Hypersphere Embedding for Speaker Recognition']
test_ident.py train_aug.py roc_vox.py embed_verif.py roc.py
# Unified Hypersphere Embedding for Speaker Recognition By Mahdi Hajibabaei and Dengxin Dai ### Introduction This repository contains the code and instruction needed to replicate the experiments done in paper: [Unified Hypersphere Embedding for Speaker Recognition](https://arxiv.org/abs/1807.08312) Note: In late 2018, collectors of the dataset changed the structure of dataset which is no longer compatible with parse_list function. If you wish to use the pipeline with newly structured dataset, write a function that creates *_set and *_label for training, validation and testing. In this work, we first train a ResNet-20 with the typical softmax and cross entropy loss function and then fine-tune the network with more discriminative loss function such as A-Softmax, AM-Softmax and logistic margin. ### Requirements 1. [*VoxCeleb*](http://www.robots.ox.ac.uk/~vgg/data/voxceleb/vox1.html) dataset and lists of [dataset split](http://www.robots.ox.ac.uk/~vgg/data/voxceleb/meta/iden_split.txt) and [verification evaluation pairs](http://www.robots.ox.ac.uk/~vgg/data/voxceleb/meta/veri_test.txt) 2. [Sphereface's Caffe build](https://github.com/wy1iu/sphereface/tree/master/tools/caffe-sphereface) 3. [AM-Softmax's Caffe build](https://github.com/happynear/caffe-windows/tree/504d8a85f552e988fabff88b026f2c31cb778329)
695
MahsaDerakhshan/AffinityClustering
['graph clustering']
['Affinity Clustering: Hierarchical Clustering at Scale']
dense-graphs/affinity.py partitioning2 edge MST Affinity ArrayUnionFind partitioning1 sorted set ArrayUnionFind append union find append randrange append randrange split
# AffinityClustering This repository contains implementations of some of the algorithms proposed in [Affinity Clustering: Hierarchical Clustering at Scale](https://papers.nips.cc/paper/7262-affinity-clustering-hierarchical-clustering-at-scale). ## NEWS [12/12/172] A PySpark implementation of affinity on **dense** graphs (Section 5.1 of the paper) is added to the repository.
696
MahsaPaknezhad/WSIRegistration
['whole slide images']
['Regional Registration of Whole Slide Image Stacks Containing Highly Deformed Artefacts']
setRegionOfInterest.py
# WSIRegistration This repository contains the c++ code for the paper: *"Regional Registration of Whole Slide Image Stacks Containing Major Histological Artifacts"* submitted to BMC Bioinformatics Journal. Opencv-3.4.1 and Opencv_contrib3.4.1 libraries were used for this implementation. The executable file named gray-levels performs Mumford-Shah segmentation. # Motivation: In order to register a region of interest (ROI) in the whole slide images, three steps are carried out as follows: 1) Removing surrounding artifacts, 2) Rough alignment of consecutive tissue slides, and 3) Registration of user-defined ROI. # 1) Removing surrounding artifacts Extra stains and artifacts around the tissue can affect the registration outcome. To remove these artifacts, each image is converted to the gray scale and smoothed using a Gaussian filter. The smoothed image is then thresholded. Since an accurate segmentation of the tissue from the surrounding artifacts cannot be achieved merely by thresholding, an opening and later a closing morphological operation was applied on the output mask from thresholding to get a mask that covers the artifacts and extra stains around the tissue. The final segmentation mask is applied to the image to remove the surrounding artifacts. Contours in the new image are then detected. The contours which are closer to the center of the image and surround the largest area in the image are identified. Extra tissue and stains outside the convex hull of the selected contours are removed, resulting in a cleaned tissue image. Original Image | Thresholded Image | Selected Edges | Convex Hull of Edges | Cleaned Image
697
MaksimEkin/COVID19-Literature-Clustering
['malware classification']
['A New Burrows Wheeler Transform Markov Distance']
lib/plot_text.py lib/call_backs.py input_callback selected_code CustomJS
# COVID-19 Literature Clustering ![](cover/bokeh_plot.png) <br> <div align="center", style="font-size: 50px"> ### **NEW PAPER!** [:page_with_curl: COVID-19 Multidimensional Kaggle Literature Organization](https://www.maksimeren.com/publication/eren_doceng2021/) <br> ### [:bar_chart: Interactive Plot](https://maksimekin.github.io/COVID19-Literature-Clustering/plots/t-sne_covid-19_interactive.html) &emsp; [:orange_book: Analysis Notebook](https://maksimekin.github.io/COVID19-Literature-Clustering/COVID19_literature_clustering.html) &emsp; [:blue_book: Kaggle Submission](https://www.kaggle.com/maksimeren/covid-19-literature-clustering) ### [:page_facing_up: Paper Publication](https://www.maksimeren.com/publication/eren_doceng2020/) &emsp; [:clapper: Video (Chase Pipkin from Freethink)](https://www.youtube.com/watch?v=vyOrM8zC_Iw) #### [:information_source: arXiv Literature Clustering](https://github.com/MaksimEkin/arXiv-Literature-Clustering) </div>
698
MalongTech/research-charnet
['scene text detection']
['Convolutional Character Networks']
charnet/config/__init__.py charnet/modeling/backbone/decoder.py tools/test_net.py charnet/config/defaults.py charnet/modeling/layers/scale.py charnet/modeling/backbone/hourglass.py charnet/modeling/model.py setup.py charnet/modeling/rotated_nms.py charnet/modeling/postprocessing.py charnet/modeling/utils.py charnet/modeling/layers/misc.py charnet/modeling/layers/__init__.py charnet/modeling/backbone/resnet.py to_numpy_or_none CharRecognizer _conv3x3_bn_relu WordDetector CharNet CharDetector OrientedTextPostProcessing load_lexicon load_char_dict WordInstance nms_with_char_cls nms softnms nms_poly rotate_rect Decoder _make_layer_revr hourglass88 _make_layer Residual HourGlassNet HourGlassBlock ResNetHead _make_stage BottleneckWithBatchNorm ResNet resnet50 Bottleneck StemWithBatchNorm BaseStem _NewEmptyTensorOp Conv2d interpolate BatchNorm2d ConvTranspose2d Scale vis save_word_recognition resize append numpy list dict pop list scale_from_clipper zeros_like PT_SUBJECT Pyclipper reshape Area PT_CLIP CT_INTERSECTION AddPaths append scale_to_clipper AddPath sum enumerate Execute pop list scale_from_clipper zeros_like PT_SUBJECT Pyclipper reshape Area PT_CLIP CT_INTERSECTION AddPaths append scale_to_clipper AddPath sum enumerate Execute sum list scale_from_clipper arange exp PT_SUBJECT Pyclipper reshape Area PT_CLIP CT_INTERSECTION copy AddPaths append AddPath argmax Execute pop list scale_from_clipper PT_SUBJECT Pyclipper Area PT_CLIP CT_INTERSECTION AddPaths append AddPath enumerate Execute append list cos sin append range Residual append range Residual append transformation_module range _output_size tuple int shape SIZE_DIVISIBILITY float round max format word_bbox polylines putText text FONT_HERSHEY_SIMPLEX copy
# Convolutional Character Networks This project hosts the testing code for CharNet, described in our paper: Convolutional Character Networks Linjie Xing, Zhi Tian, Weilin Huang, and Matthew R. Scott; In: Proceedings of the IEEE International Conference on Computer Vision (ICCV), 2019. ## Installation ``` pip install torch torchvision python setup.py build develop
699