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
mithun-bharadwaj/Neural_Style_Transfer
['style transfer']
['A Neural Algorithm of Artistic Style']
src/vgg_model.py load_vgg_model _conv2d_relu Variable zeros _avgpool loadmat
# Neural Style Transfer ## What is Neural Style Transfer NST is an algorithm that generates an image by combining the content from one image and style from another image. ## Implementation I've used a pre-trained VGG19 model in .mat format to create a graph from the required layers to calculate the content and style cost. The code vgg_model.py which is used to create a graph is credited in part to the MatConvNet team. Neural_Style_Transfer.ipynb is an implementation of the following steps: 1. Load the content and style image. 2. Pre-process the images by resizing and subtracting the means from the RGB channels. 3. Generate a random image by adding noise to the content image. This will act as the initialization for the generated image. 4. Calculate the content cost.
3,000
mitmedialab/sherlock-project
['word embeddings']
['Sherlock: A Deep Learning Approach to Semantic Data Type Detection']
sherlock/features/preprocessing.py sherlock/features/bag_of_words.py sherlock/features/word_embeddings.py setup.py sherlock/helpers.py sherlock/deploy/predict_sherlock.py sherlock/features/paragraph_vectors.py sherlock/deploy/model_helpers.py sherlock/deploy/train_sherlock.py sherlock/features/bag_of_characters.py download_data construct_sherlock_model categorize_features _transform_predictions_to_classes predict_sherlock _save_retrained_sherlock_model _get_categorical_label_encodings train_sherlock extract_bag_of_characters_features extract_bag_of_words_features tagcol_paragraph_embeddings_features infer_paragraph_embeddings_features train_paragraph_embeddings_features extract_features prepare_feature_extraction prepare_word_embeddings convert_string_lists_to_lists extract_word_embeddings_features print download_file_from_google_drive to_list read model_from_json close load_weights compile open load inverse_transform argmax LabelEncoder construct_sherlock_model predict categorize_features to_categorical LabelEncoder classes_ save transform fit to_json save_weights _get_categorical_label_encodings print _save_retrained_sherlock_model categorize_features construct_sherlock_model fit var skew list all items min kurtosis OrderedDict mean any median dropna sum max count FreqDist nunique kurtosis max count skew list all apply OrderedDict sum size mean contains var items min any median dropna std len seed Doc2Vec format save delete_temporary_training_data load seed format Series infer_vector sample DataFrame append enumerate print download_file_from_google_drive split array open progress_apply isinstance Series pandas to_list DataFrame seed items list prepare_feature_extraction print astype prepare_word_embeddings OrderedDict infer_paragraph_embeddings_features append DataFrame len get nanmedian OrderedDict nanmean lower nanstd flatten nan append dropna range enumerate split
# Sherlock: code, data, and trained model. Sherlock is a deep-learning approach to semantic data type detection, i.e. labeling tables with column types such as `name`, `address`, etc. This is helpful for, among others, data validation, processing and integration. This repository provides data and code to guide usage of Sherlock, retraining the model, and replication of results. Visit https://sherlock.media.mit.edu for more background on this project. ## Installation of package 1. You can install Sherlock by cloning this repository, and run `pip install .`. 2. Install dependencies using `pip install -r requirements.txt` (or `requirements38.txt` depending on your Python version). ## Demonstration of usage The `00-use-sherlock-out-of-the-box.ipynb` notebook demonstrates usage of the readily trained model for a given table. The notebooks in `notebooks/` prefixed with `01-data processing.ipynb` and `02-1-train-and-test-sherlock.ipynb` can be used to reproduce the results, and demonstrate the usage of Sherlock (from data preprocessing to model training and evaluation). ## Data The raw data (corresponding to annotated table columns) can be downloaded using the `download_data()` function in the `helpers` module.
3,001
mitsu-h/deepvoice3
['speech synthesis']
['Deep Voice 3: Scaling Text-to-Speech with Convolutional Sequence Learning']
deepvoice3_pytorch/frontend/text/cleaners.py deepvoice3_pytorch/frontend/text/symbols.py vctk_preprocess/prepare_vctk_labels.py lrschedule.py deepvoice3_pytorch/frontend/en/__init__.py deepvoice3_pytorch/frontend/es/__init__.py deepvoice3_pytorch/conv.py ljspeech.py compute_timestamp_ratio.py train_seq2seq.py deepvoice3_pytorch/frontend/text/cmudict.py train_world.py deepvoice3_pytorch/frontend/text/numbers.py hparam_tf/hparam.py nikl_preprocess/prepare_metafile.py nikl_m.py vctk.py load_npy_time.py deepvoice3_pytorch/frontend/ko/__init__.py deepvoice3_pytorch/frontend/jp/__init__.py tests/test_deepvoice3.py deepvoice3_pytorch/deepvoice3.py tests/test_embedding.py deepvoice3_pytorch/modules.py load_test.py tests/test_audio.py deepvoice3_pytorch/__init__.py tests/test_conv.py gentle_web_align.py vctk_preprocess/extract_feats.py audio.py deepvoice3_pytorch/frontend/__init__.py training_module.py vctk_preprocess/prepare_htk_alignments_vctk.py preprocess.py hparams.py deepvoice3_pytorch/builder.py nikl_s.py tests/test_nyanko.py train_linear.py deepvoice3_pytorch/frontend/text/__init__.py setup.py tests/test_frontend.py dump_hparams_to_json.py synthesis.py jsut.py json_meta.py text_preprocessing.py deepvoice3_pytorch/nyanko.py _build_mel_basis preemphasis load_wav save_wav _denormalize inv_preemphasis melspectrogram _lws_processor world_synthesize _linear_to_mel _db_to_amp _amp_to_db inv_spectrogram spectrogram world _normalize json2hts write_hts_label gentle_request hparams_debug_string _process_utterance_single build_from_path start_at end_at _process_utterance _process_utterance build_from_path _process_utterance build_from_path time_count load_npy cyclic_cosine_annealing noam_learning_rate_decay step_learning_rate_decay _process_utterance build_from_path _process_utterance build_from_path preprocess write_metadata develop create_readme_rst build_py tts _load txt_prepro logit time_string save_checkpoint save_alignment save_states ApDataSource _load restore_parts _pad_2d MelSpecDataSource _load_embedding SpDataSource plot_alignment eval_model _pad build_model prepare_spec_image PartialyRandomizedSimilarTimeLengthSampler F0DataSource load_checkpoint TextDataSource LinearSpecDataSource _NPYDataSource train PyTorchDataset collate_fn train PyTorchDataset collate_fn eval_model train PyTorchDataset collate_fn _process_utterance end_at build_from_path start_at deepvoice3_multispeaker deepvoice3 nyanko Conv1d _clear_modules Decoder LinearConverter Encoder AttentionLayer Converter WorldConverter expand_speaker_embed Linear_relu get_mask_from_lengths ConvTranspose1d Embedding sinusoidal_encode position_encoding_init Conv1dGLU HighwayConv1d Conv1d SinusoidalEncoding GradMultiply Linear Converter Decoder _clear_modules Encoder MultispeakerSeq2seq AttentionSeq2Seq MultiSpeakerTTSModel mix_pronunciation _maybe_get_arpabet text_to_sequence text_to_sequence normalize_delimitor _yomi text_to_sequence _mix_pronunciation sequence_to_text add_punctuation mix_pronunciation sequence_to_text text_to_sequence lowercase english_cleaners expand_abbreviations collapse_whitespace basic_cleaners add_punctuation convert_to_ascii transliteration_cleaners expand_numbers _parse_cmudict _get_pronunciation CMUDict normalize_numbers _expand_dollars _expand_ordinal _expand_decimal_point _expand_number _remove_commas text_to_sequence _clean_text _symbols_to_sequence _should_keep_symbol sequence_to_text _arpabet_to_sequence parse_values _reuse_fail _cast_to_type_if_compatible _process_scalar_value HParams _process_list_value _parse_fail execute pwrap pe test_amp_to_db test_conv1d_incremental test_incremental_correctness _pad test_single_speaker_deepvoice3 _deepvoice3 _get_model test_multi_speaker_deepvoice3 _pad_2d test_incremental_path_multiple_times test_incremental_forward _test_data test_sinusoidal test_en test_ja_jsut test_en_lj test_ja test_nyanko test_incremental_correctness _pad test_nyanko_basics test_incremental_path_multiple_times _pad_2d _test_data load_binary_file_frame replace_conflines replace_write extract_final_features generate_merlin_wav subfolder_select pwrap array_to_binary_file extract_intermediate_features pe save_numpy_features load_binary_file execute get_reconstructions copytree json2hts on_progress write_hts_label do int16 sample_rate write astype abs max preemphasis stft _amp_to_db spec_ref_level_db abs _denormalize griffinlim _db_to_amp power spec_ref_level_db preemphasis stft _linear_to_mel _amp_to_db spec_ref_level_db abs power_to_db sp_ref_level_db wav2world astype abs double astype _build_mel_basis exp log min_level_db print append str float len print basename json list values submit join list format partial items isinstance endswith print ProcessPoolExecutor loads dirname ignore_recognition_level split append keys len range len range len load_wav process_only_htk_aligned save max exists basename rescaling format replace astype start_at load int join T sample_rate float32 trim end_at rescaling_max load_wav process_only_htk_aligned save max exists basename rescaling format replace astype start_at load int join T sample_rate float32 trim end_at rescaling_max zip collect_files enumerate world load join list append argmax enumerate split time load_npy minimum float build_from_path write_metadata makedirs print sample_rate hop_size sum max print check_call T _denormalize text_to_sequence world_synthesize make_generation_fast_ eval inv_spectrogram to numpy array load list split pad subplots xlabel close ylabel colorbar tight_layout imshow savefig T plot_alignment min max flip join tts format T save_wav add_image transpose makedirs add_audio load_state_dict to save_alignment enumerate state_dict save_world add_audio save_alignment transpose len inv_spectrogram save_wav format _denormalize world_synthesize add_image prepare_spec_image join T enumerate print min numpy makedirs join format print save training_type print _load format load_state_dict update format print load_state_dict state_dict LongTensor FloatTensor clone unsqueeze array max outputs_per_step L1Loss model clip_grad_norm_ zero_grad clip_grad_value_ save_checkpoint max save_states binary_criterion view step getattr to outputs_per_step format eval_model param_groups l1 size item float BCELoss lr_schedule enumerate lr_schedule_f backward print add_scalar tqdm numpy get_trainable_parameters len _denormalize text_to_sequence make_generation_fast_ eval numpy array int world_upsample int world_upsample available_speakers labels TranscriptionDataSource AttentionSeq2Seq Decoder LinearConverter Encoder WorldConverter MultispeakerSeq2seq MultiSpeakerTTSModel AttentionSeq2Seq Decoder Encoder Converter MultiSpeakerTTSModel AttentionSeq2Seq Decoder Encoder Converter max MultiSpeakerTTSModel size expand clear_buffer float array cos sin clone cos sin normal_ zero_ kaiming_normal_ weight zero_ Linear uniform_ normal_ zero_ sqrt zero_ normal_ zero_ enumerate join join mix_pronunciation normalize_numbers replace append split Tagger _yomi parse replace normalize_delimitor add_punctuation hira2kata normalize sub replace lowercase collapse_whitespace lowercase convert_to_ascii collapse_whitespace upper convert_to_ascii expand_abbreviations collapse_whitespace append _get_pronunciation sub split split group split int group sub match group len cleaner getattr int _reuse_fail format parse_fn type issubclass groupdict end match _process_scalar_value _process_list_value _parse_fail Popen readline wait close pwrap iter append print execute _amp_to_db _db_to_amp rand deepvoice3 LongTensor size rand array max AttentionSeq2Seq Decoder Encoder Converter MultiSpeakerTTSModel model _test_data _get_model LongTensor model print size rand _get_model array max LongTensor model print reshape eval abs array len abs embed_speakers view from_numpy _pad_2d dirname encoder LongTensor size start_fresh_sequence eval incremental_forward load join decoder print reshape array len _plot make_generation_fast_ abs max cuda view from_numpy _pad_2d load_state_dict dirname encoder LongTensor size start_fresh_sequence eval incremental_forward load join decoder print reshape _get_model array len print Embedding position_encoding_init SinusoidalEncoding numpy long getattr sequence_to_text text_to_sequence getattr sequence_to_text text_to_sequence format text_to_sequence print sequence_to_text TranscriptionDataSource getattr collect_files trange len format text_to_sequence print sequence_to_text TranscriptionDataSource getattr collect_files trange len model _test_data nyanko nyanko nyanko _plot seq2seq abs view from_numpy _pad_2d encoder LongTensor size start_fresh_sequence eval incremental_forward load decoder print reshape postnet nyanko numpy array len enumerate replace_conflines join remove lexists isdir copystat readlink st_mode symlink ignore lstat lchmod copy2 listdir S_IMODE makedirs fromfile reshape close open tofile array close open reshape size close fromfile open strip exists open str replace_write getcwd escape pe writelines append format chdir glob close mkdir listdir enumerate int read format_info_tup print write symlink embed str chdir getcwd print min replace_write pe symlink mkdir abspath sleep listdir copytree len tuple abspath copy2 savez_compressed seed str list sorted load_binary_file_frame getcwd append next range astype shuffle set lower mkdir zip enumerate remove print min symlink array len join list load_binary_file_frame str format chdir getcwd array_to_binary_file pe mkdir abspath dirname keys range print reshape generate_merlin_wav load debug list items print wait Popen
# Deepvoice3の再現実装 [r9y9](https://github.com/r9y9/deepvoice3_pytorch) 様の実装したDeepvoice3を、より論文に近いネットワーク構造へと実装し直しました。具体的な変更点は - 言語処理部を、論文の形式へと変更 - 1×1convをすべて全結合層(FC)へと変更 - attention layerを全てのDecoder layerに適用 - positional encodingはEmbeddingで特徴量次元に合わせるのではなく、特徴量方向にexpandしたものを使用 - 各種ハイパーパラメータを論文に遵守 - `torch.nn.utils.weight_norm(dim=None)`に変更し,各層の出力を正規化するのではなく,ネットワーク全体を通して出力を正規化するように変更.詳しくは[こちら](https://pytorch.org/docs/master/generated/torch.nn.utils.weight_norm.html) 1. [arXiv:1710.07654](https://arxiv.org/abs/1710.07654): Deep Voice 3: Scaling Text-to-Speech with Convolutional Sequence Learning. ## Requirements
3,002
mjhosseini/linkpred_entgraph
['link prediction']
['Duality of Link Prediction and Entailment Graph Induction']
bashmagic/bashmagic/core.py spodernet/utils/spacy_util.py spodernet/utils/cuda_utils.py convE/evaluation.py constants/constants.py randWalk/randWalkMatFactory.py convE/util.py spodernet/frontend.py spodernet/preprocessing/processors.py spodernet/data/snli2spoder.py spodernet/utils/global_config.py convE/model.py spodernet/backends/tfmodels.py spodernet/backends/tfbackend.py convE/main.py bashmagic/bashmagic/__init__.py spodernet/preprocessing/pipeline.py spodernet/preprocessing/vocab.py convE/wrangle_KG.py spodernet/interfaces.py spodernet/hooks.py bashmagic/setup.py spodernet/backends/torchbackend.py randWalk/randWalkMat.py spodernet/preprocessing/batching.py spodernet/utils/util.py spodernet/utils/logger.py convE/graph.py spodernet/backends/torchmodels.py read execute unzip get_active_window_path get_active_window_coordinates sort_dict_by_value get_files_paths_for_folder execute_and_return get_active_window_name get_files_by_filetype wget get_folder_paths_for_folder ConstantsUnaryToBinary ConstantsRWalk ranking_and_hits_entGraph get_freq_entities get_all_ent_pairs ranking_and_hits compute_probs Graph Node OEdge main preprocess Complex DistMult ConvE getPredEnt get_AllRels get_AllEntities get_sparse_matrix_and_rel2Idx read_graphs write_evaluation_graph write_training_graph RandWalkMatrix RandWalkMatrixFactory Embedding Trainer AbstractModel Model PairedBiDirectionalLSTM SoftmaxCrossEntropy AccuracyHook LossHook IntersectionHook TopKRankingLoss ETAHook AbstractHook IAtIterEndObservable IAtEpochEndObservable IAtEpochStartObservable IAtBatchPreparedObservable build_str2var_dict TFTrainer TensorFlowConverter TensorFlowConfig predictor reader TFEmbedding TFPairedBiDirectionalLSTM TFSoftmaxCrossEntropy train_model TorchCUDAConverter TorchNegativeSampling eval_model get_list_of_torch_modules TorchConverter TorchSoftmaxCrossEntropy TorchPairedBiDirectionalLSTM TorchBiDirectionalLSTM TorchEmbedding TorchVariableLengthOutputSelection StreamBatcher DataLoaderSlave BatcherState StreamMethods DatasetStreamer Pipeline SaveLengthsToState AbstractProcessor POSTokenizer AbstractLoopLevelListOfTokensProcessor ToLower CustomTokenizer Idx2MultiTargetConverter DependencyParser RemoveLineOnJsonValueCondition NERTokenizer VariableLengthSorter KeyToKeyMapper StreamToBatch SaveStateToList Tokenizer ConvertTokenToIdx TfidfFitter AbstractLoopLevelTokenProcessor StreamToHDF5 DictConverter TargetIdx2MultiTarget TfidfTransformer DeepSeqMap ApplyFunction JsonLoaderProcessors SentTokenizer DictKey2ListMapper NaiveNCharTokenizer SaveMaxLengthsToState ListIndexRemapper AddToVocab Vocab CUDATimer Config Backends get_logger_path GlobalLogger get_home_path make_dirs_if_not_exists Logger LogLevel merge_verbs merge_tokens merge_with_set extract_triples merge_noun_phrases merge_entities xavier_uniform_weight save_sparse_hdf save_data load_sparse_hdf load_hdf5_paths save_dense_hdf get_home_path make_dirs_if_not_exists get_data_path load_data PercentileRejecter Timer embedding_sequence2text load_dense_hdf format format communicate Popen split append splitext get_files_paths_for_folder get_folder_paths_for_folder execute split strip sub format split format batch_size sort get_freq_entities mean numpy array item info append float forward long range enumerate format getPredEnt batch_size sort get_freq_entities mean array item info append float numpy long range enumerate items list defaultdict sorted strip open append range split defaultdict strip add open split str sorted batch_size write set add get_all_ent_pairs numpy info append forward range enumerate idx2token log ToLower save_vocabs CustomTokenizer dataset add_token_processor clear_processors ConvertTokenToIdx format StreamToHDF5 add_stream_processor zip execute Pipeline DatasetStreamer JsonLoaderProcessors DictKey2ListMapper add_post_processor set_path add_sent_processor AddToVocab Complex subscribe_to_start_of_epoch_event batch_size StreamBatcher zero_grad LossHook DistMult numpy save read_graphs dataset forward cuda open str load_vocabs Adam subscribe_to_events load_state_dict append process sum ETAHook to range state_dict format get_AllRels insert TargetIdx2MultiTarget size get_AllEntities close preprocess eval mkdir init float Pipeline enumerate load num_token label_smoothing_epsilon backward print ConvE probs_file_path write parameters model_name cpu train step loss items list csr_matrix pred2Node id w dict idx append oedges range len list print sort Graph dict get_sparse_matrix_and_rel2Idx types ArgumentParser listdir set_Ws data device forward max list csr_matrix ones append range replace num_entities enumerate print clamp argsort zeros numpy array split num_token add set append range num_token add set append range input_length support_length support index target inp fully_connected sparse_softmax_cross_entropy_with_logits reduce_mean arg_max softmax xavier_initializer append hasattr modules get_list_of_torch_modules backward step zero_grad Adam from_iterable parameters append train forward cuda range enumerate eval forward enumerate get_list_of_torch_modules TORCH makedirs INFO tag_ text noun_chunks ent_type_ merge label_ text ents dep_ merge range merge range idx merge merge_verbs set merge_with_set merge_noun_phrases merge_entities append debug_once File close create_dataset get debug_once File close data join csr_matrix save_dense_hdf indptr indices shape split join load_dense_hdf split load_sparse_hdf join exists split save_sparse_hdf isinstance size save_dense_hdf float sum append load_data sqrt isinstance Variable get_word append numpy
<div class=figure> <p align="center"><img src="https://www.dropbox.com/s/jz09uugbyzdkoun/toy_acl2019.jpg?raw=1" width="300" height=auto></p> <p align="center"><small><i>(A) Link Prediction, (B) Entailment Graph Induction</i></small></p> </div> This codbase contains the PyTorch implementation of the following paper: **Duality of Link Prediction and Entailment Graph Induction**, *Mohammad Javad Hosseini, Shay B. Cohen, Mark Johnson, and Mark Steedman. Association for Computational Linguistics (ACL 2019).* [[paper]](https://www.aclweb.org/anthology/P19-1468.pdf) ## Setup ### Cloning the project and installing the requirements git clone https://github.com/mjhosseini/linkpred_entgraph.git
3,003
mkduer/semantic-fluency-nn
['language acquisition']
['Predicting and Explaining Human Semantic Search in a Cognitive Model']
src/algorithms/hill_climbing.py src/visualization/networkx_plot.py src/text/text_wrangler.py src/algorithms/irt.py tests/test_semantic_graph.py src/algorithms/random_walk.py src/graph/semantic_network.py src/visualization/constants.py experiments/tSNE_prototype.py experiments/irt_comparisons.py src/algorithms/simulated_annealing.py src/visualization/irt_plot.py src/visualization/tsne_plot.py tests/test_text_wrangler.py tests/test_graph.py src/graph/Graph.py experiments prototype HillClimber IRT RandomWalker SimulatedAnnealer UndirectedGraph _select_subset SemanticNetwork Corpus IRTPlot NetworkxPlot TsnePlot TestGraphMethods SemanticGraphTests TestTextWrangler MAX_ITERATIONS RandomWalker run str SemanticNetwork HillClimber append range Corpus TOTAL_TESTS update IRTPlot HC_REPEAT zip SimulatedAnnealer calculate generate_plots graph print W2V_ETA sentence_matrix Word2Vec train C_COMPONENTS C_PERPLEXITY reduce_clusters DIM3_PERPLEXITY str reduce_model DIM3_COMPONENTS C_ITER wv visualize_embeddings_3D similarity_clusters visualize_clusters Corpus range process_vectors save_title TOP_N DIM3_ETA C_ETA visualize_embeddings_2D W2V_ETA TsnePlot CLUSTER_KEYS DIM3_ITER sentence_matrix Word2Vec train int choice
## Replicating Human Semantic Fluency Artificial Intelligence Winter 2019 CS 441/541 ## Authors Alejandro Espinoza ([azespinoza](https://github.com/azespinoza)) Michelle Duer ([mkduer](https://github.com/mkduer)) Alli Wong ([wonal](https://github.com/wonal)) Carson Cook ([cjc77](https://github.com/cjc77)) Jacob Collins ([jacobmcollins](https://github.com/jacobmcollins))
3,004
mkocaoglu/Entropic-Causality
['causal inference']
['Entropic Causal Inference']
entropicCausalPair.py causalLabels.py Tuebingen_loop.py entropy_minimizer remove_outliers quantize_data decide_quantization calc_entropy remove_zero_columns read_file CausalPair estimate_conditionals main read_csv Ymax Ymin Xmax nofsamples digitize decide_quantization Xmin unique Y append X min len IsolationForest RandomState predict fit astype zeros float sum range all append remove_zero_columns min max entropy_minimizer print remove_outliers quantize_data calc_entropy estimate_conditionals read_file CausalPair abs
# Entropic-Causality Test causal direction using a lower bound on the entropy of the exogenous variable in the causal model. The model with smaller total input entropy is chosen as the true model. Requires numpy, pandas, sklearn packages. INPUT: For a text file with two columns, with no header, first column is X and second column is Y. Algorithm outputs either X->Y or Y->X with a score that indicates how confident it is in its decision. pair0001.txt is taken from CauseEffectPairs repository at https://webdav.tuebingen.mpg.de/cause-effect/ HOW TO RUN: To test on this cause effect pair, download entropicCausalPair.py and pair0001.txt into the same folder and run python entropicCausalPair.py pair0001.txt To test it on every (scalar) causal pair in the Tuebingen dataset, download every pair from https://webdav.tuebingen.mpg.de/cause-effect/ into the same folder and run
3,005
mktoid/made-thousand-facial-landmarks
['face alignment', 'data augmentation']
['Wing Loss for Robust Facial Landmark Localisation with Convolutional Neural Networks']
hack_utils.py hack_train.py validate parse_arguments main train predict TransformByKeys restore_landmarks_batch CropCenter create_submission ScaleMinSideToSize ThousandLandmarksDataset restore_landmarks add_argument ArgumentParser backward cpu float zero_grad tqdm loss_fn to step append float tqdm eval loss_fn to append reshape tqdm eval restore_landmarks_batch zeros to numpy enumerate data validate in_features l1_loss DataLoader str Adam to ThousandLandmarksDataset range predict format inf Compose create_submission Linear load join print now parameters isfile train epochs mse_loss join int iterrows reshape len write astype map eval array read_csv open
# MADE CV Homework #1 http://data.mail.ru/ Thousand Facial Landmarks https://www.kaggle.com/c/made-thousand-facial-landmarks/ Основное в решении: resnext101wsl, нормализация imagenet, пробовал использовать Wing Loss (https://arxiv.org/pdf/1711.06753.pdf), а так же информацию из этого же пейпера, что для задачи Facial Landmark Localisation, L1 и smooth L1 loss дают лучшее качестве чем L2. Аугментации (яркость/контраст/affine) - не улучшили В итоге решение - соло, 6 эпох, l1_loss
3,006
mlech26l/learning-long-term-irregular-ts
['sequential image classification', 'time series']
['Learning Long-Term Dependencies in Irregularly-Sampled Time Series']
node_cell.py irregular_sampled_datasets.py xor_task.py torch_node_cell.py et_smnist.py walker_kinematic.py pt_trainer.py person_activity.py Walker2dImitationData ETSMnistData PersonData XORData VanillaRNN BidirectionalRNN GRUD HawkLSTMCell LSTMCell CTGRU GRUODE ODELSTM CTRNNCell PhasedLSTM load_dataset ODELSTM ODELSTMCell IrregularSequenceLearner train_mask DataLoader test_t test_x ETSMnistData train_elapsed TensorDataset XORData LongTensor train_t size train_y test_y test_events test_mask item int train_x PersonData test_elapsed train_events Tensor
# Learning Long-Term Dependencies in Irregularly-Sampled Time Series This is the official code repository of the paper *Learning Long-Term Dependencies in Irregularly-Sampled Time Series* [[arXiv link]](https://arxiv.org/pdf/2006.04418.pdf). ![alt](misc/state_table.png) ## Update January 2021 - PyTorch support added Efficient and flexible **PyTorch** implementation added. Supports adaptive step-size solvers through the [TorchDyn](https://github.com/DiffEqML/torchdyn) package, as well as much faster but less precise custom implemented fixed-stepsize solvers. The file [torch_node_cell.py](https://github.com/mlech26l/ode-lstms/blob/master/torch_node_cell.py) contains the implementation of the ODE-LSTM. The file [pt_trainer.py](https://github.com/mlech26l/ode-lstms/blob/master/pt_trainer.py) uses [PyTorch-Lightning](https://github.com/PyTorchLightning/pytorch-lightning) to train a ODE-LSTM on some of the datasets of the paper. In particular, the PyTorch implementation give lightly better results than the TensorFlow implemenation.
3,007
mlech26l/ode-lstms
['sequential image classification', 'time series']
['Learning Long-Term Dependencies in Irregularly-Sampled Time Series']
node_cell.py irregular_sampled_datasets.py xor_task.py torch_node_cell.py et_smnist.py walker_kinematic.py pt_trainer.py person_activity.py Walker2dImitationData ETSMnistData PersonData XORData VanillaRNN BidirectionalRNN GRUD HawkLSTMCell LSTMCell CTGRU GRUODE ODELSTM CTRNNCell PhasedLSTM load_dataset ODELSTM ODELSTMCell IrregularSequenceLearner train_mask DataLoader test_t test_x ETSMnistData train_elapsed TensorDataset XORData LongTensor train_t size train_y test_y test_events test_mask item int train_x PersonData test_elapsed train_events Tensor
# Learning Long-Term Dependencies in Irregularly-Sampled Time Series This is the official code repository of the paper *Learning Long-Term Dependencies in Irregularly-Sampled Time Series* [[arXiv link]](https://arxiv.org/pdf/2006.04418.pdf). ![alt](misc/state_table.png) ## Update January 2021 - PyTorch support added Efficient and flexible **PyTorch** implementation added. Supports adaptive step-size solvers through the [TorchDyn](https://github.com/DiffEqML/torchdyn) package, as well as much faster but less precise custom implemented fixed-stepsize solvers. The file [torch_node_cell.py](https://github.com/mlech26l/ode-lstms/blob/master/torch_node_cell.py) contains the implementation of the ODE-LSTM. The file [pt_trainer.py](https://github.com/mlech26l/ode-lstms/blob/master/pt_trainer.py) uses [PyTorch-Lightning](https://github.com/PyTorchLightning/pytorch-lightning) to train a ODE-LSTM on some of the datasets of the paper. In particular, the PyTorch implementation give lightly better results than the TensorFlow implemenation.
3,008
mlepori1/Representations_Of_Syntax
['data augmentation']
['Representations of Syntax [MASK] Useful: Effects of Constituency and Dependency Structure in Recursive LSTMs']
Corpus_Processing/bracketer.py Natural_Language/MARCC Scripts/test_biLSTM.py Models/models.py Natural_and_Artificial/test_artificial.py Natural_Language/MARCC Scripts/test_dep.py Corpus_Processing/dependency_utils.py Natural_Language/MARCC Scripts/test_const.py Natural_and_Artificial/MARCC/test_aug500_const_1.py Natural_and_Artificial/MARCC/test_aug500_dep_1.py Natural_and_Artificial/MARCC/test_aug500_hybrid_1.py Natural_and_Artificial/MARCC/test_aug500_biLSTM_1.py Corpus_Processing/__init__.py Natural_Language/__init__.py Models/__init__.py Artificial_Corpus_Examples/__init__.py Natural_Language/utils.py Natural_Language/MARCC Scripts/train_const.py Natural_and_Artificial/augment_models.py Natural_Language/MARCC Scripts/test_hybrid.py Natural_Language/MARCC Scripts/train_dep.py Natural_Language/preprocess_data.py Natural_Language/MARCC Scripts/train_biLSTM.py Natural_Language/MARCC Scripts/train_hybrid.py Artificial_Corpus_Examples/test_models_artificial.py make_set remove_spurious convert_paren_form_to_bracket parse_to_tree_input get_next_level get_string_from_parse parse_to_pairs create_dependency_tree create_dep_tags convert_stanford_to_gov_dict convert_to_gold_dep order_doc parse_dep_grammar string_const_tree order_strings_by_dep BidirectionalLSTM HybridTreeLSTM DependencyTreeLSTM ConstituencyTreeLSTM TreeLSTMClassifier make_set make_set create_embedding_dictionary create_word_idx_matrices count_parameters count_parameters count_parameters count_parameters convert_paren_form_to_bracket open create_dependency_tree len intersection append range string_const_tree close shuffle set convert_to_gold_dep deepcopy print create_dep_tags index order_doc split get_string_from_parse parse_to_tree_input order_strings_by_dep append enumerate append enumerate append enumerate remove_spurious get_next_level append parse_to_pairs split len range replace split len range replace split deepcopy len range split append split index open pop deepcopy str isdigit int replace len index append range split str int len append range enumerate split inf index split range len len reverse append enumerate split deepcopy list sort len set append range split int to_conll enumerate split normal list print ones split open zeros keys range len int split startswith open
# Representations_Of_Syntax Code and Resources for the paper 'Representations of Syntax [MASK] Useful: Effects of Constituency and Dependency Structure in Recursive LSTMs' by Lepori, Linzen, and McCoy. This repository is structured as follows: - Artificial Corpus Examples: Contains code to train and run models on artificial corpora. This takes very little time, compared to the natural language training. Thus, it may be useful as a toy example. - Corpus Processing: Contains files of helper functions to convert parse trees into representations that the Tree LSTMs can use. - Models: Contains the code implementing the models from Tai et al. (2015) https://arxiv.org/abs/1503.00075, a bidirectional LSTM, and the head-lexicalized tree LSTM. - Natural Language: Contains the Code to process the LGD dataset from Linzen et al (2016) https://arxiv.org/abs/1611.01368. Also contains the scripts ran on the Maryland Advanced Research Computing Center (MARCC) to obtain results on the natural language corpora. All of these scripts take a long time to run. - Natural and Artificial: Contains the code to test pretrained models on the artificial test set. To reproduce our results on the artificial test set, configure the main method of the script test_artificial.py, load in the correct pretrained model (either before or after augmentation), and run. Also contains the code to augment the pretrained models using a variety of PCFG-generated corpora. This also contains example scripts used to test the augmented models on natural language on the Maryland Advanced Research Computing Center (MARCC). - Pretrained Models: Contains all models used in the final paper. Notes:
3,009
mlepori1/Unequal_Representations
['word embeddings']
['Unequal Representations: Analyzing Intersectional Biases in Word Embeddings Using Representational Similarity Analysis', 'Unequal Representations: Analyzing Intersectional Biases in Word Embeddings Using Representational Similarity Analysis']
glove_utils/utils.py glove_utils/create_small_embed_matrix.py BERT_Sentence_Tests.py glove_Word_Tests.py BERT_Word_Tests.py preprocess_data find_keyword make_concept get_bert_embeds preprocess_data make_concept get_bert_embeds preprocess_data make_concept get_glove_embeds create_embedding_dictionary create_word_idx_matrices append lower replace from_pretrained reshape convert_tokens_to_ids find_keyword eval append tensor numpy tokenize len zeros range len upper print create_embedding_dictionary append create_word_idx_matrices normal list print ones split open zeros keys range len
mlepori1/Unequal_Representations
3,010
mlindauer/GenericWrapper4AC
['experimental design']
['Pitfalls and Best Practices in Algorithm Configuration']
test/test_calls/test_checker.py test/test_resources/pi.py genericWrapper4AC/generic_wrapper.py examples/SGD/sgd_ta.py test/test_resources/mem_str.py test/test_calls/test_calls.py genericWrapper4AC/argparser/parse.py examples/artificial_example/target_algorithm.py setup.py examples/dummy_wrapper/dummy_wrapper.py examples/artificial_example/wrapper.py genericWrapper4AC/data/data.py test/test_resources/test_limits.py genericWrapper4AC/domain_specific/satwrapper.py examples/SGD/SGDWrapper.py examples/MiniSAT/MiniSATWrapper.py InstallRunsolver ArtWrapper DummyWrapper MiniSATWrapper SGDWrapper AbstractWrapper signalHandler parse parse_config_old get_extended_parser parse_config_new get_parser Data SatWrapper TestCalls TestChecker TestResourceLimits exit add_argument ArgumentParser add_argument mem_limit parse_config_old max_quality parse_known_args get_extended_parser runsolver parse_config_new tmp_dir int Data min dict float cutoff seed int Data min dict instance cutoff
# Generic Wrapper for Algorithm Configuration The generic wrapper is a base class to easily implement your own interface between your algorithm and an algorithm configurator (such as ParamILS or SMAC). The generic wrapper is developed and maintained by members of the [AutoML](http://www.automl.org) Group at the University of Freiburg and the [Beta Lab](http://www.cs.ubc.ca/labs/beta/) of the university of British Columbia. Status for master branch: [![Build Status](https://travis-ci.org/automl/GenericWrapper4AC.svg?branch=master)](https://travis-ci.org/automl/GenericWrapper4AC) Status for dev branch: [![Build Status](https://travis-ci.org/automl/GenericWrapper4AC.svg?branch=dev)](https://travis-ci.org/automl/GenericWrapper4AC) ## INSTALLATION We provide a `setup.py` script which can be used to install generic wrapper as a package and which also installs all dependencies (including `runsolver`). ``` python setup.py install
3,011
mlmed/dl-web-xray
['medical diagnosis', 'domain generalization', 'out of distribution detection']
['On the limits of cross-domain generalization in automated X-ray prediction', 'A Benchmark of Medical Out of Distribution Detection']
scripts/webdl_utils.py scripts/onnx2tf.py load_graph_base load_graph load_graph2 convert_tf2tfjs convert_onnx2tf_pb convert_tf_pb2savedmodel load print get_distribution check_model prepare export_graph print SavedModelBuilder get_distribution save
# Chester the AI Radiology Assistant Source code or this page: https://mlmed.org/tools/xray/ ![](res/dr-convnet-small.png) NOT FOR MEDICAL USE. In order to bridge the gap between AI researchers and medical professionals we developed a very accessible free prototype system which can be used by medical professionals to understand the reality of Deep Learning tools for chest X-ray diagnostics. The system is designed to be a second opinion where a user can process an image to confirm or aid in their diagnosis. The tool predicts 18 different radiological findings based on data from the 7 largest public datasets. What makes this tool unique is that the web version runs entirely local and no data is sent off the device which allows this tool to scale to millions of users for free. The tool is available as a webpage which works on computers and mobile phones and with our new version 3 release we provide native windows and mac versions. The goals of this system are: Demonstrate how AI systems work and their limitations. Show the potential of open data (needed to build a public system like this). Create a tool to help teach radiology. Demonstrate a model delivery system that can scale to provide free medical tools to the world. Publications: - Chester: A Web Delivered Locally Computed Chest X-Ray Disease Prediction System, Joseph Paul Cohen and Paul Bertin and Vincent Frappier, arxiv, https://arxiv.org/abs/1901.11210
3,012
mlyg/mixed-focal-loss
['medical image segmentation', 'semantic segmentation']
['Unified Focal loss: Generalising Dice and cross entropy-based losses to handle class imbalanced medical image segmentation']
loss_functions.py
# Unified Focal loss Repository for the code used in "Unified Focal Loss: Generalising Dice and Cross Entropy-based Losses to Handle Class Imbalanced Medical Image Segmentation". ## Source **Update:** The published version of the paper can be found at: https://www.sciencedirect.com/science/article/pii/S0895611121001750 ## Description of repository contents In this repository, please find the associated Tensorflow/Keras implementation for the following loss functions: 1. Dice loss 2. Tversky loss 3. Combo loss 4. Focal Tversky loss (symmetric and asymmetric)
3,013
mmalekzadeh/privacy-preserving-bandits
['multi label classification']
['Privacy-Preserving Bandits']
bandipy/plotter.py bandipy/basepolicy.py bandipy/prior.py bandipy/__init__.py bandipy/experiment.py bandipy/environment.py bandipy/simulation.py bandipy/datasets.py bandipy/policy.py BasePolicy Random Greedy UCB EpsilonGreedy CriteoDatasets Synthetic MultiLabelDatasets ActionSpace RandomBanditEnv ContextSpace RewardSpace ContextualBanditEnv Experiment ExperimentWithSampling2 RandomExperiment ExperimentOnPrivateData ExperimentWithSampling ExperimentOnData Plotter LinUCB Policy PrefPriors ContextPriors Simulation
# Privacy-Preserving-Bandits (P2B) Codes and Data accompanying our paper "[Privacy-Preserving Bandits](https://proceedings.mlsys.org/paper/2020/hash/42a0e188f5033bc65bf8d78622277c4e-Abstract.html)" ```bibtex @inproceedings{malekzadeh2020privacy, title = {Privacy-Preserving Bandits}, author = {Malekzadeh, Mohammad and Athanasakis, Dimitrios and Haddadi, Hamed and Livshits, Benjamin}, booktitle = {Proceedings of Machine Learning and Systems (MLSys '20)}, url = {https://proceedings.mlsys.org/paper/2020/file/42a0e188f5033bc65bf8d78622277c4e-Paper.pdf}, volume = {2}, pages = {350--362},
3,014
mmmayo13/tweet-sentiment-scores
['sentiment analysis']
['A Clustering Analysis of Tweet Length and its Relation to Sentiment']
src/extract_text.py src/get_tweets.py src/build_dict.py src/process_tweets.py build_sent_dict get_sent compute_sent get_unsented_words proc_tweets main proc_tweets main main get_tweets read_stream proc_tweets build_sent_dict get_sent main get_unsented_words get_sent loads append rsplit rsplit rsplit float str items print encode float sum len proc_tweets build_sent_dict compute_sent open print encode to_url sign_request from_consumer_and_token add_handler open OpenerDirector print strip read_stream get_tweets str len
## Tweet Sentiment Analysis ### Introduction Scripts for capturing tweets, creating sentiment dictionary, processing & scoring tweet sentiments, written in Python. These scripts were written to facilitate the clustering of tweet length & sentiment scores in [this research paper](http://arxiv.org/pdf/1406.3287v3.pdf). Twitter app authentication credentials are required for use of get_tweets.py. Acquire these [here](https://dev.twitter.com/). Inspiration for some of this material comes from [Bill Howe](http://homes.cs.washington.edu/~billhowe/) and his Coursera course, [Introduction to Data Science](https://www.coursera.org/course/datasci). ### Description *get_tweets.py* - Captures tweets from Twitter stream - Requires keys and secrets in order to successfully run *build_dict.py*
3,015
mnikitin/Learn-Convolutional-Neural-Network-for-Face-Anti-Spoofing
['face anti spoofing']
['Learn Convolutional Neural Network for Face Anti-Spoofing']
utils/data_utils.py utils/statistics.py start_test.py start_train.py utils/net_train.py config.py crop_images.py utils/net_generator.py utils/net_utils.py compute_data_mean_std.py main compute_mean_std_casia main process_db_casia crop_face load_net test_net_casia train_classifier prepare_svm_data save_results get_cnn_features estimate_eer print_results main estimate_hter save_config train_net_casia start_experiment main set_logging create_imglist_casia create_record_file get_alexnet train_net get_wd_mult get_rec_data_iterators get_raw_data_iterators get_hter_at_thr get_thresholds get_eer_stats eval_stat get_accuracy get_best_thr glob mean append imread std print str compute_mean_std_casia int copyMakeBorder min shape resize ceil float max imwrite print glob makedirs imread crop_face process_db_casia set_params Module bind load_checkpoint gpu Batch tolist astype swapaxes imread forward append get_cnn_features glob svm_parameter svm_problem svm_train svm_predict get_eer_stats asarray get_hter_at_thr svm_predict asarray makedirs print str load_net str list train_classifier prepare_svm_data print save_results set estimate_eer print_results append range estimate_hter test_net_casia basicConfig addHandler StreamHandler DEBUG setLevel train_net set_logging save_config makedirs str list create_record_file set create_imglist_casia start_experiment range int float train_net_casia system append shuffle glob Pooling FullyConnected SoftmaxOutput Variable Convolution LRN Activation Flatten Dropout get_alexnet Speedometer do_checkpoint set_wd_mult Module ResizeIter load_checkpoint get_wd_mult get_rec_data_iterators SGD MSRAPrelu FactorScheduler fit get_internals list_arguments dict enumerate asarray ImageIter ImageRecordIter sum append float range get_thresholds float fabs eval_stat float eval_stat float eval_stat len get_thresholds get_accuracy
# Learn-Convolutional-Neural-Network-for-Face-Anti-Spoofing Implementation of "[Learn Convolutional Neural Network for Face Anti-Spoofing](https://arxiv.org/abs/1408.5601)" paper ## Results ### CASIA intra-test Raw dataset: [dropbox](https://www.dropbox.com/s/aaz282d9wyst0w8/CASIA_faceAntisp.rar?dl=0) or [baidu](https://pan.baidu.com/s/15HyX7tizCCuwN9BKiV9_zA) (password: h5un) <table> <tr> <th rowspan="2"></th>
3,016
moabitcoin/holy-edge
['boundary detection', 'edge detection']
['Holistically-Nested Edge Detection']
hed/test.py hed/utils/io.py hed/train.py hed/losses.py hed/models/vgg16.py hed/data/data_parser.py run-hed.py main get_session sigmoid_cross_entropy_balanced HEDTester HEDTrainer DataParser Vgg16 IO get int GPUOptions HEDTrainer get_session setup print HEDTester config_file download_data print_help IO run_train gpu_limit read_yaml_file run_test run weighted_cross_entropy_with_logits float32 reduce_sum reduce_mean cast
## Holistically-Nested Edge Detection The code is also hosted at `https://github.com/harsimrat-eyeem/holy-edge` - Harsimrat Sandhawalia Input image | Final fused Edge maps | Edge maps from side layers :-------------------------:|:-------------------------:|:-------------------------: <img src="https://github.com/harsimrat-eyeem/holy-edge/blob/master/hed/example-results/35049.jpg" width="480"> | <img src="https://github.com/harsimrat-eyeem/holy-edge/blob/master/hed/example-results/animated-7.gif" width="480"> | <img src="https://github.com/harsimrat-eyeem/holy-edge/blob/master/hed/example-results/animated-levels-7.gif" width="480"> <img src="https://github.com/harsimrat-eyeem/holy-edge/blob/master/hed/example-results/201080.jpg" width="480"> | <img src="https://github.com/harsimrat-eyeem/holy-edge/blob/master/hed/example-results/animated-9.gif" width="480"> | <img src="https://github.com/harsimrat-eyeem/holy-edge/blob/master/hed/example-results/animated-levels-9.gif" width="480"> - Final fused edge maps generated at 100, 500, 1k, 1.5k, 2k, 2.5k, 3k, 3.5k, 4k, 4.5k iterations. - Edge maps form side layers generated at 5k iterations. This repository contains tensorflow implementation of the [HED model](https://github.com/s9xie/hed). Details of hyper-paramters are available in the [paper](https://arxiv.org/pdf/1504.06375.pdf) @InProceedings{xie15hed,
3,017
mobvoi/lstm_ctc
['speech recognition', 'data augmentation']
['End-To-End Speech Recognition Using A High Rank LSTM-CTC Based Model']
bin/nnet-forward.py local/ctc_token_fst.py nnet/tfrecord.py bin/nnet-train.py pyKaldiIO/kaldi_io.py nnet/class_prior.py nnet/utils.py pyKaldiIO/io_funcs.py pyKaldiIO/nnet_nnet1.py nnet/config.py bin/nnet-validate.py nnet/lstm.py pyKaldiIO/nnet_example.py bin/compute-wer.py bin/convert-to-tfrecords.py bin/nnet-decode.py pyKaldiIO/__init__.py pyKaldiIO/kaldi_holder.py nnet/graph.py pyKaldiIO/nnet_common.py nnet/__init__.py pyKaldiIO/kaldi_table.py nnet/pipeline.py nnet/moe.py pyKaldiIO/text_util.py bin/nnet-init.py bin/reorder-posterior.py nnet/funcs.py pyKaldiIO/kaldi_matrix.py pyKaldiIO/nnet_randomizer.py nnet/bilstm.py compute_errors read_text_file width initialize_global_variables allocate_global_variables compute_distance_backtrace compute_alignment normalize_tokens main parse_text_line space_padding str2bool main str2bool main str2bool main str2bool main str2bool main str2bool main str2bool create_logits_blstm get_class_prior read_label_counts str2flt str2bool str2int parse_config train validate create_graph_for_inference create_graph_for_decoding create_graph_for_validation_ctc get_create_logits create_graph_for_training_ctc get_optimizer create_logits_cudnnlstm create_logits_lstm create_moe create_pipeline_sequence_batch create_pipeline_sequential write_tfrecord _splice dataset_from_tfrecords _subsample fill_blank_path combine_label_nbest ReadFloat WspecifierOptions ReadUint8 ClassifyRxfilename ClassifyRspecifier ClassifyWspecifier ReadToken InitKaldiOutputStream LogWarning WriteToken LogInfo GetLoggerPrefix WspecifierType ReadUint32 ReadBasicType OutputType LogError WriteBasicType InitKaldiInputStream ReadInt32 RspecifierType ExpectToken ClassifyWxfilename BasicType InputType LogDebug RspecifierOptions BasicVectorHolder WriteInt32VectorToStream NewHolderByType FloatVectorHolder PosteriorHolder NnetExampleHolder HolderType FloatMatrixHolder WriteHolderValueToStream FileInputImpl OffsetFileInputImpl PipeInputImpl FileOutputImpl StandardOutputImpl Output StandardInputImpl PipeOutputImpl KaldiOutputStream KaldiInputStream Input PerColHeader Uint16ToFloat FloatVector GlobalHeader CharToFloat SparseMatrix SparseVector FloatMatrix WriteFloatVectorToStream CompressedMatrix WriteFloatMatrixToStream SequentialBaseFloatVectorReader RandomAccessPosteriorReader RandomAccessInt32VectorReader TableWriterScriptImpl SequentialNnetExampleReader SequentialBaseFloatMatrixReader SequentialTableReader TableWriterStateType RandomAccessTableReader Int32VectorWriter TableWriterArchiveImpl RandomAccessTableReaderArchiveImplBase RandomAccessFloatVectorReader SequentialTableReaderArchiveImpl SequentialTableReaderScriptImpl RandomAccessTableReaderUnsortedArchiveImpl RandomAccessTableReaderScriptImpl TableWriter SequentialTableReaderStateType RandomAccessTableReaderStateType BaseFloatMatrixWriter TableWriterBothImpl BaseFloatVectorWriter ReadIndexVector ReadIndexVectorElementBinary Index NnetIo NnetExample Nnet Softmax Component AffineTransform Sigmoid RandomizerMask NnetDataRandomizerOptions FloatVectorRandomizer Int32VectorRandomizer BasicVectorRandomizer MatrixRandomizer IsToken append list category append lower list strip dict normalize_tokens parse_text_line open append range allocate_global_variables range initialize_global_variables allocate_global_variables maxsize range len list write exit append len write range exit len list write exit width append max range len stdin to_lower parse_text_line strip compute_errors read_text_file write normalize_tokens compute_alignment compute_distance_backtrace reference encode to_character float space_padding nnet_input SequentialBaseFloatMatrixReader Close trainable_variables create_graph_for_decoding nnet_in parse_config Saver dataset_from_tfrecords nnet_config Session run restore basename create_pipeline_sequential Int32VectorWriter Write splitext info ConfigProto local_variables_initializer output global_variables_initializer nnet_output log get create_graph_for_inference apply_log BaseFloatMatrixWriter validate fatal save create_pipeline_sequence_batch exit nnet_out create_graph_for_validation_ctc objective set_random_seed seed create_graph_for_training_ctc train concat xw_plus_b log multiply get_class_prior reduce_sum shape reverse_sequence append expand_dims range get sqrt softmax info float dynamic_rnn constant truncated_normal Variable reshape float32 create_moe zeros asarray log read_label_counts sum range len int float lower str2int strip str2flt dict startswith str2bool open isnan info run isnan info run get_create_logits where assign ctc_greedy_decoder SparseTensor transpose ctc_loss merge_all reduce_sum int64 gather_nd cast get get_or_create_global_step create_logits items constant not_equal dict edit_distance add_to_collection scalar trainable_variables items constant gradients clip_by_global_norm create_graph_for_validation_ctc get_collection add_to_collection UPDATE_OPS add_n info get items create_logits squeeze get_create_logits dict add_to_collection softmax expand_dims get items ctc_beam_search_decoder create_logits transpose squeeze get_create_logits dict add_to_collection softmax expand_dims values get MultiRNNCell zero_state dynamic_rnn truncated_normal Variable reshape xw_plus_b shape sqrt info zeros float xw_plus_b exit shape batch_normalization range get sqrt info float create_ornn_next dynamic_rnn truncated_normal print reshape Variable feature_project create_moe zeros create_ornn tanh dropout truncated_normal Variable reshape multiply reduce_sum xw_plus_b sqrt expand_dims softmax zeros float padded_batch constant initializer make_initializable_iterator dict get_next cast int32 initializer make_initializable_iterator dict get_next repeat zip slice concat tile append range gather range seed int time from_tensor_slices exit shuffle map open fatal append split TFRecordWriter write FeatureList SerializeToString close dict SequenceExample stop_gradient ctc_beam_search_decoder concat reduce_max sparse_to_dense float32 indices reduce_sum edit_distance sign int64 stack cast int32 append range values multiply reduce_sum sign append expand_dims range len co_filename basename co_name __name__ f_lineno getLogger error exit stack GetLoggerPrefix stack warning GetLoggerPrefix getLogger stack GetLoggerPrefix info getLogger debug stack GetLoggerPrefix getLogger Peek LogError Read Write append Peek Read ReadToken LogError Read LogError Write LogError Read pack chr LogError Write endswith isdigit LogError startswith kScriptRspecifier kNoRspecifier split RspecifierOptions kArchiveRspecifier find endswith isdigit LogError startswith WspecifierOptions kBothWspecifier split kArchiveWspecifier kScriptWspecifier kNoWspecifier find LogError InitKaldiOutputStream cint32 LogError Write WriteBasicType range WriteInt32VectorToStream LogError WritePosteriorToStream WriteFloatVectorToStream WriteFloatMatrixToStream InitKaldiOutputStream cint32 pack tolist Write WriteBasicType range len InitKaldiOutputStream cint32 pack tolist Write WriteBasicType range len ReadInt32 ord LogError t Read x n ReadInt32 ExpectToken LogError Read append range ReadIndexVectorElementBinary Index
## MOE Mobvoi E2E speech recognition (MOE) uses high rank LSTM-CTC based models. The toolkit is inspired by [Kaldi](http://kaldi-asr.org/) and [EESEN](https://github.com/srvk/eesen). Data preparation, feature processing and WFST based graph operation is fork from Kaldi. LSTM-CTC deep model training is built based on [Tensorflow](https://www.tensorflow.org/). WFST based method from EESEN is applied to leverge token, lexicon and language model (TLG) for decoding. ### Installation The toolkit is tested on Ubuntu 16.04 LST. It requires python2.7, Tensorflow 1.8 (We haven't tested for higher version of Tensorflow), Kaldi and EESEN. * We put the Kaldi, EESEN and our LSTM-CTC toolkit in the same directory level. Otherwise, you may need to modify the path file (e.g. [path.sh](./egs/wsj/path.sh)) accordingly. ``` mkdir MOE cd MOE ``` * Install tensorflow using virtual environment. Assume the python2.7 is installed.
3,018
mobvoi/wenet
['speech recognition']
['WeNet: Production oriented Streaming and Non-streaming End-to-End Speech Recognition Toolkit', 'Unified Streaming and Non-streaming Two-pass End-to-end Model for Speech Recognition']
tools/fst/prepare_dict.py tools/cmvn_kaldi2json.py examples/multi_cn/s0/local/primewords_parse_transcript.py examples/gigaspeech/s0/local/gigaspeech_scoring.py wenet/utils/mask.py wenet/transformer/positionwise_feed_forward.py tools/segment.py runtime/server/x86_gpu/model_repo/scoring/1/model.py wenet/utils/config.py runtime/server/x86_gpu/client/client.py tools/fst/ctc_token_fst_corrected.py runtime/server/x86_gpu/client/utils.py wenet/transformer/encoder.py wenet/bin/train.py test/test_file_utils.py examples/csj/s0/csj_tools/wn.2.prep.text.py examples/gigaspeech/s0/local/extract_meta.py tools/flake8_hook.py examples/vkw2021/s0/local/vkw_kws_results.py wenet/bin/export_onnx.py wenet/bin/average_model.py examples/swbd/s0/local/format_acronyms_dict.py tools/text2token.py tools/compute_cmvn_stats.py wenet/transformer/embedding.py wenet/bin/recognize_deprecated.py docs/conf.py tools/compute-cer.py wenet/transformer/subsampling.py wenet/transformer/decoder_layer.py examples/wenetspeech/s0/local/process_opus.py wenet/transformer/swish.py wenet/utils/common.py wenet/utils/scheduler.py wenet/transformer/attention.py tools/wav2dur.py tools/fst/rnnt_token_fst.py runtime/server/x86_gpu/model_repo/feature_extractor/1/model.py wenet/transformer/ctc.py wenet/bin/export_jit.py wenet/bin/recognize_onnx.py examples/csj/s0/csj_tools/wn.1.split_wav.py tools/compute_fbank_feats.py tools/fst/ctc_token_fst.py examples/wenetspeech/s0/local/extract_meta.py runtime/server/x86_gpu/client/generate_perf_input.py wenet/dataset/processor.py wenet/dataset/dataset_deprecated.py wenet/utils/cmvn.py runtime/server/x86_gpu/scripts/convert.py wenet/transformer/encoder_layer.py examples/aishell2/s0/local/word_segmentation.py tools/compute-wer.py examples/tedlium3/s0/local/join_suffix.py wenet/transformer/label_smoothing_loss.py wenet/utils/checkpoint.py wenet/bin/alignment.py tools/merge_scp2txt.py tools/remove_longshortdata.py wenet/dataset/wav_distortion.py wenet/transformer/cmvn.py examples/csj/s0/csj_tools/wn.4.make_raw_list.py wenet/dataset/dataset.py runtime/server/x86/web/app.py examples/csj/s0/csj_tools/wn.0.parse.py tools/compute_cmvn_stats_deprecated.py tools/make_raw_list.py wenet/transformer/asr_model.py wenet/transformer/decoder.py wenet/bin/train_deprecated.py examples/swbd/s0/local/map_acronyms_transcripts.py wenet/dataset/kaldi_io.py examples/aishell4/s0/local/aishell4_process_textgrid.py runtime/server/x86_gpu/client/offline_client.py wenet/utils/executor.py wenet/transformer/convolution.py wenet/utils/file_utils.py tools/make_shard_list.py wenet/utils/ctc_util.py tools/fst/ctc_token_fst_compact.py test/test_tokenize.py wenet/bin/recognize.py examples/csj/s0/csj_tools/wn.3.mincut.py main Segment get_args procfolder_orig parsexml procfolder ch2to1 procpath xmlfn proc1file wavfn prep_text_wavscp gen_wav_scp parse_xml_set split_train_tests_xml all_wavs readtst gen_text mincut main meta_analysis get_args asr_text_post_processing main get_frames_timestamp get_labformat_frames map_words2char main meta_analysis get_args main read_file output index single_job generate SpeechClient _levenshtein_distance cal_cer TritonPythonModel Fbank TritonPythonModel test_read_non_lang_symbols test_tokenize test_non_lang_symbol_tokenize kaldi2json characterize default_cluster stripoff_tags Calculator usage width normalize characterize default_cluster stripoff_tags Calculator usage width normalize CollateFunc AudioDataset CollateFunc AudioDataset load_wav_scp parse_opts load_wav_segments load_wav_scp_dict write_tar_file shape get_parser main seg_char get_parser exist_or_not ol il s contain_oov get_frames_timestamp get_labformat generator_textgrid main get_args main get_args test to_numpy Decoder Encoder main get_args main get_args main get_args DataList DistributedSampler Dataset Processor _waveform_distortion _load_wav_with_speed _extract_feature CollateFunc _load_feature _spec_substitute AudioDataset _spec_augmentation UnknownMatrixHeader open_or_fd _read_mat_ascii read_vec_int_ark read_vec_flt_scp UnknownVectorHeader read_cntime_ark read_cntime read_vec_flt_ark write_mat write_vec_int UnsupportedDataType BadInputFormat read_post_ark SubprocessFailed write_vec_flt read_vec_int read_mat BadSampleSize read_vec_flt read_ali_ark _read_mat_binary read_key read_cnet_ark _read_compressed_mat read_segments_as_bool_vec read_vec_int_scp popen read_mat_scp read_post read_mat_ark write_ark_scp tar_file_and_group compute_fbank parse_raw url_opener resample speed_perturb sort padding shuffle static_batch spec_aug filter __tokenize_by_bpe_model dynamic_batch tokenize batch make_quad_distortion distort amp2db make_gain_db make_amp_mask make_fence_distortion generate_amp_mask distort_wav_conf_and_save make_jag_distortion db2amp distort_chain make_poly_distortion distort_wav_conf make_max_distortion init_asr_model ASRModel MultiHeadedAttention RelPositionMultiHeadedAttention GlobalCMVN ConvolutionModule CTC BiTransformerDecoder TransformerDecoder DecoderLayer NoPositionalEncoding PositionalEncoding RelPositionalEncoding ConformerEncoder BaseEncoder TransformerEncoder ConformerEncoderLayer TransformerEncoderLayer LabelSmoothingLoss PositionwiseFeedForward Conv2dSubsampling4 BaseSubsampling LinearNoSubsampling Conv2dSubsampling6 Conv2dSubsampling8 Swish load_checkpoint save_checkpoint _load_kaldi_cmvn _load_json_cmvn load_cmvn add_sos_eos log_add th_accuracy reverse_pad_list get_subsample remove_duplicates_and_blank get_activation pad_list override_config forced_align insert_blank Executor read_non_lang_symbols read_lists read_symbol_table mask_finished_scores add_optional_chunk_mask mask_finished_preds make_pad_mask subsequent_mask make_non_pad_mask subsequent_chunk_mask WarmupLR parse_args add_argument ArgumentParser strip Path fromFile stime open sorted name stem etime maxTime append Segment range close print text minTime write __len__ path len join join format print parsexml listdir join list format print apply_async close append listdir Pool range len dict join listdir replace dict join listdir replace load format write system to_mono join list format print apply_async close xmlfn Pool range keys wavfn len list append list listdir readtst append list listdir join add set join parse_xml_set split_train_tests_xml gen_text all_wavs gen_wav_scp str dirname makedirs meta_analysis get_args output_dir input_json upper replace append split load join basename append open split append append enumerate len int len read_file output read format dump print array open zeros min range len list _levenshtein_distance zip read_non_lang_symbols tokenize zip next tokenize append category append len upper isalnum stripoff_tags append range reversed startswith len print parse_args add_argument ArgumentParser load_wav_scp_dict format info strip add_argument ArgumentParser compile split readline seg_char exist_or_not encode_as_pieces end search bpe_model nchar SentencePieceProcessor split parse_args get_parser format IntervalTier print len write TextGrid add append split format print get_subsample append enumerate len print true_divide save str list dst_model int64 val_best format glob astype src_path keys argsort num array output_quant_file quantize_dynamic load_checkpoint script output_file init_asr_model checkpoint requires_grad assert_allclose batch_size data_type DataLoader fatal device read_symbol_table basicConfig non_lang_syms override_config exit read_non_lang_symbols to eval deepcopy dict test_data Dataset gpu mode InferenceSession decoder_onnx get encoder_onnx cmvn register_comm_hook cv_data model_dir DistributedDataParallel save_checkpoint set_step cv train_data cuda fp16_grad_sync Executor Adam rank sum GradScaler SummaryWriter use_amp init_process_group dist_backend tensorboard_dir info manual_seed symbol_table add_scalar makedirs set_epoch parameters symlink train WarmupLR get tar_file_and_group compute_fbank parse_raw url_opener resample speed_perturb DataList sort padding shuffle spec_aug read_lists filter Processor tokenize batch concatenate min copy randrange resize randint range randint min range copy uniform load int SoxEffectsChain apply_effects_file append_effect_to_chain sample_rate set_input_file sox_build_flow_effects split load int _waveform_distortion error sample_rate _load_wav_with_speed from_numpy uniform append fbank float numpy enumerate split append read_mat enumerate rsplit int seek search popen split open start Popen decode strip read_vec_int open_or_fd read_key read_vec_int open_or_fd split decode remove read open_or_fd close frombuffer array split pack char write open_or_fd encode range len read_vec_flt open_or_fd split read_vec_flt open_or_fd read_key decode remove read open_or_fd close frombuffer array split pack char write open_or_fd encode tobytes read_mat open_or_fd split read_mat open_or_fd read_key decode _read_mat_ascii _read_mat_binary open_or_fd decode read reshape startswith frombuffer decode vstack append array split dtype read reshape uint8_to_float_v2 frombuffer empty enumerate name format write write_mat pack char tell write open_or_fd encode tobytes open_or_fd read_post read_key decode read tolist open_or_fd close append frombuffer range read_cntime open_or_fd read_key decode read tolist open_or_fd close frombuffer loadtxt repeat astype update stdout urlparse Popen open name rfind communicate close open load int sample_rate dict loads size apply_effects_tensor choice fbank encode_as_pieces upper append compile split load strip extend upper __tokenize_by_bpe_model SentencePieceProcessor append compile split size min randint range detach append append append append size max len format fatal argsort tensor pad_sequence db2amp append uniform range make_amp_mask db2amp generate_amp_mask make_amp_mask generate_amp_mask float uniform range func float uniform range func make_quad_distortion distort make_gain_db print make_fence_distortion make_jag_distortion make_poly_distortion make_max_distortion load from_numpy save numpy distort_wav_conf get load_cmvn output_size ASRModel TransformerDecoder ConformerEncoder CTC BiTransformerDecoder GlobalCMVN float TransformerEncoder load sub load_state_dict info is_available exists isinstance DataParallel DistributedDataParallel sub save info state_dict sqrt array range len sqrt array range len _load_kaldi_cmvn _load_json_cmvn fill_ zeros max range len tensor pad_sequence sum argmax append max sum all log deepcopy print param_type type enumerate split concatenate reshape append zeros expand_dims ones insert_blank size append tensor float range max zeros len read_lists compile unsqueeze arange expand zeros min max range size device unsqueeze item subsequent_chunk_mask size unsqueeze arange expand masked_fill_ size cat zeros_like size repeat
# WeNet [![License](https://img.shields.io/badge/License-Apache%202.0-brightgreen.svg)](https://opensource.org/licenses/Apache-2.0) [![Python-Version](https://img.shields.io/badge/Python-3.7%7C3.8-brightgreen)](https://github.com/wenet-e2e/wenet) [**Roadmap**](ROADMAP.md) | [**Docs**](https://wenet-e2e.github.io/wenet) | [**Papers**](https://wenet-e2e.github.io/wenet/papers.html) | [**Runtime (x86)**](https://github.com/wenet-e2e/wenet/tree/main/runtime/libtorch) | [**Runtime (android)**](https://github.com/wenet-e2e/wenet/tree/main/runtime/android) | [**Pretrained Models**](docs/pretrained_models.md) | [**HuggingFace**](https://huggingface.co/spaces/wenet/wenet_demo)
3,019
modAL-python/modAL
['active learning']
['modAL: A modular active learning framework for Python']
examples/runtime_comparison.py examples/ensemble.py examples/shape_learning.py examples/sklearn_workflow.py examples/ranked_batch_mode.py modAL/uncertainty.py modAL/models/learners.py tests/example_tests/bayesian_optimization.py modAL/acquisition.py tests/example_tests/active_regression.py tests/example_tests/bagging.py examples/active_regression.py modAL/models/base.py examples/bagging.py examples/stream-based_sampling.py examples/query_by_committee.py modAL/utils/selection.py modAL/utils/validation.py modAL/__init__.py modAL/cluster.py modAL/density.py tests/example_tests/query_by_committee.py examples/multilabel_svm.py tests/core_tests.py modAL/multilabel.py examples/deep_bayesian_active_learning.py examples/keras_integration.py modAL/models/__init__.py tests/example_tests/ensemble.py examples/ensemble_regression.py examples/bayesian_optimization.py modAL/expected_error.py tests/mock.py examples/custom_query_strategies.py modAL/disagreement.py docs/source/conf.py examples/pool-based_sampling.py tests/example_tests/multidimensional_data.py docs/source/_themes/sphinx_rtd_theme/__init__.py examples/information_density.py examples/bayesian_optimization_multidim.py tests/example_tests/ensemble_regression.py modAL/batch.py tests/example_tests/custom_query_strategies.py tests/example_tests/pool_based_sampling.py modAL/utils/combination.py examples/pytorch_integration.py modAL/utils/__init__.py tests/example_tests/stream_based_sampling.py setup.py modAL/utils/data.py tests/example_tests/information_density.py tests/example_tests/multilabel_svm.py tests/example_tests/shape_learning.py tests/example_tests/ranked_batch_mode.py setup get_html_theme_path GP_regression_std custom_query_strategy max_entropy uniform create_keras_model create_keras_model Torch_Model comparisons modAL_EER acton_QBC libact_EER timeit libact_QBC alp_QBC acton_uncertainty libact_uncertainty modAL_uncertainty modAL_QBC alp_uncertainty random_sampling optimizer_PI EI max_PI PI max_EI optimizer_EI UCB optimizer_UCB max_UCB uncertainty_batch_sampling select_cold_start_instance select_instance ranked_batch HierarchicalClustering information_density similarize_distance max_std_sampling vote_entropy_sampling KL_max_disagreement consensus_entropy max_disagreement_sampling vote_entropy consensus_entropy_sampling expected_error_reduction min_confidence max_loss avg_confidence _SVM_loss avg_score mean_max_loss SVM_binary_minimum max_score _proba_entropy classifier_entropy entropy_sampling _proba_uncertainty _proba_margin uncertainty_sampling classifier_margin margin_sampling classifier_uncertainty BaseLearner BaseCommittee Committee ActiveLearner CommitteeRegressor BayesianOptimizer make_product make_linear_combination make_query_strategy drop_rows data_hstack data_vstack data_shape enumerate_data retrieve_rows add_row shuffled_argmax weighted_random multi_argmax check_class_proba check_class_labels MockCommittee MockFunction MockActiveLearner MockEstimator custom_query_strategy MockClassifier dirname abspath add_html_theme abspath dirname predict linear_combination compile Sequential add Dense MaxPooling2D Conv2D Flatten Dropout mean array function choice update IdealLabeler make_query array LogisticRegressionLibact label train Dataset range UncertaintySampling update IdealLabeler make_query EER array LogisticRegressionLibact label train Dataset range update IdealLabeler make_query array QueryByCommittee label train Dataset range ActiveLearner teach LogisticRegression query range Committee query range teach ActiveLearner teach LogisticRegression query range acton_main acton_main concatenate LogisticRegression rank ActiveLearnerALP range fit concatenate rank ActiveLearnerALP range fit modAL_EER acton_QBC libact_EER load_iris libact_QBC alp_QBC acton_uncertainty libact_uncertainty modAL_uncertainty modAL_QBC alp_uncertainty predict predict predict optimizer_PI optimizer_EI optimizer_UCB mean argmin pairwise_distances pairwise_distances_argmin_min reshape min shape argmax minimum on_transformed data_vstack ones select_instance select_cold_start_instance append bool range transform_without_estimating len classifier_uncertainty pairwise_distances entropy len Counter classes_ vote zeros enumerate transpose predict_proba entropy entropy transpose mean vote_proba zeros enumerate vote_entropy consensus_entropy KL_max_disagreement reshape predict _proba_entropy inf drop_rows data_vstack clone y_training estimator X_training predict_proba enumerate_data unique zeros add_row _proba_uncertainty enumerate fit len maximum dot classes_ eye sum predict enumerate abs T min argmax _SVM_loss _SVM_loss predict_proba min mean predict_proba predict_proba max predict mean predict_proba predict partition predict_proba max predict_proba partition predict_proba classifier_uncertainty classifier_margin classifier_entropy ones ones DataFrame any ndarray isinstance ndarray TypeError isinstance concat type any DataFrame ndarray isinstance issparse DataFrame ndarray isinstance issparse ndarray isinstance ones DataFrame issparse DataFrame isinstance isinstance permutation len list choice sum range len range len array_equal hstack enumerate
<img src="https://modal-python.readthedocs.io/en/latest/_static/modAL_b.png" alt="modAL" style="width: 400px;"> Modular Active Learning framework for Python3 [![travis-ci-master](https://travis-ci.org/modAL-python/modAL.svg?branch=master)](https://travis-ci.org/modAL-python/modAL) [![codecov-master](https://codecov.io/gh/modAL-python/modAL/branch/master/graph/badge.svg)](https://codecov.io/gh/modAL-python/modAL) [![readthedocs](https://readthedocs.org/projects/modal-python/badge/?version=latest)](http://modal-python.readthedocs.io/en/latest/?badge=latest) ## Page contents - [Introduction](#introduction) - [Active learning from bird's-eye view](#active-learning) - [modAL in action](#modAL-in-action) - [From zero to one in a few lines of code](#initialization) - [Replacing parts quickly](#replacing-parts) - [Replacing parts with your own solutions](#replacing-parts-with-your-own-solutions)
3,020
modelhub-ai/cascaded-fcn-liver
['lesion segmentation']
['Automatic Liver and Lesion Segmentation in CT Using Cascaded Fully Convolutional Neural Networks and 3D Conditional Random Fields']
contrib_src/inference.py contrib_src/processing.py contrib_src/modelapi.py contrib_src/run.py Model ImageProcessor
# cascaded-fcn-liver This repository hosts the contributor source files for the cascaded-fcn-liver model. ModelHub integrates these files into an engine and controlled runtime environment. A unified API allows for out-of-the-box reproducible implementations of published models. For more information, please visit [www.modelhub.ai](http://modelhub.ai/) or contact us [[email protected]](mailto:[email protected]). ## meta | | | | ---------------- | --------------------------------------- | | id | ccc16d36-d788-43eb-9e53-2125c97888df | | application_area | CT Abdomen | | task | Segmentation | | task_extended | Liver and liver lesion segmentation | | data_type | Computed Tomography (CT) |
3,021
modestyachts/certainty_equiv_perception_control
['autonomous driving']
['Certainty Equivalent Perception-Based Control']
python/closedloop_orb.py python/experiments.py python/observers.py python/evaluate_predictors.py python/evaluate_orb.py python/predictors.py python/orb_utils.py python/initialize_system_collect_data.py python/closedloop_predictors.py optimal_k lqg_inf_horizon DoubleIntegratorPlant kalman_gain lqr_inf_horizon PeriodicOLControl PeriodicTrackingController Interconnection LinearObservations CarlaObservations PolynomialObservations DotObservations custom_pth_root indicator_observe IndicatorObservations loc2im IndexTracker basis_functions get_transform OrbPredictor horn Predictor KernelRidgePredictor KernelPredictor FeatureRidgePredictor optimal_k solve_discrete_are solve_discrete_are kalman_gain T exp abs range zeros_like sign int floor append zeros range max T format print reshape inv horn append abs array range svd T reshape mean dot eye
# Certainty Equivalent Perception-based Control This repository includes the code necessary for reproducing experiments presented in *Certainty Equivalent Perception-based Control*. In addition to the packages listed in `requirements.txt`, the code requires the CARLA simulator (https://carla.readthedocs.io/en/latest/start_quickstart/) with python bindings (https://carla.readthedocs.io/en/stable/connecting_the_client/), ORB-SLAM (https://github.com/raulmur/ORB_SLAM2), and ORB-SLAM python bindings (https://github.com/jskinn/ORB_SLAM2-PythonBindings). The host IP and port of the CARLA simulator should be edited in `observers.py`. ## Reproducing experiments The following set of commands are sufficient for reproducing experiments. ``` mkdir data/ cd python python initialize_system_collect_data.py carla-uav
3,022
mohaimenz/EnvNet-V2
['data augmentation']
['Learning from Between-class Examples for Deep Sound Recognition']
dataset.py models.py opts.py utils.py main.py training.py Generator setup Main EnvNet2 FCDN ConvBNReLU display_info parse CustomCallback Trainer random_gain random_crop multi_crop padding random_scale a_weight to_hms normalize compute_gain mix load join data format fs Generator extend nFolds dataset range parse format splits print Trainer Train list display_info add_argument dict nFolds ArgumentParser save parse_args setattr range makedirs format LR batchSize print BC nEpochs strongAugment schedule warmup dataset netType maximum power log10 linspace rfft abs maximum a_weight mean log10 append power sum array range len power compute_gain max sqrt int format
# EnvNet-V2 Tensorflow implementation of between-class learning for sound recognition https://arxiv.org/abs/1711.10282 This repository is just a translation of the chainer implementation of EnvNet-V2 to Keras/Tensorflow. The chainer implementation can be found here at: https://github.com/mil-tokyo/bc_learning_sound ## Setup - Install Tensorflow 2.0 - Prepare datasets following [this page](https://github.com/mil-tokyo/bc_learning_sound/tree/master/dataset_gen). ## Training - Template: python main.py --dataset [esc50, esc10, or urbansound8k] --netType [envnet or envnetv2] --data path/to/dataset/directory/ (--BC) (--strongAugment)
3,023
mohammedLamine/RS-Lasso
['time series']
['High dimensional regression for regenerative time-series: an application to road traffic modeling']
geolytics_analysis/CustomUtils.py geolytics_analysis/__init__.py geolytics_analysis/models.py geolytics_analysis/data_simulation.py geolytics_analysis/model_comparator.py setup.py geolytics_analysis/Plotting.py geolytics_analysis/paper_models.py geolytics_analysis/.ipynb_checkpoints/paper_models-checkpoint.py reverseVincenty createIrisPopulationCollection timeToSeconds getClustersColors timeToTimeDelta secondsToTime getTimeSpent DataSimulation DataModel BaseModels DataCleaner ModelPlots ModelCompare TSLasso RSLasso Ols ElasticNet RidgeCV Lasso stackHistotyLayers dataFrameAsImage prepareMultipleTrips saveBigMergesMap drawOneTrip plotRoads printmap plotUserRegionsOfInterst plotUserTripsClusters addCarTrips addTrip getFoliumMap addMultipleTrips getMergeLayer getLayerWithPositions makePercentageSnapShots drawMultipleTrips Ols TSLasso RSLasso Lasso time tolist insert_many Map addTrip Map IntSlider interact iterrows Map display print rgb2hex addTrip zip brg add_to iterrows rgb2hex addTrip zip brg iterrows rgb2hex addTrip zip brg Map display print min addCarTrips addTrip max len imshow figure getFoliumMap add_to getClustersColors getLayerWithPositions FeatureGroupSubGroup print FeatureGroupSubGroup add_to trip_clusters getClustersColors set getFoliumMap add_to FeatureGroupSubGroup fromiter int list replace plotRoads concatenate concat getClustersColors shuffle dict unique zip brg range values len format getMergeLayer append range len fromiter int list replace plotRoads getClustersColors index dict zip brg range values len
Bouchouia, Mohammed, and François Portier. "High dimensional regression for regenerative time-series: An application to road traffic modeling." Computational Statistics & Data Analysis 158 (2021): 107191.
3,024
mohit1997/DeepZip
['data compression']
['DeepZip: Lossless Data Compression using Recurrent Neural Networks']
data/parse_wiki.py src/compressor.py src/decompressor.py src/arithmeticcoding_fast.py src/models.py src/trainer.py data/parse_new.py BitInputStream ArithmeticCoderBase ArithmeticDecoder ArithmeticEncoder BitOutputStream main strided_app predict_lstm var_int_encode create_data predict_lstm strided_app var_int_decode arithmetic_step main biGRU_big LSTM_multi_selu_16bit GRU_multi FC_4layer_16bit GRU_multi_16bit FC_4layer LSTM_multi_selu biGRU biLSTM_16bit FC LSTM_multi_big biLSTM LSTM_multi LSTM_multi_bn FC_4layer_big LSTM_multi_16bit GRU_multi_big biGRU_16bit FC_16bit loss_fn generate_single_output_data strided_app fit_model size model_weights_file cumsum finish temp_file_prefix BitOutputStream open list ones ArithmeticEncoder range predict close load_weights int reshape min write zeros array len pack write predict_lstm batch_size cumsum set_random_seed finish BitOutputStream open seed temp_file_prefix str var_int_encode ones strided_app mkdtemp ArithmeticEncoder range close OneHotEncoder output_file_prefix load int read reshape fit write sequence_npy_file temp_dir rmtree model_name transform zeros len print float32 choice sum len BitInputStream read ArithmeticDecoder update_table loads bytearray output_file_name input_file_prefix var_int_decode print Bidirectional Embedding Sequential add Dense CuDNNGRU Bidirectional Embedding Sequential add Dense CuDNNGRU Bidirectional Embedding Sequential add Dense CuDNNGRU set_floatx Bidirectional Embedding CuDNNLSTM Sequential add Dense Bidirectional Embedding CuDNNLSTM Sequential add Dense set_floatx Embedding CuDNNLSTM Sequential add Dense Flatten Embedding CuDNNLSTM Sequential add Dense Flatten Embedding CuDNNLSTM Sequential add Dense BatchNormalization Flatten Embedding CuDNNLSTM Sequential add Dense set_floatx Flatten Embedding CuDNNLSTM Sequential add Dense Flatten Embedding CuDNNLSTM Sequential lecun_uniform add Dense set_floatx Flatten Embedding Sequential add Dense CuDNNGRU Flatten Embedding Sequential add Dense CuDNNGRU Flatten Embedding Sequential add Dense CuDNNGRU set_floatx Flatten Embedding Sequential add Dense set_floatx Flatten Embedding Sequential add Dense Flatten Embedding Sequential add Dense Flatten dense embedding Sequential lecun_uniform add flatten set_floatx Embedding Sequential lecun_uniform add Dense Flatten load int reshape strided_app len OneHotEncoder transform fit name EarlyStopping Adam log_file CSVLogger ModelCheckpoint compile fit
# DeepZip <em>Update: Please checkout our new work [DZip](https://github.com/mohit1997/Dzip-torch) presented at DCC 2021.</em> ## Description Data compression using neural networks [DeepZip: Lossless Data Compression using Recurrent Neural Networks](https://arxiv.org/abs/1811.08162) ## Requirements 0. GPU, nvidia-docker (or try alternative installation) 1. python 2/3 2. numpy 3. sklearn
3,025
mohizahmad/DeepDOA-master
['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)
3,026
mohsaad/Deeper-Depth-Prediction
['depth estimation']
['Deeper Depth Prediction with Fully Convolutional Residual Networks']
pytorch/utils.py pytorch/export_caffe2.py pytorch/weights.py pytorch/predict.py pytorch/preprocess.py pytorch/model.py ResidualBlock FastUpConvolution Model ProjectionBlock FastUpProjection DepthPrediction DataProcess center_crop load_weights shape type permute item state_dict
# Deeper-Depth-Prediction Depth prediction using Deep Residual Networks. Original code and paper by @iro-cp found here: https://github.com/iro-cp/FCRN-DepthPrediction I was also helped by @iapatil's version of this, found here: https://github.com/iapatil/depth-semantic-fully-conv Written in PyTorch. To run, download the pretrained numpy weights from [here](http://campar.in.tum.de/files/rupprecht/depthpred/NYU_ResNet-UpProj.npy) and save them in the current directory. Then, activate a PyTorch environment and run ``` python predict.py <color_image> ```
3,027
moinnadeem/characterizing-sampling-algorithms
['text generation']
['A Systematic Characterization of Sampling Algorithms for Open-ended Language Generation']
code/main.py code/utils.py code/filtering.py code/run_generation.py code/embeddings.py code/create_ref.py code/metrics.py code/csv_writer.py code/plotter.py code/score.py code/lm_metrics.py code/sweep_seq_sizes.py code/sampler.py code/find_similar_samples.py code/calculate_baseline_bleu.py main parse_args main parse_args parse_args CSVWriter encode_sentences pad compute_scores cut_seq_to_eos top_filtering combined_filtering generate_no_beam_search top_k_top_p_filtering generate main parse_args process_file main parse_args all_subclasses SelfBleu SelfNist Nist Bleu Metrics parse_args Plotter set_seed prepare_xlm_input prepare_transfoxl_input prepare_ctrl_input adjust_length_to_model main prepare_xlnet_input MaxEntropySampler SortedNoisedFixedSampler LinearLagSampler SineSampler Sampler ExpSampler UniformSimplexSampler TargetEntropySampler SortedSimplexSampler SineExpSampler KTemperatureSweep NegativeSampler RandomSpaceTopkSampler NoisedTemperatureSampler FibSampler FixedSampler RandomFixedSampler LinearSampler JointSampler TemperatureSweep TanhSampler NegLinearSampler parse_args score_gold evaluate_bleu preprocess_text set_seed evaluate chunk_and_prefix_file lock unlock print_args evaluate_nist NumpyEncoder write_sentences calculate_logprobs sizeof_fmt DuplicateFilter add_argument ArgumentParser seed join evaluate_bleu list set_seed items print keys print_args hmean input_file from_pretrained add_special_tokens max_seq_length chunk_and_prefix_file min reference_file max sum reshape search add mean IndexFlatIP normalize numpy encode reshape extend sent_tokenize pad stack unsqueeze repeat append sum max len cumsum sort size min clone softmax format is_encoder_decoder view generate_no_beam_search expand shape new_ones warning long vocab_size device encoder to full get_encoder model is_top_p SortedNoisedFixedSampler scatter_ argmax topk enforce_repetition_penalty_ fill_ combined_filtering squeeze prepare_inputs_for_generation append cat detach NoisedTemperatureSampler masked_fill_ softmax top_k_top_p_filtering long enumerate isinstance JointSampler print min _use_cache mul_ transform bool step NegativeSampler ones_like cumsum sort size min softmax sum max range cumsum sort size min clone scatter softmax max append defaultdict glob extend set input_dir from_pretrained defaultdict basename append hexdigest enumerate items list all_subclasses Sampler add_parser upper add_subparsers __name__ decode lock plot_gold unsqueeze rename output_dir save score_gold generation_batch_size exists tolist sampler unlock shape dirname Plotter append to write_sentences range cat plot_curves eval_method replace knn eval stack vars preprocessed_min eos_token preprocess_text gram collect num_sentences preprocessed_max results_file eval_text hexdigest pretrained_class makedirs seed manual_seed_all manual_seed encode info str list eval input xlm_language keys prepare_input ArgumentParser device squeeze_ length model_type generate encode parse_args get format lower adjust_length_to_model info enumerate model_name_or_path add_argument seed items evaluate_bleu basename set_seed list SentenceTransformer print encode_sentences shuffle print_args item keys exists print join vars print get_score print get_score print get_score rindex clean_up_tokenization replace print rfind strip sent_tokenize convert_tokens_to_string append tokenize enumerate len unsqueeze softmax gather range log print add_special_tokens preprocess_text print close rename sleep exists rename
# A Systematic Characterization on Sampling Methods for Open-ended Language Generation <p align="center"><img src="comparison.png" alt="A Comparison of Sampling Algorithms" width="75%" /></p> This repository contains the official implementation of *["A Systematic Characterization on Sampling Methods for Open-ended Language Generation"](https://arxiv.org/abs/2009.07243)*, to appear at AACL 2020. It also serves as an extensible codebase to design and evaluate various sampling algorithms. We encourage the use of this codebase to design novel sampling algorithms. ## Getting Started Step 1: First, download the fine-tuned models and shuffled datasets: `cd code && ./download.sh` Step 2: Install the requirements: `pip install -r requirements.txt` ## Reproducing Results #### If you use SLURM
3,028
mojtaba-Hsafa/OCR-browser-domain-extractor
['optical character recognition']
["From Videos to URLs: A Multi-Browser Guide To Extract User's Behavior with Optical Character Recognition"]
video_url_ocr.py url_area_to_text url_cleaner_1 url_finder_regex AOI sharpen screenshots_to_csv url_cleaner_2 video_to_image join read VideoCapture str imwrite split makedirs str print matchTemplate eval minMaxLoc append imread array filter2D join uint8 append COLOR_BGR2GRAY ones print sharpen fastNlMeansDenoising image_to_string resize dilate imread listdir cvtColor append replace find append find len len group finditer compile find url_area_to_text join imwrite url_cleaner_1 url_finder_regex AOI len to_csv shape url_cleaner_2 split append imread DataFrame makedirs
# OCR browser domain extractor
3,029
mojtaba-Hsafa/train_accidents
['word embeddings']
["Analysis of Railway Accidents' Narratives Using Deep Learning"]
w2v_detail_causes.py ModelsAndEvaluation.py glove_detail_causes.py v2w_causes.py ROC_curves.py tsne.py glove_causes.py save_history_plot evaluation_plot build_model load_best_model cross_val print Embedding emb_layer Model Input compile len load_weights compile show confusion_matrix set_printoptions savefig figure plot_confusion_matrix f1_score argmax predict show plot xlabel ylabel title savefig figure legend evaluate build_model print StratifiedKFold split summary append argmax fit
# train_accidents
3,030
molecule-one/megan
['graph attention']
['Molecule Edit Graph Attention Network: Modeling Chemical Reactions as Sequences of Graph Edits']
src/model/utils.py bin/featurize.py bin/eval.py src/utils/dispatch_utils.py src/feat/utils.py src/feat/vocabulary.py src/datasets/__init__.py src/model/graph/gat.py src/__init__.py src/model/megan_modules/decoder.py src/model/beam_search.py src/utils/__init__.py src/model/megan_modules/encoder.py src/model/megan.py src/feat/graph_features.py src/feat/ring_actions.py src/datasets/uspto_mit.py src/feat/__init__.py src/datasets/uspto_50k.py src/config.py src/feat/mol_graph.py src/model/megan_utils.py src/feat/megan_graph.py bin/acquire.py src/datasets/util.py src/get_instances.py src/feat/find_properties.py src/split/__init__.py src/feat/reaction_actions.py src/feat/featurize.py src/split/basic_splits.py bin/train.py src/datasets/uspto_full.py acquire evaluate_megan remap_reaction_to_canonical prediction_is_correct featurize train_megan get_split get_featurizer get_dataset get_split get_featurizer get_dataset set_random_seed Uspto50k UsptoFull UsptoMit download_url unzip_and_clean Dataset gen_training_samples featurize_parallel ReactionSampleGenerator find_properties_parallel update_feat_values get_atom_features get_bond_features try_get_atom_feature try_get_bond_feature get_adj_path get_sample_data_path MeganTrainingSamplesFeaturizer get_metadata_path get_nodes_path get_actions_vocab_path get_prop2oh_vocab_path unravel_bond_features ravel_atom_features get_graph ravel_bond_features unravel_atom_features ReactionAction BondEditAction atom_to_str feat_val_to_str StopAction AddRingAction AtomEditAction AddAtomAction find_rings find_added_benzene_rings add_benzene_ring is_benzene_ring get_atom_ind reac_to_canonical get_bond_tuple fix_explicit_hs atom_to_edit_tuple add_map_numbers fix_incomplete_mappings ReactionFeaturizer get_best_actions get_batch paths_are_probably_same get_top_k_paths tuple2action get_topk get_action_object beam_search filter_duplicate_paths Megan to_one_hot set_atom_feat generate_eval_batch get_base_action_masks mols_from_graph RdkitCache generate_batch DumpTensorflowSummaries to_one_hot MultiHeadGraphConvLayer softmax MeganDecoder MeganEncoder DefaultSplit DatasetSplit replace_standard_stream save_current_config Fork run_with_redirection parse_config_file parse_config_key _argparse_gin_bindings dispatch_configurable_command log_current_config to_binary_one_hot convert_arg filter_reactants save_weights has_finished_training add_supervisor_logger to_torch_tensor complete_mappings lists_to_tuple loop parse_logging_level get_metric_order mark_reactants load_state_dict get_git_info renumber_atoms_for_mapping select_batch_from_dict smiles_to_unmapped randomize_mol_order get_script_run_info mol_to_unmapped_smiles split_every mol_to_unmapped summary configure_logger info get_dataset Counter split MolFromSmiles SetAtomMapNum int MolToSmiles GetAtoms GetAtomMapNum max values enumerate remap_reaction_to_canonical flatten forward exists values dir get_dataset mark_reactants load_x load_state_dict ceil append to sum get_actions_vocabulary RdkitCache update format parse_config_file query_parameter shuffle close eval fix_explicit_hs info enumerate load join int time MolFromSmiles load_metadata print split_every tqdm get_featurizer get_base_action_masks zeros len featurize_dataset get_featurizer info get_dataset on_epoch_end save_current_config flatten save_weights max exists set_lr list feat_dir len dir copyfile get_dataset Adam get_actions_vocab_path load_state_dict ceil to get_lr run_epoch get_actions_vocabulary range format DumpTensorflowSummaries mean get_prop2oh_vocab_path info load join int items parameters get_featurizer summary log_current_config makedirs get int seed info endswith join remove replace get ReactionSampleGenerator source_mol MolToSmiles gen_training_sample warning append range MolFromSmiles reac_to_canonical renumber_atoms_for_mapping str int join feat_loop csr_matrix gen_training_samples makedirs to_csv fix_explicit_hs zip append save_npz fix_incomplete_mappings enumerate len list try_get_atom_feature GetAtoms add GetBonds keys try_get_bond_feature MolFromSmiles list update_feat_values feat_loop set fix_explicit_hs zip keys append debug zip append debug zip ravel_multi_index ravel_multi_index max GetBonds tensor len add_bond GetAtoms get_bond_features union index get_atom_features any array zip zeros GetAtomMapNum full range enumerate str GetElementSymbol capitalize feat_val_to_str GetAtomWithIdx GetIntProp SetIntProp AddAtom SetAtomMapNum Atom AddBond append range SetIsAromatic SetBoolProp GetAtomMapNum GetNumAtoms GetBondBetweenAtoms dict GetBoolProp GetBondWithIdx HasProp len dict AtomRings append GetRingInfo dict find_rings append set SetAtomMapNum GetAtomMapNum max GetAtoms MolFromSmiles SetAtomMapNum int arange MolToSmiles shuffle GetAtoms GetNumAtoms enumerate MolFromSmiles SetAtomMapNum MolToSmiles GetAtoms GetAtomMapNum max values enumerate int GetStereo GetBondType RemoveHs GetAtoms AddHs SanitizeMol SetNoImplicit GetAtoms enumerate argsort range paths_are_probably_same set full range len len generate_eval_batch append zeros range enumerate topk min T ravel_multi_index arange get_topk append numpy range get_action_object process_paths_batch max all atom_map1 GetAtoms add get_graph ceil append GetBonds range mols_from_graph array_split get_top_k_paths copy reversed new_atoms_map_nums enumerate int join atom_map2 isinstance GetBondDir ClearProp graph_apply filter_duplicate_paths len data Variable scatter_ unsqueeze to dim SetFormalCharge SetAtomicNum SetIsAromatic SetChiralTag SetNumExplicitHs bool tuple AddAtom SetAtomMapNum list add AddBond append triu range get_atom SetBondDir reversed nonzero RWMol enumerate SetStereo mark_edited RemoveAtom get_bond GetBondWithIdx len ones triu unsqueeze clamp len clone sign unsqueeze zeros tensor max enumerate int arange hasattr concatenate ones zeros reshape astype sign unsqueeze to_tensor_batch append tensor triu max range enumerate len zeros view exp format info endswith join list items isinstance add_argument set_defaults join list format items info append setattr getattr join get items list int function configure_logger parse_config_file parse_config_key add_argument _argparse_gin_bindings bind_parameter lower mkdir ArgumentParser startswith parse_args split lower stdout setFormatter join format RotatingFileHandler isinstance getLogger print parse_logging_level addHandler debug StreamHandler Formatter mkdir DEBUG setLevel commit Repo join get_git_info argv MolToSmiles MolFromSmiles ClearProp GetAtoms ClearProp Mol GetAtoms MolToSmiles mol_to_unmapped append GetAtomMapNum GetAtoms MolFromSmiles SetAtomMapNum max GetAtoms int float toarray from_numpy is_available float long shuffle split GetAtoms GetAtomMapNum SetBoolProp set append GetAtoms set endswith lower items save state_dict print repr join exists info setFormatter addHandler debug Formatter setLevel FileHandler list islice iter
# Molecule Edit Graph Attention Network: Modeling Chemical Reactions as Sequences of Graph Edits Code for *"Molecule Edit Graph Attention Network: Modeling Chemical Reactions as Sequences of Graph Edits"* (https://arxiv.org/abs/2006.15426) Code was run/tested for: - python 3.6 - pytorch 1.3.1 - tensorflow 2.0 - rdkit 2020.03.2 Pytorch is used for building, training and evaluating models. CUDA support is recommended. Tensorflow is used only for visualizing training process (tensorboard). CUDA support is not required. ### Environment setup
3,031
moliusimon/frnn
['video prediction']
['Folded Recurrent Neural Networks for Future Video Prediction']
network/preprocessor/operator/op_crop.py network/preprocessor/__init__.py network/layer/lconvgru.py network/preprocessor/operator/op_mirror.py network/layer/__init__.py main_ucf101.py network/classifier.py network/layer/marginalize.py network/preprocessor/operator/op_reroute.py network/toolkit/sharray.py network/loader/__init__.py main_kth.py main_kth_rladder.py model/ucf101/model_rladder.py network/topology/folded.py model/kth/loader.py network/loader/hdf5.py network/memory/memory.py network/memory/tape.py network/preprocessor/operator/op_shift.py network/adversarial.py network/layer/convolutional.py analysis/build_gifs_readme.py network/preprocessor/operator/op_rescale.py main_mmnist_rladder.py network/layer/reshape.py analysis/layer_removal.py network/layer/gru.py network/toolkit/metric.py model/kth/model_rladder.py network/folded.py network/loader/multistream.py main_mmnist.py network/layer/rbf.py model/mmnist/model_frnn.py network/__init__.py network/preprocessor/operator/op_swapaxes.py analysis/quantitative.py analysis/qualitative.py model/ucf101/preprocess.py network/network.py network/toolkit/__init__.py network/preprocessor/operator/__init__.py network/loader/loader.py network/preprocessor/preprocessor.py network/adversarial_sequential.py main_ucf101_rladder.py network/topology/__init__.py model/mmnist/loader.py network/layer/pooling.py network/preprocessor/operator/operator.py network/regressor.py model/ucf101/loader.py analysis/build_gifs.py network/layer/bconvgru.py network/rladder.py model/mmnist/model_rladder.py network/layer/fully.py network/toolkit/initialize.py network/topology/topology.py model/kth/model_frnn.py network/layer/layer.py model/kth/preprocess.py network/loader/ndarray.py model/mmnist/preprocess.py network/autoencoder.py model/ucf101/model_frnn.py train analyse test run train analyse test run train analyse test run train analyse test run train analyse test run train analyse test run preprocess_predictions generate_captions build_dataset generate_instance_sequence preprocess_predictions generate_instance_sequence build_sequences test_layer_subsets save_sequences make_plot print_results LoaderKth partition_data prepare_partition prepare_sequence LoaderMMNIST prepare_testing LoaderMMNist prepare_training LoaderUcf101 prepare_sequence prepare_partition partition_data NetworkAdversarial NetworkAdversarialSequential NetworkAutoencoder NetworkClassifier NetworkFolded Network NetworkRegressor NetworkRLadder LayerBConvgru LayerConvolutional LayerFully LayerGru Layer LayerLConvgru LayerMarginalize LayerPooling LayerRbf LayerReshape LoaderHdf5 Loader LoaderMultistream LoaderNdarray build_loader Memory MemoryTape Preprocessor Operator OperatorCrop OperatorMirror OperatorRescale OperatorShift OperatorSwapaxes build_operator init_weights init_biases init_state_placeholders Metric create ones sharray zeros create_copy TopologyFolded Topology load load dump HIGHEST_PROTOCOL print_results open load load print_results test_layer_subsets save_sequences open enumerate imresize sorted list glob ones zip preprocess_predictions enumerate ones generate_captions mimsave zip enumerate range len ones mimsave zip enumerate instantiate str zip makedirs reset set_loader append range imsave enumerate run instantiate str zip print transpose makedirs set_loader range imsave enumerate run str concatenate print nanmean nan show tuple add_subplot figlegend subplots_adjust lineplot figure zip enumerate glob array append VideoCapture read imresize str File close prepare_sequence shape create_dataset enumerate str LoaderMMNist File close create_dataset range enumerate load str File close create_dataset enumerate int list extend shuffle append keys len lower ndarray isinstance get dict capitalize normal std sqrt svd get reshape tile append len dtype astype create create shape create dtype
## Folded Recurrent Neural Networks Here we provide the code for Folded Recurrent Neural Networks, a type of recurrent auto-encoder with shared states between encoder and decoder. This allows for representation stratification, with the resulting model requiring less capacity on the deeper layers. It is also possible to use only the encoder or decoder during encoding and prediction, respectively. This results in computational and memory savings, and limits the propagation of prediction errors by avoiding the re-encoding of predictions. Due to this strategy, layers can be removed from an already trained model. This facilitates the analysis of the contribution to the final predictions made by each layer. It also serves as mechanism for reducing the size of the final models. This code applies fRNN to future video prediction, as explained in the following paper: https://arxiv.org/pdf/1712.00311.pdf This repository also implements the RLadder baseline presented in the paper. This baseline uses an equivalent topology that makes use of bridge connections instead of directly sharing the states. The other methods in the comparison also made their code publicly available. <p align="center"><img src ="examples.gif" /></p> ### DATASETS & MODELS The models for each dataset are saved inside "./model/<dataset>/". Each model has a main file, one for the fRNN model named "model_frnn.py" and one for the RLadder baseline, named "main_rladder.py". These files specify the paths where to find the pre-processed data and save the trained models, as well as the training parameters: - Number of training iterations (batches)
3,032
mommi84/horn-concerto
['link prediction']
['Beyond Markov Logic: Efficient Mining of Prediction Rules in Large Graphs']
horn_concerto_inference.py evaluation.py horn_concerto.py horn_concerto_eval.py horn_concerto_parallel.py range_test simple_rules triangles write_rule adjacencies type_two_rules sparql_query sort_by_value_desc top_properties write_rule_3 write_titles simple_rules triangles write_rule adjacencies type_two_rules sparql_query sort_by_value_desc top_properties write_rule_3 write_titles rangeTypes retrieve sparql_query opposite_product run simple_rules triangles write_rule adjacencies type_two_rules sparql_query sort_by_value_desc top_properties write_rule_3 write_titles rangeTypes run len list format split read close urlencode dict urlopen flush int time format print sparql_query dict int time format print sparql_query dict str int print sparql_query dict str time format int print sparql_query dict print time format sparql_query range len print time format flush print time format flush triangles simple_rules write_rule adjacencies type_two_rules dict sort_by_value_desc write_rule_3 float dict list format print cpu_count opposite_product dict mean split append max len print format print top_properties write_titles
# Horn Concerto 📯 Knowledge Discovery in RDF Datasets using SPARQL Queries. [![Codacy Badge](https://api.codacy.com/project/badge/Grade/3bafbe6a3bfb420282e57c2b89b0a5bf)](https://www.codacy.com/app/mommi84/horn-concerto?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=mommi84/horn-concerto&amp;utm_campaign=Badge_Grade) To install Horn Concerto, clone its repository and cd into it. ```bash git clone https://github.com/mommi84/horn-concerto.git cd horn-concerto ``` ## Mining existing endpoints The current algorithm works with any SPARQL endpoint. To test it, run it with:
3,033
morduspordus/SingleClassRL
['semantic segmentation']
['Regularized Loss for Weakly Supervised Single Class Semantic Segmentation']
losses.py train_with_transfer.py loss_utils.py unet_models.py custom_transforms.py get_standard_arguments.py get_dataset.py oxford_iii_pet.py get_model.py image_utils.py other_utils.py train_with_anneal.py evaluator.py training_utils.py get_losses.py train_epoch.py param_functions.py NormalizeImage FixedResize ToTensor denormalizeimage Normalize RandomHorizontalFlip ToTensorImage Evaluator get_val_dataset get_train_val_datasets get_dataset get_losses standard_complete_loss_with_negative standard_complete_loss get_model get_standard_arguments color_map encode_segmap get_oxford_pet_labels visualize_images transform_to_image decode_segmap img_denormalize process_visualize_image visualize_results MiddleSqLoss NegativeClassLoss VolumeLoss SparseCRFLoss BorderLoss regularized_loss_per_channel_diag regularized_loss_per_channel middle_sq_loss_per_channel extract_condition_not_equal_fn extract_needed_predictions extract_needed_mask extract_condition_equal_fn compute_edge_mask_diag compute_edge_mask param_to_string create_file_name OxfordPet sparse_crf_anneal_param sparse_crf_to_list_dict train_anneal print_metrics create_valid_epoch_runner create_train_epoch_runner train_normal train ValidEpoch Epoch TrainEpoch two_stage_training two_stage_training MobileNetV2_Layers Unet_Main Unet_MobileNetV2 pix2pix_upsample Unet_se_resnext50_32x4d transpose numpy OxfordPet get_dataset get_dataset items list MiddleSqLoss NegativeClassLoss VolumeLoss SparseCRFLoss append BorderLoss format print model_name Unet_MobileNetV2 Unet_se_resnext50_32x4d dict loss_names sparse_crf_to_list_dict zeros bitget array range transpose array clip show subplot items yticks pause close imshow title figure xticks enumerate len std detach isinstance model squeeze choice mean unsqueeze img_denormalize numpy max len uint8 name astype eval decode_segmap visualize_images process_visualize_image show copy get_oxford_pet_labels imshow zeros range zeros astype get_pascal_labels enumerate transpose astype uint8 exp size list sum exp size list sum extract_needed_predictions abs mean extract_needed_mask extract_needed_predictions abs mean extract_needed_mask extract_needed_predictions mean cond_fn str join exists join append range append fn TrainEpoch ValidEpoch asscalar str print format print print_metrics create_valid_epoch_runner create_train_epoch_runner DataLoader device step range visualize_results run load StepLR train get_train_val_datasets Adam get_losses parameters load_state_dict save get_model state_dict list format print train_normal zip param_to_string range len replace train_anneal print train_normal standard_complete_loss create_file_name get_standard_arguments reset_reg_weight loss_names makedirs standard_complete_loss_with_negative
# SingleClassRL Implementation of weak single object segmentation from paper "Regularized Loss for Weakly Supervised Single Class Semantic Segmentation", ECCV2020. [PDF](https://cs.uwaterloo.ca/~oveksler/Papers/eccv2020.pdf) ## Main Files * train_with_anneal.py: use for training first in annealing stage, then in normal stage * train_with_transfer.py: use from training with weight transfer from another dataset, models that can be used for weight transfer are in directory 'trained_models' ## OxfodPet dataset Download OxfordPet from (https://www.robots.ox.ac.uk/~vgg/data/pets/) Files in 'SingleClassRL\data\Oxford_iit_pet\annotations' should be placed in the 'annotation' directory of OxfordPet dataset
3,034
morning-dews/GSN-Dialogues
['response generation']
['GSN: A Graph-Structured Network for Multi-Party Dialogues']
train.py beam_search.py data.py args.py batcher.py attention_modules.py main.py decode.py utils.py model.py attention_decoder attention_struct Batcher record_maker Batch run_beam_search Hypothesis outputids2words show_art_oovs abstract2ids show_abs_oovs Vocab article2ids BeamSearchDecoder main GSNModel train evaluate get_steps set_random_seeds concat_conv avg_loss get_datapath make_hps beam_size sorted _decode extend append _encode range _word2id index _size append _word2id index _size append append _id2word _word2id join append split _word2id join append split vocab_path BeamSearchDecoder set_verbosity vocab_size get_datapath make_hps set_random_seeds _decode _replace Vocab get_steps format test_data_path eval_data_path INFO beam_size GSNModel log_dir print Batcher data_path mode train makedirs join time log_dir print FileWriter Saver ConfigProto _build_graph makedirs flush time format Summary print _id2word index _eval add_summary max _next_batch seed random_seed set_random_seed data_pre int data_size decay_epoch branch_batch_size print items format min Summary add_summary
# GSN-Dialogues ## Requirements - TensorFlow 1.2 - Python 2.7 ## Explanations ### Training ```bash python -u main.py --mode=train \ --branch_batch_size=70 \ --sen_batch_size=9 \
3,035
morningkaya/Audio-Classification2
['data augmentation']
['Kapre: On-GPU Audio Preprocessing Layers for a Quick Implementation of Deep Neural Network Models with Keras']
clean.py train.py predict.py models.py downsample_mono split_wavs test_threshold envelope check_dir save_sample Conv2D Conv1D LSTM make_prediction train DataGenerator append abs max apply int16 read T resample astype float32 to_mono join str format write exists mkdir join delta_time format int arange dst_root glob check_dir downsample_mono sr tqdm src_root zeros envelope listdir enumerate save_sample show str format use threshold plot print glob downsample_mono grid sr fn title legend src_root envelope Model Input compile Model Input compile Model Input compile concatenate sr LabelEncoder flatten save argmax sorted load_model model_fn dt append envelope src_dir fit_transform range predict format glob mean pred_fn listdir enumerate int join print reshape downsample_mono tqdm zeros array delta_time batch_size warn LabelEncoder src_root sorted model_type train_test_split format DataGenerator glob set listdir join sample_rate fit CSVLogger transform ModelCheckpoint len
# Audio-Classification (Kapre Version) Pipeline for prototyping audio classification algorithms with TF 2 ![melspectrogram](docs/mel_spectrograms.png) <!-- TOC --> - [YouTube](#youtube) - [Environment](#environment) - [Jupyter Notebooks](#jupyter-notebooks) - [Audio Preprocessing](#audio-preprocessing) - [Training](#training) - [Plot History](#plot-history)
3,036
moskomule/dda
['data augmentation']
['Faster AutoAugment: Learning Augmentation Strategies using Backpropagation']
tests/test_pil.py examples/models/shakedrop.py examples/models/shakeshake/shake_resnet.py examples/randaugment.py examples/models/preresnet/common.py dda/kernels.py tests/test_functional.py examples/models/pyramidnet.py examples/data.py examples/models/__init__.py tests/test_operations.py examples/models/wideresnet.py faster_autoaugment/policy.py faster_autoaugment/train.py examples/models/preresnet/preresnet.py examples/models/shakeshake/shakeshake.py dda/functional.py dda/operations.py faster_autoaugment/utils.py faster_autoaugment/search.py examples/utils.py examples/models/shakeshake/shake_resnext.py examples/models/geometric.py dda/pil.py setup.py sharpness _blur cutout hflip posterize solarize _STE hue equalize rotate gray gaussian_blur3x3 _gray ste contrast brightness _blend_image translate_y sample_pairing tensor_function shear_x invert auto_contrast translate_x shear_y _rgb_to_hsv _hsv_to_rgb saturate vflip get_sharpness_kernel get_gaussian_5x5kernel _gaussian get_gaussian_3x3kernel Rotate Solarize Saturate Contrast SamplePairing TranslateY Brightness VerticalFlip ShearX HorizontalFlip _Operation Invert AutoContrast Hue Posterize _KernelOperation TranslateX Equalize ShearY Gray Sharpness sharpness hflip posterize solarize hue equalize rotate pil_function gray contrast brightness translate_y shear_x invert auto_contrast translate_x shear_y _random_flip saturate vflip get_dataloader _get_dataset _split_dataset ExtraSVHN TinyImageNet OriginalSVHN new_getitem main train_and_eval RandAugment _shear shear _affine _shape_check translate rotate conv3x3 BasicBlock PyramidNet Bottleneck ShakeDropFunction ShakeDrop conv_init conv3x3 WideBasic WideResNet get_model pyramid shakeshake26_2x32d shakeshake26_2x96d wrn40_2 shakeshake26_2x112d wrn28_10 resnet200 wrn28_2 conv1x1 SEBlock pre_conv3x3_block IBN dwconv3x3_block ChannelShuffle2 depthwise_conv3x3 ConvBlock pre_conv1x1_block MultiOutputSequential channel_shuffle2 ParametricConcurrent conv1x1_block conv7x7_block Concurrent PreConvBlock SesquialteralHourglass Hourglass conv3x3 conv3x3_block channel_shuffle Identity ParametricSequential DualPathSequential ChannelShuffle preresnet16 preresnet152b preresnet14 PreResNet _test preresnet200b preresnet101b get_preresnet preresnet10 PreResBottleneck preresnet269b preresnet200 PreResUnit preresnet152 preresnet18_w3d4 preresnet18 preresnet34 PreResActivation preresnet18_wd2 _calc_width PreResInitBlock preresnet18_wd4 preresnet50 PreResBlock preresnet50b preresnet12 preresnet101 Shortcut ShakeShake ShakeBlock ShakeResNet ShakeBottleNeck ShakeResNeXt SubPolicy Policy SubPolicyStage search Discriminator BaseConfig DataConfig AdvTrainer OptimConfig main ModelConfig EvalTrainer CosineSchedulerConfig BaseConfig DataConfig StepSchedulerConfig train_and_eval OptimConfig main ModelConfig Config wrn40_2 test_function_with_magnitude test_function_without_magnitude test_operations input test_pils view chunk size stack stack stack stack view view view chunk view randperm size view get_sharpness_kernel device get_gaussian_3x3kernel device ones t pow exp view _random_flip _random_flip _random_flip _random_flip _random_flip _random_flip _random_flip _random_flip _random_flip fromarray transpose transform _get_dataset DataLoader print dset _split_dataset Compose randperm deepcopy len get_dataloader get_model list batch_size name augment SGD epochs val_size MultiStepLR TQDMReporter lr download range steps print set_device pretty gpu_id is_available size expand eye _shear _shape_check _shape_check _shape_check bias xavier_uniform_ weight __name__ constant_ lower size view contiguous size view contiguous int PreResNet download_model _calc_width format model print Variable randn backward eval net __name__ TQDMReporter list epochs range gpu load mul print get_original_cwd path CosineAnnealingWithWarmup Path faster_auto_augment_policy load_state_dict warmup WideResNet randint rand backward f op backward op
# Differentiable Data Augmentation Library ![](https://github.com/moskomule/dda/workflows/pytest/badge.svg) This library is a core of Faster AutoAugment and its descendants. This library is research oriented, and its AIP may change in the near future. ## Requirements and Installation ### Requirements ``` Python>=3.8 PyTorch>=1.5.0 torchvision>=0.6 kornia>=0.2
3,037
motazalfarraj/Elastic-Impedance-Inversion-Using-Recurrent-Neural-Networks
['time series']
['Semi-supervised Sequence Modeling for Elastic Impedance Inversion']
main.py core/models.py core/functions.py get_data get_models train test display_results Normalization metrics forward_model inverse_model arange Normalization Subset DataLoader TensorDataset item is_available normalize float cuda load ormsby f dt test_checkpoint inverse_model cuda wavelet_duration is_available float forward_model zero_grad get_data forward_net save session_name list step max_epoch MSELoss inverse_net append normalize range detach format inf get_models mkdir alpha optimizer metrics criterion backward print clone tqdm beta unnormalize format print MSELoss get_data get_models eval mkdir session_name sum mean numpy cpu is_tensor std is_cuda join format print squeeze mean tensor
# Semi-Supervised Sequence Modeling for Elastic Impedance Inversion [Motaz Alfarraj](http://www.motaz.me), and [Ghassan AlRegib](http://www.ghassanalregib.info) Codes and data for a manuscript published in Interpretation Journal, Aug 2019. This repository contains the codes for the paper: M. Alfarraj, and G. AlRegib, "**Semi-Supervised Sequence Modeling for Elastic Impedance Inversion**," in *Interpretation*, Aug. 2019. [[ArXiv]](https://arxiv.org/pdf/1908.07849.pdf) [[SEG Digital Library]](https://library.seg.org/doi/abs/10.1190/int-2018-0250.1) ## Abstract Recent applications of machine learning algorithms in the seismic domain have shown great potential in different areas such as seismic inversion and interpretation. However, such algorithms rarely enforce geophysical constraints — the lack of which might lead to undesirable results. To overcome this issue, we have developed a semisupervised sequence modeling framework based on recurrent neural networks for elastic impedance inversion from multiangle seismic data. Specifically, seismic traces and elastic impedance (EI) traces are modeled as a time series. Then, a neural-network-based inversion model comprising convolutional and recurrent neural layers is used to invert seismic data for EI. The proposed workflow uses well-log data to guide the inversion. In addition, it uses seismic forward modeling to regularize the training and to serve as a geophysical constraint for the inversion. The proposed workflow achieves an average correlation of 98% between the estimated and target EI using 10 well logs for training on a synthetic data set. ## Sample Results #### Estimated EI Section
3,038
moto8xpk/DataExtractionJejuMLCamp
['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']
script.py
# DataExtractionJejuMLCamp ![alt text](https://github.com/moto8xpk/DataExtractionJejuMLCamp/blob/master/photo/jeju.png) ### For testing my model you can download here: [Model](https://drive.google.com/open?id=1S5OC-lns_KmJ0m_7JFem08JKV0VxgoSb) ![alt text](https://github.com/moto8xpk/DataExtractionJejuMLCamp/blob/master/photo/cropped-image.png) ### Some paper in the project CRNN: https://arxiv.org/pdf/1507.05717.pdf CTC: https://www.cs.toronto.edu/~graves/icml_2006.pdf
3,039
moucheng2017/Learn_Noisy_Labels_Medical_Images
['medical image segmentation']
['Disentangling Human Error from the Ground Truth in Segmentation of Medical Images', 'Disentangling Human Error from Ground Truth in Segmentation of Medical Images']
adamW.py Segmentation.py Models.py Train_punet.py preprocessing/Prepare_BRATS.py Run.py Train_GCM.py Train_unet.py data_simulation/artificial_wrong_mask.py preprocessing/Prepare_MNIST.py Train_ours.py preprocessing/Prepare_BRATS_noisy_label.py Utilis.py Loss.py AdamW noisy_label_loss dice_loss noisy_label_loss_low_rank conv_block cm_layers low_rank_cm_layers ProbabilisticUnet AxisAlignedConvGaussian UpConvBlock UNet_GlobalCMs double_conv Encoder UNet Fcomb Unet gcm_layers DownConvBlock UNet_CMs segmentation getData trainSingleModel trainGCMModels getData trainSingleModel trainModels train_punet getData trainSingleModel trainUnet evaluate_noisy_label_3 save_mask_prediction_example evaluate_noisy_label evaluate_noisy_label_5 CustomDataset truncated_normal_ calculate_cm generalized_energy_distance test_punet evaluate_noisy_label_2 evaluate_noisy_label_7 evaluate_punet test init_weights l2_regularisation evaluate_noisy_label_4 segmentation_scores init_weights_orthogonal_normal CustomDataset_punet preprocessing_accuracy evaluate_noisy_label_6 evaluate unzip_all prepare_data chunks main_loop single_loop delete_all generate_patches unzip_all prepare_data chunks main_loop single_loop delete_all generate_patches generate_patches divide_data chunks main_loop view size zip sum long bmm view size contiguous zip to sum long enumerate sum view model device max str squeeze calculate_cm append to range imsave asarray size eval mkdir enumerate load repeat zeros numpy str UNet_GlobalCMs trainSingleModel getData range DataLoader CustomDataset_punet noisy_label_loss zero_grad save device evaluate_noisy_label_5 max open str view squeeze step default_timer calculate_cm append to sum range imsave model_seg SummaryWriter format asarray size close eval evaluate_noisy_label_4 mkdir segmentation_scores noisy_label_loss_low_rank add_scalars enumerate bmm evaluate_noisy_label_6 backward print AdamW reshape contiguous write parameters repeat zeros train numpy str trainSingleModel getData range UNet_CMs zero_grad DataLoader device forward str Adam to range ProbabilisticUnet test_punet evaluate_punet mkdir item CustomDataset_punet enumerate elbo backward print parameters train step len str UNet trainSingleModel getData range CustomDataset model dice_loss Adam param_groups test softmax evaluate sigmoid generalized_energy_distance model1 eval segmentation_scores model2 append to numpy max enumerate generalized_energy_distance model1 reshape size eval numpy segmentation_scores model2 append to sum max enumerate generalized_energy_distance reshape size eval numpy segmentation_scores model1 append to sum max enumerate generalized_energy_distance view size eval numpy segmentation_scores model1 append to sum max enumerate bmm generalized_energy_distance view size eval numpy segmentation_scores model1 append to sum max enumerate bmm generalized_energy_distance model1 view size eval numpy segmentation_scores model2 append to sum max enumerate generalized_energy_distance view size eval numpy segmentation_scores model1 append to sum max enumerate eval eval squeeze add_ copy_ shape normal_ kaiming_normal_ weight weight orthogonal_ parameters norm imshow savefig str device forward open str shape append to range imsave generalized_energy_distance close eval mkdir segmentation_scores sample float enumerate print write numpy generalized_energy_distance float eval numpy segmentation_scores device sample to forward range append enumerate ones_like zeros_like copy where histogram sum len ones_like asarray zeros_like astype where numpy confusion_matrix view range len print join listdir replace print join remove listdir random floor count_nonzero str shape ceil imsave range asarray concatenate get_fdata mean splitext unique listdir load join int T print sort reshape std split str int list len chunks choice listdir makedirs list generate_patches set single_loop prepare_data list shuffle chunks listdir len makedirs where generate_patches makedirs
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.md) This repository contains a PyTorch implementation of the NeurIPS 2020 paper ["Disentangling Human Error from the Ground Truth in Segmentation of Medical Images", 2020](https://arxiv.org/pdf/2007.15963.pdf). [Mou-Cheng Xu](https://moucheng2017.github.io/) is the main developer of the Python code; [Le Zhang](https://cheonglok.github.io/l.zhang/) is the main developer of the data simulation code. # How to use our code for further research We recommend to try the toy-example in [MNIST_example.ipynb](https://github.com/moucheng2017/Learn_Noisy_Labels_Medical_Images/blob/master/MNIST_example.ipynb) to understand the pipeline, this is a simplied main function for MNIST, similar to other main functions in [Train_GCM.py](https://github.com/moucheng2017/Learn_Noisy_Labels_Medical_Images/blob/master/Train_GCM.py), [Train_ours.py](https://github.com/moucheng2017/Learn_Noisy_Labels_Medical_Images/blob/master/Train_ours.py), [Train_puunet.py](https://github.com/moucheng2017/Learn_Noisy_Labels_Medical_Images/blob/master/Train_punet.py) and [Train_unet.py](https://github.com/moucheng2017/Learn_Noisy_Labels_Medical_Images/blob/master/Train_unet.py). 1. If you want to apply our code on your own medical data-sets: Following MNIST_example.ipynb, you might want to replace the data-loader with your own data-loader for your preferred pre-processing. An example for a data-loader can be found in [Utilis.py](https://github.com/moucheng2017/Learn_Noisy_Labels_Medical_Images/blob/master/Utilis.py), namely CustomDataset_punet. 2. If you want to plug-in the proposed loss function and play around: The loss function is implemented in Loss.py as noisy_label_loss. 3. If you want to adapt our Run.py for your application, you need to prepare data stored in a specific way:
3,040
moucheng2017/Pay_Attention_To_Mistakes
['medical image segmentation', 'semantic segmentation']
['Learning To Pay Attention To Mistakes']
exps/fpa3.py adamW.py NNLoss.py NNMetrics.py NNTrain.py Model.py exps/cseunet.py exps/unet.py NNUtils.py exps/fpa1.py Run.py preprocessing/preprocessing_brats.py NNBaselines.py exps/fpa.py exps/wunet.py exps/fpa2.py exps/dunet.py AdamW MistakeAttention ERFANet double_conv single_conv SE double_conv UNet CBAM_UNet_All GCNonLocal_UNet_All CSE_UNet_Full CBAM_UNet_Encoder GCNonLocal CSE_UNet_Encoder CBAM_UNet_Decoder CSE Deeper_CBAM_UNet_All GE_UNet_All Attention_block AttentionUNet GCNonLocal_UNet_Encoder DilatedUNet CBAM SE_UNet_All SE_UNet_Encoder dilated_conv GE_UNet_Encoder GE GCNonLocal_UNet_Decoder SE_UNet_Decoder first_conv GE_UNet_Decoder DeeperUNet single_conv Deeper_CSE_UNet_Full dice_loss kt_loss focal_loss _fast_hist preprocessing_accuracy hd95 __surface_distances segmentation_scores f1_score getData trainSingleModel trainModels evaluate CustomDataset test fgsm_attack weights_init get_upsampling_weight unzip_all prepare_data chunks main_loop single_loop delete_all generate_patches sum view sigmoid logsigmoid ones_like asarray zeros_like where detach reshape preprocessing_accuracy nanmean zip zeros sum diag preprocessing_accuracy recall_score flatten shape precision_score zeros ravel asarray preprocessing_accuracy distance_transform_edt astype ndim copy atleast_1d _normalize_sequence generate_binary_structure bool binary_erosion percentile __surface_distances hstack nanmean AttentionUNet str ERFANet UNet trainSingleModel getData range DilatedUNet CSE_UNet_Full DataLoader CustomDataset data model zero_grad where MultiStepLR save device tensor str dice_loss default_timer fgsm_attack to range SummaryWriter ones_like format param_groups test mkdir segmentation_scores f1_score add_scalars enumerate evaluate backward print AdamW sigmoid parameters hd95 train step len clamp sign data f1_score dice_loss model backward zero_grad where sigmoid fgsm_attack eval hd95 segmentation_scores tensor to enumerate data model zero_grad where tensor open str dice_loss fgsm_attack append to format glob close mean eval segmentation_scores mkdir f1_score enumerate load join backward print write sigmoid hd95 kaiming_uniform_ isinstance Conv2d bias BatchNorm2d weight constant_ zeros abs range len print join listdir replace print join remove listdir random floor count_nonzero str shape ceil imsave range asarray concatenate get_fdata mean splitext unique listdir load join int print sort reshape std split str int list len chunks choice listdir makedirs list generate_patches set single_loop prepare_data
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.md) This repository contains a PyTorch implementation of the BMVC 2020 paper ["Learning To Pay Attention To Mistakes", 2020](https://www.bmvc2020-conference.com/assets/papers/0335.pdf). [Mou-Cheng Xu](https://moucheng2017.github.io/) is the developer of the code. 1. Download the whole repo including both the code and the datasets folder, compile your environment using bmvc2020_environment.yml file. 2. Use Run.py to run and debug. ## How to use this repo with your own datasets: 1. An example of the folder structure of training data is in datasets folder. 2. After you prepare the datasets, you can easily tune the interface in Run.py. 3. In ''network'' argument in ''Run.py'', we provide different combinations of our model to be called: ''ERF_encoder_fp'', ''ERF_encoder_fn'', ''ERF_decoder_fp'', ''ERF_decoder_fn'', ''ERF_all_fp'', ''ERF_all_fn''. 4. When you use any configurations including 'fn' in ''network'', please set the ''reverse'' flag as ''True''.
3,041
mouna99/dien
['click through rate prediction']
['Deep Interest Evolution Network for Click-Through Rate Prediction']
script/model.py script/split_by_user.py script/utils.py script/rnn.py script/generate_voc.py script/local_aggretor.py script/shuffle.py script/Dice.py script/process_data.py script/data_iterator.py script/train.py fopen load_dict unicode_to_utf8 DataIterator dice parametric_relu Model_DIN_V2_Gru_att_Gru Model_DIN_V2_Gru_Gru_att Model Model_DNN Model_DIN_V2_Gru_Vec_attGru Model_WideDeep Model_DIN_V2_Gru_Vec_attGru_Neg Model_DIN_V2_Gru_QA_attGru Model_PNN Model_DIN split_test process_meta manual_join process_reviews dynamic_rnn _dynamic_rnn_loop _best_effort_input_batch_size raw_rnn static_rnn _infer_state_dtype static_bidirectional_rnn bidirectional_dynamic_rnn static_state_saving_rnn _rnn_step _transpose_batch_time _reverse_seq main prelu VecAttGRUCell din_fcn_attention QAAttGRUCell self_all_attention din_attention self_attention calc_auc din_fcn_shine attention endswith reshape square sigmoid sqrt reduce_mean abs relu get_variable print eval open print str eval open join sorted print strip len open append randint split print strip seek open get_shape concatenate transpose concat rank set_shape shape value all is_sequence get_shape _copy_some_through call_cell assert_same_structure flatten set_shape zip pack_sequence_as cond get_shape tuple merge_with unknown_shape stack set_shape reverse_sequence unstack zip append _reverse flatten tuple identity to_int32 value constant output_size _best_effort_input_batch_size tuple while_loop reduce_max _concat flatten shape set_shape zip pack_sequence_as reduce_min state_size is_sequence static_rnn state flatten pack_sequence_as state_size flatten tuple pack_sequence_as _reverse_seq remove seek print strip close readlines shuffle mkstemp realpath split TemporaryFile open append sorted ones_like isinstance Variable reshape concat transpose where expand_dims shape softmax random_normal equal tensordot dense ones_like isinstance print reshape concat transpose where matmul shape softmax tile expand_dims equal dense ones_like prelu isinstance reshape concat transpose where matmul shape softmax tile expand_dims equal while_loop transpose TensorArray stack expand_dims while_loop transpose TensorArray stack expand_dims dense ones_like prelu isinstance reshape concat transpose shape tile equal
# Deep Interest Evolution Network for Click-Through Rate Prediction https://arxiv.org/abs/1809.03672 ## prepare data ### method 1 You can get the data from amazon website and process it using the script ``` sh prepare_data.sh ``` ### method 2 (recommended) Because getting and processing the data is time consuming,so we had processed it and upload it for you. You can unzip it to use directly.
3,042
mounicam/hashtag_master
['sentiment analysis']
['Multi-task Pairwise Neural Ranking for Hashtag Segmentation']
neural_ranker/features/lm.py neural_ranker/features/wordshapes.py neural_ranker/features/hashtag.py neural_ranker/features/urban_dict.py neural_ranker/models/base_multitask_ranker.py neural_ranker/models/mse_ranker.py word_breaker/word_breaker.py neural_ranker/metrics.py neural_ranker/features/counts.py neural_ranker/models/mr_multi_ranker.py neural_ranker/main.py word_breaker/main.py neural_ranker/features/feature_extractor.py neural_ranker/models/mr_ranker.py word_breaker/metrics.py neural_ranker/rerank.py neural_ranker/features/named_entity.py neural_ranker/config.py neural_ranker/models/base_ranker.py neural_ranker/models/mse_multi_ranker.py get_resources main mean_reciprocal_rank accuracy fscore _greedy rerank CountFeatures _expand_gold_truths FeatureExtractor Hashtag LMFeatures NamedEntityFeatures UrbanDictFeatures WordShapeFeatures BaselineMultitaskRanker BaseRanker MRMultiRanker MRRanker MSEMultiRanker MSERanker main segment_word expand_gold_truths mean_reciprocal_rank accuracy fscore SegNode WordBreaker MRMultiRanker model get_features FeatureExtractor test_topk get_resources open train_topk MSEMultiRanker append MRRanker close test zip rerank join print write extend output train MSERanker split zip set zip set append len zip intersection append predict startswith enumerate sorted list remove set append keys enumerate append join extend replace SegNode search WordBreaker append join extend replace topk expand_gold_truths input lm LanguageModel segment_word
# HashtagMaster: Segmentation tool for hashtags This repository contains the code and resources from the following [paper](https://mounicam.github.io/HashtagMaster_ACL_camera_ready_v2.pdf) ## Repo Structure: 1. ```word_breaker```: Code for word-breaker beam search. 1. ```neural_ranker```: Code for our neural pairwise ranker models. (4 variants) 1. ```data```: Task datasets and other feature files. All the features files for the experiment are added except the language models. We provided a small sample of the language models. Please email us for the whole language model. ## Instructions: 1. First, run the "Word Breaker" to get the top-k candidates: ```python word_breaker/main.py --k 10 --lm data/small_gt.bin --out train_topk.tsv --input data/our_dataset/train_corrected.tsv```
3,043
mousecpn/L2A-OT
['domain generalization']
['Learning to Generate Novel Domains for Domain Generalization']
utils/wassersteinLoss.py utils/logger.py utils/utils.py utils/datasets.py resnet.py main.py model.py utils/data_reader.py main get_args L2A_OT_Trainer Generator DomianClassifier ResidualBlock Discriminator ResNet resnet50 Bottleneck resnet152 conv3x3 resnet34 resnet18 BasicBlock resnet101 get_train_transformers get_val_dataloader DG_Dataset ConcatDataset Subset get_train_dataloader get_val_transformer get_train_dataloader_sep get_random_subset _dataset_info get_split_dataset_info BatchImageGenerator Logger TFLogger fix_torch_seed unfold_label mseloss shuffle_list sgd fix_all_seed shuffle_data crossentropyloss write_log fix_python_seed num_flat_features compute_accuracy shuffle_list_with_ind pairwise_distances sinkhron_loss cost_matrix sink_stabilized sink dmat parse_args add_argument ArgumentParser DGC_loading get_args DGC trainG D_init batImageGenVals L2A_OT_Trainer C_init device DGC_init C_D_loading test_workflow_C args load_url ResNet load_state_dict load_url ResNet load_state_dict load_url ResNet load_state_dict load_url ResNet load_state_dict load_url ResNet load_state_dict append int split _dataset_info int list sample range len get_train_transformers join DG_Dataset ConcatDataset Subset val_size DataLoader limit_source append source get_split_dataset_info get_train_transformers join DG_Dataset ConcatDataset Subset val_size DataLoader limit_source append source get_split_dataset_info append random_horiz_flip RandomHorizontalFlip ColorJitter join DG_Dataset ConcatDataset limit_target print Subset target DataLoader get_val_transformer _dataset_info int min astype int8 append range len permutation arange len shuffle permutation arange len CrossEntropyLoss MSELoss SGD str close write open print seed print manual_seed_all manual_seed print seed manual_seed_all manual_seed accuracy_score argmax exp view Variable ones matmul div item cuda len get_Gamma Variable ones get_K matmul div cuda len sum expand transpose square matmul sqrt sum squeeze stack transpose sum exp squeeze transpose lse cost_matrix tensor range log M
# Learning to Generate Novel Domains for Domain Generalization This is an unofficial PyTorch implementation of Learning to Generate Novel Domains for Domain Generalization (ECCV2020). [[arxiv]](https://arxiv.org/abs/2007.03304) Some of the code is borrowed from https://github.com/HAHA-DL/Episodic-DG and https://github.com/yunjey/stargan. #### data Please download the data from https://drive.google.com/drive/folders/1i23DCs4TJ8LQsmBiMxsxo6qZsbhiX0gw?usp=sharing and use the official train/val split. ``` Domain-Generalization-via-Image-Stylization ├── data │ ├── Train val splits and h5py files pre-read
3,044
mozanunal/SparseCT
['denoising']
['Noise2Self: Blind Denoising by Self-Supervision']
sparse_ct/example/supervised_example.py sparse_ct/model/dncnn.py sparse_ct/reconstructor_2d/perceptual_tv.py sparse_ct/reconstructor_2d/__init__.py sparse_ct/example/show_image.py sparse_ct/loss/perceptual.py sparse_ct/reconstructor_2d/dgr.py sparse_ct/example/n2self_train.py sparse_ct/reconstructor_2d/mask.py sparse_ct/example/n2self_example.py sparse_ct/model/common.py papers/dgr/figure.py sparse_ct/example/bm3d_example.py sparse_ct/example/conventional_example.py papers/dgr/net_architecture_experiments.py sparse_ct/reconstructor_2d/analytic.py sparse_ct/tool.py sparse_ct/example/dgr_example.py papers/dgr/dose_experiment.py sparse_ct/model/skip.py sparse_ct/reconstructor_2d/meta.py sparse_ct/data/__init__.py sparse_ct/model/partialconv2d.py sparse_ct/reconstructor_2d/supervised.py papers/dgr/view_experiment.py papers/self_super_ct_reconstuction/n2self_example.py sparse_ct/metric.py sparse_ct/data/benchmark.py sparse_ct/model/unet.py sparse_ct/example/art_example.py sparse_ct/reconstructor_2d/iterative.py sparse_ct/example/supervised_train.py sparse_ct/example/benchmark_parser.py papers/dgr/num_params_experiment.py sparse_ct/example/all_example.py sparse_ct/model/downsampler.py sparse_ct/reconstructor_2d/dataset.py setup.py sparse_ct/loss/tv.py papers/self_super_ct_reconstuction/n2self_train.py sparse_ct/reconstructor_2d/base.py sparse_ct/reconstructor_2d/n2selfS.py sparse_ct/reconstructor_2d/supervised_iterative.py sparse_ct/example/run_benchmarks.py papers/dgr/noise_experiments.py sparse_ct/reconstructor_2d/n2self.py np_to_torch im2tensor torch_to_np plot_grid plot_result get_images benchmark poisson_noise pad_to_square awgn calc_power create_circular_mask ellipses_to_sparse_sinogram image_to_sparse_sinogram db2ratio noisy_shepp_logan noisy_zebra parse test benchmark_all FOCUS_GEN VGGPerceptualLoss tv_3d_lp tv_3d_l2 tvd_2d_l2 tv_3d_l1 tv_2d_lp tv_2d_l1 tv_2d_l2 Swish GenNoise act add_module Concat conv bn DnCNN get_kernel Downsampler PartialConv2d Skip unetDown UNet unetConv2 ListModule unetUp IRadonReconstructor FBP_BM3DReconstructor Reconstructor DeepLesionDataset EllipsesDataset DgrReconstructor _FOCUS SartReconstructor SartBM3DReconstructor SartTVReconstructor SinBM3DReconstructor pixel_grid_mask interpolate_mask Masker MetaReconstructor _FOCUS N2SelfReconstructor _FOCUS toSubLists N2SelfReconstructorS _FOCUS toSubLists PerceptualTVReconstructor _FOCUS SupervisedReconstructor SupervisedItReconstructor _FOCUS float show subplots hstack close imshow savefig clip subplots vstack resize clip show shape ZOOM imshow savefig append range imsave plot astype copy uint8 rectangle_perimeter FOCUS subplots_adjust figure len glob get_images format basicConfig critical name SartReconstructor calc mean eval warning image_to_sparse_sinogram info set_for_metric std append len normal calc_power sqrt shape log10 db2ratio shape vstack max hstack sqrt min imread rand shepp_logan_phantom rand resize gray2rgb radon pad_to_square astype awgn create_circular_mask linspace gray2rgb pad_to_square astype radon awgn create_circular_mask linspace resize max clip print readlines format name calc plot_grid save_result eval warning image_to_sparse_sinogram info set_for_metric append benchmark pow sum abs sum abs pow sum pow sum abs sum abs pow sum str len isinstance int AvgPool2d MaxPool2d ReflectionPad2d Conv2d Downsampler exp pi sin zeros abs range act Sequential add Concat Sigmoid conv Upsample range bn len FloatTensor zeros range conv2d device to sum array FloatTensor list FloatTensor choices set FloatTensor FloatTensor FloatTensor
# SparseCT This repo is a tool to develop sparse view CT reconstruction projects and compare different methods easily. The following papers are developed using this code repository. ## Papers ### Self-Supervised Training For Low Dose CT Reconstruction - [Click here to access the paper](https://arxiv.org/abs/2010.13232) - [Click here to reach the experiments of the paper](https://github.com/mozanunal/SparseCT/tree/master/papers/self_super_ct_reconstuction) ``` @INPROCEEDINGS{9433944, author={Unal, Mehmet Ozan and Ertas, Metin and Yildirim, Isa}, booktitle={2021 IEEE 18th International Symposium on Biomedical Imaging (ISBI)},
3,045
mozilla/LPCNet
['speech synthesis']
['LPCNet: Improving Neural Speech Synthesis Through Linear Prediction', 'A Real-Time Wideband Neural Vocoder at 1.6 kb/s Using LPCNet', 'Improving Opus Low Bit Rate Quality with Neural Speech Synthesis']
training_tf2/train_lpcnet.py training_tf2/tf_funcs.py training_tf2/test_lpcnet.py training_tf2/dataloader.py training_tf2/mdense.py training_tf2/lpcnet.py training_tf2/ulaw.py training_tf2/pade.py training_tf2/lossfuncs.py training_tf2/dump_lpcnet.py training_tf2/diffembed.py lpc2rc LPCNetLoader diff_Embed dump_dense_layer printSparseVector dump_layer_ignore dump_grub dump_embedding_layer printVector dump_dense_layer_impl dump_mdense_layer dump_sparse_gru dump_embedding_layer_impl dump_gru_layer_dummy dump_conv1d_layer interp_mulaw metric_icel metric_exc_sd metric_oginterploss res_from_sigloss loss_matchlar metric_cel tree_to_pdf_infer quant_regularizer Sparsify new_lpcnet_model SparsifyGRUB PCMInit tree_to_pdf interleave WeightClip tree_to_pdf_train MDense my_loss2 my_loss1 num_init den_init ratio my_loss3 diff_rc2lpc diff_pred tf_l2u tf_u2l diff_lpc2rc lin2ulaw ulaw2lin repeat range format reshape transpose write range len concatenate reshape astype printVector write append zeros range diag print name __name__ printSparseVector format hasattr name print write printVector copy upper get_weights sum max __name__ printSparseVector clip format hasattr name print write astype printVector copy upper get_weights sum max __name__ format name write upper get_weights upper format write printVector name print dump_dense_layer_impl upper get_weights __name__ format name print transpose write printVector upper get_weights max __name__ format name print write printVector upper get_weights max __name__ upper format write printVector name print __name__ dump_embedding_layer_impl squeeze roll tf_l2u floor cast tile clip_by_value abs log roll tf_l2u cast floor clip_by_value tile tf_l2u round cast clip_by_value tf_l2u reshape expand_dims repeat concat MDense fdense1 Input rnn2 Embedding fconv1 Model CuDNNGRU GRU Lambda Dense error_calc Conv1D diff_Embed fdense2 rnn md fconv2 embed print constant print constant clip abs log sign abs cast sign abs sign log sign round abs clip
# LPCNet Low complexity implementation of the WaveRNN-based LPCNet algorithm, as described in: - J.-M. Valin, J. Skoglund, [LPCNet: Improving Neural Speech Synthesis Through Linear Prediction](https://jmvalin.ca/papers/lpcnet_icassp2019.pdf), *Proc. International Conference on Acoustics, Speech and Signal Processing (ICASSP)*, arXiv:1810.11846, 2019. - J.-M. Valin, U. Isik, P. Smaragdis, A. Krishnaswamy, [Neural Speech Synthesis on a Shoestring: Improving the Efficiency of LPCNet](https://jmvalin.ca/papers/improved_lpcnet.pdf), *Proc. ICASSP*, arxiv:2106.04129, 2022. - K. Subramani, J.-M. Valin, U. Isik, P. Smaragdis, A. Krishnaswamy, [End-to-end LPCNet: A Neural Vocoder With Fully-Differentiable LPC Estimation](https://jmvalin.ca/papers/lpcnet_end2end.pdf), *Proc. INTERSPEECH*, arxiv:2106.04129, 2022. For coding/PLC applications of LPCNet, see: - J.-M. Valin, J. Skoglund, [A Real-Time Wideband Neural Vocoder at 1.6 kb/s Using LPCNet](https://jmvalin.ca/papers/lpcnet_codec.pdf), *Proc. INTERSPEECH*, arxiv:1903.12087, 2019. - J. Skoglund, J.-M. Valin, [Improving Opus Low Bit Rate Quality with Neural Speech Synthesis](https://jmvalin.ca/papers/opusnet.pdf), *Proc. INTERSPEECH*, arxiv:1905.04628, 2020. - J.-M. Valin, A. Mustafa, C. Montgomery, T.B. Terriberry, M. Klingbeil, P. Smaragdis, A. Krishnaswamy, [Real-Time Packet Loss Concealment With Mixed Generative and Predictive Model](https://jmvalin.ca/papers/lpcnet_plc.pdf), *Proc. INTERSPEECH*, arxiv:2205.05785, 2022. # Introduction
3,046
mpc-msri/EzPC
['time series']
['SIRNN: A Math Library for Secure RNN Inference']
Athos/HelperScripts/FindAccuracy.py Athos/tests/tf/unittests/test_convolution.py Aramis/3party-aramis/party1/utils_sgx_port/parse_circuitfile.py Athos/SeeDot/AST/AST.py Athos/CompilerScripts/comparison_scripts/convert_to_signed.py Athos/ONNXCompiler/ONNXNodesAST.py Athos/TFCompiler/Graph.py Athos/tests/tf/unittests/test_shape_manipulation.py Athos/ONNXCompiler/process_onnx.py Athos/CompilerScripts/tf_graph_io.py Athos/RandomForests/parse_graphviz_to_ezpc_input.py Athos/SeeDot/AST/ASTVisitor.py Aramis/3party-aramis/party2/compile_porthos_to_aramis.py Athos/demos/onnx/pre_process.py Athos/ONNXCompiler/test/test.py Athos/CompilerScripts/create_tf_input.py Athos/tests/onnx/unittests/test_arith_binops.py Athos/RandomForests/convert_pickle_to_graphviz.py Aramis/3party-aramis/party0/files/data/parsedata.py SIRNN/preProcessSIRNN.py Athos/CompilerScripts/remove_tf_nodes.py Athos/tests/tf/unittests/test_batchnorm.py Athos/SeeDot/Codegen/CodegenBase.py Athos/Networks/ResNet/AccuracyAnalysisHelper/ResNet_main_float_acc.py Athos/tests/onnx/unittests/test_shape_manipulation.py Athos/CompilerScripts/compile_tf.py Athos/Networks/SqueezeNetImgNet/squeezenet_main.py Athos/HelperScripts/nn_maxmintest.py Aramis/3party-aramis/party2/files/data/parsedata.py Athos/CompilerScripts/comparison_scripts/compare_np_arrs.py Athos/Networks/DenseNet/nets_factory.py Athos/Networks/ResNet/Resnet_Model.py Athos/CompileONNXGraph.py Athos/ONNXCompiler/create_input.py Athos/tests/tf/unittests/test_unaryops.py Athos/Networks/SqueezeNetImgNet/AccuracyAnalysisHelper/SqueezeNet_main_float_acc.py SIRNN/secureCodegen.py Athos/CompilerScripts/tf_graph_trans.py Athos/HelperScripts/Convert_WnId_To_TrainId.py Athos/Networks/SecureNNBenchmarks/NetworkB.py Athos/SeeDot/AST/MtdAST.py Aramis/3party-aramis/party1/files/data/parsedata.py Athos/CompilerScripts/preprocess_frozen_tf_graph.py Athos/tests/utils.py Athos/CompilerScripts/replace_tf_nodes_with_identity.py Athos/SeeDot/AST/PrintAST.py Aramis/3party-aramis/party2/utils_sgx_port/parse_circuitfile.py Athos/TFCompiler/TFNodesAST.py SCI/src/LinearHE/generate_primes.py Athos/SeeDot/Util.py Athos/Networks/SecureNNBenchmarks/NetworkC.py Athos/ONNXCompiler/common.py Athos/tests/onnx/unittests/test_convolution.py Athos/Networks/ResNet/PreProcessingImages/ResNet_preprocess_main.py Athos/HelperScripts/Scale_img_and_model.py Athos/tests/tf/unittests/test_non_linear.py Athos/CompilerScripts/convert_np_to_fixedpt.py Athos/Networks/ResNet/PreProcessingImages/imagenet_preprocessing.py Athos/CompileRandomForests.py Athos/CompilerScripts/comparison_scripts/convert_scale.py Athos/CompilerScripts/generate_concat.py Athos/Networks/OtherBenchmarks/MiniONN_CIFAR.py Athos/SeeDot/Writer.py Athos/SeeDot/Type.py Athos/Networks/ChestXRay/ChestXRay_tf_main.py Athos/SeeDot/Optimizations/ReluMaxpoolOpti.py Athos/RandomForests/patch_ezpc_code_params.py Athos/tests/onnx/unittests/test_batchnorm.py Athos/Networks/SqueezeNetCIFAR10/Util.py Athos/Networks/DenseNet/densenet.py Athos/tests/conftest.py Athos/SeeDot/IR/IR.py Athos/CompilerScripts/convert_saved_model_to_frozen_graph.py Athos/TFCompiler/ProcessTFGraph.py Athos/Networks/DenseNet/AccuracyAnalysisHelper/DenseNet_main_float_acc.py Athos/SeeDot/Optimizations/GarbageCollector.py Athos/Networks/Lenet/lenetLarge_mnist_train.py Athos/CompilerScripts/memory_estimate.py Athos/CompilerScripts/get_output.py Athos/tests/onnx/unittests/test_non_linear.py Athos/Networks/DenseNet/PreProcessingImages/DenseNet_preprocessing.py Athos/SeeDot/IR/IRUtil.py Athos/SeeDot/Codegen/EzPC.py Aramis/3party-aramis/party0/compile_porthos_to_aramis.py Athos/Networks/LogisticRegression/LogisticRegressionTrain.py Athos/Networks/Lenet/lenetSmall_mnist_train.py Athos/CompileSampleNetworks.py Athos/Networks/DenseNet/PreProcessingImages/DenseNet_preprocess_main.py Athos/Networks/SqueezeNetCIFAR10/Squeezenet_model.py Athos/Networks/SecureNNBenchmarks/NetworkD.py Athos/Networks/DenseNet/DenseNet_main.py Athos/demos/onnx/run_onnx.py Athos/HelperScripts/Random_Image_Selection.py Athos/SeeDot/Compiler.py Athos/Networks/Lenet/lenetLarge_mnist_inference.py Athos/tests/tf/unittests/test_arith_binops.py Athos/Networks/ResNet/ResNet_main.py Athos/Networks/SecureNNBenchmarks/NetworkA.py Athos/SeeDot/IR/IRBuilderCSF.py Athos/CompilerScripts/get_pred_tf_graph.py Athos/TFCompiler/DumpTFMtData.py Athos/CompilerScripts/convert_keras_to_tf.py Athos/CompilerScripts/convert_keras_to_onnx.py Athos/tests/onnx/unittests/test_unaryops.py Aramis/3party-aramis/party0/utils_sgx_port/parse_circuitfile.py Athos/SeeDot/SeeDot.py Athos/Networks/SqueezeNetImgNet/PreProcessingImages/SqNetImgNet_preprocess_main.py Aramis/3party-aramis/party1/compile_porthos_to_aramis.py Athos/CompilerScripts/compile_tf_graph.py Athos/HelperScripts/FindAccuracy_Porthos.py Athos/ONNXCompiler/onnx_run.py Athos/CompileTFGraph.py Athos/CompilerScripts/comparison_scripts/compare_output.py Athos/RandomForests/notebooks/RandomForestCaliforniaHousingPickle.py Athos/CompilerScripts/change_onnx_output.py Athos/Networks/Lenet/lenetSmall_mnist_inference.py Athos/SeeDot/AST/IRBuilderAST.py Athos/Networks/LogisticRegression/LogisticRegressionInfer.py Athos/CompilerScripts/parse_config.py Athos/CompilerScripts/grappler.py Athos/HelperScripts/FindAccuracy_TF.py Athos/ONNXCompiler/onnx_run_tf.py Athos/HelperScripts/Confirm_preprocessing.py Athos/Networks/OtherBenchmarks/resnet32_cifar100.py parse_args generate_code parse_args parse_args generate_code parse_args generate_code get_onnx_type fix_shape get_np_type_from_onnxruntime fix_inp_shape get_graph_from save_graph_def get_tensor check_operation_exists get_unsupported_ops infer_input_info get_op_names_from_tensors set_input_shapes tensors_exist compile parse_args check_operation_exists get_shape_list boolean_string parse_args compile get_input_dim set_input_dim freeze_session convert_np_to_fixedpt parse_args gen_random_input check_operation_exists get_shape_list boolean_string parse_args generate_code generate_for_loop_prolog get_signature generate_bound get_input_access ind generate_epilog get_output_access generate_concat_axis get_assgn_stmt convert_raw_output_to_np numpy_float_array_to_float_val_str check_operation_exists boolean_string parse_args compile get_graph_from optimize convert_consts_to_var get_default_config get_only_prune_config get_white_list delete_nodes FunctionCallType extract_call_params get_footprint get_str_param get_opt_str_param get_int_param get_config get_shape_list get_opt_bool_param get_bool_param get_opt_int_param get_str_list_param parse_config get_params get_opt_param get_opt_str_list_param parse_input_tensors check_operation_exists optimize get_const_names parse_args load_graph_def_pb save_model dump_pb load_pb dump_pb_without_vars display_graph dump_graph_def_pb get_dangling_consts_old replace_nodes_with_identity remove_dead_nodes get_inputs convert_consts_to_var fold_constants replace_node_with_const fold_splits DFS get_dangling_consts delete_nodes parse_args extract_txt_to_numpy_array extract_float_txt_to_numpy_array get_arr_from_image parseInferenceOutputFile calculateAccuracy parseInferenceOutputFile calculateAccuracy parseInferenceOutputFile calculateAccuracy scaleImg checkIfFileExists scaleModel parseArgs get_preprocessed_image densenet161 densenet densenet169 densenet_arg_scope _conv_block _global_avg_pool2d _conv _dense_block densenet121 _transition_block parseArgs get_network_fn _aspect_preserving_resize preprocess_for_train _crop _central_crop _smallest_size_at_least _mean_image_subtraction preprocess_for_eval preprocess_image _random_crop main ImageCoder dumpImageDataFloat _process_image max_pool_2x2 findLabel conv2d deepnn main bias_variable weight_variable max_pool_2x2 conv2d deepnn main bias_variable weight_variable max_pool_2x2 findLabel conv2d deepnn main bias_variable weight_variable max_pool_2x2 conv2d deepnn main bias_variable weight_variable saveImg findLabel bias_variable weight_variable identity_building_block build conv_building_block resnet_block main ImagenetModel _get_block_sizes infer parseArgs main _building_block_v2 _building_block_v1 batch_norm _bottleneck_block_v2 _bottleneck_block_v1 conv2d_fixed_padding Model fixed_padding block_layer _aspect_preserving_resize _decode_crop_and_flip _central_crop _smallest_size_at_least _mean_image_subtraction _resize_image preprocess_image _parse_example_proto ImageCoder _convert_to_example BoundingBox get_sample _int64_feature FindNumberBoundingBoxes GetItem parse_record dumpImageDataFloat ReadAndPreProcessTFRecord _bytes_feature GetInt CreateTFRecordFromImage main ProcessXMLAnnotation _process_image bias_variable weight_variable bias_variable weight_variable bias_variable weight_variable bias_variable weight_variable SqueezeNet1Orig infer SqueezeNet1 findAndSaveCorrectTestImg main train getTrainedWeightsStrForm display_stats get_sample_points normalize load_preprocess_validation_data load_preprocess_testing_data _preprocess_and_save one_hot_encode preprocess_and_save_data batch_features_labels load_preprocess_training_data main load_preprocess_training_batch get_one_sample_point load_cfar10_batch load_label_names load_net get_dtype_np get_weights_biases _pool_layer net_preloaded _conv_layer unprocess preprocess imread_resize _act_layer get_dtype_tf main fire_cluster build_parser imsave main dumpImageDataFloat preprocess imread_resize parse_output match_output numpy_float_array_to_float_val_str match_debug write_debug_info extract_txt_to_numpy_array get_seedot_name_from_onnx_name numpy_float_array_to_fixed_point_val_str get_data_type add_openmp_threading_to_convolution merge_name_map proto_val_to_dimension_tuple main preprocess_batch_normalization onnx2seedot _onnx_dtype __convert_onnx_attribute_proto get_reshaped_input_ast getOperatorsIdx update_program_with_new_node ONNXNodesAST get_new_var_name get_onnx_order get_reshaped_filter_ast get_seedot_shape_order convert_onnx get_reshaped_bias_ast get_reshaped_output_ast translate_onnx OnnxNode get_seedot_filter_shape_order preprocess_for_tf main dump_model_weights strip_weights get_node_metadata inferShapes optimise get_unsupported_ops addOutputs process_onnx_nodes generate_seedot_ast process_input_variables exitIfUnsupportedOps preprocess_batch_normalization compile TestNode convert_pickle_to_graphviz fill_recur dump_complete_tree get_to_pad_subtree TreeNode parse_graphviz_to_ezpc_input pad_to_complete_tree is_internal patch_ezpc_code_params Compiler MainDriver isInt Taints Int isUnit isEqual Unit getTaint_taint Type InferType Tensor isTensor getTaint_type Config SFType getBroadcastShapes write_debug_info DisjointSet flatten get_volume Version copy_dict loadASTFromFile Target forEzPC Writer ASTNode Output Reduce UninterpFuncCall Operators Input Pool Slice Int Reshape Float PaddingKeysDict ID Let FusedBatchNorm Decl UOp Func BOp Transpose ArgMax Party ASTVisitor IRBuilderAST MtdAST PrintAST CodegenBase EzPC Output Cmd For Bool While BoolExpr Input FuncCall Int If Var CExpr IntExpr PrintAsFloat Prog Pragmas Expr Assn BoolUop BoolBop Exp Decl Memset BoolCop Op IntBop CmdList DataType TypeCast Comment IntUop Print IRBuilderCSF initVarToZero max_uint mul bitAnd shrVar div neq lte max shr negate inc loop_shr loop addIndex lt prog_merge add getFlatArrIdxExpr eq castToInt andd relu orr shl init decCmd add_idx_priv cond_zero shrDefault incCmd print_loop generateBroadcastLoopBOp dec gt sub castToFloat max_sint shrUint gte getMaskedIters SecretFlowAnalysis AliasAnalysis GarbageCollector ReluMaxpoolOpti pytest_runtest_makereport pytest_addoption backend test_dir make_dir test_env ONNXConfig run_onnx make_dir save_graph make_onnx_graph BaseConfig Program assert_almost_equal Frontend get_params Compiler TFConfig test_matmul test_equal test_div test_gemm test_arith_binop test_batch_norm _batchnorm_test_mode test_convtranspose test_conv test_non_linear test_constant test_global_avgpool test_shape test_cast test_uop test_maxpool test_avgpool test_reducemean test_matmul test_bias_add test_equal test_div test_arith_binop test_fused_batch_norm test_conv_transpose test_depthwise_conv test_conv test_softmax test_non_linear test_expand_dims test_slice test_pad test_squeeze test_concat test_transpose test_split test_tile test_reshape test_reduce test_pool test_fill test_argmax test_cast test_uop save_graph_metadata dumpImageDataInt numpy_float_array_to_float_val_str save_graphdef updateWeightsForBN dumpTrainedWeightsFloat strip_variable_init_constants save_weights dumpImgAndWeightsData save_sizeinfo dumpImgAndWeightsDataSeparate dumpTrainedWeightsInt Value Graph MultiValue Shape Node DataTypeEnum errIfTokensNotMinLen Tensor readSizeInfo generateIRCode process_tf_graph arrange_input_before_output prefixAllPlaceHolderNodes generateASTForNode checkTFNodeNameForEq addOutputs simplifyGraph TFNodesAST makeDatasetDir fixCMakeLists parseArgs fixModelFixed resetMYINT copyFiles run indentFile runEzPC createSpace removeCinsCouts run replaceDivisionsAndRunEzPC removeComments writefile getLocStrings addReconstruct parseArgs readfile replaceMakeVector replaceDivisions addSuffix mainToFuncWithHeader addPartyDistinction main deallocateModelAndVars correctTempName appendLibrary getLeftWhiteSpace add_argument ArgumentParser join basename format print getcwd chdir system exit upper lower dirname abspath mkdir append exists compile process_tf_graph save_graph_def save_graphdef load_graph_def_pb exit as_graph_def list keys as_list append discard set append int split get_graph_from items list optimize print get_unsupported_ops convert_consts_to_var get_tensor exit zeros getcwd chdir infer_input_info load_pb get_op_names_from_tensors set_input_shapes keys tensors_exist as_list graph load str format exit as_list str print chdir rand exit write close realpath numpy_float_array_to_fixed_point_val_str dirname save load_pb open str range range range range range str range get_output_access str range generate_epilog generate_for_loop_prolog get_signature generate_concat_axis generate_epilog range compile nditer load Value rewrite_options ConfigProto Value rewrite_options get_default_config set as_datatype_enum get_graph_from CopyFrom TRAIN_OP export_meta_graph get_operation_by_name as_proto Cluster disable_resource_variables add_to_collection get_default_config get_only_prune_config enable_resource_variables SignatureDef get_white_list OptimizeGraph range node extend GraphDef set append get_graph_from list get_white_list set append int range len extract_call_params reduce int max exit get exit get get exit get get exit get get exit get get append int split get items get_shape_list list get_str_param get_opt_str_param exit upper get_opt_bool_param get_opt_int_param get_opt_str_list_param parse_input_tensors get_config parse_config set join basename print convert_consts_to_var fold_constants exit get_operations fold_splits dirname sleep load_pb dump_pb get_const_names close FileWriter exit load_graph_def_pb exit Graph as_graph_def TransformGraph as_graph_def print name format graph format print name get_inputs add replace_node_with_const update get_dangling_consts_old format print set get_dangling_consts delete_nodes len set delete_nodes close open close open convert numpy int list map filter startswith array enumerate split range print print format exit list checkIfFileExists map split checkIfFileExists ptp min astype resize imread parse_args add_argument ArgumentParser int transpose len hasattr default_image_size greater_equal to_int32 logical_and Assert shape stack rank equal greater_equal logical_and extend Assert rank random_uniform append range equal len append _crop range split convert_to_tensor to_float to_int32 greater cond convert_to_tensor resize_bilinear squeeze shape set_shape _smallest_size_at_least expand_dims to_float _aspect_preserving_resize random_flip_left_right set_shape random_uniform _mean_image_subtraction to_float set_shape _aspect_preserving_resize _mean_image_subtraction decode_jpeg int format print exit getpid float32 placeholder constant constant range data_dir float32 placeholder deepnn read_data_sets truncated_normal int64 reduce_mean argmax reshape imshow savefig str add add identity_building_block range conv_building_block Model Input resnet_block update build ImagenetModel float32 placeholder imgnet_model argmax runPrediction savePreTrainedWeightsFloat infer parseArgs scalingFac saveImgAndWtData savePreTrainedWeightsInt pad fixed_padding conv2d_fixed_padding batch_norm projection_shortcut relu conv2d_fixed_padding projection_shortcut batch_norm relu conv2d_fixed_padding batch_norm projection_shortcut relu conv2d_fixed_padding projection_shortcut batch_norm relu block_fn range sample_distorted_bounding_box random_flip_left_right decode_and_crop_jpeg extract_jpeg_shape stack unstack shape expand_dims minimum int32 cast float32 _aspect_preserving_resize _decode_crop_and_flip _central_crop _resize_image set_shape decode_jpeg Example update concat transpose cast VarLenFeature parse_single_example expand_dims values _parse_example_proto preprocess_image cast iter BoundingBox parse height ymin FindNumberBoundingBoxes min ymax xmin xmax GetInt getroot width append float max range GetItem ImageCoder _convert_to_example TFRecordWriter write SerializeToString close _process_image read TFRecordReader string_input_producer parse_record float32 ImageCoder xmin_scaled ymin_scaled concat xmax_scaled ymax_scaled preprocess_image expand_dims ProcessXMLAnnotation _process_image get_sample ImageCoder join str dumpImageDataFloat global_variables_initializer range Session run argmax softmax_cross_entropy_with_logits list load_preprocess_validation_data load_preprocess_testing_data minimize print float32 placeholder reduce_mean cast inference sum equal Saver run save_graph_metadata restore node cast get_default_graph inference equal time print reduce_mean int32 global_variables_initializer all_weights len nditer join str dumpCifar10Image print range argmax getTrainedWeightsStrForm imsave all_weights len get_sample_points load_preprocess_testing_data SqueezeNet1 train transpose show items list format max print min dict upper shape imshow savefig zip load_cfar10_batch load_label_names len min max zeros enumerate one_hot_encode normalize dump open join int str _preprocess_and_save transpose extend load_cfar10_batch array range len load join str open load join str open min range len load join open str load join open str load join open load join open preprocess_and_save_data display_stats get_one_sample_point asarray convert astype dstack float uint8 astype save time get_dtype_np print error astype append loadmat array array array reshape concat get_weights_biases _conv_layer _act_layer time get_weights_biases _pool_layer print _conv_layer avg_pool cast _act_layer get_dtype_tf fire_cluster constant Variable conv2d append bias_add relu avg_pool max_pool add_argument ArgumentParser load_net Graph shape imread_resize input parse_args ConfigProto build_parser preprocess int nditer makedirs load open load print open isdigit rstrip write close float open assert_almost_equal extract_txt_to_numpy_array assert_almost_equal extract_txt_to_numpy_array load asarray initializer graph random write close numpy_float_array_to_fixed_point_val_str save open preprocess_batch_normalization proto_val_to_dimension_tuple initializer node sqrt float_data range len list HasField ints map strings floats Value isinstance list get_seedot_shape_order list get_seedot_filter_shape_order get_onnx_order list visit ID Let FLOAT ValueInfoProto preprocess_for_tf name make_tensor_value_info astype extend getattr initializer name node output input range len get_unsupported_ops exit simplify infer_shapes initializer input print name make_tensor_value_info tuple dims output data_type get_data_type append value_info proto_val_to_dimension_tuple value_info write_debug_info graph visit process_onnx_nodes process_input_variables MtdAST addOutputs str join asarray initializer graph print write close numpy_float_array_to_fixed_point_val_str preprocess_batch_normalization open pop list make_model initializer ValueInfoProto graph name node Dimension dims output extend opset_import data_type input metadata_props make_graph append join strip_weights get_node_metadata inferShapes optimise setrecursionlimit graph generate_seedot_ast dirname abspath version save exitIfUnsupportedOps value_info str ASTNode Output CLIENT visit ID expr range Let len print name visit ID Input Let print name node getattr func op_type load join str max_depth n_estimators print export_graphviz call range open max max_depth TreeNode value max_depth feature TreeNode max_depth right get_to_pad_subtree depth left value feature right left append depth is_internal int fill_recur str join max_depth dump_complete_tree len Context pow dirname append pad_to_complete_tree float range find join str print pow dirname abspath auto dict update format print reverse append range len auto Enum negMax Int addIndex flatten resource IntBop Int eq sub shrUint list range reversed len list range reversed len append Int range len IntBop getBroadcastShapes loop addIndex Prog Assn getMaskedIters mul Int add get_volume range len addoption getoption join gettempdir rmtree mkdir exists mkdir rmtree exists when setattr get_result join make_dir rmtree auto join make_model save flatten make_graph BytesIO make_model save_model print name opset_import check_model close getvalue InferenceSession run range len make_node run_onnx parse_io astype ONNX compile_and_run assert_almost_equal Compiler make_onnx_graph make_node run_onnx parse_io astype divide ONNX compile_and_run assert_almost_equal Compiler make_onnx_graph make_node run_onnx parse_io astype matmul skip ONNX compile_and_run assert_almost_equal Compiler make_onnx_graph dtype make_node run_onnx gemm_reference_implementation randn compile_and_run parse_io astype ONNX append assert_almost_equal Compiler make_onnx_graph Compiler make_node run_onnx parse_io astype ONNX compile_and_run assert_almost_equal equal make_onnx_graph shape reshape len make_node run_onnx parse_io astype ONNX compile_and_run assert_almost_equal Compiler make_onnx_graph make_node run_onnx parse_io astype skip ONNX compile_and_run assert_almost_equal Compiler make_onnx_graph make_node run_onnx parse_io astype skip ONNX compile_and_run assert_almost_equal Compiler make_onnx_graph tanh exp inf make_node run_onnx Compiler compile_and_run parse_io astype sqrt ONNX negative assert_almost_equal clip make_onnx_graph dtype make_node run_onnx randn compile_and_run parse_io floor ONNX negative assert_almost_equal Compiler make_onnx_graph dtype make_node run_onnx randn parse_io mean ONNX compile_and_run assert_almost_equal Compiler make_onnx_graph dtype make_node run_onnx randn parse_io astype int64 ONNX compile_and_run assert_almost_equal Compiler make_onnx_graph make_node run_onnx parse_io astype ONNX compile_and_run assert_almost_equal Compiler make_onnx_graph make_node run_onnx parse_io astype ONNX compile_and_run assert_almost_equal Compiler make_onnx_graph dtype make_node run_onnx randn parse_io mean ONNX compile_and_run assert_almost_equal Compiler make_onnx_graph decode make_node run_onnx reshape compile_and_run parse_io astype flatten ONNX encode assert_almost_equal Compiler append make_onnx_graph int make_node run_onnx print parse_io astype float32 make_onnx_graph int64 int32 ONNX compile_and_run assert_almost_equal Compiler make_tensor add_output dtype randn Graph add_output dtype randn Graph compile_and_run assert_almost_equal Compiler add_output Graph array add_output dtype add_input randn Graph add_output dtype Graph array add_output dtype randn Graph compile_and_run assert_almost_equal Compiler add_output dtype randn Graph add_output dtype randn Graph skip compile_and_run assert_almost_equal Compiler add_output dtype randn Graph skip compile_and_run assert_almost_equal Compiler add_output dtype format randn Graph skip abs add_output dtype randn Graph compile_and_run assert_almost_equal Compiler add_output dtype randn Graph compile_and_run assert_almost_equal Compiler add_output dtype randn Graph compile_and_run assert_almost_equal Compiler add_output dtype randn Graph compile_and_run assert_almost_equal Compiler add_output dtype randn Graph compile_and_run assert_almost_equal Compiler add_output dtype randn Graph compile_and_run assert_almost_equal Compiler add_output dtype randn Graph compile_and_run assert_almost_equal Compiler add_output dtype randn Graph compile_and_run assert_almost_equal Compiler add_output dtype randn Graph compile_and_run assert_almost_equal Compiler add_output dtype randn Graph compile_and_run assert_almost_equal Compiler add_output Graph skip add_output dtype randn Graph compile_and_run assert_almost_equal Compiler add_output dtype randn Graph compile_and_run assert_almost_equal Compiler add_output dtype randn Graph compile_and_run assert_almost_equal Compiler add_output randn Graph from_dtype add_output Graph compile_and_run assert_almost_equal Compiler TransformGraph get_true_names set list graph name node outputs append run list graph TransformGraph name graph_def node outputs append run rsqrt graph node f shape assign fill zeros run print print print print dumpImageDataInt dumpTrainedWeightsInt print dumpImageDataInt dumpTrainedWeightsInt graph updateWeightsForBN run print getattr func getOp str ASTNode items getInputsRef visit ID generateASTForNode MtdAST getAllNodesRef Let int name print MtdAST split append int split append getAllNodesRef setNodesList pop getInputsRef getAllNodes setNodesList copy Node append getAllNodesRef getName range len topo_sort list getInputsRef setNodesList len extend reversed add set append getAllNodesRef getName range enumerate join items readSizeInfo getInputsRef generateIRCode setrecursionlimit Graph print arrange_input_before_output addOutputs dirname startswith isfile getAllNodesRef prefixAllPlaceHolderNodes enumerate simplifyGraph popen results_dir join dataset makedirs join replace chdir getcwd write close open abspath results_dir dataset split join read replace chdir getcwd write close abspath results_dir dataset open join read replace chdir getcwd sci_build_location write close abspath results_dir dataset open makeDatasetDir fixCMakeLists fixModelFixed resetMYINT copyFiles join curdir chdir splitlines abspath chdir getcwd len write close range open extend index results_dir predict_dir len lstrip find append range split pop rstrip split range len range replace len insert find extend insert list keys range len rstrip replace find range len join int rstrip count insert createSpace len split range getLeftWhiteSpace find chdir getcwd communicate ezpc_dir Popen extend split read runEzPC replaceDivisions writefile abspath appendLibrary split join range len indentFile replaceDivisionsAndRunEzPC replaceMakeVector deallocateModelAndVars removeComments writefile correctTempName getLocStrings addReconstruct addSuffix mainToFuncWithHeader addPartyDistinction readfile removeCinsCouts datasets
# CrypTFlow: An End-to-end System for Secure TensorFlow Inference [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/mpc-msri/EzPC/issues) **Reference Papers:** [SecFloat: Accurate Floating-Point meets Secure 2-Party Computation](https://eprint.iacr.org/2022/322) Deevashwer Rathee, Anwesh Bhattacharya, Rahul Sharma, Divya Gupta, Nishanth Chandran, Aseem Rastogi *IEEE S&P 2022* [SIRNN: A Math Library for Secure RNN Inference](https://eprint.iacr.org/2021/459) Deevashwer Rathee, Mayank Rathee, Rahul Kranti Kiran Goli, Divya Gupta, Rahul Sharma, Nishanth Chandran, Aseem Rastogi *IEEE S&P 2021* [CrypTFlow2: Practical 2-Party Secure Inference](https://eprint.iacr.org/2020/1002) Deevashwer Rathee, Mayank Rathee, Nishant Kumar, Nishanth Chandran, Divya Gupta, Aseem Rastogi, Rahul Sharma
3,047
mpeven/ntu_rgb
['action recognition', 'time series', 'data augmentation']
['Action Recognition Using Volumetric Motion Representations']
datasets_sysu.py ntu_rgb_utils.py austin/train_3D_cnn_classify.py opengl_viewer/voxel_flow.py expand_npz.py optical_flow.py austin/extract_features_ntu_subject_train.py progress_meter.py train.py save_images.py ntu_rgb.py opengl_viewer/camera.py opengl_viewer/shapes.py sysu_dataset.py feature_manager.py opengl_viewer/optical_flow.py models.py config.py datasets.py opengl_viewer/opengl_viewer.py print_config get_train_valid_loader get_test_loader NTURGBDataset get_train_loader SYSUdataset get_test_loader get_train_loader create_ims_from_op_flow create_npys_from_ims main FeatureManager Model_5_small Model_1 Model_5 Model_4 Model_3 Model_2 create_all_voxel_flows create_voxel_flows NTU create_all_3D_op_flows view_one_voxel_flow record_multiple_voxel_flow get_animation ProgressMeter long_running_function main save_optical_flow save_3D_optical_flow save_ims show_voxel_flow rename_everything SYSU create_all_op_flow_3D main cache_5_ims_per_vid go depth_to_pc transform_tsdf rot_angles_to_mat rad2deg deg2rad tsdf classify Camera OpenGlViewer Optical_flow_3D Voxel_Flow_3D print format seed DataLoader NTURGBDataset manual_seed NTURGBDataset NTURGBDataset SYSUdataset SYSUdataset uint8 format imwrite min astype array save abs max range makedirs load format astype float32 save resize zeros imread range list build_feature FeatureManager num_vids tqdm range save_feature_sparse get_voxel_flow range NTU format NTU print get_voxel_flow now range int format NTU print min now num_vids get_3D_optical_flow range int view concatenate print SYSU get_voxel_flow OpenGlViewer shape append range get_voxel_flow view get_op_flow_img close imshow ArtistAnimation figure append range len range int get_rgb_mask format list NTU exit tqdm stack get_rgb_vid_images save append range get_2D_optical_flow get_rgb_mask format int NTU list resize exit astype float32 tqdm stack vstack isfile append range savez_compressed format NTU exit get_3D_optical_flow isfile range savez_compressed int save_3D_optical_flow sorted format glob SYSU rename append dataset enumerate format SYSU num_vids get_3D_optical_flow trange savez_compressed int format SYSU num_vids stack save append trange imread range len SYSU view get_voxel_flow rename_everything list permutation astype float32 copy flatten mean meshgrid zeros imread max range len int restore basename print close open collect_files zeros ConfigProto Session append len cos eye sin dtype T ones astype where copy dot shape repeat int32 expand_dims minimum list ones astype flatten sqrt shape linspace int32 meshgrid power range batchnorm3d relu flatten dot softmax dnn_conv3d dnn_pool
# ntu_rgb Code to use the nturgb+d dataset for action recognition
3,048
mpskex/Minimizing-Mutual-Information
['person re identification', 'image retrieval']
['Shuffle and Learn: Minimizing Mutual Information for Unsupervised Hashing']
PrecompDataset.py UnsupervisedDataset.py collect_feat.mscoco.py HashModel.py cal_map.py unsupervised_mi.py MutualInformation.py collect.py collect_feat.nuswide.py collect_feat.cifar.py calculate_hamming compress calculate_top_map calculate_map mean_average_precision CNN extract_feature_cifar set_device extract_feature CNN hash hash_layer get_standard_layer get_hashmodel get_norm_layer HashModel MutualInformation approximate_joint_prob PrecomputedDataset UnsupervisedDataset CNN hash hash_layer eval size transpose matmul size size T matmul eval set_device eval set_device get_standard_layer get_norm_layer
# Minimizing Mutual Information for Unsupervised Hash [[arxiv](https://arxiv.org/abs/2011.10239)] Unversity of British Columbia Okanagan Master of Applied Science Fangrui Liu 2020 ![Demo](https://github.com/mpskex/Minimizing-Mutual-Information/blob/main/scatter_preserv.gif?raw=true) You can used [precomputed feature](https://drive.google.com/drive/folders/1dcm6v4KTx4i6L3JqknhpWDFOb0RXPtRx?usp=sharing) from VGG-16 to train. Note: - Training scripts are using fixed seed for randomized behaviors. - Precomputed feature are used to train the hash network. So you need to collect features from datasets before you train the hash networks. - you can download the NUS-Wide and MSCOCO dataset [here](https://github.com/thuml/HashNet/tree/master/caffe) and please extract the file.
3,049
mquad/hgru4rec
['session based recommendations']
['Personalizing Session-based Recommendations with Hierarchical Recurrent Neural Networks']
data/xing/build_dataset.py src/train_hier_gru.py src/hgru4rec.py src/evaluation.py last_n_days_out_split write_dict_to_hdf make_sessions last_session_out_split remap_columns write_dataset_to_hdf evaluate_sessions_batch evaluate_sessions evaluate_sessions_batch_hier_bootstrap print_norm Sampler inspect HGRU4Rec Series unique values cumsum logical_or sort_values values diff to_hdf zip list to_hdf values zip value_counts last index copy unique value_counts copy index unique agg sort_values max nunique cumsum from_records vstack max fillna predict_next_batch seed tolist append sum sort_values range format hstack astype unique info T print min int32 zeros array len from_records concat vstack max drop_duplicates predict_next_batch fillna seed tolist logical_and preprocess_data append sum range format hstack astype copy unique info remove T cumcount min any int32 zeros array len sum from_records predict_next hstack vstack in1d unique append sort_values range len norm format inspect info
# HGRU4Rec Code for our ACM RecSys 2017 paper "Personalizing Session-based Recommendation with Hierarchical Recurrent Neural Networks". See the paper: [https://arxiv.org/abs/1706.04148](https://arxiv.org/abs/1706.04148) ## Setup This code is based of GRU4Rec ([https://github.com/hidasib/GRU4Rec](https://github.com/hidasib/GRU4Rec)). As the original code, it is written in Python 3.4 and requires Theano 0.8.0+ to run efficiently on GPU. In addition, this code uses H5Py and PyTables for efficient I/O operations. We suggest to use `virtualenv` or `conda` (preferred) together with `requirements.txt` to set up a virtual environment before running the code. ## Experiments on the XING dataset This repository comes with the code necessary to reproduce the experiments on the XING dataset.
3,050
mrana6/euclideanizing_flows
['density estimation']
['Euclideanizing Flows: Diffeomorphic Reduction for Learning Stable Dynamical Systems']
euclideanizing_flows/plot_utils.py euclideanizing_flows/data_utils.py euclideanizing_flows/train_utils.py setup.py main.py euclideanizing_flows/flows.py LASA get_jacobian RFFN Cos CouplingLayer BijectionNet LinearClamped FCNN NaturalGradientDescentVelNet sim_euler visualize_field generate_trajectories visualize_vel train test view reshape requires_grad_ device to net arange concatenate reshape array dynamics solve_ivp arange model reshape save sim_euler float norm streamplot reshape shape quiver visualize_field reshape nelement meshgrid zeros numpy detach model clip_grad_norm_ zero_grad DataLoader numpy histo_summary list range format replace float deepcopy time items isinstance backward print named_parameters parameters loss_fn Tensor step scalar_summary len eval model
SDSEF: Stable Dynamical System Learning Using Euclideanizing Flows =================================================== SDSEF is a dynamical system or policy learning approach with global asymptotic stability guarantees. For details, checkout our [publication](https://arxiv.org/pdf/2005.13143.pdf) in L4DC 2020. This library is an implementation of SDSEF in pytorch. SDSEF is being developed by [Asif Rana](mailto:[email protected]) and [Anqi Li](mailto:[email protected]). Prerequisites ------ - python >= 2.7 - PyTorch >= 1.5.0
3,051
mravanelli/pySpeechRev
['speech recognition', 'speech enhancement', 'distant speech recognition']
['Contaminated speech training methods for robust DNN-HMM distant speech recognition', 'The DIRHA-English corpus and related tasks for distant-speech recognition in domestic environments']
supplib.py pySpeechRev.py shift copy_folder load_IR ReadList ig_f empty_like copytree read loadmat append rstrip
# pySpeechRev This python code performs an efficient speech reverberation starting from a dataset of close-talking speech signals and a collection of acoustic impulse responses. The reverberated signal y[n] is computed in the following way: ``` y[n]=x[n] * h[n] ``` where x[n] is the clean signal and * is the convolutional operator. The script takes in input the following arguments: - in_folder: folder where the original close-talk dataset is stored. - out_folder: folder where the reverberated dataset will be stored.
3,052
mrheffels/aerial-imagery-segmentation
['data augmentation', 'semantic segmentation']
['Aerial Imagery Pixel-level Segmentation']
models/orbit/runner.py models/research/deeplab/utils/get_dataset_colormap_test.py models/official/vision/detection/modeling/retinanet_model.py models/research/slim/nets/cyclegan.py models/research/deeplab/evaluation/panoptic_quality_test.py models/research/slim/datasets/preprocess_imagenet_validation_data.py models/official/vision/detection/executor/__init__.py models/official/modeling/hyperparams/params_dict.py models/official/vision/detection/utils/object_detection/shape_utils.py models/official/vision/beta/tasks/retinanet.py models/official/common/distribute_utils_test.py models/official/nlp/transformer/beam_search_v1.py models/orbit/utils/common.py models/official/nlp/xlnet/run_squad.py models/research/deeplab/core/utils_test.py models/research/deeplab/datasets/remove_gt_colormap.py models/research/slim/nets/inception_v4_test.py models/official/nlp/nhnet/configs_test.py models/official/nlp/bert/input_pipeline.py models/research/slim/nets/nasnet/nasnet_utils.py models/official/vision/detection/configs/__init__.py models/official/nlp/transformer/embedding_layer.py models/official/recommendation/data_test.py models/official/vision/image_classification/preprocessing.py models/official/nlp/nhnet/models.py models/official/nlp/bert/tokenization_test.py models/official/vision/keras_cv/ops/anchor_generator.py models/research/slim/nets/mobilenet/mobilenet_v2.py models/official/recommendation/ncf_keras_main.py models/official/vision/beta/dataloaders/decoder.py models/official/vision/beta/modeling/layers/roi_sampler.py models/research/deeplab/evaluation/streaming_metrics.py models/official/modeling/optimization/optimizer_factory_test.py models/official/nlp/modeling/ops/segment_extractor_test.py models/official/nlp/data/pretrain_dataloader.py models/official/nlp/modeling/layers/masked_lm.py models/official/nlp/modeling/layers/position_embedding.py models/official/nlp/tasks/question_answering_test.py models/research/slim/datasets/cifar10.py models/official/nlp/projects/bigbird/encoder_test.py models/official/vision/detection/modeling/learning_rates.py models/official/nlp/tasks/masked_lm.py models/official/vision/beta/modeling/factory.py dd-ml-segmentation-benchmark/testgpu.py models/research/slim/nets/pix2pix.py models/official/vision/detection/ops/nms.py models/orbit/utils/tpu_summaries.py models/official/nlp/tasks/sentence_prediction_test.py models/official/vision/beta/ops/anchor.py models/research/slim/nets/inception_v1.py models/official/vision/detection/configs/maskrcnn_config.py models/official/nlp/transformer/transformer_test.py models/official/nlp/xlnet/preprocess_pretrain_data.py models/official/vision/detection/modeling/shapemask_model.py dd-ml-segmentation-benchmark/main_fastai.py models/official/nlp/modeling/networks/albert_encoder.py models/official/nlp/tasks/masked_lm_test.py models/official/vision/beta/modeling/maskrcnn_model.py models/official/nlp/modeling/layers/transformer_scaffold.py models/official/nlp/transformer/transformer_main.py models/official/vision/image_classification/resnet/common.py models/official/nlp/data/squad_lib.py models/official/nlp/modeling/layers/multi_channel_attention_test.py models/official/nlp/modeling/losses/weighted_sparse_categorical_crossentropy_test.py models/official/vision/beta/losses/maskrcnn_losses.py models/official/vision/detection/modeling/optimizers.py models/official/nlp/tasks/tagging_test.py dd-ml-segmentation-benchmark/libs/util.py models/official/core/input_reader.py models/official/utils/flags/_benchmark.py models/research/deeplab/evaluation/base_metric.py models/official/recommendation/constants.py models/research/deeplab/datasets/openimagearray.py models/official/nlp/bert/bert_models_test.py models/official/vision/detection/modeling/checkpoint_utils.py models/official/vision/beta/configs/decoders.py models/official/nlp/projects/triviaqa/preprocess.py models/official/modeling/optimization/configs/learning_rate_config.py models/official/vision/detection/utils/mask_utils.py models/official/nlp/nhnet/decoder_test.py dd-ml-segmentation-benchmark/libs/training_keras.py dd-ml-segmentation-benchmark/libs/images2chips.py models/official/nlp/keras_nlp/layers/position_embedding_test.py models/official/nlp/nhnet/trainer.py models/official/nlp/transformer/data_download.py models/official/vision/detection/modeling/__init__.py models/official/pip_package/setup.py models/official/vision/beta/dataloaders/classification_input.py models/official/vision/detection/utils/object_detection/preprocessor.py models/research/slim/preprocessing/preprocessing_factory.py models/official/vision/beta/modeling/heads/dense_prediction_heads.py models/official/nlp/data/tagging_data_lib_test.py models/official/modeling/activations/swish.py models/research/deeplab/common_test.py models/official/nlp/bert/run_pretraining.py models/official/vision/beta/modeling/layers/nn_blocks_3d_test.py models/official/nlp/modeling/layers/tn_transformer_test.py models/official/vision/beta/train.py models/official/vision/detection/ops/postprocess_ops.py models/research/slim/eval_image_classifier.py models/official/nlp/data/sentence_retrieval_lib.py models/official/nlp/xlnet/preprocess_squad_data.py models/official/core/train_lib.py models/research/setup.py models/official/modeling/optimization/configs/optimization_config_test.py models/official/vision/keras_cv/layers/deeplab.py models/research/deeplab/core/nas_cell.py models/official/nlp/albert/run_classifier.py models/official/nlp/modeling/layers/cls_head_test.py models/official/nlp/bert/export_tfhub_test.py models/research/slim/datasets/imagenet.py models/research/slim/datasets/download_and_convert_visualwakewords_lib.py models/official/modeling/activations/gelu_test.py models/official/vision/beta/modeling/backbones/spinenet.py models/official/vision/beta/modeling/backbones/resnet_3d_test.py models/official/nlp/modeling/layers/transformer.py models/official/nlp/tasks/utils.py models/official/nlp/modeling/layers/position_embedding_test.py models/official/nlp/modeling/layers/relative_attention_test.py models/official/nlp/modeling/layers/transformer_test.py models/official/vision/beta/modeling/backbones/efficientnet_test.py models/orbit/utils/common_test.py models/official/vision/beta/ops/mask_ops.py models/official/vision/detection/utils/object_detection/ops.py models/official/vision/detection/utils/object_detection/balanced_positive_negative_sampler.py models/official/vision/image_classification/callbacks.py models/research/deeplab/datasets/build_cityscapes_data.py models/official/vision/detection/dataloader/tf_example_decoder.py models/research/slim/preprocessing/lenet_preprocessing.py models/official/nlp/modeling/networks/mobile_bert_encoder.py models/orbit/controller.py models/official/core/base_trainer_test.py models/official/vision/beta/modeling/layers/detection_generator_test.py models/official/vision/image_classification/configs/base_configs.py models/official/nlp/keras_nlp/layers/self_attention_mask.py models/research/deeplab/utils/save_annotation.py models/official/nlp/modeling/layers/dense_einsum.py models/official/vision/beta/dataloaders/tf_example_decoder.py models/official/vision/beta/ops/preprocess_ops.py models/official/vision/detection/modeling/factory.py models/official/nlp/nhnet/trainer_test.py models/official/nlp/modeling/networks/classification.py models/research/deeplab/evaluation/eval_coco_format.py models/research/slim/nets/inception_utils.py dd-ml-segmentation-benchmark/libs/config.py models/official/staging/training/grad_utils.py models/official/vision/detection/utils/object_detection/matcher.py models/official/nlp/data/squad_lib_sp.py models/official/vision/beta/ops/anchor_test.py models/official/nlp/transformer/transformer_forward_test.py models/official/vision/beta/modeling/backbones/factory_test.py models/official/vision/detection/utils/object_detection/visualization_utils.py models/official/vision/beta/modeling/retinanet_model_test.py dd-ml-segmentation-benchmark/libs/datasets.py models/official/nlp/nhnet/optimizer.py models/official/nlp/xlnet/xlnet_modeling.py models/official/vision/detection/modeling/architecture/spinenet.py models/official/nlp/keras_nlp/layers/masked_lm.py models/official/utils/misc/model_helpers.py models/research/deeplab/core/conv2d_ws.py models/research/deeplab/core/resnet_v1_beta_test.py models/official/nlp/projects/triviaqa/train.py models/research/slim/nets/nasnet/nasnet_test.py models/official/nlp/modeling/networks/bert_encoder.py models/official/vision/image_classification/resnet/resnet_model.py models/official/nlp/bert/bert_models.py models/official/nlp/modeling/layers/util.py models/official/vision/keras_cv/ops/box_matcher.py models/official/vision/image_classification/configs/__init__.py models/official/vision/detection/dataloader/__init__.py models/official/nlp/train_ctl_continuous_finetune.py models/official/nlp/xlnet/common_flags.py models/official/vision/keras_cv/ops/iou_similarity.py models/research/slim/preprocessing/cifarnet_preprocessing.py models/official/nlp/train_ctl_continuous_finetune_test.py models/official/nlp/modeling/layers/tn_transformer_expand_condense.py models/official/vision/beta/configs/backbones_3d.py models/official/nlp/data/tagging_dataloader.py models/official/vision/beta/configs/retinanet.py models/research/slim/nets/resnet_v1.py models/official/vision/detection/utils/object_detection/__init__.py models/official/core/task_factory.py models/research/slim/nets/vgg.py models/research/deeplab/datasets/data_generator.py models/official/common/registry_imports.py models/official/nlp/keras_nlp/layers/on_device_embedding.py models/official/common/flags.py models/official/nlp/modeling/layers/rezero_transformer.py models/official/vision/image_classification/mnist_main.py models/research/deeplab/utils/get_dataset_colormap.py models/research/slim/nets/mobilenet/conv_blocks.py models/official/nlp/configs/electra.py models/official/nlp/projects/triviaqa/evaluate.py models/official/vision/detection/dataloader/factory.py models/official/vision/beta/ops/nms.py models/official/nlp/xlnet/xlnet_config.py models/official/nlp/transformer/metrics.py models/official/vision/keras_cv/ops/anchor_generator_test.py models/research/deeplab/core/conv2d_ws_test.py models/research/slim/nets/nets_factory_test.py dd-ml-segmentation-benchmark/libs/custom_training.py models/research/slim/nets/s3dg.py models/official/vision/keras_cv/layers/deeplab_test.py models/research/slim/nets/inception_resnet_v2.py models/research/deeplab/datasets/data_generator_test.py models/official/vision/detection/evaluation/coco_utils.py models/official/nlp/bert/tf2_encoder_checkpoint_converter.py models/official/vision/beta/modeling/backbones/efficientnet.py models/official/vision/image_classification/learning_rate.py models/official/modeling/optimization/configs/optimization_config.py models/official/vision/detection/dataloader/maskrcnn_parser.py models/official/nlp/modeling/models/bert_classifier.py models/official/nlp/bert/configs.py models/official/vision/beta/serving/image_classification_test.py models/official/nlp/modeling/layers/gated_feedforward_test.py models/official/vision/detection/utils/object_detection/faster_rcnn_box_coder.py models/official/nlp/modeling/ops/beam_search_test.py models/official/nlp/modeling/models/bert_token_classifier_test.py models/official/vision/beta/ops/sampling_ops.py models/official/nlp/data/question_answering_dataloader_test.py models/official/nlp/projects/bigbird/attention_test.py models/research/slim/nets/i3d_test.py models/official/nlp/keras_nlp/layers/__init__.py models/official/nlp/albert/tf2_albert_encoder_checkpoint_converter.py models/research/slim/nets/resnet_v2.py models/official/nlp/transformer/utils/metrics.py models/research/deeplab/datasets/build_dd_data.py models/official/nlp/bert/squad_evaluate_v2_0.py models/official/nlp/bert/serving.py models/official/nlp/modeling/losses/weighted_sparse_categorical_crossentropy.py models/official/vision/beta/dataloaders/utils.py models/official/vision/detection/modeling/losses.py models/research/slim/nets/nasnet/nasnet_utils_test.py models/research/slim/nets/resnet_utils.py models/official/vision/image_classification/optimizer_factory.py models/research/deeplab/datasets/build_data.py models/official/vision/beta/configs/backbones.py models/research/deeplab/core/preprocess_utils.py models/official/nlp/keras_nlp/__init__.py models/official/utils/flags/_conventions.py models/research/slim/nets/inception_v2_test.py models/official/nlp/data/data_loader.py models/official/vision/keras_cv/losses/loss_utils.py models/official/nlp/keras_nlp/encoders/bert_encoder_test.py models/official/nlp/transformer/utils/tokenizer.py models/official/nlp/bert/export_tfhub.py models/research/slim/nets/alexnet.py models/official/nlp/keras_nlp/layers/transformer_encoder_block.py models/official/nlp/tasks/question_answering.py models/official/vision/detection/configs/shapemask_config.py models/official/vision/beta/modeling/backbones/resnet_test.py models/official/vision/detection/modeling/maskrcnn_model.py models/official/nlp/keras_nlp/setup.py models/research/deeplab/model.py models/official/vision/beta/modeling/video_classification_model.py models/official/vision/beta/tasks/__init__.py models/official/nlp/transformer/attention_layer.py models/official/vision/detection/evaluation/factory.py models/official/vision/image_classification/efficientnet/common_modules.py models/research/slim/download_and_convert_data.py models/official/vision/beta/configs/video_classification_test.py dd-ml-segmentation-benchmark/libs/inference_keras.py models/official/nlp/modeling/layers/tn_expand_condense.py models/research/slim/nets/inception_v4.py models/official/nlp/modeling/layers/transformer_xl_test.py models/official/modeling/hyperparams/__init__.py models/research/slim/export_inference_graph.py models/official/vision/beta/configs/image_classification.py models/official/nlp/modeling/losses/__init__.py models/research/deeplab/evaluation/panoptic_quality.py models/official/nlp/transformer/ffn_layer.py models/official/recommendation/movielens.py models/research/slim/preprocessing/vgg_preprocessing.py models/official/modeling/training/distributed_executor.py models/research/deeplab/core/nas_network.py models/official/vision/detection/modeling/architecture/keras_utils.py models/research/slim/nets/nasnet/pnasnet_test.py models/official/nlp/modeling/networks/classification_test.py models/official/vision/beta/modeling/layers/mask_sampler.py models/official/vision/image_classification/augment.py models/research/slim/train_image_classifier.py models/official/nlp/bert/model_training_utils.py models/official/vision/detection/utils/class_utils.py models/official/modeling/optimization/optimizer_factory.py models/official/nlp/xlnet/run_classifier.py models/official/vision/beta/tasks/maskrcnn.py models/official/vision/detection/utils/box_utils.py models/official/nlp/nhnet/raw_data_processor.py models/official/vision/beta/dataloaders/tf_example_decoder_test.py models/research/deeplab/eval.py models/official/nlp/transformer/data_pipeline.py models/research/slim/nets/mobilenet/mobilenet.py models/official/nlp/xlnet/preprocess_utils.py models/research/slim/nets/post_training_quantization.py models/official/nlp/bert/model_saving_utils.py models/official/utils/flags/_misc.py dd-ml-segmentation-benchmark/libs/datasets_keras.py dd-ml-segmentation-benchmark/libs/models_keras.py models/official/nlp/modeling/layers/cls_head.py models/official/nlp/modeling/layers/talking_heads_attention_test.py models/official/nlp/modeling/models/bert_span_labeler_test.py models/official/vision/beta/serving/export_base.py models/official/vision/image_classification/learning_rate_test.py models/official/modeling/optimization/configs/optimizer_config.py models/official/modeling/performance.py models/official/nlp/modeling/networks/mobile_bert_encoder_test.py models/official/vision/beta/modeling/backbones/resnet_3d.py models/official/vision/beta/modeling/retinanet_model.py models/official/vision/beta/configs/image_classification_test.py models/official/nlp/train.py models/official/vision/beta/ops/box_ops.py models/official/nlp/projects/triviaqa/sentencepiece_pb2.py models/official/nlp/projects/triviaqa/prediction.py models/research/slim/nets/inception_v3.py models/official/vision/beta/__init__.py dd-ml-segmentation-benchmark/libs/training.py models/official/vision/detection/utils/object_detection/box_list_ops.py models/official/vision/detection/dataloader/anchor.py models/official/vision/keras_cv/losses/focal_loss.py models/research/slim/nets/inception_v2.py models/official/nlp/xlnet/training_utils.py models/official/vision/keras_cv/losses/__init__.py models/official/nlp/optimization.py models/official/nlp/tasks/electra_task_test.py models/official/nlp/data/data_loader_factory_test.py models/official/nlp/modeling/networks/span_labeling.py models/official/vision/beta/modeling/layers/nn_blocks.py models/official/vision/beta/modeling/layers/nn_layers.py models/research/slim/datasets/flowers.py models/official/vision/beta/modeling/classification_model.py models/orbit/standard_runner.py models/official/vision/beta/modeling/layers/box_sampler.py models/official/core/base_task.py models/research/deeplab/core/nas_network_test.py models/official/nlp/projects/triviaqa/download_and_prepare.py models/research/slim/nets/resnet_v1_test.py models/official/vision/beta/modeling/layers/detection_generator.py models/research/deeplab/core/xception_test.py models/official/nlp/bert/run_squad_helper.py models/official/nlp/transformer/compute_bleu.py models/official/nlp/transformer/translate.py models/official/vision/detection/modeling/architecture/resnet.py models/official/nlp/modeling/models/bert_token_classifier.py models/official/vision/beta/evaluation/coco_utils.py models/research/deeplab/utils/train_utils.py models/orbit/controller_test.py models/official/nlp/data/question_answering_dataloader.py models/official/nlp/modeling/layers/relative_attention.py models/official/nlp/modeling/models/__init__.py models/official/nlp/configs/encoders.py models/official/nlp/modeling/layers/rezero_transformer_test.py models/official/vision/beta/modeling/heads/instance_heads.py models/official/vision/image_classification/classifier_trainer.py models/research/slim/datasets/download_and_convert_cifar10.py models/official/nlp/modeling/models/bert_pretrainer_test.py models/research/slim/nets/mobilenet_v1_train.py models/official/vision/beta/configs/__init__.py models/official/nlp/modeling/models/bert_pretrainer.py models/official/vision/beta/modeling/factory_test.py models/official/recommendation/stat_utils.py models/official/nlp/data/data_loader_factory.py models/official/vision/image_classification/optimizer_factory_test.py models/official/vision/beta/modeling/backbones/revnet_test.py models/official/vision/image_classification/dataset_factory.py models/research/deeplab/deprecated/segmentation_dataset.py models/official/nlp/modeling/models/seq2seq_transformer_test.py models/official/vision/detection/utils/object_detection/minibatch_sampler.py models/official/recommendation/data_pipeline.py models/official/nlp/modeling/layers/transformer_xl.py models/official/vision/beta/modeling/layers/roi_aligner.py models/official/recommendation/ncf_input_pipeline.py models/official/vision/beta/dataloaders/video_input_test.py models/official/vision/detection/modeling/architecture/nn_ops.py models/official/nlp/modeling/models/electra_pretrainer_test.py models/official/nlp/modeling/models/electra_pretrainer.py models/official/vision/detection/ops/spatial_transform_ops.py models/official/vision/detection/utils/object_detection/argmax_matcher.py models/official/nlp/bert/tf1_checkpoint_converter_lib.py models/official/nlp/projects/triviaqa/predict.py models/official/utils/flags/_device.py models/official/nlp/projects/triviaqa/modeling.py models/official/utils/flags/core.py models/research/slim/datasets/dataset_factory.py models/official/nlp/xlnet/squad_utils.py models/research/slim/nets/vgg_test.py models/official/core/registry.py models/official/nlp/albert/export_albert_tfhub.py dd-ml-segmentation-benchmark/score_fastai.py models/research/slim/deployment/model_deploy_test.py models/official/vision/image_classification/resnet/resnet_config.py models/official/nlp/nhnet/models_test.py models/official/nlp/modeling/layers/transformer_scaffold_test.py models/research/slim/datasets/download_and_convert_visualwakewords.py models/official/nlp/keras_nlp/layers/position_embedding.py dd-ml-segmentation-benchmark/libs/datasets_fastai.py dd-ml-segmentation-benchmark/main_keras.py models/official/vision/beta/modeling/backbones/resnet.py models/official/vision/detection/evaluation/__init__.py models/official/vision/detection/utils/object_detection/box_list.py models/official/nlp/albert/configs.py models/official/nlp/transformer/misc.py models/official/nlp/modeling/layers/gated_feedforward.py dd-ml-segmentation-benchmark/libs/scoring.py models/official/utils/misc/model_helpers_test.py models/research/deeplab/core/nas_genotypes.py models/official/vision/keras_cv/ops/__init__.py models/official/utils/flags/flags_test.py models/official/vision/detection/dataloader/mode_keys.py models/research/slim/nets/s3dg_test.py models/official/nlp/modeling/models/bert_classifier_test.py models/research/deeplab/model_test.py models/official/staging/training/__init__.py models/official/vision/detection/modeling/architecture/factory.py models/official/nlp/modeling/layers/tn_expand_condense_test.py models/research/slim/nets/cyclegan_test.py models/official/nlp/xlnet/optimization.py models/official/vision/beta/dataloaders/retinanet_input.py models/official/core/base_trainer.py models/official/nlp/modeling/layers/masked_softmax.py models/official/vision/image_classification/mnist_test.py models/research/slim/datasets/download_and_convert_mnist.py models/official/vision/image_classification/efficientnet/efficientnet_model.py models/official/vision/beta/serving/image_classification.py models/official/nlp/modeling/layers/masked_lm_test.py models/research/slim/nets/mobilenet/mobilenet_v2_test.py dd-ml-segmentation-benchmark/libs/inference.py models/research/slim/nets/nets_factory.py models/official/nlp/modeling/layers/multi_channel_attention.py models/orbit/utils/summary_manager.py models/research/deeplab/core/utils.py models/official/utils/flags/_performance.py models/official/vision/detection/modeling/base_model.py models/official/core/train_utils.py models/official/vision/beta/configs/common.py models/research/slim/export_inference_graph_test.py models/official/nlp/modeling/layers/talking_heads_attention.py models/official/nlp/transformer/model_params.py models/official/vision/beta/dataloaders/parser.py models/official/vision/detection/utils/object_detection/region_similarity_calculator.py models/official/core/registry_test.py models/official/nlp/transformer/compute_bleu_test.py models/research/deeplab/train.py models/research/slim/nets/inception_v3_test.py models/official/nlp/modeling/networks/span_labeling_test.py models/official/vision/detection/modeling/architecture/identity.py models/official/modeling/hyperparams/oneof_test.py models/official/vision/detection/configs/factory.py models/official/vision/beta/configs/video_classification.py models/official/core/train_lib_test.py models/research/slim/datasets/build_imagenet_data.py models/research/deeplab/evaluation/test_utils.py models/official/utils/flags/_base.py dd-ml-segmentation-benchmark/libs/util_keras.py models/official/nlp/data/sentence_prediction_dataloader_test.py models/research/slim/setup.py models/official/vision/detection/ops/roi_ops.py models/research/deeplab/datasets/convert_rgb_to_index.py models/official/nlp/keras_nlp/layers/transformer_encoder_block_test.py models/official/nlp/tasks/electra_task.py models/official/vision/detection/ops/__init__.py models/orbit/utils/__init__.py models/research/slim/nets/mobilenet/mobilenet_v3_test.py models/official/modeling/optimization/__init__.py models/official/vision/beta/modeling/heads/dense_prediction_heads_test.py models/official/nlp/data/create_pretraining_data_test.py models/official/utils/testing/integration.py models/official/vision/image_classification/efficientnet/tfhub_export.py models/official/vision/image_classification/resnet/resnet_runnable.py models/official/nlp/modeling/layers/self_attention_mask.py models/official/recommendation/data_preprocessing.py models/official/vision/image_classification/efficientnet/efficientnet_config.py models/official/modeling/tf_utils.py models/official/nlp/projects/triviaqa/evaluation.py models/research/deeplab/core/preprocess_utils_test.py models/official/nlp/modeling/models/dual_encoder.py models/official/nlp/data/pretrain_dataloader_test.py models/official/vision/detection/main.py models/official/nlp/modeling/models/seq2seq_transformer.py models/official/nlp/nhnet/configs.py models/research/slim/nets/mobilenet_v1.py models/official/nlp/modeling/layers/masked_softmax_test.py models/research/slim/nets/mobilenet_v1_test.py models/official/nlp/modeling/networks/__init__.py models/official/vision/beta/modeling/decoders/fpn.py models/official/nlp/data/sentence_prediction_dataloader.py models/official/vision/image_classification/resnet/resnet_ctl_imagenet_main.py models/official/nlp/modeling/ops/beam_search.py models/official/vision/beta/modeling/backbones/revnet.py dd-ml-segmentation-benchmark/custom_main_fastai.py models/official/utils/misc/keras_utils.py models/official/vision/beta/dataloaders/maskrcnn_input.py models/research/deeplab/vis.py models/official/utils/hyperparams_flags.py models/official/nlp/albert/export_albert_tfhub_test.py models/official/vision/detection/executor/detection_executor.py models/official/vision/detection/configs/retinanet_config.py models/orbit/standard_runner_test.py models/official/modeling/activations/gelu.py models/official/vision/beta/serving/export_saved_model.py models/official/nlp/albert/run_squad.py models/official/nlp/nhnet/raw_data_process.py models/official/vision/beta/ops/preprocess_ops_3d_test.py models/official/nlp/modeling/layers/__init__.py models/official/nlp/transformer/transformer.py models/research/deeplab/common.py models/official/nlp/tasks/tagging.py models/official/nlp/data/tagging_dataloader_test.py dd-ml-segmentation-benchmark/custom_main_keras.py models/official/recommendation/ncf_test.py models/official/vision/beta/configs/maskrcnn.py models/official/modeling/activations/__init__.py models/official/vision/image_classification/resnet/imagenet_preprocessing.py models/research/deeplab/evaluation/eval_coco_format_test.py models/official/nlp/modeling/ops/segment_extractor.py models/official/nlp/nhnet/evaluation.py models/official/vision/image_classification/classifier_trainer_test.py models/research/slim/nets/overfeat.py models/official/modeling/optimization/ema_optimizer.py models/official/vision/detection/dataloader/shapemask_parser.py models/research/slim/datasets/download_and_convert_flowers.py models/official/nlp/modeling/layers/dense_einsum_test.py models/official/vision/beta/modeling/backbones/spinenet_test.py models/official/vision/image_classification/configs/configs.py models/official/nlp/bert/run_squad.py models/official/nlp/data/create_finetuning_data.py models/orbit/__init__.py models/official/nlp/projects/bigbird/encoder.py models/official/vision/beta/modeling/layers/box_matcher.py models/official/modeling/hyperparams/base_config.py models/official/recommendation/popen_helper.py models/official/vision/detection/dataloader/retinanet_parser.py models/research/slim/nets/pix2pix_test.py models/research/slim/nets/alexnet_test.py models/official/nlp/modeling/layers/attention_test.py models/orbit/utils/epoch_helper.py models/research/deeplab/evaluation/streaming_metrics_test.py models/official/nlp/projects/triviaqa/dataset.py models/research/deeplab/input_preprocess.py models/research/slim/datasets/mnist.py models/official/core/base_task_test.py models/official/common/distribute_utils.py dd-ml-segmentation-benchmark/libs/custom_training_keras.py models/research/slim/nets/i3d_utils.py models/research/slim/deployment/model_deploy.py models/official/nlp/modeling/networks/xlnet_base_test.py models/research/slim/nets/dcgan_test.py models/official/nlp/modeling/layers/on_device_embedding.py models/official/nlp/modeling/networks/encoder_scaffold.py models/official/nlp/keras_nlp/layers/on_device_embedding_test.py models/official/nlp/configs/bert.py models/official/vision/image_classification/test_utils.py models/official/nlp/bert/common_flags.py models/research/slim/nets/inception_v1_test.py models/official/nlp/modeling/networks/bert_encoder_test.py models/official/vision/detection/modeling/architecture/nn_blocks.py models/official/nlp/modeling/layers/mat_mul_with_margin_test.py models/official/recommendation/create_ncf_data.py models/official/modeling/hyperparams/params_dict_test.py models/official/nlp/data/wmt_dataloader.py models/official/utils/testing/mock_task.py models/official/nlp/transformer/utils/tokenizer_test.py models/research/deeplab/evaluation/parsing_covering.py models/official/nlp/bert/tokenization.py models/official/nlp/modeling/networks/xlnet_base.py models/official/vision/beta/modeling/decoders/fpn_test.py models/official/nlp/transformer/transformer_main_test.py models/research/slim/nets/overfeat_test.py models/official/vision/beta/modeling/heads/instance_heads_test.py models/official/vision/image_classification/augment_test.py models/official/nlp/modeling/networks/albert_encoder_test.py models/official/nlp/transformer/optimizer.py models/research/deeplab/core/dense_prediction_cell_test.py models/official/vision/detection/modeling/architecture/__init__.py models/research/slim/nets/inception_resnet_v2_test.py models/official/vision/beta/modeling/layers/nn_blocks_test.py models/official/vision/beta/ops/preprocess_ops_3d.py models/official/vision/detection/modeling/architecture/heads.py models/research/slim/datasets/dataset_utils.py models/official/vision/beta/modeling/layers/nn_blocks_3d.py models/research/deeplab/core/xception.py models/official/vision/beta/modeling/decoders/__init__.py models/official/vision/detection/modeling/architecture/fpn.py models/official/vision/beta/modeling/backbones/factory.py models/official/nlp/transformer/transformer_layers_test.py models/orbit/utils/loop_fns.py models/official/vision/beta/ops/preprocess_ops_test.py models/official/vision/detection/utils/__init__.py models/research/deeplab/evaluation/parsing_covering_test.py models/official/nlp/data/tagging_data_lib.py models/official/modeling/activations/swish_test.py models/official/vision/beta/modeling/maskrcnn_model_test.py models/official/vision/detection/ops/target_ops.py models/official/vision/keras_cv/layers/__init__.py models/official/vision/beta/dataloaders/tf_example_label_map_decoder.py models/official/modeling/optimization/lr_schedule.py models/official/vision/beta/losses/retinanet_losses.py models/official/nlp/modeling/layers/mat_mul_with_margin.py models/official/modeling/hyperparams/base_config_test.py models/research/deeplab/core/resnet_v1_beta.py models/research/slim/datasets/process_bounding_boxes.py models/official/nlp/bert/run_classifier.py models/official/vision/detection/configs/base_config.py models/research/slim/nets/mobilenet/mobilenet_v3.py models/research/slim/nets/cifarnet.py models/research/slim/nets/mobilenet_v1_eval.py models/official/vision/beta/modeling/backbones/__init__.py models/official/nlp/keras_nlp/encoders/bert_encoder.py models/official/nlp/bert/squad_evaluate_v1_1.py models/official/nlp/nhnet/utils.py models/official/nlp/tasks/sentence_prediction.py models/official/nlp/modeling/networks/encoder_scaffold_test.py models/official/nlp/bert/model_training_utils_test.py models/official/vision/beta/evaluation/coco_evaluator.py models/research/deeplab/datasets/build_voc2012_data.py models/official/nlp/modeling/layers/attention.py models/official/vision/detection/utils/object_detection/box_coder.py models/official/vision/beta/ops/mask_ops_test.py models/official/nlp/transformer/model_utils.py models/official/vision/beta/tasks/image_classification.py models/official/nlp/nhnet/decoder.py models/research/deeplab/convert_to_tflite.py models/research/deeplab/core/feature_extractor.py models/research/slim/nets/nasnet/pnasnet.py models/official/vision/keras_cv/__init__.py models/research/slim/nets/inception.py models/research/slim/nets/i3d.py models/research/deeplab/core/dense_prediction_cell.py models/official/vision/beta/dataloaders/tf_example_label_map_decoder_test.py models/research/deeplab/export_model.py models/official/vision/beta/modeling/classification_model_test.py models/official/utils/misc/distribution_utils.py models/official/nlp/modeling/models/bert_span_labeler.py models/research/slim/nets/lenet.py models/official/vision/beta/modeling/decoders/factory.py models/official/nlp/modeling/models/dual_encoder_test.py models/official/vision/beta/modeling/factory_3d.py models/official/nlp/projects/bigbird/attention.py models/official/vision/detection/utils/object_detection/target_assigner.py models/research/slim/nets/dcgan.py models/official/vision/detection/evaluation/coco_evaluator.py models/official/vision/detection/utils/dataloader_utils.py models/official/nlp/xlnet/preprocess_classification_data.py models/official/nlp/nhnet/input_pipeline.py models/research/slim/preprocessing/inception_preprocessing.py models/research/slim/nets/resnet_v2_test.py models/official/nlp/transformer/model_utils_test.py models/official/vision/beta/tasks/video_classification.py models/official/vision/keras_cv/setup.py models/official/vision/keras_cv/ops/anchor_labeler.py models/official/vision/beta/dataloaders/video_input.py models/official/nlp/keras_nlp/encoders/__init__.py models/official/recommendation/neumf_model.py models/official/vision/beta/ops/spatial_transform_ops.py models/research/slim/datasets/visualwakewords.py models/orbit/utils/tpu_summaries_test.py models/official/nlp/data/wmt_dataloader_test.py models/research/deeplab/datasets/build_ade20k_data.py models/research/deeplab/evaluation/test_utils_test.py models/official/vision/beta/modeling/video_classification_model_test.py models/official/utils/misc/callstack_sampler.py models/official/vision/detection/dataloader/input_reader.py models/official/nlp/projects/triviaqa/inputs.py models/official/utils/flags/_distribution.py models/official/vision/beta/modeling/layers/roi_aligner_test.py models/official/nlp/xlnet/classifier_utils.py models/official/vision/image_classification/resnet/tfhub_export.py models/official/modeling/hyperparams/oneof.py models/official/vision/beta/modeling/layers/roi_generator.py models/official/vision/detection/utils/input_utils.py models/official/modeling/hyperparams/config_definitions.py models/research/slim/nets/nasnet/nasnet.py models/official/nlp/data/create_pretraining_data.py models/official/core/exp_factory.py models/official/recommendation/ncf_common.py models/official/nlp/xlnet/run_pretrain.py models/official/nlp/data/classifier_data_lib.py models/official/nlp/xlnet/data_utils.py train_model FocalLoss train_model categorical_focal_loss download_dataset load_dataset load_img SegmentationSequence mask_to_classes load_dataset load_lines image2tile get_split run color2class tensor2numpy numpy2tensor category2mask Inference run_inference chip_iterator image_size chips_from_image run_inference_on_file run_inference category2mask make_encoder act get_scale_index conv upscale build_unet reflectpad pad_to_scale score_masks score_predictions wherecolor plot_confusion_matrix train_model train_model FBeta ConfusionMatrix ExportCallback Recall MySaveModelCallback CMScores Precision MyCSVLogger FBeta _mirrored_cross_device_ops configure_cluster tpu_initialize get_strategy_scope get_distribution_strategy _collective_communication DummyContextManager GetDistributionStrategyTest define_flags Task all_strategy_combinations TaskKerasTest Trainer TrainerTest all_strategy_combinations get_exp_config get_exp_config_creater register_config_factory _get_random_integer InputReader lookup register RegistryTest get_task_cls get_task register_task_cls maybe_create_best_ckpt_exporter run_experiment BestCheckpointExporter TrainTest ParseConfigOptions remove_ckpts read_global_step_from_checkpoint write_summary write_json_summary create_trainer serialize_config parse_configuration configure_optimizer set_mixed_precision_policy assert_rank safe_mean get_shape_list get_activation pack_inputs is_special_none_tensor unpack_inputs gelu GeluTest hard_swish identity simple_swish CustomizedSwishTest Config DumpConfig2 DumpConfig3 DumpConfig1 BaseConfigTest CallbacksConfig TensorboardConfig TaskConfig DataConfig ExperimentConfig TrainerConfig RuntimeConfig OneOfConfig OutputLayer OneOfTest ResNet Backbone Network nested_csv_str_to_json_str ParamsDict read_yaml_to_params_dict save_params_dict_to_yaml override_params_dict ParamsDictIOTest IOTest ParamsDictTest ExponentialMovingAverage LinearWarmup PolynomialWarmUp DirectPowerDecay OptimizerFactory OptimizerFactoryTest DirectPowerLrConfig PolynomialLrConfig LinearWarmupConfig ConstantLrConfig PolynomialWarmupConfig ExponentialLrConfig CosineLrConfig StepwiseLrConfig WarmupConfig OptimizerConfig OptimizationConfig LrConfig OptimizerConfigTest AdamConfig LAMBConfig RMSPropConfig EMAConfig AdamWeightDecayConfig BaseOptimizerConfig SGDConfig SummaryWriter _save_checkpoint metrics_as_dict _steps_to_run reset_states metric_results ExecutorBuilder _no_metric DistributedExecutor AdamWeightDecay WarmUp create_optimizer main main run_continuous_finetune ContinuousFinetuneTest AlbertConfig main export_albert_tfhub create_albert_model ExportAlbertTfhubTest main predict export_squad predict_squad eval_squad train_squad main main convert_checkpoint _create_albert_model BertPretrainLossAndMetricLayer squad_model get_transformer_encoder classifier_model pretrain_model BertModelsTest use_float16 dtype define_common_bert_flags use_graph_rewrite get_loss_scale BertConfig main create_bert_model export_bert_tfhub ExportTfhubTest create_pretrain_dataset create_squad_dataset create_classifier_dataset decode_record create_retrieval_dataset single_file_dataset export_bert_model clip_by_global_norm_callback run_customized_training_loop write_txt_summary _save_checkpoint _should_export_summary steps_to_run _should_export_checkpoint _get_input_iterator _float_metric_value RecordingCallback eager_gpu_strategy_combinations metric_fn ModelTrainingUtilsTest eager_strategy_combinations create_fake_data_input_fn summaries_with_matching_keyword create_model_fn check_eventfile_for_keyword get_dataset_fn run_keras_compile_fit custom_main get_predictions_and_labels export_classifier run_bert_classifier get_loss_fn main run_bert get_pretrain_dataset_fn run_bert_pretrain run_customized_training get_loss_fn main export_squad predict_squad eval_squad train_squad main export_squad get_dataset_fn predict_squad squad_loss_fn get_squad_model_to_predict eval_squad _get_matched_files train_squad get_raw_results get_loss_fn dump_to_files predict_squad_customized prediction_output_squad define_common_squad_flags main BertServing evaluate _exact_match_score _normalize_answer _f1_score _metric_max_over_ground_truths _make_precision_recall_eval _get_tokens _merge_eval _get_raw_scores evaluate _apply_no_ans_threshold _compute_f1 _compute_exact _make_qid_to_has_ans _run_precision_recall_analysis _find_all_best_thresh _find_best_thresh _normalize_answer _make_eval_dict _has_exclude_patterns convert _bert_name_replacement _get_permutation create_v2_checkpoint _get_new_shape _create_bert_model convert_checkpoint main _create_bert_pretrainer_model validate_case_matches_checkpoint convert_by_vocab FullTokenizer preprocess_text BasicTokenizer convert_ids_to_tokens WordpieceTokenizer printable_text convert_tokens_to_ids encode_ids encode_pieces load_vocab whitespace_tokenize FullSentencePieceTokenizer convert_to_unicode _is_whitespace _is_control _is_punctuation TokenizationTest ClsHeadConfig PretrainerConfig ElectraPretrainerConfig MobileBertEncoderConfig EncoderConfig build_encoder BigBirdEncoderConfig AlbertEncoderConfig BertEncoderConfig ColaProcessor MnliProcessor InputExample StsBProcessor XtremeXnliProcessor RteProcessor file_based_convert_examples_to_features XtremePawsxProcessor QnliProcessor QqpProcessor AxProcessor XnliProcessor DataProcessor generate_tf_record_from_data_file SstProcessor InputFeatures _truncate_seq_pair WnliProcessor convert_single_example MrpcProcessor PawsxProcessor TfdsProcessor generate_regression_dataset generate_classifier_dataset generate_squad_dataset generate_tagging_dataset main generate_retrieval_dataset TrainingInstance _contiguous create_int_feature _window _wordpieces_to_grams create_instances_from_document create_training_instances _masking_ngrams write_instance_to_example_files main create_float_feature truncate_seq_pair create_masked_lm_predictions CreatePretrainingDataTest DataLoader get_data_loader register_data_loader_cls MyDataConfig MyDataLoader DataLoaderFactoryTest BertPretrainDataLoader BertPretrainDataConfig BertPretrainDataTest _create_fake_dataset QuestionAnsweringDataLoader QADataConfig QuestionAnsweringDataTest _create_fake_dataset SentencePredictionDataLoader SentencePredictionDataConfig SentencePredictionDataTest _create_fake_dataset generate_sentence_retrevial_tf_record TatoebaProcessor BuccProcessor _check_is_max_context _compute_softmax InputFeatures get_final_text _improve_answer_span write_to_json_files _get_best_indexes read_squad_examples convert_examples_to_features SquadExample FeatureWriter write_predictions generate_tf_record_from_json_file postprocess_output _check_is_max_context _convert_index _compute_softmax InputFeatures write_to_json_files _get_best_indexes read_squad_examples convert_examples_to_features SquadExample FeatureWriter write_predictions generate_tf_record_from_json_file postprocess_output TaggingDataLoader TaggingDataConfig _create_fake_dataset TaggingDataLoaderTest _tokenize_example token_classification_meta_data generate_tf_record_from_data_file PanxProcessor UdposProcessor InputExample write_example_to_file _convert_single_example _read_one_file TaggingDataLibTest _create_fake_file _get_example_length _batch_examples _create_min_max_boundaries WMTDataLoader _filter_max_length WMTDataConfig WMTDataLoaderTest _create_fake_dataset _get_requirements BertEncoder BertEncoderTest MaskedLM OnDeviceEmbedding OnDeviceEmbeddingTest PositionEmbedding PositionEmbeddingLayerTest SelfAttentionMask TransformerEncoderBlock TransformerArgumentTest TransformerEncoderBlockLayerTest VotingAttention MultiChannelAttention CachedAttention _create_cache CachedAttentionTest ClassificationHead ClassificationHead DenseEinsum DenseEinsumLayer GatedFeedforward GatedFeedforwardTest MaskedLMTest MaskedSoftmax _large_compatible_negative MaskedSoftmaxLayerTest MatMulWithMargin MatMulWithMarginTest MultiChannelAttentionTest RelativePositionEmbedding RelativePositionEmbeddingLayerTest MultiHeadRelativeAttention _get_output_shape TwoStreamRelativeAttention _build_proj_equation _rel_shift _large_compatible_negative MultiHeadRelativeAttentionTest _create_mock_attention_data TwoStreamRelativeAttentionTest ReZeroTransformer TransformerWithReZeroLayerTest SelfAttentionMask TalkingHeadsAttention TalkingHeadsAttentionTest TNExpandCondense TNLayerTest TNTransformerExpandCondense TransformerLayerTest Transformer TransformerDecoderBlock CompiledTransformer TransformerScaffold ValidatedFeedforwardLayer ValidatedAttentionLayer TransformerLayerTest _create_cache TransformerDecoderBlockTest TransformerXLBlock _cache_memory TransformerXL TransformerXLTest create_mock_transformer_xl_data TransformerXLBlockTest TfFunctionIfEagerDecorator tf_function_if_eager _validate_rank loss _adjust_labels ClassificationLossTest BertClassifier BertClassifierTest BertPretrainer BertPretrainerV2 BertPretrainerTest BertSpanLabeler BertSpanLabelerTest BertTokenClassifier BertTokenClassifierTest DualEncoder DualEncoderTest scatter_update unmask sample_from_softmax get_updated_inputs ElectraPretrainer ElectraPretrainerTest Seq2SeqTransformer create_model TransformerDecoder attention_initializer TransformerEncoder Seq2SeqTransformerTest AlbertEncoder AlbertEncoderTest BertEncoder BertEncoderTest Classification ClassificationTest EncoderScaffold EncoderScaffoldLayerClassTest Embeddings EncoderScaffoldHiddenInstanceTest ValidatedTransformerLayer EncoderScaffoldEmbeddingNetworkTest _get_norm_layer TransformerLayer MobileBertEmbedding NoNorm MobileBERTEncoder generate_fake_input MobileBertEncoderTest SpanLabeling SpanLabelingTest _compute_segment_matrix _create_causal_attention_mask RelativePositionEncoding _compute_positional_encoding _compute_attention_mask XLNetBase CausalAttentionMaskTests ComputePositionEncodingTest SegmentMatrixTests MaskComputationTests RelativePositionEncodingTest XLNetModelTests SequenceBeamSearch inf _log_prob_from_logits _get_shape_keep_last_dim _shape_list _expand_to_same_rank _gather_topk_beams _StateKeys _flatten_beam_dim _unflatten_beam_dim _gather_beams sequence_beam_search _expand_to_beam_size _length_normalization BeamSearchTests _random_int_from_range _random_int_up_to get_sentence_order_labels _sample_from_other_batch get_next_sentence_labels _get_random SentenceOrderLabelsTest NextSentencePredictionTest BERT2BERTConfig NHNetConfig ConfigsTest EmbeddingPostprocessor get_attention_bias Decoder TransformerDecoder AttentionBias DecoderTest rouge_2_fscore rouge_l_fscore continuous_eval bleu_score get_input_dataset multidoc_parse_spec process_singledoc_transformer_dataset decode_record process_multidoc_dataset _filter_max_length create_dataset process_singledoc_dataset decode_sparse_record create_bert2bert_model create_model get_model_params NHNet _add_sos_to_seq embedding_linear create_nhnet_model Bert2Bert remove_sos_from_seq create_transformer_model get_bert2bert_layers get_nhnet_layers all_strategy_combinations process_decoded_ids distribution_forward_path Bert2BertTest NHNetTest create_optimizer LearningRateSchedule main transform_as_tfrecords RawDataProcessor define_flags Trainer main train run TrainerTest all_strategy_combinations get_trivial_data encoder_common_layers get_bert_config_from_params get_test_params initialize_bert2bert_from_pretrained_bert bigbird_block_sparse_attention BigBirdMasks BigBirdAttention bigbird_block_rand_mask create_band_mask_from_inputs create_rand_mask_from_inputs BigbirdAttentionTest BigBirdEncoder BigBirdEncoderTest filter_files_for_big_bird TriviaQA TriviaQAConfig parse_example ReadQuestions _web_evidence_dir BigBirdTriviaQAConfig _wiki_evidence_dir main main normalize_answer metric_max_over_ground_truths is_exact_match get_ground_truths has_exact_match f1_score get_oracle_score exact_match_score evaluate_triviaqa labels_map_fn features_map_fn _skew_elements_right RelativePositionGenerator scatter_labels _flatten_dims _pad_to_multiple read_batches SpanOrCrossEntropyLoss smooth_labels TriviaQaHead TriviaQaModel main worker_context read_sentencepiece_model predict decode_logits decode_answer distributed_logits_fn split_and_pad Answer _handle_exceptional_examples read_question_answers Evidence read_sentencepiece_model make_answer_set make_paragraph Question Features EvidenceInfo make_pipeline Paragraph AnswerSpan QuestionAnswerEvidence realign_answer_span find_answer_spans FindAnswerSpans QuestionAnswer alias_answer make_example ReadEvidence MakeFeatures evaluate worker_context main read_model_config read_sentencepiece_model fit _build_pretrainer ElectraPretrainTask ElectraPretrainConfig ElectraPretrainTaskTest MaskedLMConfig MaskedLMTask MLMTaskTest QuestionAnsweringConfig QuestionAnsweringTask ModelConfig predict QuestionAnsweringTaskTest predict ModelConfig SentencePredictionConfig SentencePredictionTask _create_fake_dataset SentencePredictionTaskTest TaggingConfig TaggingTask _masked_labels_and_weights ModelConfig predict _create_fake_dataset TaggingTest get_encoder_from_hub predict Attention SelfAttention SequenceBeamSearch sequence_beam_search bleu_on_list UnicodeRegex bleu_tokenize bleu_wrapper main define_compute_bleu_flags ComputeBleuTest download_and_extract encode_and_save_files download_from_url txt_line_iterator shard_filename make_dir dict_to_example download_report_hook find_file define_data_download_flags compile_files get_raw_files main shuffle_records write_file all_exist _get_example_length _load_records _batch_examples _read_and_batch_from_files map_data_for_transformer_fn train_input_fn eval_input_fn _create_min_max_boundaries _filter_max_length _parse_example _generate_synthetic_data EmbeddingSharedWeights FeedForwardNetwork padded_sequence_accuracy MetricLayer padded_neg_log_perplexity padded_accuracy_topk padded_cross_entropy_loss transformer_loss padded_accuracy padded_accuracy_top5 _pad_tensors_to_same_length get_callbacks get_model_params define_transformer_flags update_stats get_position_encoding get_decoder_self_attention_bias get_padding get_padding_bias ModelUtilsTest LearningRateSchedule Transformer PrePostProcessingWrapper create_model EncoderStack DecoderStack _count_params TransformerForwardTest TransformerLayersTest _ensure_dir evaluate_and_log_bleu translate_and_compute_bleu main TransformerTask _generate_file TransformerTaskTest TransformerV2Test translate_file translate_from_text _encode_and_add_eos _trim_and_decode translate_from_input _get_sorted_inputs _len_lcs rouge_l_fscore _lcs padded_accuracy rouge_l_sentence_level compute_bleu rouge_2_fscore _get_ngrams padded_sequence_accuracy rouge_n bleu_score padded_accuracy_topk _convert_to_eval_metric _f_lcs padded_accuracy_top5 _pad_tensors_to_same_length get_eval_metrics _get_ngrams_with_counter padded_neg_log_perplexity padded_cross_entropy_loss _generate_alphabet_dict _generate_subtokens _save_vocab_file alphanumeric_char_set _count_and_gen_subtokens _split_token_to_subtokens _join_tokens_to_string _gen_new_subtoken_list _list_to_index_dict _split_string_to_tokens _count_tokens _generate_subtokens_with_target_vocab_size _escape_token _load_vocab_file _unescape_token _unicode_to_native _filter_and_bucket_subtokens native_to_unicode Subtokenizer StringHelperTest SubtokenizerTest _truncate_seq_pair InputFeatures PaddingInputExample convert_single_example _whole_word_mask _idx_pair_to_mask create_pretrain_dataset _single_token_mask create_squad_dataset file_based_input_fn_builder parse_files_to_dataset get_squad_input_data _token_span_mask create_classification_dataset get_classification_input_data _local_perm _online_sample_masks format_filename get_pretrain_input_data _word_span_mask get_input_iterator WarmUp create_optimizer MnliMatchedProcessor MnliMismatchedProcessor StsbProcessor Yelp5Processor InputExample ImdbProcessor file_based_convert_examples_to_features main GLUEProcessor DataProcessor create_data _int64_feature _create_data create_tfrecords _convert_example parse_files_to_dataset get_dataset _sample_mask_ngram get_input_fn _float_feature _local_perm _is_start_piece format_filename _split_a_and_b batchify _sample_mask main preprocess preprocess_text printable_text encode_ids encode_pieces print_ main get_metric_fn run_evaluation get_classificationxlnet_model main get_pretrainxlnet_model main InputFeatures get_qaxlnet_model run_evaluation compute_f1 _check_is_max_context normalize_answer _convert_index _compute_softmax find_all_best_thresh InputFeatures find_best_thresh write_predictions compute_exact read_squad_examples get_raw_scores get_tokens SquadExample convert_examples_to_features FeatureWriter make_qid_to_has_ans create_eval_data _save_checkpoint train _float_metric_value create_run_config XLNetConfig RunConfig rel_shift Summarization is_special_none_tensor ClassificationLossLayer RelativeAttention RelativeMultiheadAttention ClassificationXLNetModel QALossLayer _cache_mem _create_mask LMLossLayer _get_initializer QAXLNetModel gelu TransformerXLModel EmbeddingLookup RelativePositionEncoding PositionwiseFF PretrainingXLNetModel _get_requirements generate_data main prepare_raw_data BisectionDataConstructor BaseDataConstructor DummyConstructor MaterializedDataConstructor get_constructor DatasetManager read_dataframe _filter_index_sort instantiate_pipeline mock_download BaseTest _regularize_1m_dataset csv_to_joint_dataframe ratings_csv_to_dataframe _transform_csv define_flags _download_and_clean _regularize_20m_dataset main define_data_download_flags download integerize_genres get_inputs define_ncf_flags convert_to_softmax_logits get_v1_distribution_strategy parse_flags create_ncf_input_data create_dataset_from_data_producer create_dataset_from_tf_record_files run_ncf_custom_training IncrementEpochCallback build_stats MetricLayer LossLayer _get_keras_model metric_fn CustomEarlyStopping main run_ncf NcfTest construct_model neumf_model_fn compute_eval_loss_and_metrics_helper _get_estimator_spec_with_metrics sparse_to_dense_grads compute_top_k_and_ndcg _strip_first_and_last_dimension get_forkpool get_threadpool get_fauxpool FauxPool worker_job very_slightly_biased_randint permutation mask_duplicates random_int32 _filter_and_allreduce_gradients _filter_grads minimize_using_explicit_allreduce _run_callbacks hparam_flags_dict strategy_flags_dict define_common_hparams_flags define_gin_flags initialize_common_flags register_key_flags_in_core _get_nondefault_flags_as_dict set_defaults parse_flags get_nondefault_flags_as_str BaseTester define_flags define_base get_num_gpus define_log_steps define_benchmark _stdout_utf8 define_device require_cloud_storage define_distribution define_image get_tf_dtype get_loss_scale define_performance callstack_sampling CallstackSampler BatchTimestamp TimeHistory SimpleCheckpoint set_session_config set_gpu_thread_mode_and_count past_stop_threshold apply_clean generate_synthetic_data SyntheticDataTest PastStopThresholdTest run_synthetic MockModel MockTask mock_experiment MockTaskConfig main SpineNet RevNet ResNet EfficientNet Backbone Backbone3D ResNet3DBlock ResNet3D50 ResNet3D NormActivation Decoder FPN Identity ImageClassificationTask DataConfig image_classification_imagenet image_classification_imagenet_revnet Losses ImageClassificationModel image_classification ImageClassificationConfigTest TfExampleDecoder MaskRCNN MaskSampler MaskHead ROIGenerator Parser RPNHead maskrcnn_spinenet_coco ROIAligner ROISampler fasterrcnn_resnetfpn_coco DataConfig maskrcnn_resnetfpn_coco DetectionGenerator Losses MaskROIAligner DataDecoder Anchor MaskRCNNTask TfExampleDecoderLabelMap DetectionHead TfExampleDecoder RetinaNet TfExampleDecoderLabelMap RetinaNetTask retinanet retinanet_resnetfpn_coco Parser DataConfig DetectionGenerator Losses DataDecoder RetinaNetHead Anchor retinanet_spinenet_coco kinetics600 add_trainer video_classification DataConfig VideoClassificationModel Losses video_classification_kinetics600 VideoClassificationTask VideoClassificationConfigTest Parser Decoder Decoder Parser Parser Parser TfExampleDecoderLabelMap TfExampleDecoder _generate_source_id TfExampleDecoderTest _encode_image TfExampleDecoderLabelMap TfExampleDecoderLabelMapTest _encode_image process_source_id pad_groundtruths_to_fixed_size _postprocess_image PostBatchProcessor Decoder Parser _process_label _process_image VideoAndLabelParserTest DecoderTest COCOEvaluator convert_predictions_to_coco_annotations generate_annotation_file scan_and_generator_annotation_file COCOGroundtruthGenerator COCOWrapper convert_groundtruths_to_coco_dataset FastrcnnClassLoss FastrcnnBoxLoss MaskrcnnLoss RpnScoreLoss RpnBoxLoss FocalLoss RetinanetBoxLoss focal_loss ClassificationModel ClassificationNetworkTest build_retinanet build_classification_model build_maskrcnn register_model_builder build_video_classification_model build_model RetinaNetBuilderTest MaskRCNNBuilderTest ClassificationModelBuilderTest VideoClassificationModelBuilderTest MaskRCNNModel MaskRCNNModelTest RetinaNetModel RetinaNetTest VideoClassificationModel VideoClassificationNetworkTest round_repeats EfficientNet block_spec_decoder BlockSpec round_filters build_efficientnet EfficientNetTest register_backbone_builder build_backbone FactoryTest ResNet build_resnet build_resnet3d ResNet3D ResNet3DTest ResNetTest RevNet build_revnet RevNetTest build_spinenet build_block_specs BlockSpec SpineNet SpineNetTest build_decoder FPN FPNTest RetinaNetHead RPNHead RetinaNetHeadTest RpnHeadTest DetectionHead MaskHead MaskHeadTest DetectionHeadTest BoxMatcher BoxSampler _generate_detections_v1 _generate_detections_per_image _generate_detections_batched DetectionGenerator MultilevelDetectionGenerator _generate_detections_v2 _select_top_k_scores MultilevelDetectionGeneratorTest SelectTopKScoresTest DetectionGeneratorTest _sample_and_crop_foreground_masks MaskSampler ResidualInner ResidualBlock BottleneckBlock InvertedBottleneckBlock _pad_strides ReversibleLayer BottleneckResidualInner _maybe_downsample SelfGating BottleneckBlock3D NNBlocksTest ResidualInnerTest BottleneckResidualInnerTest distribution_strategy_combinations ReversibleLayerTest NNBlocksTest SqueezeExcitation StochasticDepth MultilevelROIAligner MultilevelROIAlignerTest _multilevel_propose_rois MultilevelROIGenerator ROISampler build_anchor_generator RpnAnchorLabeler AnchorLabeler unpack_targets Anchor AnchorTest normalize_boxes filter_boxes gather_instances denormalize_boxes top_k_boxes box_matching clip_boxes get_non_empty_box_indices bbox_overlap compute_outer_boxes jitter_boxes yxyx_to_xywh encode_boxes decode_boxes filter_boxes_by_scores paste_instance_masks paste_instance_masks_v2 MaskUtilsTest sorted_non_max_suppression_padded _self_suppression _cross_suppression _suppression_loop_body clip_or_pad_to_fixed_size normalize_image random_crop_image_v2 resize_and_crop_masks resize_and_crop_image horizontal_flip_image resize_and_crop_image_v2 horizontal_flip_masks random_crop_image resize_and_crop_boxes center_crop_image random_horizontal_flip compute_padded_size center_crop_image_v2 horizontal_flip_boxes _sample_or_pad_sequence_indices random_flip_left_right sample_sequence normalize_image sample_linspace_sequence resize_smallest decode_jpeg crop_image ParserUtilsTest InputUtilsTest _encode_image BalancedPositiveNegativeSampler matmul_gather_on_zeroth_axis combined_static_and_dynamic_shape indices_to_dense_vector _compute_grid_positions _selective_crop_and_resize nearest_upsampling multilevel_crop_and_resize _feature_bilinear_interpolation crop_mask_in_target_box _decode_tf_example _decode_image ExportModule main export_inference_graph ClassificationModule ImageClassificationExportTest ImageClassificationTask MaskRCNNTask RetinaNetTask VideoClassificationTask main run_executor run config_generator RpnAnchorLabeler AnchorLabeler Anchor parser_generator InputFn Parser Parser process_source_id pad_groundtruths_to_fixed_size Parser pad_to_size TfExampleDecoder MetricWrapper COCOEvaluator ShapeMaskCOCOEvaluator convert_predictions_to_coco_annotations generate_annotation_file scan_and_generator_annotation_file COCOGroundtruthGenerator COCOWrapper convert_groundtruths_to_coco_dataset evaluator_generator DetectionDistributedExecutor Model _make_filter_trainable_variables_fn make_restore_checkpoint_fn _get_checkpoint_map _build_assignment_map model_generator StepLearningRateWithLinearWarmup CosineLearningRateWithLinearWarmup learning_rate_generator ShapemaskMseLoss FastrcnnClassLoss FastrcnnBoxLoss MaskrcnnLoss RpnScoreLoss RpnBoxLoss RetinanetClassLoss focal_loss ShapemaskLoss RetinanetBoxLoss MaskrcnnModel OptimizerFactory RetinanetModel ShapeMaskModel shapeprior_head_generator mask_rcnn_head_generator retinanet_head_generator fast_rcnn_head_generator finemask_head_generator coarsemask_head_generator multilevel_features_generator backbone_generator norm_activation_generator rpn_head_generator Fpn MaskrcnnHead ShapemaskFinemaskHead ShapemaskPriorHead RetinanetHead FastrcnnHead RpnHead ShapemaskCoarsemaskHead Identity maybe_enter_backend_graph NoOpContextManager ResidualBlock BottleneckBlock NormActivation norm_activation_builder Resnet build_block_specs BlockSpec SpineNetBuilder SpineNet sorted_non_max_suppression_padded _self_suppression _cross_suppression _suppression_loop_body _generate_detections_per_image _generate_detections_batched _generate_detections MultilevelDetectionGenerator generate_detections_factory GenericDetectionGenerator _select_top_k_scores multilevel_propose_rois ROIGenerator single_level_feature_crop get_grid_one_hot nearest_upsampling multilevel_crop_and_resize feature_bilinear_interpolation selective_crop_and_resize compute_grid_positions crop_mask_in_target_box MaskSampler ROISampler box_matching sample_and_crop_foreground_masks assign_and_sample_proposals normalize_boxes filter_boxes top_k_boxes denormalize_boxes decode_boxes clip_boxes get_non_empty_box_indices bbox_overlap compute_outer_boxes jitter_boxes yxyx_to_xywh encode_boxes visualize_images_with_bounding_boxes filter_boxes_by_scores coco_split_class_ids process_source_id pad_groundtruths_to_fixed_size normalize_image resize_and_crop_masks resize_and_crop_image resize_and_crop_image_v2 resize_and_crop_boxes random_horizontal_flip compute_padded_size pad_to_fixed_size paste_instance_masks paste_instance_masks_v2 ArgMaxMatcher BalancedPositiveNegativeSampler BoxCoder batch_decode BoxList refine_boxes_multi_class area boolean_mask prune_outside_window prune_non_overlapping_boxes visualize_boxes_in_image gather box_voting sq_dist sort_by_field _copy_extra_fields sample_boxes_by_jittering intersection to_normalized_coordinates non_max_suppression concatenate matched_intersection SortOrder ioa scale height_width prune_small_boxes filter_field_value_equals to_absolute_coordinates clip_to_window iou refine_boxes matched_iou get_minimal_coverage_box prune_completely_outside_window filter_greater_than change_coordinate_frame FasterRcnnBoxCoder Match Matcher MinibatchSampler matmul_gather_on_zeroth_axis indices_to_dense_vector resize_to_range keypoint_scale scale_boxes_to_pixel_coordinates keypoint_flip_horizontal _flip_masks_left_right _copy_extra_fields keypoint_prune_outside_window keypoint_change_coordinate_frame _compute_new_dynamic_size random_horizontal_flip _compute_new_static_size box_list_scale _flip_boxes_left_right iou area RegionSimilarityCalculator IouSimilarity intersection combined_static_and_dynamic_shape pad_or_clip_nd assert_shape_equal TargetAssigner draw_bounding_boxes_on_image_array encode_image_array_as_png_str _visualize_boxes_and_masks_and_keypoints _resize_original_image draw_bounding_box_on_image visualize_images_with_bounding_boxes add_cdf_image_summary draw_bounding_box_on_image_array draw_keypoints_on_image _visualize_boxes_and_masks draw_mask_on_image_array _visualize_boxes draw_bounding_boxes_on_image draw_keypoints_on_image_array _visualize_boxes_and_keypoints draw_bounding_boxes_on_image_tensors add_hist_image_summary save_image_array_as_png visualize_boxes_and_labels_on_image_array sharpness cutout wrapped_rotate posterize solarize unwrap equalize from_4d _shrink_level_to_arg _parse_policy_info rotate color RandAugment autocontrast _convert_angles_to_transform _apply_func_with_prob ImageAugment contrast _convert_translation_to_transform brightness AutoAugment _enhance_level_to_arg translate_y solarize_add _shear_level_to_arg shear_x select_and_apply_random_policy level_to_arg invert translate_x _mult_to_arg _randomly_negate_tensor _translate_level_to_arg translate blend shear_y wrap transform _rotate_level_to_arg to_4d get_dtype_test_cases AutoaugmentTest TransformsTest CustomTensorBoard AverageModelCheckpoint get_callbacks get_scalar_from_tensor MovingAverageCallback resume_from_checkpoint initialize serialize_config _get_params_from_flags get_models get_dtype_map main _get_metrics _get_dataset_builders train_and_eval get_loss_scale export get_image_size_from_model define_classifier_flags run ClassifierTest get_trivial_model get_params_override get_trivial_data distribution_strategy_combinations UtilTests run_end_to_end basic_params_override ImageNetConfig AugmentConfig DatasetConfig Cifar10Config DatasetBuilder CosineDecayWithWarmup WarmupDecaySchedule LearningRateTests build_model define_mnist_flags main decode_image run eager_strategy_combinations KerasMnistTest build_optimizer build_learning_rate OptimizerFactoryTest standardize_image decode_crop_and_flip load_eval_image preprocess_for_train normalize_images build_eval_dataset mean_image_subtraction preprocess_for_eval resize_image decode_and_center_crop trivial_model TimeHistoryConfig LossConfig TrainConfig MetricsConfig EvalConfig ExperimentConfig ExportConfig OptimizerConfig LearningRateConfig ModelConfig ResNetImagenetConfig get_config EfficientNetImageNetConfig get_batch_norm load_weights count_params TpuBatchNormalization EfficientNetModelConfig mb_conv_block round_repeats EfficientNet conv2d_block round_filters efficientnet ModelConfig BlockConfig main export_tfhub define_keras_flags build_stats define_pruning_flags set_cudnn_batchnorm_mode get_callbacks PiecewiseConstantDecayWithWarmup get_synth_input_fn define_clustering_flags get_optimizer get_synth_data input_fn get_parse_record_fn get_filenames _aspect_preserving_resize _decode_crop_and_flip parse_record process_record_dataset _central_crop _smallest_size_at_least _mean_image_subtraction _resize_image parse_example_proto preprocess_image ResNetModelConfig run main build_stats get_num_train_iterations identity_block resnet50 conv_block _gen_l2_regularizer ResnetRunnable main export_tfhub _get_requirements ASPP DeeplabTest FocalLoss multi_level_flatten AnchorGenerator maybe_map_structure_for_anchor _SingleAnchorGenerator MultiScaleAnchorGeneratorTest AnchorGeneratorTest AnchorLabeler BoxMatcher iou area IouSimilarity intersection Controller _log_info StepTimer TestTrainerWithSummaries TestEvaluator create_model TestRunner summaries_with_matching_keyword TestEvaluatorWithNestedSummary dataset_fn ControllerTest AbstractTrainer AbstractEvaluator _create_eval_loop_fn StandardEvaluatorOptions StandardTrainer StandardEvaluator _create_train_loop_fn StandardTrainerOptions TestEvaluator TestTrainer dataset_fn StandardRunnerTest create_global_step get_value make_distributed_dataset UtilsTest EpochHelper LoopFnWithSummaries create_tf_while_loop_fn create_loop_fn SummaryManager OptionalSummariesFunction _soft_device_placement TrainFunctionWithSummaries TpuSummariesTest DummyTrainer train_function_with_summaries ModelOptions CommonTest main check_tflite_consistency convert_to_tflite main main _create_input_tensors preprocess_image_and_label _get_logits multi_scale_logits predict_labels refine_by_decoder predict_labels_multi_scale _decoder_with_sum_merge get_branch_logits _decoder_with_concat_merge extract_features get_extra_layer_scopes DeeplabModelTest _build_deeplab main main _convert_train_id_to_eval_id _process_batch Conv2D conv2d conv2d_same ConvolutionTest DensePredictionCell dense_prediction_cell_hparams DensePredictionCellTest mobilenet_v3_large_seg mobilenet_v2_arg_scope get_network _preprocess_subtract_imagenet_mean _preprocess_zero_mean_unit_range _mobilenet_v3 mobilenet_edgetpu mobilenet_v3_small_seg _mobilenet_v2 extract_features mean_pixel NASBaseCell PNASCell config hnasnet nas_arg_scope _build_nas_base _nas_stem pnasnet NASNetworkTest create_test_input pad_to_bounding_box random_crop resize_to_range get_label_resize_method get_random_scale flip_dim _crop randomly_scale_image_and_label resolve_shape _image_dimensions PreprocessUtilsTest lite_bottleneck resnet_v1_small_beta_block resnet_v1_beta resnet_v1_18 resnet_v1_101_beta resnet_arg_scope resnet_v1_beta_block resnet_v1_101 resnet_v1_50_beta bottleneck resnet_v1_18_beta resnet_v1_50 root_block_fn_for_beta_variant ResnetCompleteNetworkTest create_test_input scale_dimension resize_bilinear get_batch_norm_fn split_separable_conv2d get_batch_norm_params get_label_weight_mask UtilsTest Block xception_module xception_arg_scope xception_65_factory separable_conv2d_same xception xception_71 fixed_padding xception_65 stack_blocks_dense xception_block xception_41 xception_71_factory UtilityFunctionTest XceptionNetworkTest create_test_input main _convert_dataset main _get_files _convert_dataset _int64_list_feature image_seg_to_tfexample _bytes_list_feature ImageReader main _convert_dataset main _convert_dataset get_cityscapes_dataset_name Dataset _get_attributes_of_image DatasetTest main _save_annotation _remove_colormap get_cityscapes_dataset_name get_dataset SegmentationMetric realdiv_maybe_zero _compute_metric _is_thing_array _open_panoptic_id_image _run_metrics_worker _split_panoptic main eval_coco_format _iterate_work_queue _matched_annotations _build_metric _category_and_instance_from_annotation EvalCocoFormatTest PanopticQuality _ids_to_counts PanopticQualityTest ParsingCovering CoveringConveringTest _panoptic_quality_helper streaming_parsing_covering _parsing_covering_helper _running_total _realdiv_maybe_zero streaming_panoptic_quality StreamingPanopticQualityTest StreamingParsingCoveringTest panoptic_segmentation_with_class_map read_test_image read_segmentation_with_rgb_color_map TestUtilsTest get_cityscapes_name create_pascal_label_colormap create_cityscapes_label_colormap create_ade20k_label_colormap get_dronedeploy_name get_pascal_name get_ade20k_name create_label_colormap create_dronedeploy_label_colormap get_mapillary_vistas_name label_to_color_image get_dataset_colormap_max_entries bit_get create_mapillary_vistas_label_colormap VisualizationUtilTest save_annotation get_model_gradient_multipliers get_model_learning_rate _div_maybe_zero add_softmax_cross_entropy_loss_for_each_scale get_model_init_fn main main main ExportInferenceGraphTest _configure_learning_rate _configure_optimizer _get_init_fn main _get_variables_to_train ImageCoder _convert_to_example _process_image_files _process_image _int64_feature _process_dataset _is_cmyk _find_image_files _build_bounding_box_lookup _find_human_readable_labels _build_synset_lookup _find_image_bounding_boxes _bytes_feature _float_feature main _process_image_files_batch _is_png get_split get_dataset download_and_uncompress_zipfile download_and_uncompress_tarball image_to_tfexample write_label_file download_url open_sharded_output_tfrecords float_list_feature int64_feature bytes_feature float_feature read_label_file has_labels bytes_list_feature _add_to_tfrecord _download_and_uncompress_dataset _get_output_filename _clean_up_temporary_files run _dataset_exists _convert_dataset run _clean_up_temporary_files _get_filenames_and_classes _get_dataset_filename ImageReader _add_to_tfrecord _extract_labels _get_output_filename _download_dataset _extract_images _clean_up_temporary_files run run create_labels_file create_visual_wakeword_annotations create_tf_record_for_visualwakewords_dataset _filter_annotations _create_tf_example download_coco_dataset get_split get_split create_readable_names_for_imagenet_labels get_split BoundingBox FindNumberBoundingBoxes GetInt ProcessXMLAnnotation GetItem get_split _gather_clone_loss deploy _add_gradients_summaries _optimize_clone create_clones optimize_clones DeploymentConfig _sum_clones_gradients DeploymentConfigTest DeployTest OptimizeclonesTest BatchNormClassifier CreatecloneTest LogisticClassifier inception_v2_base _reduced_kernel_size_for_small_input inception_v2 alexnet_v2 alexnet_v2_arg_scope AlexnetV2Test cifarnet_arg_scope cifarnet cyclegan_upsample cyclegan_arg_scope _dynamic_or_static_shape cyclegan_generator_resnet CycleganTest _validate_image_inputs discriminator generator DCGANTest i3d_arg_scope i3d_base i3d I3DTest center_initializer conv3d_spatiotemporal inception_block_v1_3d reduced_kernel_size_3d inception_resnet_v2_arg_scope inception_resnet_v2 inception_resnet_v2_base block8 block35 block17 InceptionTest inception_arg_scope inception_v1_base inception_v1 InceptionV1Test InceptionV2Test inception_v3 _reduced_kernel_size_for_small_input inception_v3_base InceptionV3Test inception_v4 block_reduction_b inception_v4_base block_inception_b block_inception_c block_reduction_a block_inception_a InceptionTest lenet lenet_arg_scope _fixed_padding mobilenet_v1_arg_scope mobilenet_v1 _reduced_kernel_size_for_small_input mobilenet_v1_base wrapped_partial eval_model metrics build_model imagenet_input main MobilenetV1Test train_model get_quant_delay get_learning_rate get_checkpoint_init_fn build_model imagenet_input main get_network_fn NetworksTest overfeat overfeat_arg_scope OverFeatTest Block pix2pix_generator upsample pix2pix_discriminator pix2pix_arg_scope _default_generator_blocks DiscriminatorTest GeneratorTest _representative_dataset_gen main _preprocess_for_quantization restore_model Block conv2d_same subsample resnet_arg_scope stack_blocks_dense resnet_v1_152 NoOpScope resnet_v1_101 bottleneck resnet_v1_200 resnet_v1_50 resnet_v1 resnet_v1_block ResnetUtilsTest ResnetCompleteNetworkTest create_test_input resnet_v2_50 resnet_v2_200 resnet_v2_101 resnet_v2_block resnet_v2_152 bottleneck resnet_v2 ResnetUtilsTest ResnetCompleteNetworkTest create_test_input s3dg_base self_gating s3dg s3dg_arg_scope S3DGTest vgg_16 vgg_arg_scope vgg_a vgg_19 VGG16Test VGGATest VGG19Test expand_input_by_factor _v1_compatible_scope_naming _fixed_padding split_separable_conv2d expanded_conv _make_divisible split_conv _split_divisible squeeze_excite mobilenet depth_multiplier _scope_all safe_arg_scope _fixed_padding apply_activation op _set_arg_scope_defaults _make_divisible NoOpScope mobilenet_base global_pool training_scope mobilenet mobilenet_base wrapped_partial mobilenet_base_group_norm training_scope MobilenetV2Test find_ops mobilenet mbv3_fused hard_swish mbv3_op reduce_to_1x1 _reduce_consecutive_layers mobilenet_base wrapped_partial MobilenetV3Test build_nasnet_cifar nasnet_mobile_arg_scope _build_aux_head build_nasnet_mobile cifar_config nasnet_large_arg_scope _update_hparams _imagenet_stem large_imagenet_config build_nasnet_large mobile_imagenet_config _cifar_stem nasnet_cifar_arg_scope _build_nasnet_base NASNetTest _operation_to_num_layers _operation_to_info _pooling global_avg_pool _operation_to_filter_shape _operation_to_pooling_shape calc_reduction_layers drop_path NasNetABaseCell _operation_to_pooling_type _operation_to_pooling_info get_channel_dim NasNetANormalCell factorized_reduction NasNetAReductionCell _stacked_separable_conv get_channel_index NasnetUtilsTest build_pnasnet_mobile pnasnet_mobile_arg_scope PNasNetNormalCell large_imagenet_config build_pnasnet_large mobile_imagenet_config pnasnet_large_arg_scope _build_pnasnet_base PNASNetTest preprocess_image preprocess_for_train preprocess_for_eval distorted_bounding_box_crop preprocess_for_train preprocess_for_eval preprocess_image distort_color apply_with_random_selector preprocess_image get_preprocessing _aspect_preserving_resize preprocess_for_train _crop _central_crop _smallest_size_at_least _mean_image_subtraction preprocess_for_eval preprocess_image _random_crop update resnet50 fit_one_cycle load_dataset FocalLoss unet_learner unfreeze array fit_generator compile print exit system run PosixPath label_from_func get_image_files normalize array ImageDataGenerator SegmentationSequence reshape dstack set where unique zeros join imwrite print zfill color2class shape imread range image2tile join print close mkdir split get_split enumerate len zeros list items where copyMakeBorder shape ceil imread range enumerate imread transpose numpy astype from_numpy transpose astype Image print exit Inference predict mkdir flush shape pad ceil range append category2mask shape save zip zeros argmax array predict join run_inference_on_file load_model make_encoder layers act min output get_scale_index conv upscale append Input range len get VGG16 ResNet18 ResNet50 VGG19 ResNet101 ResNet152 range ceil int reflectpad conv reflectpad subplots max colorbar imshow ylim savefig setp range format unique_labels astype get_xticklabels tight_layout set mkdir xlim remove text confusion_matrix split f1_score items list jaccard_score print reshape recall_score wherecolor where precision_score plot_confusion_matrix zeros imread array join print array append score_masks flush experimental_connect_to_cluster initialize_tpu_system TPUClusterResolver tpu_initialize lower get dumps loads split len scope DummyContextManager DEFINE_enum DEFINE_multi_string DEFINE_string lookup enumerate isinstance split lookup join best_checkpoint_export_subdir best_checkpoint_eval_metric BestCheckpointExporter best_checkpoint_metric_comp info Controller CheckpointManager checkpoint info Trainer info validate override experiment params_override PrettyPrinter lock get_exp_config pformat as_dict info override_params_dict save_params_dict_to_yaml join makedirs info Variable Checkpoint expect_partial info numpy str list items hasattr join format info numpy list items float get_value join remove glob rmtree info exists enable_mixed_precision_graph_rewrite LossScaleOptimizer set_policy Policy flatten constant append flatten tuple append is_special_none_tensor string_types lower isinstance as_list assert_rank shape append enumerate integer_types ndims isinstance size cast reduce_sum convert_to_tensor convert_to_tensor convert_to_tensor join defaultdict format groupdict list items end match append split string_types nested_csv_str_to_json_str load override isinstance join save info Metric isinstance metrics_as_dict metrics_as_dict list values AdamWeightDecay info LAMB WarmUp PolynomialDecay run_experiment loss_scale serialize_config mixed_precision_dtype set_mixed_precision_policy parse_config_files_and_bindings model_dir gin_file gin_params get_distribution_strategy parse_configuration run_experiment lock get_distribution_strategy list basename checkpoints_iterator dirname sleep best_checkpoint_export_subdir format remove_ckpts replace write_summary write_json_summary mixed_precision_dtype set_mixed_precision_policy info __name__ join items loss_scale collect create_file_writer run_continuous_finetune pretrain_steps mode get_transformer_encoder Input transformer_encoder Checkpoint Asset create_albert_model save assert_consumed export_path albert_config_file model_checkpoint_path sp_model_file export_albert_tfhub from_json_file eval_batch_size train_data_path eval_data_path get_dataset_fn bert_config_file run_bert train_batch_size predict bert_config_file from_json_file bert_config_file FullSentencePieceTokenizer from_json_file bert_config_file FullSentencePieceTokenizer from_json_file bert_config_file from_json_file export_squad join worker_hosts create_file_writer predict_squad configure_cluster eval_squad write_to_json_files train_squad task_index info sleep model_export_path AlbertEncoder join convert _create_albert_model rmtree create_v2_checkpoint split checkpoint_model_name checkpoint_to_convert convert_checkpoint converted_checkpoint_path dict AlbertConfig isinstance BertPretrainLossAndMetricLayer BertPretrainer pretrain_loss_layer get_transformer_encoder TruncatedNormal Model Input pretrainer_model get_transformer_encoder TruncatedNormal core_model Model KerasLayer Input bert_model get_transformer_encoder TruncatedNormal KerasLayer Input DEFINE_boolean DEFINE_integer define_distribution define_gin_flags DEFINE_float define_log_steps DEFINE_bool define_performance define_base DEFINE_string get_transformer_encoder Input transformer_encoder create_bert_model Variable assert_existing_objects_matched Checkpoint Asset save info vocab_file do_lower_case export_bert_tfhub list cast int32 parse_single_example keys TFRecordDataset OFF map take with_options Options TFRecordDataset glob shard list_files num_input_pipelines input_pipeline_id extend shuffle interleave int64 repeat map AUTOTUNE prefetch FixedLenFeature batch len shard num_input_pipelines float32 input_pipeline_id shuffle map repeat AUTOTUNE prefetch batch FixedLenFeature single_file_dataset shard num_input_pipelines input_pipeline_id shuffle map int64 repeat AUTOTUNE prefetch batch FixedLenFeature single_file_dataset shard map input_pipeline_id num_input_pipelines AUTOTUNE prefetch batch single_file_dataset join latest_checkpoint assert_existing_objects_matched Checkpoint load_weights save info mkdtemp rmtree _should_export_checkpoint distribute_datasets_from_function iter clip_by_global_norm list zip join mkdir TPUStrategy int isinstance list_logical_devices min warning info Mean _get_input_iterator join value glob error summary_iterator get partial MeanSquaredError SparseCategoricalAccuracy info _run_evaluation distribute_datasets_from_function iter set_policy export_bert_model export_bert_model log_steps model_dir enable_xla dtype num_eval_per_epoch eval_batch_size train_data_size TimeHistory set_session_config ceil append steps_per_loop set_mixed_precision_policy num_train_epochs info model_export_path int learning_rate min run_bert_classifier train_batch_size get eval_batch_size join train_data_path get_dataset_fn eval_data_path bert_config_file parse_config_files_and_bindings export_classifier gin_param gin_file model_dir get_distribution_strategy run_bert from_json_file train_batch_size model_export_path custom_main run_customized_training_loop get_pretrain_dataset_fn dtype set_mixed_precision_policy bert_config_file info from_json_file print run_bert_pretrain gin_param FullTokenizer FullTokenizer log_steps DEFINE_enum DEFINE_integer DEFINE_float define_common_bert_flags DEFINE_bool DEFINE_string sparse_categorical_crossentropy reduce_mean numpy zip latest_checkpoint Checkpoint expect_partial model_dir info predict_batch_size get_dataset_fn predict_step distribute_datasets_from_function get_raw_results iter info append range len dtype int train_data_path run_customized_training_loop info get_dataset_fn set_mixed_precision_policy enable_xla num_train_epochs set_session_config train_batch_size get int filename predict_batch_size info close do_lower_case dict read_squad_examples n_best_size max_answer_length convert_examples_to_features FeatureWriter predict_squad_customized postprocess_output len join write_to_json_files model_dir info glob strip extend split get predict_file latest_checkpoint get_squad_model_to_predict _get_matched_files model_dir dump_to_files prediction_output_squad enumerate get predict_file evaluate latest_checkpoint get_squad_model_to_predict _get_matched_files model_dir dump_to_files prediction_output_squad set_policy squad_model export_bert_model run_restore_ops BertServing Checkpoint sequence_length export Counter split sum values len append metric_fn error bool _get_tokens Counter sum values len error max list items float len append float sorted enumerate _make_precision_recall_eval _merge_eval sum sorted sum _find_best_thresh _merge_eval _get_raw_scores _apply_no_ans_threshold _make_qid_to_has_ans _run_precision_recall_analysis _find_all_best_thresh append _make_eval_dict replace info info assert_existing_objects_matched Checkpoint save str len info BertEncoder _create_bert_model BertPretrainerV2 _create_bert_model _create_bert_pretrainer_model makedirs converted_model match group isinstance PY3 PY2 isinstance PY3 PY2 OrderedDict append strip split category category startswith category ord join lower normalize ensure_text split ensure_binary replace printable_text extend append EncodeAsPieces SampleEncodeAsPieces encode_pieces get dict info type __name__ join str text_b example_id InputFeatures convert_tokens_to_ids len _truncate_seq_pair tokenize guid info append label weight text_a enumerate segment_ids create_int_feature TFRecordWriter makedirs write SerializeToString close OrderedDict Example dirname input_mask info create_float_feature input_ids enumerate convert_single_example len pop len items list format get_train_examples isinstance get_labels get_dev_examples getattr get_test_examples file_based_convert_examples_to_features len FullTokenizer preprocess_text partial FullSentencePieceTokenizer tfds_params sp_model_file convert_to_unicode lower TfdsProcessor FullTokenizer preprocess_text partial FullSentencePieceTokenizer tfds_params sp_model_file convert_to_unicode TfdsProcessor FullTokenizer preprocess_text partial FullSentencePieceTokenizer sp_model_file convert_to_unicode lower FullTokenizer preprocess_text partial FullSentencePieceTokenizer sp_model_file lower convert_to_unicode generate_regression_dataset mark_flag_as_required generate_classifier_dataset generate_squad_dataset dirname generate_tagging_dataset generate_retrieval_dataset meta_data_file_path makedirs segment_ids tokens use_v2_feature_names list convert_tokens_to_ids masked_lm_labels SerializeToString OrderedDict Example append masked_lm_positions value create_int_feature TFRecordWriter close info keys enumerate join write create_float_feature len Feature Feature list extend shuffle create_instances_from_document keys range len TrainingInstance extend append randint truncate_seq_pair create_masked_lm_predictions range len append next range iter _window begin clear sorted list pop _contiguous end shuffle accumulate _Gram append _window sum range values append len _Gram enumerate begin int list replacement_action sorted end _wordpieces_to_grams min MaskedLmInstance index _masking_ngrams append label round max range len pop len FullTokenizer max_ngram_size Random glob max_seq_length extend masked_lm_prob dupe_factor create_training_instances short_seq_prob write_instance_to_example_files random_seed max_predictions_per_seq do_whole_word_mask gzip_compress split ones_like list create_float_feature create_int_feature TFRecordWriter write SerializeToString close Example randint range array join format languages get_dev_examples get_processor_name info get_test_examples file_based_convert_examples_to_features len join is_whitespace whitespace_tokenize warning SquadExample append len _DocSpan printable_text _improve_answer_span orig_answer_text length convert_tokens_to_ids append range doc_tokens InputFeatures question_text start output_fn info tokenize enumerate join _check_is_max_context deepcopy namedtuple len join tokenize range length start min enumerate postprocess_output write_to_json_files info strip end_logit _get_best_indexes warning sorted defaultdict get_final_text _NbestPrediction end_logits OrderedDict append start_logit replace _compute_softmax start_logits enumerate join namedtuple text _PrelimPrediction split join _strip_spaces iteritems BasicTokenizer len info tokenize find sorted append range enumerate len append exp FullTokenizer close read_squad_examples convert_examples_to_features FeatureWriter get len PieceToId is_impossible abs max list map paragraph_text _convert_index replace encode_ids SPIECE_UNDERLINE DecodePieces _lcs_match preprocess_text encode_pieces extend start_position sp_model zeros tok_end_to_orig_index tok_start_to_orig_index paragraph_text index FullSentencePieceTokenizer strip words readlines add_word_and_label_id InputExample append split words add_word_and_label_id InputExample any append text_preprocessing tokenize sub_sentence_id enumerate label_ids create_int_feature convert_tokens_to_ids words extend OrderedDict Example append len _tokenize_example TFRecordWriter makedirs write SerializeToString close _convert_single_example dirname info enumerate len token_classification_meta_data dict write_example_to_file maximum append int max constant any _create_min_max_boundaries range slice shape transpose reshape update astype dict randint equal update normal astype dict randint equal squeeze cast int32 dtype _adjust_labels sparse_categorical_crossentropy cast _validate_rank floordiv minimum ones reshape get_shape_list concat squeeze maximum float32 scatter_nd cast int32 expand_dims range one_hot get_shape_list uniform softmax argmax scatter_update items list copy Seq2SeqTransformer internal_model TransformerDecoder dict transformer_loss Model add_loss Input TransformerEncoder sqrt NoNorm LayerNormalization seed asarray append randint range ones zeros concat band_part zeros concat cast _create_causal_attention_mask concat logical_not logical_or zeros equal concat cast clip_by_value position_encoding_layer range SequenceBeamSearch expand_dims ndims as_list shape range len isinstance _shape_list Tensor range len pop _shape_list _shape_list reshape stack range top_k random_fn cast float32 cast float32 row_lengths _random_int_up_to random_fn gather row_lengths ones_like bool nrows zeros_like map_flat_values concat logical_not flat_values with_flat_values where stack _sample_from_other_batch cast expand_dims range row_lengths bool nrows concat logical_not where stack _sample_from_other_batch cast expand_dims range get_decoder_self_attention_bias get_padding get_padding_bias argmax rouge_l_sentence_level argmax rouge_n argmax compute_bleu get_input_dataset update_state metrics zip Checkpoint checkpoints_iterator reset_states expect_partial test_step func info numpy enumerate map batch list cast int32 to_dense parse_single_example keys padded_batch filter map len_passage int64 FixedLenFeature passage_list multidoc_parse_spec map batch TFRecordDataset get process_singledoc_transformer_dataset shard list_files num_input_pipelines input_pipeline_id shuffle process_multidoc_dataset interleave repeat AUTOTUNE prefetch process_singledoc_dataset len TPUStrategy int num_replicas_in_sync isinstance ones concat assert_equal shape int32 ones get_shape_list concat assert_equal shape int32 BertEncoder Decoder dict get_bert_config_from_params _embedding_layer Input decoder_layer bert_model_layer BertEncoder Decoder dict get_bert_config_from_params _embedding_layer Input decoder_layer bert_model_layer Checkpoint expect_partial info Bert2Bert get_bert2bert_layers get_bert2bert_layers initialize_bert2bert_from_pretrained_bert cls initialize_bert2bert_from_pretrained_bert assert_existing_objects_matched Checkpoint info get_nhnet_layers init_from_bert2bert from_tensor_slices experimental_distribute_dataset batch list isinstance reshape append Tensor numpy learning_rate learning_rate_warmup_steps hidden_size LearningRateSchedule join print num_tfrecords_shards generate_examples append range data_folder makedirs RawDataProcessor crawled_articles transform_as_tfrecords read_crawled_articles DEFINE_bool DEFINE_integer get_input_dataset train_file_pattern min checkpoint_interval dict history train_steps train_batch_size fit TPUStrategy override get_model_params isinstance params_override num_replicas_in_sync train continuous_eval model_type get_distribution_strategy info enable_mlir_bridge override_params_dict run len_passage map repeat range batch len_title encoder_common_layers restore layers zip assert_existing_objects_matched Checkpoint extend transformer_layers info get_weights common_layers_with_encoder set_weights expand_dims concat einsum zeros arange range reshape gather einsum reshape transpose multiply concat sqrt repeat softmax gather expand_dims create_rand_mask_from_inputs einsum _add_context _transpose_and_strip_dicts get strip splits DownloadConfig builder evaluate_triviaqa Counter split sum values len append metric_fn get_ground_truths exact_match_score format normalize_answer print get_ground_truths has_exact_match keys len format metric_max_over_ground_truths print get_ground_truths keys len RaggedFeature int64 builder ones concat float32 scatter_nd value_rowids logical_not get_static_value make_local_relative_att_ids argmax ones transpose logical_and cast to_tensor range update RelativePositionGenerator relative_vocab_size make_relative_att_ids fill equal dict logical_or int32 get_static_value row_lengths scatter_labels sequence_mask float32 reduce_sum cast expand_dims equal master row_lengths decode defaultdict split_and_pad_fn features_map_fn zip decode_logits_fn concat logits_fn info append experimental_local_results numpy enumerate TPUStrategy function partial features_map_fn master distributed_logits_fn decode_max_size split_and_pad batch_size TPUClusterResolver sentencepiece_model_path experimental_connect_to_cluster initialize_tpu_system decode_logits decode_top_k MirroredStrategy read_sentencepiece_model num_replicas_in_sync floordiv mod reduce_any reshape transpose logical_and where top_k gather expand_dims argmax minimum length where int64 cast gather update pieces EncodeAsSerializedProto FromString append tokenize len get Answer Question EvidenceInfo QuestionAnswer append join lower punctuation set append punctuation alias_answer aliases replace AnswerSpan append finditer compile begin decode question_id normalize_answer bisect_left warning encode token_offsets len AnswerSpan find encode realign_answer_span append len inc set int64 zeros array ParDo FindAnswerSpans Map MapTuple Create ReadEvidence MakeFeatures GroupByKey pop items list override keys EncoderConfig attention_dropout_rate warning dropout_rate dict WarmUp PolynomialDecay info row_lengths defaultdict split_and_pad_fn labels_map_fn features_map_fn decode_logits_fn concat update_loss evaluate_triviaqa logits_fn zip experimental_local_results Mean numpy enumerate parse_config model_config_path labels_map_fn as_dict encoder read_model_config gin_bindings init_checkpoint_path fit tie_embeddings get generator_encoder build_encoder get_embedding_layer discriminator_encoder namedtuple aggregate_logs _preprocess_eval_data set_preprocessed_eval_input_path do_lower_case get_strategy n_best_size build_inputs make_distributed_dataset max_answer_length postprocess_output sorted greater_equal where random_integers dict outputs KerasLayer info Input hub_layer iter create_loop_fn loop_fn sub splitlines bleu_wrapper translation reference DEFINE_enum DEFINE_string mark_flag_as_required sep walk count append download_and_extract print int ensure_str ensure_str join urlretrieve print Rename find_file info download_from_url find_file info ensure_str join info write txt_line_iterator zip txt_line_iterator Rename write dict_to_example SerializeToString close info all_exist enumerate ensure_str Rename shuffle Remove tf_record_iterator info append len iteritems Feature MakeDirs info init_from_files encode_and_save_files data_dir make_dir raw_dir compile_files get_raw_files shuffle_records DEFINE_string DEFINE_bool parse_single_example to_dense padded_batch int _batch_examples prefetch shard list_files num_input_pipelines input_pipeline_id map filter repeat info with_options Options padded_batch int generate_synthetic_data batch join join padded_cross_entropy_loss padded_cross_entropy_loss DEFINE_boolean DEFINE_enum define_device DEFINE_integer define_benchmark DEFINE_bool define_performance adopt_module_key_flags set_defaults define_base DEFINE_string enable_time_history batch_size enable_tensorboard TensorBoard log_steps TimeHistory append train_finish_time isinstance batch_size log_steps TimeHistory timestamp history timestamp_log float len exp concat float32 log expand_dims cast float range remove translate_file name NamedTemporaryFile bleu_wrapper Subtokenizer translate_and_compute_bleu info makedirs train tf_gpu_thread_mode eval FLAGS enable_mlir_bridge set_gpu_thread_mode_and_count TransformerTask sorted enumerate len EOS_ID index constant append isdir reshape num_replicas_in_sync predict_step enumerate _trim_and_decode input_generator info run experimental_local_results range _get_sorted_inputs predict len _encode_and_add_eos translate_from_input predict info _trim_and_decode info update float32 cast int32 py_func tuple range Counter len exp dict zip float sum range _get_ngrams_with_counter float32 cast int32 py_func tuple add set range len _get_ngrams zip intersection append float len float32 cast int32 py_func _len_lcs _f_lcs zip append float len _lcs dict max range append range len append enumerate replace defaultdict append min range len info iteritems defaultdict _escape_token _split_token_to_subtokens range len append add iteritems set extend _filter_and_bucket_subtokens append range len list info _count_and_gen_subtokens _gen_new_subtoken_list range _list_to_index_dict len isinstance insert CLS_ID SEG_ID_CLS SEP_ID tokenize_fn info input_fn file_based_input_fn_builder input_fn float32 file_based_input_fn_builder input_fn distribute_datasets_from_function experimental_distribute_dataset iter callable TPUStrategy int num_replicas_in_sync isinstance TPUStrategy int join format isinstance glob num_replicas_in_sync constant not_equal cumsum reshape logical_and float32 where reduce_sum cast bool range constant arange cumsum boolean_mask float32 round_to_int shuffle uniform int64 cast gather range array log constant arange cumsum boolean_mask float32 round_to_int shuffle uniform int64 cast gather range array log concat not_equal sort sparse_to_dense logical_and shuffle boolean_mask cast bool range sample_strategy info parse_files_to_dataset format TPUStrategy int join sorted basename isinstance glob num_replicas_in_sync len info append format_filename enumerate split TFRecordDataset from_tensor_slices prefetch shard min shuffle num_input_pipelines input_pipeline_id apply map parallel_interleave AUTOTUNE info batch len ones reshape transpose equal shuffle logical_not logical_and where float32 logical_or cast range Adam use_bert_format get_train_examples num_passes spiece_model_file set_verbosity SentencePieceProcessor output_dir file_based_convert_examples_to_features eval_split basename append PaddingInputExample format shuffle lower INFO Load get_dev_examples get_test_examples len use_eod permutation pass_id strip logical_not Open SentencePieceProcessor save_dir seed list tolist map sp_path append concatenate encode_ids info from_raw_text join task preprocess_text create_tfrecords extend Load split array len join sorted task format pass_id _create_data Glob split MakeDirs info input_glob save_dir format_filename len reshape len extend choice info append randint max list set arange mask_alpha min choice array randint mask_beta flip len IdToPiece arange mask_alpha min choice array item randint _is_start_piece mask_beta flip len tuple SerializeToString shape Example append range concatenate TFRecordWriter close num_core_per_host info format_filename _split_a_and_b batchify _sample_mask reuse_len join reshape write num_predict array list is_sparse cast int32 bfloat16 to_dense keys repeat concat random_shuffle current_host parse_files_to_dataset join sorted basename int Glob len info append format_filename enumerate split create_train_data max_query_length spiece_model_file doc_stride SentencePieceProcessor output_dir train_file create_eval_data basename max_seq_length convert_examples_to_features format uncased close shuffle FeatureWriter info join predict_file Load proc_id read_squad_examples preprocess mkdir join isinstance printable_text print append decode replace decode isinstance encode ClassificationXLNetModel float num_replicas_in_sync hstack equal where vstack info append _run_evaluation experimental_local_results numpy array range get_input_iterator SparseCategoricalAccuracy n_layer XLNetConfig n_class iterations lr_layer_decay_rate summary_type create_run_config train_steps get_classification_input_data d_model mem_len test_batch_size create_optimizer num_replicas_in_sync int learning_rate warmup_steps seq_len test_data_size train_tfrecord_path test_tfrecord_path OnlineMaskingConfig save leak_ratio perm_size uncased num_hosts get_pretrain_input_data num_predict reuse_len int join list items len write_predictions RawResult QAXLNetModel predict_dir max_query_length end_n_top doc_stride max_answer_length create_eval_data test_feature_path LoadFromSerializedProto n_best_size query_len start_n_top read predict_file get_squad_input_data read_squad_examples bool print max Counter get_tokens sum values len sorted sum find_best_thresh end_log_prob cls_logits strip tok_end_to_orig_index make_qid_to_has_ans sorted defaultdict tok_start_to_orig_index _NbestPrediction OrderedDict paragraph_text append range _compute_softmax find_all_best_thresh enumerate text min _PrelimPrediction get_raw_scores start_log_prob SEP_ID SEG_ID_Q format CLS_ID SEG_ID_PAD collect print SEG_ID_CLS SEG_ID_P join format close convert_examples_to_features FeatureWriter join create_file_writer mkdir get_input_iterator dict update RandomNormal RandomUniform slice shape reshape ones zeros concat band_part data_dir download dataset instantiate_pipeline prepare_raw_data run generate_data groupby apply filter unique info USER_COLUMN sort_values len groupby remove read_dataframe info USER_COLUMN exists join _filter_index_sort format print RATINGS_FILE default_timer info RAW_CACHE_FILE join format urlretrieve st_size _regularize_1m_dataset print extractall mkdtemp stat copy _regularize_20m_dataset info listdir makedirs PY2 join rmtree _transform_csv join rmtree _transform_csv _download_and_clean float32 astype ratings_csv_to_dataframe merge apply define_flags download dataset seed data_dir train_batches_per_epoch dataset eval_batches_per_epoch DummyConstructor SYNTHETIC_BATCHES_PER_EPOCH use_synthetic_data download instantiate_pipeline batch_size get_num_gpus TPUStrategy ERROR TPUClusterResolver dumps get_master reset get_distribution_strategy info setLevel DEFINE_boolean DEFINE_enum DEFINE_list define_device define_flags DEFINE_integer DEFINE_float define_benchmark DEFINE_bool define_performance adopt_module_key_flags set_defaults define_base DEFINE_string concat TFRecordDataset partial list_files map interleave AUTOTUNE prefetch unbatch deserialize batch map make_input_fn int create_dataset_from_tf_record_files train_batches_per_epoch eval_batches_per_epoch NUM_EVAL_NEGATIVES create_dataset_from_data_producer slice compute_top_k_and_ndcg cast float32 construct_model concatenate output Model summary Input log_steps apply_clean get_distribution_strategy seed set_seed early_stopping get_inputs TimeHistory set_session_config append parse_flags start set_policy IncrementEpochCallback build_stats print error CustomEarlyStopping create_ncf_input_data Policy function model_dir experimental_distribute_dataset save on_train_begin SparseCategoricalCrossentropy eval_step iter on_batch_end range on_batch_begin info join train_epochs Checkpoint ml_perf on_train_end create_file_writer on_epoch_begin train_finish_time batch_size log_steps timestamp timestamp_log len run_ncf trainable_variables get_global_step set_random_seed Input CrossShardOptimizer get_collection identity apply_gradients cast random_int32 get group sparse_to_dense_grads compute_gradients sparse_softmax_cross_entropy output float32 AdamOptimizer UPDATE_OPS convert_to_softmax_logits int32 concatenate multiply Dense Model summary range model_layer flush len compute_eval_loss_and_metrics_helper reshape sparse_softmax_cross_entropy float32 cast compute_top_k_and_ndcg tile NUM_EVAL_NEGATIVES dtype not_equal reshape multiply less float32 reduce_sum TOP_K argsort log cast int32 NUM_EVAL_NEGATIVES equal Pool ThreadPool FauxPool shuffle RandomState arange dtype uint64 randint argsort concatenate append tuple warning list SUM CollectiveHints all_reduce zip _filter_grads callback _run_callbacks list get_unscaled_gradients isinstance LossScaleOptimizer gradient apply_gradients zip _filter_and_allreduce_gradients DEFINE_multi_string DEFINE_string DEFINE_integer define_common_hparams_flags define_device define_distribution define_performance define_base DEFINE_string items list set_default parse_flags_with_usage unparse_flags getattr FLAGS join sorted format items isinstance _get_nondefault_flags_as_dict append define_image define_base define_benchmark define_performance DEFINE_boolean DEFINE_list DEFINE_integer DEFINE_float append DEFINE_string list_local_devices DEFINE_integer define_log_steps DEFINE_enum DEFINE_string lookup join format append DEFINE_string DEFINE_integer DEFINE_string DEFINE_integer append DEFINE_enum get_tf_dtype DEFINE_boolean DEFINE_enum format DEFINE_integer DEFINE_bool DEFINE_string CallstackSampler save set_jit str min cpu_count info format info map_structure model_dir format rmtree info mkdtemp extend FLAGS append main parse_flags ExperimentConfig ExperimentConfig ExperimentConfig ExperimentConfig ExperimentConfig ExperimentConfig ExperimentConfig ExperimentConfig num_examples TrainerConfig VideoClassificationTask ExperimentConfig kinetics600 add_trainer fromarray int64 to_number cast clip_or_pad_to_fixed_size random_flip_left_right sample_sequence sample_linspace_sequence resize_smallest warning decode_jpeg crop_image reshape cast one_hot int uint8 paste_instance_masks astype append yxyx_to_xywh range enumerate len int uint8 BytesIO concatenate size len astype area enumerate asfortranarray encode float range append open generate_annotation_file COCOGroundtruthGenerator iteritems groundtruth_generator info append convert_groundtruths_to_coco_dataset norm_activation build_backbone ClassificationModel MaskSampler MaskHead MaskRCNNModel build_backbone RPNHead roi_aligner rpn_head ROISampler MultilevelROIAligner include_mask MultilevelROIGenerator detection_generator detection_head DetectionGenerator roi_generator num_scales norm_activation aspect_ratios DetectionHead roi_sampler build_decoder len norm_activation aspect_ratios RetinaNetHead head build_backbone detection_generator MultilevelDetectionGenerator build_decoder num_scales RetinaNetModel len lookup norm_activation build_backbone VideoClassificationModel int max info append BlockSpec get type norm_activation lookup type get type norm_activation get norm_activation block_specs temporal_kernel_sizes use_self_gating append temporal_strides type get type norm_activation info get type norm_activation model_id get type norm_activation FPN stack non_max_suppression_padded concat less float32 where reduce_sum greater top_k cast int32 fill gather range append as_list reshape transpose top_k gather concat top_k reduce_sum crop_mask_in_target_box zeros_like ones equal greater where shape stack gather_nd top_k cast expand_dims range pad avg_pool _pad_strides AnchorGenerator OrderedDict append float range as_list int list items reshape OrderedDict stack clip_boxes stack ones squeeze shape stack gather_nd gather expand_dims range logical_and greater where zeros_like reduce_max less_equal where expand_dims bbox_overlap tile gather_instances argmax expand_boxes min astype maximum shape array int32 resize append zeros max enumerate int max min astype float32 dot shape floor ceil zeros warpPerspective array append enumerate reshape dtype cast reduce_sum dtype slice bbox_overlap cast expand_dims reduce_all dtype slice while_loop reshape bbox_overlap cast tile expand_dims range equal minimum dtype while_loop reshape float32 pad cast int32 ceil gather range as_list dtype ones concat maximum cast clip_by_value set_shape append range len ceil cast int32 subtract concat split floordiv range tile _sample_or_pad_sequence_indices concat float32 maximum cast int32 linspace set_shape append range _sample_or_pad_sequence_indices float32 maximum uniform cast set_shape cond as_list shape random_crop resize_with_crop_or_pad not_equal maximum shape logical_or cond uniform equal cond cast as_list shape append enumerate ones ones_like cast as_list reshape avg_pool as_list minimum reshape maximum stack floor cast append expand_dims range as_list dtype one_hot _compute_grid_positions reshape multiply reduce_sum _feature_bilinear_interpolation cast int32 tile gather range einsum set_shape decode_image parse_single_example _decode_image join task ClassificationModule isinstance build_model isdir latest_checkpoint ImageClassificationTask assert_existing_objects_matched Checkpoint serialize_config expect_partial TensorSpec save validate experiment params_override lock get_exp_config override_params_dict export_inference_graph configure_cluster model_dir get_distribution_strategy list worker_hosts strategy_config task_index SummaryWriter model_generator partial latest_checkpoint num_replicas_in_sync evaluate_checkpoint DetectionDistributedExecutor info set_policy int items isdir Policy evaluate_from_model_dir use_bfloat16 validate PrettyPrinter model lock config_file log_steps TimeHistory config_generator pformat as_dict set_session_config append InputFn SHAPEMASK_RESTRICTIONS RETINANET_RESTRICTIONS MASKRCNN_CFG SHAPEMASK_CFG MASKRCNN_RESTRICTIONS RETINANET_CFG maskrcnn_parser shapemask_parser anchor Parser retinanet_parser int32 pad_to_fixed_size dtype greater_equal concat maximum Assert shape cast append zeros range len COCOEvaluator ShapeMaskCOCOEvaluator list remove name startswith info variables len load_checkpoint ShapeMaskModel RetinanetModel MaskrcnnModel resnet Resnet SpineNetBuilder spinenet Fpn fpn Identity retinanet_head aspect_ratios num_scales len rpn_head aspect_ratios num_scales len frcnn_head mrcnn_head shapemask_head shapemask_head shapemask_head use_batched_nms partial gather concat top_k reduce_sum cast int32 as_list reshape avg_pool as_list minimum reshape maximum stack floor append expand_dims range as_list one_hot reshape cast int32 as_list dtype reshape get_grid_one_hot multiply feature_bilinear_interpolation reduce_sum compute_grid_positions cast tile gather range einsum as_list reshape stack cast int32 tile append gather range ones shape stack gather_nd range normalize_boxes constant float32 shape cast draw_bounding_boxes as_list dtype greater_equal ones concat maximum Assert cast set_shape append range len convert_image_dtype expand_dims constant clip_boxes dtype pad_to_bounding_box cast int32 resize assert_has_rank stack get_field get_extra_fields add_field append range filter_field_value_equals refine_boxes non_max_suppression get add_field iou greater_equal _copy_extra_fields reshape greater reduce_sum Assert matmul BoxList cast get_field expand_dims reduce_all subtract concat split as_list int min float round max minimum constant maximum shape stack cast round cond BoxList get append keypoint_scale slice shape stack pad set_shape convert fromarray uint8 BytesIO close getvalue save warning type convert array draw_bounding_box_on_image copyto truetype line Draw text size rectangle ceil getsize sum fromarray array draw_bounding_boxes_on_image copyto shape range draw_bounding_box_on_image expand_dims resize constant partial grayscale_to_rgb map_fn draw_keypoints_on_image convert array copyto ellipse Draw tuple size zip fromarray ones_like list getrgb reshape convert logical_and any copyto expand_dims composite array str int defaultdict format list items tuple draw_mask_on_image_array tolist min extend draw_bounding_box_on_image_array append draw_keypoints_on_image_array range uint8 image py_func uint8 image py_func concat less_equal shape rank cast equal shape less_equal cast equal convert_to_tensor convert_to_tensor cos sin convert_to_tensor rank to_4d _convert_translation_to_transform float32 pi rank cast transform _convert_angles_to_transform to_4d cast float32 ones_like maximum where pad uniform tile zeros expand_dims equal int64 cast clip_by_value uint8 rgb_to_grayscale grayscale_to_rgb ones_like uint8 float32 reduce_sum grayscale_to_rgb cast int32 clip_by_value histogram_fixed_width rgb_to_grayscale zeros_like wrap rotate wrap translate wrap translate transform transform scale_channel stack uint8 constant ones_like squeeze float32 depthwise_conv2d where pad cast clip_by_value tile expand_dims equal scale_channel stack convert_to_tensor ones shape concat dtype ones_like slice reshape concat where shape expand_dims equal uniform floor cast bool cond _randomly_negate_tensor _randomly_negate_tensor float _randomly_negate_tensor uniform floor cast bool cond uniform equal cond enumerate tuple list join CustomTensorBoard AverageModelCheckpoint BackupAndRestore ModelCheckpoint MovingAverageCallback callable get_value model_name append get_image_size_from_model warning DatasetBuilder loss_scale validate PrettyPrinter get_config lock lower pformat as_dict info override_params_dict latest_checkpoint iterations load_weights info dtype set_image_data_format run_eagerly gpu_thread_mode experimental_run_functions_eagerly set_mixed_precision_policy set_session_config get_loss_scale list_physical_devices batchnorm_spatial_persistent set_gpu_thread_mode_and_count DEFINE_bool DEFINE_string initialize_common_flags DEFINE_integer initialize worker_hosts build_stats skip_eval evaluate configure_cluster serialize_config get_strategy_scope _get_dataset_builders task_index info label_smoothing epochs global_batch_size fit latest_checkpoint destination model_dir load_weights as_dict info save checkpoint _get_params_from_flags export compile SparseCategoricalCrossentropy trivial_model SGD main parse_flags FLAGS Model Input train_epochs build_stats evaluate batch_size download_and_prepare num_examples fit get_strategy_scope model_dir save download batch builder define_device define_distribution DEFINE_bool define_base set_default apply_clean get shadow_copy AdamW Adam RMSprop SGD lower ExponentialMovingAverage info Lookahead ExponentialDecay examples_per_epoch scale_by_batch_size WarmupDecaySchedule name decay_epochs PiecewiseConstantDecay info CosineDecayWithWarmup warmup_epochs initial_lr decay_rate broadcast_to cast shape broadcast_to cast shape convert_image_dtype broadcast_to constant shape minimum float32 crop_to_bounding_box decode_and_crop_jpeg stack cast int32 resize_image sample_distorted_bounding_box constant random_flip_left_right crop_to_bounding_box decode_and_crop_jpeg stack unstack standardize_image reshape convert_image_dtype mean_image_subtraction decode_and_center_crop read_file preprocess_for_eval constant from_tensor_slices map batch len distort standardize_image decode_crop_and_flip convert_image_dtype mean_image_subtraction resize_image Input get_weights load_model set_weights min_depth depth_divisor width_coefficient update batch_norm bn_momentum get_batch_norm weight_decay bn_epsilon image_data_format Conv2D DepthwiseConv2D expand_ratio int drop_connect_rate se_ratio multiply input_filters activation add fused_conv image_data_format get_activation conv2d_block use_se output_filters max stem_base_filters input_channels activation weight_decay image_data_format depth_coefficient dtype drop_connect_rate num_classes top_base_filters sum range format mb_conv_block replace rescale_input normalize_images conv2d_block get_activation round_filters float enumerate blocks dropout_rate num_repeat join assert_existing_objects_matched Checkpoint dict Model MODEL_CONFIGS save get_output_at Input efficientnet model_path model_name export_tfhub PruningSummaries UpdatePruningStep isinstance epoch_runtime_log TimeHistory average_examples_per_second history float DEFINE_boolean DEFINE_integer define_distribution DEFINE_float define_benchmark define_performance adopt_module_key_flags define_image define_base DEFINE_string uniform truncated_normal DEFINE_float DEFINE_string DEFINE_integer DEFINE_string pop batchnorm_spatial_persistent prefetch shuffle map repeat info with_options Options batch update concat transpose cast VarLenFeature parse_single_example expand_dims values parse_example_proto reshape preprocess_image cast TFRecordDataset from_tensor_slices get_filenames cache shard num_input_pipelines input_pipeline_id shuffle interleave info sample_distorted_bounding_box random_flip_left_right decode_and_crop_jpeg extract_jpeg_shape stack unstack shape broadcast_to shape minimum int32 cast float32 shape _smallest_size_at_least _aspect_preserving_resize _decode_crop_and_flip _central_crop _resize_image set_shape decode_jpeg numpy train_epochs batch_size min ceil train_steps warn get_tf_dtype CheckpointManager data_format on_train_begin set_cudnn_batchnorm_mode set_image_data_format list_physical_devices steps_per_loop set_mixed_precision_policy tf_gpu_thread_mode Controller checkpoint get_num_train_iterations train_and_evaluate epochs_between_evals on_train_end set_gpu_thread_mode_and_count str add str add dict identity_block Input conv_block resnet50 load_weights append reshape list keys all isinstance print info summary append from_tensor_slices ones repeat zeros batch LoopFnWithSummaries create_tf_while_loop_fn function use_tf_function use_tpu_summary_optimization use_tf_while_loop create_loop_fn function use_tf_function map range get_strategy Dataset isinstance get_soft_device_placement set_soft_device_placement asarray get_input_details get_tensor print get_output_details Interpreter mean invoke set_tensor resize allocate_tensors expand_dims convert_to_tflite test_image_path check_tflite_consistency input_tensor_name output_tflite_path output_tensor_name eval_logdir MakeDirs Dataset uint8 preprocess_image_and_label squeeze placeholder expand_dims pad_to_bounding_box resize_to_range random_crop get_random_scale reshape float32 identity maximum flip_dim shape randomly_scale_image_and_label warning int32 cast set_shape mean_pixel dtype sorted reverse_v2 concat reduce_mean softmax _resize_bilinear append expand_dims argmax enumerate dtype sorted multi_scale_logits squeeze resize_bilinear softmax _resize_bilinear resize_nearest_neighbor prediction_with_upsampled_logits expand_dims argmax scale_dimension max dtype sorted _get_logits concat min _replace crop_size image_pooling_crop_size merge_fn set_shape _resize_bilinear output_stride outputs_to_num_classes decoder_output_stride DensePredictionCell build_cell get_batch_norm_fn sync_batch_norm_method get_batch_norm_params info atrous_rates sorted decoder_output_is_logits refine_by_decoder identity crop_size get_branch_logits outputs_to_num_classes extract_features decoder_output_stride get_batch_norm_params get_batch_norm_fn conv2d split_separable_conv2d conv2d concat repeat split_separable_conv2d iteritems add_softmax_cross_entropy_loss_for_each_scale ModelOptions multi_scale_logits identity get_next train_split num_clones DeploymentConfig train_logdir copy enumerate basename squeeze _convert_train_id_to_eval_id also_save_raw_predictions save_annotation range run vis_split vis_logdir _build_variable_getter pad V2_DEF deepcopy V3_LARGE expand_input deepcopy V3_EDGETPU deepcopy expand_input V3_SMALL xavier_initializer truncated_normal_initializer reshape concat to_float startswith variance_scaling_initializer get_batch_norm_fn l2_regularizer append batch_norm_fn conv2d_same relu drop_path_keep_prob config set_hparam get_batch_norm_fn total_training_steps PNASCell info num_conv_filters len drop_path_keep_prob config info set_hparam get_batch_norm_fn total_training_steps NASBaseCell num_conv_filters len append less_equal cond random_uniform as_list shape unstack is_fully_defined is_integer is_floating greater_equal reshape logical_and Assert shape stack rank cast int32 set_shape equal greater_equal logical_and extend Assert rank random_uniform append range equal len int lin_space random_shuffle squeeze resize_bilinear float32 shape cast int32 resize expand_dims int conv2d_same get_batch_norm_fn partial conv2d_same append range append append get_batch_norm_fn group_norm Tensor isinstance separable_conv2d constant one_hot isinstance not_equal float32 cast einsum pad fixed_padding _split_separable_conv2d _separable_conv2d get_batch_norm_fn l2_regularizer join int ImageReader Glob write shuffle ceil output_dir append range flush len val_image_label_folder _convert_dataset train_image_label_folder train_image_folder val_image_folder glob join cityscapes_root _get_files Glob list_folder fromarray astype original_gt_folder _save_annotation _remove_colormap segmentation_format join num_classes TFExampleDecoder ignore_label splits_to_sizes warning defaultdict uint16 shape zeros equal join _open_panoptic_id_image ignored_label compare_and_accumulate _category_and_instance_from_annotation get _iterate_work_queue _compute_metric put iteritems iterkeys set difference viewkeys warning zeros bool max range get Process join replace _compute_metric _is_thing_array cpu_count put print_detailed_results start Queue info append _matched_annotations _build_metric range merge normalize_by_image_size print_digits gt_json_file metric num_workers gt_folder pred_json_file num_categories eval_coco_format ignored_label pred_folder intersection_offset max_instances_per_category unique compare_and_accumulate PanopticQuality executing_eagerly compare_and_accumulate ParsingCovering executing_eagerly join iteritems read_test_image reshape unique empty array iteritems read_test_image empty_like zeros list arange reversed zeros range create_label_colormap fromarray astype label_to_color_image amin amax iteritems get_label_weight_mask one_hot not_equal reshape resize_bilinear concat warning cast resize_nearest_neighbor expand_dims get_or_create_global_step latest_checkpoint extend info get_variables_to_restore assign_from_checkpoint model_variables piecewise_constant_decay to_float get_or_create_global_step maximum cosine_decay exponential_decay info polynomial_decay foreground_class_of_interest small_object_area_threshold dataset_dir minimum int learning_rate sync_replicas constant batch_size float32 cast end_learning_rate exponential_decay learning_rate_decay_factor polynomial_decay num_epochs_per_decay warmup_epochs MomentumOptimizer AdagradOptimizer GradientDescentOptimizer AdamOptimizer RMSPropOptimizer AdadeltaOptimizer FtrlOptimizer checkpoint_path latest_checkpoint get_model_variables checkpoint_exclude_scopes IsDirectory startswith info train_dir extend get_collection TRAINABLE_VARIABLES Example read print _is_cmyk cmyk_to_rgb png_to_jpeg _is_png int join _convert_to_example arange _process_image TFRecordWriter print astype write SerializeToString close output_directory range flush len int ImageCoder Thread join print astype Coordinator start append range flush len seed list print Glob extend shuffle range len append append basename print _process_image_files _find_image_files _find_human_readable_labels _find_image_bounding_boxes labels_file readlines split print readlines append float split _process_dataset imagenet_metadata_file train_directory _build_bounding_box_lookup validation_directory _build_synset_lookup train_shards output_directory bounding_box_file validation_shards join TFRecordReader TFExampleDecoder read_label_file has_labels print join urlretrieve stat extractall download_url join format print Exists download_url join join index split reshape join urlretrieve print extractall stat join Remove DeleteRecursively download_and_uncompress_tarball list _get_output_filename write_label_file dict MakeDirs zip _clean_up_temporary_files range append join listdir isdir float _get_dataset_filename range seed shuffle _dataset_exists _convert_dataset _get_filenames_and_classes print print _extract_images _extract_labels print join urlretrieve _download_dataset create_labels_file download_coco_dataset create_visual_wakeword_annotations create_tf_record_for_visualwakewords_dataset coco_dirname download_and_uncompress_zipfile coco_annotations_url coco_validation_url coco_train_url append int join BytesIO tuple Example append float hexdigest open format urlretrieve readlines len split create_readable_names_for_imagenet_labels write_label_file iter BoundingBox parse height ymin FindNumberBoundingBoxes min ymax xmin xmax GetInt getroot width append float max range GetItem Exists join scalar _gather_clone_loss REGULARIZATION_LOSSES get_collection add_n _sum_clones_gradients len SUMMARIES get_collection set scope create_clones UPDATE_OPS append add_n zip global_norm isinstance name IndexedSlices histogram info append values as_list l2_regularizer constant_value shape as_list array assert_is_fully_defined assert_has_rank _validate_image_inputs batch_norm int assert_has_rank log batch_norm conv3d as_list batch_norm prediction_fn pad as_list partial update_wrapper l2_regularizer truncated_normal_initializer get get_dataset image_preprocessing_fn dataset_dir get_preprocessing DatasetDataProvider image_size batch items list squeeze aggregate_metric_map add_scalar_summary Graph build_model eval_model fine_tune_checkpoint fine_tune_checkpoint one_hot_encoding num_classes add_scalar_summary get_or_create_global_step fine_tune_checkpoint assign assign_from_checkpoint_fn get_variables_to_restore build_model train_model hasattr default_image_size shape conv2d_transpose conv2d resize as_list list partial reverse len minimum float32 crop_to_bounding_box shape cast int32 trainable_variables list restore global_variables get_collection set Saver ExponentialMovingAverage append global_variables_initializer variables_to_restore run num_steps dataset_name partial reshape download_and_prepare get_preprocessing preprocess_fn make_one_shot_iterator get_next use_model_specific_preprocessing range image_size builder output_tflite as_list insert conv3d index sigmoid tile avg_pool3d int max append range identity conv2d zip append _split_divisible enumerate split items list hasattr _make_divisible pop get deepcopy get as_list as_list pool_op convert_to_tensor set_shape xavier_initializer truncated_normal_initializer deepcopy update get_default_graph conv2d partial dict update _replace update deepcopy set_hparam variance_scaling_initializer l2_regularizer variance_scaling_initializer l2_regularizer variance_scaling_initializer l2_regularizer int stem_cell batch_norm conv2d append stem_multiplier range filter_scaling_rate int batch_norm conv2d num_conv_filters stem_multiplier drop_path_keep_prob num_cells total_training_steps transpose _update_hparams NasNetANormalCell NasNetAReductionCell info num_conv_filters use_bounded_activation drop_path_keep_prob num_cells total_training_steps transpose _update_hparams NasNetANormalCell NasNetAReductionCell info num_conv_filters use_bounded_activation drop_path_keep_prob num_cells total_training_steps transpose _update_hparams NasNetANormalCell NasNetAReductionCell info num_conv_filters use_bounded_activation format num_cells reduction_cell _build_aux_head stem calc_reduction_layers add_and_check_endpoint skip_reduction_layer_input num_reduction_layers index normal_cell activation_fn append range append int float range int batch_norm concat avg_pool2d conv2d floor dtype cast int split split _operation_to_num_layers _operation_to_filter_shape _operation_to_info batch_norm activation_fn range separable_conv2d split split _operation_to_pooling_type _operation_to_pooling_shape avg_pool2d _operation_to_pooling_info relu6 max_pool2d format num_cells _build_aux_head stem calc_reduction_layers add_and_check_endpoint normal_cell num_reduction_layers activation_fn append range drop_path_keep_prob num_cells total_training_steps transpose _update_hparams info PNasNetNormalCell num_conv_filters use_bounded_activation drop_path_keep_prob num_cells total_training_steps transpose _update_hparams info PNasNetNormalCell num_conv_filters use_bounded_activation to_float random_crop random_flip_left_right random_brightness pad image random_contrast expand_dims rgb_to_grayscale to_float resize_image_with_crop_or_pad image expand_dims rgb_to_grayscale random_uniform to_float resize_image_with_crop_or_pad subtract div rgb_to_grayscale to_int32 greater_equal logical_and extend Assert rank random_uniform append range equal len append _crop range split convert_to_tensor to_float to_int32 rint greater cond convert_to_tensor resize_bilinear squeeze set_shape expand_dims _aspect_preserving_resize set_shape random_uniform set_shape _aspect_preserving_resize
# Aerial Imagery Pixel-level Segmentation Codebase for the MSc thesis paper Aerial Imagery Pixel-level Segmentation ## Creating environments for the DroneDeploy fastai/keras benchmark and DeepLabv3+ codebase It is crucial to take note of your own GPU driver environment. For this work the following environment was available (High Performance Cluster at Eindhoven University of Technology): - GCC \& G++: 5.4.0 (20160609) - Nvidia driver: 450.51.06 - CUDA driver: 11.0 - CUDA compilation tools (including nvcc): release 10.2, V10.2.89 - Using TensorFlow through Conda automatically installs the latest CuDNN version in your local environment. ### fastai environment and preparations
3,053
mrottmann/DeepBASS
['active learning', 'data augmentation']
['Deep Bayesian Active Semi-Supervised Learning']
run_series.py deepbass.py helpers.py csv_reduce.py stringcommon stringdiff EM generate2Dcase visualize2D loadMNIST model2Dcase dropout_inference modelMNIST min abs range len min range permutation to_categorical visualize2D where flow save argmax dropout_inference open seed str list len range modelMNIST asarray setdiff1d concatenate size close union1d copy fit_generator mean ImageDataGenerator compile int T entropy evaluate generate2Dcase print reshape fit zfill loadMNIST summary model2Dcase makedirs seed astype concatenate reshape astype load_data Model Input glorot_uniform range Model Input glorot_uniform range int function concatenate print pred ceil array range griddata clear concatenate rand mean ylim scatter bwr linspace contourf savefig xlim binary dropout_inference makedirs
# DeepBASS: Deep Bayesian Active Semi-Supervised Learning This python script is based on keras with tensorflow backend. Library versions used: python3==3.4.6, keras==2.0.8, tensorflow==1.2.0, numpy==1.13.1, scipy==0.19.1, matplotlib==2.0.2, pandas==0.22.0
3,054
mrsalehi/ground-sentence-video
['temporal localization']
['TALL: Temporal Activity Localization via Language Query']
script/utils.py script/vocab.py script/models/grounder.py script/models/tgn.py script/evaluate.py script/models/textual_lstm_encoder.py script/data.py script/models/cnn_encoder.py script/models/visual_lstm_encoder.py script/models/interactor.py script/train.py ActivityNet TACoS evaluate validation train extract_frames_tacos extract_visual_features compute_overlap find_K pad_textual_data load_word_vectors pad_labels top_n_iou find_bce_weights Vocab VGG16 C3D InceptionV4 Grounder Interactor TextualLSTMEncoder TGN VisualLSTMEncoder print int int train training data model zero_grad save Parameter Embedding exit Adam normal_ load_state_dict xavier_normal_ append to state_dict SummaryWriter param_groups close to_input_tensor item float find_bce_weights validation int requires_grad time embedding load data_iter backward print add_scalar parameters TGN step len list max map zeros max range len list format glove2word2vec concatenate print load_word2vec_format keys len get VideoCapture join read replace print astype float32 mkdir save resize ceil CAP_PROP_FPS expand_dims listdir append load join VGG16 replace print Compose cnn_encoder save to listdir cat load format print name float32 tqdm save zeros to range len int topk view shape float max range show print sort mean hist listdir
# Temporally Grounding Natural Sentence in Video Code for the paper [Temporally Grounding Natural Sentence in Video](https://ai.tencent.com/ailab/media/publications/temporally-grounding-natural-ma_lin_(oral).pdf) [EMNLP 2018].<br/> ## Citation If you find this code useful, please consider citing the original work by authors: ``` @inproceedings{chen-etal-2018-temporally, title = "Temporally Grounding Natural Sentence in Video", author = "Chen, Jingyuan and Chen, Xinpeng and Ma, Lin and
3,055
mseitzer/csmri-refinement
['mri reconstruction']
['Adversarial and Perceptual Refinement for Compressed Sensing MRI Reconstruction']
utils/logging.py training/base_runner.py utils/deploy_checkpoint.py data/reconstruction/summarize_results.py metrics/segmentation_score.py models/refinement_wrapper.py data/reconstruction/deep_med_lib/my_pytorch/misc.py data/reconstruction/deep_med_lib/my_pytorch/myImageTransformations.py utils/checkpoint_paths.py data/reconstruction/deep_med_lib/utils/med_image.py validate.py data/transform_utils.py utils/config.py utils/image_pool.py data/reconstruction/deep_med_lib/utils/misc.py train.py data/__init__.py metrics/segmentation_metrics.py metrics/image_metrics.py training/optimizers.py models/vgg_loss.py data/reconstruction/scar_seg/__init__.py models/discriminators.py utils/tensor_transforms.py data/reconstruction/statistics.py models/__init__.py models/weight_inits.py training/lr_schedulers.py data/reconstruction/deep_med_lib/__init__.py data/reconstruction/deep_med_lib/my_pytorch/myfft.py data/reconstruction/rec_transforms.py models/adversarial_loss.py models/recnet.py models/unet.py data/reconstruction/deep_med_lib/my_pytorch/custom_loss.py data/reconstruction/deep_med_lib/utils/compressed_sensing.py data/reconstruction/deep_med_lib/utils/preprocessing.py models/utils.py training/adversarial_runner.py data/reconstruction/deep_med_lib/utils/metric.py training/adversarial_training.py training/early_stopping.py training/runner.py utils/checkpoints.py utils/custom_data_parallel.py utils/diagnostics.py utils/__init__.py data/reconstruction/rec_seg_transforms.py data/reconstruction/io.py data/reconstruction/scar_seg/eval.py metrics/__init__.py models/criteria.py metrics/scalar_metrics.py training/__init__.py data/reconstruction/deep_med_lib/utils/mymath.py metrics/metric.py data/transform_wrappers.py data/reconstruction/scar_seg/io.py models/vgg.py data/reconstruction/seg_transforms.py data/reconstruction/scar_seg/scar_segmentation.py data/reconstruction/deep_med_lib/utils/dnn_io.py metrics/pytorch_ssim/__init__.py make_comparison_grid save_images_to_tensorboard save_best_checkpoint train_net save_periodic_checkpoint run_validation main _save_image main save_output_images scale_by_min_max softmax normalize_image_array _build_param_dict get_rec_transform get_seg_output_transform get_rec_seg_transform get_rec_output_transform get_rec_input_batch_transform get_output_transform get_input_batch_transform is_dataset maybe_get_subset_sampler load_dataset prepare_for_visualization check_integrity _cabs load_from_raw CaseDataset save_raw maybe_convert_to_magnitude train_transform _to_torch_tensor test_transform train_transform _to_torch_tensor test_transform output_transform input_transform output_transform compute_wilcoxon compute_dice_scores compute_ssim compute_seg_score _get_index_key _dice compute_psnr collect_mean_std evaluate_for_metric print_percentiles get_best_fn statistical_testing get_precision print_mean_std main CrossEntropyLoss2d get_objective_loss get_params get_to_cuda test_fft2d_gradcheck Fft2d Fft test_ifft2d_gradcheck Ifft2d create_complex_var contiguous_clone data_consistency test_ifft_gradcheck make_contiguous Ifft test_fft_gradcheck DataConsistencyInKspace get_attribute apply_salt_and_pepper_noise get_mask_generator ElasticTransform AffineTransform GaussianBlurring AddGaussianPoissonNoise FlipClassLabels AddGaussianNoise AddVariousNoise Undersample AffineTransformPair RandomRotate center_crop UndersampleWithResizedGrid Split get_fspecial flip_classes HeartCenterCropNumpy MedianScaleNumpy get_motion_blur_kernel to_tensor apply_linear_motion_blur CoordinateTransform undersample ConvertTo1Hot PerspectiveTransform convert_from_1hot MotionBlurring affine_transform RandomZoomPair apply_speckle_noise AddSpeckleNoise out_of_focus_motion_blur clipped_zoom perspective_transform RandomCropNumpy MaxScaleNumpy RandomTranslate RandomRotatePair crop_image_at BilinearResize NormalizeNumpy MutualExclude apply_poission_matlab poisson_downsampling Merge CenterCropInKspace apply_gaussian_noise elastic_transform RandomZoom convert_to_1hot CenterCropNumpy get_truncated_normal InverseNormalize EnhancedCompose PoissonSubsampling random_num_generator nlines get_phase cartesian_mask2 get_undersampling_ratio undersampling_rate denoise_tv data_consistency_xf var_dens_mask_2d soft_thresh one_line perturbed_shear_grid_mask undersample get_undersampling_sensitivity data_consistency cartesian_mask_guarantee_sampling_rate normal_pdf genD radial_sampling cartesian_mask var_dens_mask_2d_unif lowres shear_grid_mask mask_c2r mask_r2c complex2real to_tensor_format real2complex from_tensor_format compute_n_patches_nd extract_patches_3d __interpolate_patch_shape PatchExtractor3D psnr categorical_dice HFEN mse complex_psnr nmse ssim save_params load_pickle GetNumberOfClasses load_seg save_results groupintegers getFrameNamesLookupTable alphanum_key returnIntAfterWord load_frames finish load_image_old resize_image save_image VideoWriter load_config save_pickle uniq get_project_root read_xlsx load_seg_old load_best_params load_image load_params check_and_mkdir find_empty_dirs mydeletefile get_headline findfiles save_image_old resume tryint getClassLookupTable completed clipped_zoom pad_image crop_image sizeof_fmt writetxt2img load_results star mkdirfunc load_data get_hostname get_fold_dir mat2py recursive_delete_if_empty sort_nicely readcsvfile rot90_nd fft2c fourier_matrix ifft2c inverse_fourier_matrix fftc flip ifftc scale2unit rgb2gray extract_patches visualise_patches contrast_normalization crop2d crop3d whitening hist_match centering assemble_patches_rev assemble_patches add_gt_labels load_gt_label load_from_jo_format load_dataset get_val_set _load_label _load_datasets get_test_set _split_data get_train_set ReconstructionDataset _load_image_and_label _get_test_or_val_set compute_hfen compute_mutual_information compute_psnr compute_ssim MaxMetric Metric MinMetric _make_byte_tensor binary_accuracy disc_accuracy compute_average_dice compute_dice SegmentationScore _get_average_dice_metric _get_generic_metric_fn MetricFunction _get_segmentation_score_metric accumulate_metric get_metric_fn _get_disc_accuracy_metric get_loss_metric create_window gaussian _ssim SSIM ssim WGANLoss get_adversarial_loss GANLoss _AdversarialLoss LeastSquaresLoss FeatureMatchingLoss CriterionWrapperWithScalarTarget _get_feature_penalty_criterion _get_vgg_criterion _get_adv_criterion get_criterion CriterionWrapper _get_gain construct_model CNNDiscriminator construct_model RecNet ConvBlock construct_model RefinementWrapper _scale _unscale _var_without_grad ConvEncodeUnit construct_model _pad_to_target ConvDecodeUnit UNET get_activation_fn_name need_bias get_same_padding_layer get_padding_layer get_activation_fn get_normalization_layer VGG19 VGGLoss _weight_init initialize_weights _get_init_fn construct_model build_runner AdversarialRunner CondInputSource get_discriminator_input_fn _build_input_fn BaseRunner EarlyStopper is_post_epoch_scheduler get_lr_scheduler is_pre_epoch_scheduler _get_polynomial_decay get_optimizer build_runner Runner build_runner initialize_pretrained_model load_model_state_dict inference_checkpoint_from_training_checkpoint save_checkpoint restore_checkpoint prune_checkpoints _format_checkpoint_name get_config_path _get_path is_checkpoint_path get_run_dir get_logfile_path _format_run_dir_name get_best_checkpoint_path get_periodic_checkpoint_path Configuration _decode_config gather CustomDataParallel main print_model_parameters get_model_parameter_str ImagePool setup_logging magnitude_image complex_abs print_tensor_stats scale_batch_per_example scale_to_range normalize_batch_per_example convert_to_one_hot normalize_range make_fresh_variables cpuify set_random_seeds import_function_from_path cudaify make_variable_like make_variables set_cuda_env set_worker_seeds format save_checkpoint warning dirname run_dir info get_attr prune_checkpoints get_periodic_checkpoint_path format save_checkpoint get_best_checkpoint_path warning dirname info get_attr prune_checkpoints data int isinstance len zip ceil enumerate format convert_to_segmentations make_comparison_grid debug shape warning get_attr add_image items validate time value record_value list batch_size format get_named_outputs save_images_to_tensorboard save_best_checkpoint info ceil chain get_attr record_best_value enumerate add_scalar time format should_stop info train_epoch stop_reason save_periodic_checkpoint verbose epoch_finished run_validation get_attr num_epochs epoch_beginning range len serialize config has_attr build_runner DataLoader verbose conf restore_checkpoint maybe_get_subset_sampler cuda exists values critical seed get_config_path str list set_random_seeds data_dir get_run_dir print_model_parameters dirname load_dataset append parse_args get_attr set_cuda_env update dry SummaryWriter format get from_json debug early_stoppers EarlyStopper resume mkdir run_dir info num_epochs print_parameters setup_logging runner_type join log_dir print print_model train_net split save_image data join format zip debug _save_image save_raw numpy validate fold raw is_dataset name len dump save_output_images files_or_dirs checkpoint items infer out_dir get_named_outputs mean std min max sum exp max update to_param_dict copy _build_param_dict train_transform test_transform _build_param_dict train_transform test_transform output_transform output_transform debug format debug format import_module loadmat get_case_and_slice savemat maybe_squeeze_batch_dim print maybe_convert_to_magnitude slice_iter zip ndarray copy isinstance maybe_convert ndarray isinstance squeeze copy scale get Compose Compose EnhancedCompose RandomTranslate RandomRotate RandomZoom ElasticTransform append format OrderedDict maybe_convert_to_magnitude compare_psnr _get_index_key OrderedDict compare_ssim squeeze _get_index_key seg_score cudaify make_variables _get_index_key OrderedDict unsqueeze maybe_convert_to_magnitude sum _dice range _get_index_key items list items list permutations format stest_mode all test_fn print set mean add sprint slvl append pvalue items list print OrderedDict mean v str p print get_best_fn get_precision append best_fn max l items list str p print mean append max l items list format columns collect_mean_std print_mean_std print print_percentiles order OrderedDict match pprint statistical_testing append v dropna keys basename evaluate_for_metric inputs read_csv Tensor BCELoss CrossEntropyLoss2d MSELoss is_contiguous create_complex_var create_complex_var create_complex_var create_complex_var debug format random size sum ravel pad ndim transpose random_num_generator Sequence isinstance max astype poisson array normal shape log2 unique ceil float max poisson len copy choice normal shape warpAffine getAffineTransform reshape min astype float32 shape min astype float32 getPerspectiveTransform arange reshape rand empty_like meshgrid range gaussian_filter ones zeros warpAffine getRotationMatrix2D int16 rot90 mod arange sum cos logical_and pi sign fix sqrt flipud sin meshgrid zeros abs max zeros gaussian_filter shape int zeros_like zoom float32 copy ndim round int reshape size copy shape unique randint ravel len int reshape tuple astype zeros len abs get_undersampling_sensitivity outer uniform binomial zeros normal_pdf range itemsize as_strided outer binomial normal_pdf int itemsize as_strided reshape random choice ifftshift zeros normal_pdf range itemsize as_strided ifftshift binomial normal_pdf size cartesian_mask zeros float sum len zeros range ifftshift choice astype repeat ifftshift zeros range print shape astype randint range zeros repeat zeros_like zeros repeat randint range gen_mask size mean zeros sum std range print format arange get_undersampling_ratio normal ifft2 random fft2 sqrt shape fft2c ifft2c prod fft2c ifft2 fft2 ifft2c ifft2 fftc fft2 ifftc imag real arctan arange random cos pi outer astype sqrt repeat tile sin real zeros ifftshift round max imag astype float32 swapaxes real imag asarray transpose complex2real real2complex transpose mask_r2c list prod map len check_random_state reshape compute_n_patches_nd extract_patches zip randint len size astype mean abs abs gaussian_laplace reshape compare_ssim zip append abs makedirs isdir len Popen reshape imsave imread float32 imread float32 moveaxis array shape ceil int ceil int reshape height imsave width imread float32 imread float32 seed pop replace glob print tolist shuffle ceil sort_nicely listdir range append len append sort format update str __dict__ warn import_module dirname append exists dirname makedirs load_pickle isfile save_pickle load_params load_results isfile set_all_param_values load_pickle format get_all_param_values save_pickle isfile groupby list star enumerate join sorted endswith append walk walk rmdir all sorted len open_workbook sheet_by_index nrows append ncols cell_value range enumerate makedirs remove shape putText FONT_HERSHEY_SIMPLEX dict sorted enumerate get list basename map dict findall range append format search fft2 fftshift ifftshift ifft2 fftshift ifftshift exp arange pi outer sqrt slice asarray ndim asanyarray shape T eig dot sqrt real diag len append range shape range zeros len shape range zeros len int min shape sqrt floor zeros range len shape shape float64 astype shape unique interp ravel str transpose get_case_and_slice zip append loadmat join sorted glob load_from_raw append uint8 astype append expand_dims range basename format print get_data load_gt_label _split_data any CaseDataset enumerate get_data join squeeze get_data join squeeze basename format reshape shape append _load_image_and_label array range enumerate join sorted list RandomState format glob debug shuffle map append chain sum array len join get_attr _load_datasets transform_getter join get_attr _load_datasets transform_getter log10 Variable data flatten norm gaussian_laplace flatten histogram2d Variable data isinstance gt mean _make_byte_tensor cat shape type range LongTensor type LongTensor get from_dict segmentation_score_metric get dice_metric import_function_from_path format _get_generic_metric_fn isinstance application metric_constructor get_output_transform get_attr accumulate Tensor Variable contiguous unsqueeze pow conv2d create_window size type_as get_device cuda is_cuda get_attr get VGGLoss has_attr get get isinstance initialize_weights get_attr to_param_dict CNNDiscriminator get_activation_fn_name negative_slope calculate_gain conv_blocks RecNet get from_dict RefinementWrapper initialize_pretrained_model file parameters pretrained_model shape min max view shape view UNET pad size ceil int isinstance startswith calculate_gain data get_inits __name__ update partial copy apply weight_init_params import_module construct_model discriminator_optimizer has_attr get_input_batch_transform get_optimizer values from_dict list get_lr_scheduler get_discriminator_input_fn AdversarialRunner name initialize_pretrained_model file generator_optimizer generator_model gen get_attr disc lr_scheduler cudaify application parameters get_output_transform discriminator_model auto _build_input_fn OUT_GEN ImagePool INPUT get_attr float learning_rate decay_steps end_learning_rate _get_polynomial_decay get_attr get_attr parameters Module isinstance model loss_name optimizer losses Runner get_criterion import_module save load load_state_dict join remove len load join format name pretrained_weights load_model_state_dict dirname load_state_dict info format format join format now exists load in_checkpoint out_checkpoint inference_checkpoint_from_training_checkpoint save items list is_leaf _addindent __repr__ sum __name__ items list get_named_models print get_model_parameter_str append basicConfig get_logfile_path FileHandler clamp clamp shape view mean shape std view complex_abs view min shape max int max view scatter_ format std debug min mean info median float max seed manual_seed initial_seed set_random_seeds isinstance list isinstance len range split isinstance isinstance data requires_grad isinstance type_as volatile join hasattr import_module getattr split
# Code for "Adversarial and Perceptual Refinement Compressed Sensing MRI Reconstruction" This is the code release for the MICCAI 2018 paper Adversarial and Perceptual Refinement Compressed Sensing MRI Reconstruction by Maximilian Seitzer, Guang Yang, Jo Schlemper, Ozan Oktay, Tobias Würfl, Vincent Christlein, Tom Wong, Raad Mohiaddin, David Firmin, Jennifer Keegan, Daniel Rueckert and Andreas Maier. You can find the paper on arXiv: https://arxiv.org/abs/1806.11216. In this work, we propose a way of training CNNs for MRI reconstruction that enhances perceptual quality of reconstructions while retaining higher PSNR than competing methods. *As the dataset used in the paper is proprietary (we can unfortunately not release it), the code can ultimately serve only illustrative purposes.* However, if you implement a loader for your own MRI dataset, you should be able to run the code with it. To this end, `data/reconstruction/scar_segmentation/scar_segmentation.py` may serve as a template for the loader's implementation. In `configs/`, three configuration files specifying the exact training parameters we used in the paper are given: - `1-recnet.json`, for training the baseline reconstruction network using just MSE loss - `2-refinement.json`, for training the refinement network using adversarial and perceptual losses
3,056
mshaikh2/HDL_Forensics
['face verification']
['Hybrid Feature Learning for Handwriting Verification', 'Explanation based Handwriting Verification']
ICFHR_HDL/Siamese_concat_AND.py BMVC_XAI/MultiTask/capsulelayers.py ICFHR_HDL/2-class-checker-old.py ICFHR_HDL/batch_train.py ICFHR_HDL/oneshot.py ICFHR_HDL/CNN_And_classification.py ICFHR_HDL/Siamese_contrastiveLoss_AND.py ICFHR_HDL/CNN_Classification.py ICFHR_HDL/2-class-checker-new.py ICFHR_HDL/Siamese_subtract_AND.py Mask CapsuleLayer Length squash PrimaryCap getImagesandModels getData losses dissimilarityScore similarityScore contrastive_loss deepModel trainSimandDissim getImagesandModels getData losses dissimilarityScore similarityScore contrastive_loss deepModel trainSimandDissim getImages losses dissimilarityScore similarityScore contrastive_loss deepModel trainSimandDissim getData gen_random_train_batch getNextbatch gen_random_val_batch contrastive_loss getData generateDatasetAndSave_Siamese gen_random_train_batch show_model_output getNextbatch gen_random_val_batch contrastive_loss getData generateDatasetAndSave_Siamese get_dw gen_random_train_batch getNextbatch gen_random_val_batch contrastive_loss getData generateDatasetAndSave_Siamese sqrt epsilon sum square Sequential add Dense MaxPooling2D Conv2D Flatten reshape astype deepModel imread compile to_categorical array fit print DataFrame history show subplots print reshape astype imshow input imread array show subplots reshape astype imshow input imread array int list set tqdm append imread print print append int imread reshape astype deepModel compile append int imread reshape astype sample imread range append len reshape astype sample imread range append len append combinations DataFrame to_csv T subplots set_title axis gen_random_val_batch imshow zip predict
mshaikh2/HDL_Forensics
3,057
msmbuilder/vde
['time series', 'protein folding']
['Variational Encoding of Complex Dynamics']
setup.py vde/vde.py vde/utils.py vde/__init__.py read readlist initialize_weights autocorrelation BatchSampler Swish Lambda Decoder Encoder VDE Layer join dirname split mean var arange len data isinstance xavier_uniform GRU all_weights
Variational Dynamical Encoder (VDE) === Often the analysis of time-dependent chemical and biophysical systems produces high-dimensional time-series data for which it can be difficult to interpret which features are most salient in defining the observed dynamics. While recent work from our group and others has demonstrated the utility of time-lagged co-variate models to study such systems, linearity assumptions can limit the compression of inherently nonlinear dynamics into just a few characteristic components. Recent work in the field of deep learning has led to the development of variational autoencoders (VAE), which are able to compress complex datasets into simpler manifolds. We present the use of a time-lagged VAE, or variational dynamics encoder (VDE), to reduce complex, nonlinear processes to a single embedding with high fidelity to the underlying dynamics. We demonstrate how the VDE is able to capture nontrivial dynamics in a variety of examples, including Brownian dynamics and atomistic protein folding. Additionally, we demonstrate a method for analyzing the VDE model, inspired by saliency mapping, to determine what features are selected by the VDE model to describe dynamics. The VDE presents an important step in applying techniques from deep learning to more accurately model and interpret complex biophysics. Requirements --- + ``numpy`` + ``pytorch`` + ``msmbuilder`` Usage ---
3,058
msultan/vde_metadynamics
['time series', 'protein folding']
['Variational Encoding of Complex Dynamics']
vde_metadynamics/render_meta.py vde_metadynamics/render_network.py vde_metadynamics/render_tics.py vde_metadynamics/render_df.py setup.py read create_min_dist_label create_angle_label create_rmsd_label get_feature_function render_atomic_feats get_feature_transform create_distance_label create_feature render_df create_torsion_label render_metad_code render_metad_bias_print render_network create_neural_bias render_sigmoid_layer create_swish render_fc_layer render_swish_layer render_print_val create_sigmoid render_tic_wall render_tic update locals get copy update locals copy update join locals iterrows map copy array func append get_feature_function join list iterrows hasattr render_atomic_feats get_feature_transform map center_ create_feature append range len join Template render startswith append append render join join create_neural_bias arange tolist map render out_features append append arange create_sigmoid append create_swish arange print render_sigmoid_layer render_swish_layer render_fc_layer startswith DoubleTensor cpu double append enumerate join map render kinetic_mapping append append render enumerate
# Transferable Neural Networks + Molecular dynamics ![Folding Movie](https://github.com/msultan/vde_metadynamics/blob/master/examples/ww_domain/gtt75.gif) This repo contains information on how to run enhanced sampling simulations for mutant proteins using time-lagged variational autoencoders (Variational dynamics encoders). The idea is to run enhanced sampling simulations(such as metadynamics) using the latent node in a [VDE/time-lagged auto enoders](https://arxiv.org/abs/1711.08576). For larger systems, we recommend pre-processing using [tICA](http://docs.markovmodel.org/lecture_tica.html) ,to make network training easier, and to create efficient collective variables. The repo is divided into 2 sections : 1). vde_metadynamics : This folder contains code that can write all the custom [Plumed](plumed.github.io) scrips for
3,059
mtngld/lsim
['depth estimation', 'monocular depth estimation']
['Learn Stereo, Infer Mono: Siamese Networks for Self-Supervised, Monocular, Depth Estimation']
lsim_model.py lsim.py train_input_fn test_input_fn augment_image_pair monodepth_model_fn _augment _parse_function main read_image LsimModel resize_images AREA float32 convert_image_dtype read_file decode_jpeg adjust_saturation adjust_hue clip_by_value adjust_brightness adjust_contrast ones stack clip_by_value random_uniform cond read_image random_uniform decode_csv get_next repeat make_one_shot_iterator get_next make_one_shot_iterator batch get_global_step minimize LsimModel AdamOptimizer monodepth_parameters piecewise_constant scalar int join format get_checkpoint_state print Estimator open train sum range makedirs
# Learn Stereo, Infer Mono: Siamese Networks for Self-Supervised, Monocular, Depth Estimation `lsim_model.py` is based on Monodepth, with modifications to allows siamese and mirroring: ``` @inproceedings{monodepth17, title = {Unsupervised Monocular Depth Estimation with Left-Right Consistency}, author = {Cl{\'{e}}ment Godard and Oisin {Mac Aodha} and Gabriel J. Brostow}, booktitle = {CVPR}, year = {2017}
3,060
mtoshevska/Comparing-Embeddings
['word embeddings']
['Comparative Analysis of Word Embeddings for Capturing Word Similarities']
word_embeddings.py visualize.py similarity.py correlation.py stats.py preprocess.py lemmatization.py main.py calculate_correlation_pos calculate_correlation lemmatize pos_tagging wordnet_pos_code extract_lemmas read_dataset extract_wordsim_vocabulary read_simlex tokenize_sentence extract_rw_vocabulary extract_verb_vocabulary extract_tokens read_embeddings read_multinli_corpus extract_vocabulary read_wordsim read_simverb read_rw read_verb extract_rg_vocabulary extract_simverb_vocabulary read_rg extract_simlex_vocabulary calculate_cosine_similarity construct_correlation_table print_average_word_similarities average_word_similarity average_word_similarity_pos plot_avg_similarities plot_similarity combine_images_correlation plot_correlation combine_images_similarity load_conceptnet_embeddings load_word2vec_embeddings load_glove_embeddings kendalltau get_values DataFrame delete to_csv isnan spearmanr read_csv pearsonr range len kendalltau get_values DataFrame delete to_csv isnan spearmanr read_csv pearsonr range len startswith pos_tag list pos_tagging WordNetLemmatizer wordnet_pos_code zip append get_values lower word_tokenize list tokenize_sentence tqdm zip append range exists len list lemmatize tqdm zip append range exists len list extend tqdm set zip range exists len list get_values extend set read_wordsim exists list get_values read_simlex extend set exists list get_values read_simverb extend set exists list get_values extend set read_rg exists list get_values read_rw extend set exists list get_values extend read_verb set exists read_embeddings list iterrows read_dataset to_csv append round get_values print delete isnan read_csv range len get_values print delete isnan read_csv range len average_word_similarity average_word_similarity_pos get_values to_csv extend DataFrame len show gcf set_size_inches suptitle jointplot subplots_adjust set savefig read_csv show list get_values read_dataset set lineplot read_csv DataFrame range len fromarray extend vstack save append zeros get_values subplots axhline barplot DataFrame show ylim title savefig append get_height gcf set_xticklabels get_xticklabels set despine zip set_size_inches get_x text patches subplots_adjust nanmean get_width split fromarray hstack save dict exists dict load_word2vec_format exists dict exists
# Comparative Analysis of Word Embeddings for Capturing Word Similarities Source code for the paper: [Comparative Analysis of Word Embeddings for Capturing Word Similarities](https://aircconline.com/csit/papers/vol10/csit100402.pdf). Extended version: [The Ability of Word Embeddings to Capture Word Similarities](https://aircconline.com/ijnlc/V9N3/9320ijnlc02.pdf). ## Abstract Distributed language representation has become the most widely used technique for language representation in various natural language processing tasks. Most of the natural language processing models that are based on deep learning techniques use already pre-trained distributed word representations, commonly called word embeddings. Determining the most qualitative word embeddings is of crucial importance for such models. However, selecting the appropriate word embeddings is a perplexing task since the projected embedding space is not intuitive to humans. In this paper, we explore different approaches for creating distributed word representations. We perform an intrinsic evaluation of several state-of-the-art word embedding methods. Their performance on capturing word similarities is analysed with existing benchmark datasets for word pairs similarities. The research in this paper conducts a correlation analysis between ground truth word similarities and similarities obtained by different word embedding methods.
3,061
mtrusca/HAABSA_PLUS_PLUS
['sentiment analysis', 'word embeddings', 'aspect based sentiment analysis']
['A Hybrid Approach for Aspect-Based Sentiment Analysis Using Deep Contextual Word Embeddings and Hierarchical Attention']
getBERTusingColab.py main_hyper.py prepareBERT.py lcrModelAlt_hierarchical_v3.py prepareELMo.py att_layer.py main_cross.py utils.py lcrModelAlt_hierarchical_v1.py lcrModelAlt_hierarchical_v2.py config.py dataReader2016.py main.py OntologyReasoner.py loadData.py lcrModelAlt_hierarchical_v4.py nn_layer.py softmax_with_len Mlp_attention_layer mlp_attention_layer mlp_layer bilinear_attention_layer dot_produce_attention_layer cam_mlp_attention_layer triple_attention_layer mlp_layer2 triple_attention_layer2 train_func summary_func loss_func print_config saver_func acc_func _get_data_tuple read_data_2016 window main lcr_rot main lcr_rot main lcr_rot main lcr_rot main lcr_inv_objective print_json load_best_hyperspace cabasc_objective save_json_result run_a_trial load_json_result plot_best_model lcr_alt_objective lcr_objective svm_objective dynamic_rnn softmax_layer stack_bi_dynamic_rnn bi_dynamic_rnn_diff reduce_mean_with_len cnn_layer bi_dynamic_rnn OntReasoner load_inputs_twitter load_aspect2id batch_index load_sentence load_w2v change_y_to_onehot load_inputs_document load_inputs_document_nohn load_inputs_twitter_ extract_aspect_to_id load_inputs_cabasc load_inputs_twitter_at load_word_embedding load_word_id_mapping load_inputs_full load_inputs_sentence exp sequence_mask reshape float32 reduce_sum shape cast as_list reshape matmul expand_dims get_variable as_list softmax_with_len reshape matmul get_variable softmax_with_len tanh reshape matmul get_variable sigmoid reshape matmul get_variable tanh softmax_with_len reshape transpose matmul get_variable softmax_with_len tanh reshape matmul get_variable reshape matmul tanh get_variable tanh reshape matmul softmax get_variable reshape matmul tanh get_variable items sorted format argv print FLAGS sum get_collection REGULARIZATION_LOSSES float32 reduce_sum reduce_mean cast int32 argmax equal graph FileWriter scalar merge Saver makedirs append next range iter list window print len min lower append range enumerate _get_data_tuple most_common open str word_tokenize getroot iter append get parse replace close lower print text write extend sub findall len str dropout print softmax_layer max_sentence_len squeeze concat matmul LSTMCell bilinear_attention_layer n_class dot_produce_attention_layer reduce_mean_with_len expand_dims bi_dynamic_rnn n_hidden range random_base print_config ConfigProto test_svm_path train_path format remaining_test_path print loadDataAndEmbeddings OntReasoner reset_default_graph remaining_svm_test_path test_path test_path_ont run str print save_json_result hyper_train_path reset_default_graph main hyper_eval_path str print save_json_result hyper_train_path reset_default_graph main hyper_eval_path str print save_json_result hyper_train_path reset_default_graph main hyper_eval_path str print save_json_result hyper_train_path reset_default_graph main hyper_eval_path str print save_json_result hyper_svm_eval_path reset_default_graph hyper_svm_train_path main load dump format print trials fmin open len print dumps format makedirs join print load_best_hyperspace print_json conv2d relu get_variable sequence_mask reshape cell float32 shape reverse cast tile reduce_mean_with_len gather range reshape concat int64 cast reverse_sequence bidirectional_dynamic_rnn reduce_mean_with_len gather range concat cells_fw reshape concat stack_bidirectional_dynamic_rnn int64 cast reverse_sequence reduce_mean_with_len gather range cells_bw split reshape cast float32 reduce_sum get_variable shuffle int list range int print dict split open readline format asarray print dict shape open row_stack append split list load_w2v print row_stack load_word_id_mapping keys len list print len dict uniform open append sum split list print Counter set dict zip append range len print change_y_to_onehot readlines min len reverse append load_word_id_mapping range split print change_y_to_onehot readlines min len extend reverse append load_word_id_mapping range split join list str readlines len write add set zip open range split get load_aspect2id join asarray print change_y_to_onehot readlines len append load_word_id_mapping range split format print change_y_to_onehot open split append load_word_id_mapping len join format print change_y_to_onehot open append zeros load_word_id_mapping split format print change_y_to_onehot split append load_word_id_mapping open list asarray get_q_id change_y_to_onehot len open append range split format print change_y_to_onehot readlines min len extend reverse append load_word_id_mapping range split print change_y_to_onehot readlines min len extend reverse append load_word_id_mapping range split
# HAABSA++ The code for A Hybrid Approach for Aspect-Based Sentiment Analysis Using Contextual Word Emmbeddings and Hierarchical Attention The hybrid approach for aspect-based sentiment analysis (HAABSA) is a two-step method that classifies target sentiments using a domain sentiment ontology and a Multi-Hop LCR-Rot model as backup. - HAABSA paper: https://personal.eur.nl/frasincar/papers/ESWC2019/eswc2019.pdf Keeping the ontology, we optimise the embedding layer of the backup neural network with context-dependent word embeddings and integrate hierarchical attention in the model's architecture (HAABSA++). ## Software The HAABSA source code: https://github.com/ofwallaart/HAABSA needs to be installed. Then the following changes need to be done: - Update files: config.py, att_layer.py, main.py, main_cross.py and main_hyper.py.
3,062
muellerdo/covid19.MIScnn
['data augmentation', 'semantic segmentation']
['Automated Chest CT Image Segmentation of COVID-19 Lung Infection based on 3D U-Net']
scripts/stepwise_performance/run_miscnn.noDA_noPreProc.py scripts/stepwise_performance/run_miscnn.noPreProc.py scripts/run_evaluation.py scripts/stepwise_performance/run_miscnn.noDA.py scripts/test/data_exploration.py scripts/data_exploration.py scripts/cv_analysis/miscnn_k2.py scripts/cv_analysis/miscnn_k3.py scripts/utils/identify_resamplingShape.py scripts/run_miscnn.py scripts/cv_analysis/evaluate.py scripts/run_preprocessing.py scripts/stepwise_performance/stepwise_fitting_evaluation.py scripts/test/evaluate.py scripts/test/predict.py scripts/cv_analysis/pp.py scripts/cv_analysis/miscnn_k4.py scripts/download_data.py download_from_url calc_Precision calc_Sensitivity calc_Accuracy visualize_evaluation overlay_segmentation calc_Specificity plot_fitting calc_IoU calc_DSC calc_Precision calc_Sensitivity calc_Accuracy visualize_evaluation overlay_segmentation calc_Specificity plot_fitting calc_IoU calc_DSC calc_Precision calc_Sensitivity calc_Accuracy calc_Specificity calc_IoU calc_DSC get int print close tqdm getsize exists join subplots set_title squeeze close zfill shape imshow mkdir save overlay_segmentation zeros FuncAnimation uint8 min astype greater where shape stack zeros max clip append sum equal range append sum equal range append sum equal range equal logical_not append sum range size logical_not range append sum equal append sum equal range ylab scale_colour_discrete xlab theme_bw melt ggplot ggtitle scale_y_continuous save geom_smooth aes
# Robust Chest CT Image Segmentation of COVID-19 Lung Infection based on limited data [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3902293.svg)](https://doi.org/10.5281/zenodo.3902293) In this paper, we proposed and evaluated an approach for automated segmentation of COVID-19 infected regions in CT volumes. Our method focused on on-the-fly generation of unique and random image patches for training by exploiting heavy preprocessing and extensive data augmentation. Thus, it is possible to handle limited dataset sizes which act as variant database. Instead of new and complex neural network architectures, we utilized the standard 3D U-Net. We proved that our medical image segmentation pipeline is able to successfully train accurate as well as robust models without overfitting on limited data. Furthermore, we were able to outperform current state-of-the-art semantic segmentation approaches for lungs and COVID-19 infection. Our work has great potential to be applied as a clinical decision support system for COVID-19 quantitative assessment and disease monitoring in the clinical environment. Nevertheless, further research is needed on COVID-19 semantic segmentation in clinical studies for evaluating clinical performance and robustness. The models, predictions, visualizations and evaluation (scores, figures) are available under the following link: https://doi.org/10.5281/zenodo.3902293 **This work does NOT claim clinical performance in any means and underlie purely educational purposes.** ![segmentation](docs/pdVSgt.png) ## Reproducibility **Requirements:** - Ubuntu 18.04
3,063
muhanzhang/SEAL
['link prediction']
['Link Prediction Based on Graph Neural Networks']
Python/Main.py MATLAB/software/liblinear-2.1/python/liblinearutil.py MATLAB/software/libsvm-3.22/tools/subset.py MATLAB/software/gae/gae/initializations.py MATLAB/software/gae/setup.py MATLAB/software/libsvm-3.22/python/svm.py Python/software/node2vec/src/main.py MATLAB/software/gae/gae/layers.py MATLAB/software/node2vec/src/main.py MATLAB/software/libsvm-3.22/tools/easy.py MATLAB/utils/processFM.py Python/software/node2vec/src/node2vec.py Python/data/raw_data/process_arxiv.py MATLAB/software/node2vec/src/node2vec.py MATLAB/software/gae/gae/optimizer.py MATLAB/software/libsvm-3.22/python/svmutil.py MATLAB/software/libsvm-3.22/tools/grid.py MATLAB/software/gae/gae/input_data.py Python/util_functions.py MATLAB/software/libsvm-3.22/tools/checkdata.py MATLAB/data/raw_data/process_arxiv.py MATLAB/software/gae/gae/model.py MATLAB/software/gae/gae/preprocessing.py MATLAB/software/gae/gae/train.py MATLAB/software/liblinear-2.1/python/liblinear.py weight_variable_glorot parse_index_file load_data dropout_sparse get_layer_uid GraphConvolution InnerProductDecoder GraphConvolutionSparse Layer Model GCNModelVAE GCNModelAE OptimizerAE OptimizerVAE mask_test_edges sparse_to_tuple preprocess_graph construct_feed_dict get_roc_score fillprototype parameter model print_null problem gen_feature_nodearray genFields toPyModel feature_node save_model load_model svm_read_problem train evaluations predict fillprototype print_null svm_parameter svm_problem svm_node svm_model gen_svm_nodearray genFields toPyModel svm_train svm_load_model svm_read_problem svm_save_model svm_predict evaluations main my_float err find_parameters LocalWorker redraw calculate_jobs TelnetWorker exit_with_help GridOption SSHWorker WorkerStopToken Worker process_options random_selection exit_with_help stratified_selection main main parse_args learn_embeddings read_graph Graph alias_draw alias_setup subgraph_extraction_labeling neighbors generate_node2vec_embeddings links2subgraphs sample_neg parallel_worker node_label CN CalcAUC AA main parse_args learn_embeddings read_graph Graph alias_draw alias_setup sqrt random_uniform append int strip open load list format lil_matrix from_dict_of_lists tolil tuple sort len min adjacency_matrix parse_index_file append max range open sparse_retain floor cast data shape transpose tocoo tocoo flatten coo_matrix array eye sum diags dict update int list ismember T eliminate_zeros ones sparse_to_tuple hstack csr_matrix shuffle delete dia_matrix floor append randint triu array range update T hstack z_mean average_precision_score dot sigmoid append roc_auc_score run genFields list sorted isinstance keys range enumerate len genFields genFields genFields contents open float split encode toPyModel print encode len zip c_double toPyModel print_func C flag_cross_validation set_print_string_function check_parameter set_bias parameter nr_fold isinstance flag_find_C print bias problem flag_C_specified cross_validation evaluations find_parameter_C evaluations int is_regression_model solver_type len get_nr_class bias predict_values is_probability_model gen_feature_nodearray predict_probability info get_nr_feature feature_node split genFields list sorted isinstance keys range enumerate len genFields genFields genFields encode toPyModel print encode svm_set_print_string_function svm_cross_validation isinstance print svm_parameter svm_problem print_func svm_check_parameter cross_validation x_space toPyModel evaluations n int get_svr_probability get_svm_type len svm_predict_probability get_nr_class is_probability_model svm_predict_values info gen_svm_nodearray evaluations split print format pop int format err print len exit open my_float range split all sort write encode round max flush g_end findall resume_pathname g_step len g_begin strip permute_sequence open c_step append c_begin float range_f range c_end stdin resume_pathname put getpass open calculate_jobs map append range appendleft get format gnuplot_pathname out_pathname redraw close start GridOption Queue update_param join print getuser TelnetWorker LocalWorker SSHWorker len print exit format stdout int format print exit_with_help open len sum int sorted defaultdict min write exit ceil float max enumerate len readline process_options random_selection write close stratified_selection set_defaults add_argument ArgumentParser to_undirected weighted edges input read_edgelist save_word2vec_format output Word2Vec read_graph p Graph num_walks learn_embeddings simulate_walks walk_length preprocess_transition_probs directed q pop len append zeros enumerate int rand floor len int list print len ceil sample triu range append find format print copy sample_neg helper CN AA remove list neighbors from_scipy_sparse_matrix set node_label remove_edge sample union range has_edge union find set shortest_path divmod astype concatenate str Graph from_scipy_sparse_matrix copy wv preprocess_transition_probs Word2Vec simulate_walks append zeros word_vec range len dot sum log dot concatenate squeeze hstack roc_curve auc
SEAL -- learning from Subgraphs, Embeddings, and Attributes for Link prediction =============================================================================== About ----- Code for SEAL (learning from Subgraphs, Embeddings, and Attributes for Link prediction). SEAL is a novel framework for link prediction which systematically transforms link prediction to a subgraph classification problem. For each target link, SEAL extracts its *h*-hop enclosing subgraph *A* and builds its node information matrix *X* (containing structural node labels, latent embeddings, and explicit attributes of nodes). Then, SEAL feeds (*A, X*) into a graph neural network (GNN) to classify the link existence, so that it can learn from both graph structure features (from *A*) and latent/explicit features (from *X*) simultaneously for link prediction. For more information, please check our paper: > M. Zhang and Y. Chen, Link Prediction Based on Graph Neural Networks, Advances in Neural Information Processing Systems (NIPS-18). [\[PDF\]](https://arxiv.org/pdf/1802.09691.pdf) Version ------- SEAL is implemented in both MATLAB and Python. The MATLAB version was used to generate the experimental results in the paper, which also contains the evaluation code of other baseline methods. The Python software has better flexibility and scalability.
3,064
muhdhuz/Audio_NeuralStyle
['style transfer']
['A Neural Algorithm of Artistic Style']
audiocnn.py CNN
An implementation of Neural Style Transfer for Audio using Pytorch. ============================ This is an implementation of neural style transfer using the alogrithm developed in [A Neural Algorithm of Artistic Style](https://arxiv.org/abs/1508.06576) by Leon A. Gatys, Alexander S. Ecker and Matthias Bethge. However instead of learning style from images we use the spectrogram in place to carry out the procedure on audio. General implementation is based off the [Pytorch tutorial on Neural Transfer](http://pytorch.org/tutorials/advanced/neural_style_tutorial.html) by Alexis Jacq. Also inspired by [Audio texture synthesis](https://github.com/DmitryUlyanov/neural-style-audio-torch) by Dmitry Ulyanov. **To use**: 1. Open neural_style_audio_pretrained.ipynb jupyter notebook. If require constant-Q scaling, use neural_style_audio_cqt.ipynb instead 2. Some important parameters you may want to change: * filename parameters
3,065
mukulanandchas/ART-GENERATION-USING-NEURAL-STYLE-TRANSFER
['style transfer']
['A Neural Algorithm of Artistic Style']
train.py helpers/gram_matrix.py helpers/image.py main.py model.py StyleTransfer train gram_matrix load_image save_image vgg19 zero_grad iterations weight_decay clamp_ StyleTransfer ReLU save_image save_dir str loss view content_image uniform style_image num_models load_image range detach lr output_image image_size content_loss_weight backward print style_loss_weight gram_matrix step layer t div mm view Compose view open data str join view ToPILImage save transform
# Neural Style Transfer This repository serves as a toned down PyTorch implementation of 'A Neural Algorithm of Artistic Style' by L. Gatys, A. Ecker, and M. Bethge. http://arxiv.org/abs/1508.06576. Neural Style Transfer allows us to combine the style of an image with the content of a natural image by manipulating the feature representations learned by a Convolutional Neural Network. For example, it can enable us to transfer the style from Vincent van Gogh's The Starry Night to an image of Neckarfront in Tübingen. ![alt text](images/content/neckarfront.jpg) ![alt text](images/style/starry_night.jpg) ![alt text](images/output/starry_night_balanced.jpg) ## Content-Style Ratio We can experiment with the different ratios of content and style in the output image using the content and style loss weights. A higher style loss weight would make the output image resemble more closely to the style image rather than the content image. Here are some examples of two different ratios of content and style losses applied to Neckarfront and four different style images. ![alt text](images/style/starry_night.jpg) ![alt text](images/output/starry_night_balanced.jpg)
3,066
mulangonando/Impact-of-KG-Context-on-ED
['entity disambiguation']
['Evaluating the Impact of Knowledge Graph Context on Entity Disambiguation Models']
Wikidata/Roberta/wikidata_query/wikidata_items.py Wikidata/Without_Context/wikidata_query/utils_transformer.py Wikidata/Without_Context/wikidata_query/train.py Wikidata/Without_Context/wikidata_query/graphs.py Wikidata/XLNet/wikidata_query/test.py Wikidata/Roberta/wikidata_query/test.py Wikidata/Without_Context/wikidata_query/wikidata_items.py Wikidata/Roberta/wikidata_query/graphs.py Wikidata/Roberta/wikidata_query/train.py Wikidata/Without_Context/wikidata_query/sentence_processor.py Wikidata/Roberta/wikidata_query/read_data.py Wikidata/XLNet/wikidata_query/train.py Wikidata/Roberta/wikidata_query/sentence_processor.py Wikidata/XLNet/wikidata_query/roberta_classification.py Wikidata/XLNet/wikidata_query/utils.py Wikidata/Without_Context/wikidata_query/read_data.py Wikidata/Without_Context/wikidata_query/utils.py Wikidata/XLNet/wikidata_query/roberta_evaluate.py Wikidata/XLNet/wikidata_query/read_data.py Wikidata/Roberta/wikidata_query/utils_transformer.py Wikidata/XLNet/wikidata_query/wikidata_items.py Wikidata/Without_Context/wikidata_query/roberta_evaluate.py Wikidata/Without_Context/wikidata_query/roberta_classification.py Wikidata/Roberta/wikidata_query/roberta_evaluate.py Wikidata/Roberta/wikidata_query/roberta_classification.py Wikidata/Roberta/wikidata_query/data/check_data.py Wikidata/XLNet/wikidata_query/sentence_processor.py Wikidata/XLNet/wikidata_query/graphs.py Wikidata/XLNet/wikidata_query/utils_transformer.py DCA/main.py Wikidata/Roberta/wikidata_query/utils.py Wikidata/Without_Context/wikidata_query/test.py get_triplets_for_word_1_hop get_triplets_for_word_2_hops get_graph_from_wikidata_id get_wikidata_id_of_item_different_from_given_one_with_boundaries get_json_data infer_vector_from_vector_nodes get_wikidata_id_from_wikipedia_id convert_text_into_vector_sequence create_text_item_graph_dict get_item_mask_for_words get_json_data_many_wrong_ids get_wikidata_id_of_item_different_from_given_one train load_and_cache_examples get_mismatched compute_metrics get_eval_report evaluate get_adjacency_matrices_and_vectors_given_triplets create_vectors_from_triplets get_prediction_from_models find_position_of_best_match erase_edges_with_mask get_vector_list_from_sentence get_answers_and_questions_from_json find_position_of_best_match get_vector_list_from_sentence get_answers_and_questions_from_json get_edge_name_with_signature infer_vector_from_word low_case get_vectors_from_nodes_in_graph add_triplets_to_graph_bw get_chunks capitalize infer_vector_from_doc get_node_name_with_signature plot_graph get_types_from_nodes_in_graph get_words bin_data_into_buckets InputFeatures InputExample BinaryProcessor _truncate_seq_pair convert_example_to_feature convert_examples_to_features DataProcessor WikidataItems get_triplets_for_word_1_hop get_triplets_for_word_2_hops get_graph_from_wikidata_id get_wikidata_id_of_item_different_from_given_one_with_boundaries get_json_data infer_vector_from_vector_nodes get_wikidata_id_from_wikipedia_id convert_text_into_vector_sequence create_text_item_graph_dict get_item_mask_for_words get_json_data_many_wrong_ids get_wikidata_id_of_item_different_from_given_one train load_and_cache_examples get_mismatched compute_metrics get_eval_report evaluate get_adjacency_matrices_and_vectors_given_triplets create_vectors_from_triplets get_prediction_from_models find_position_of_best_match erase_edges_with_mask get_vector_list_from_sentence get_answers_and_questions_from_json find_position_of_best_match get_vector_list_from_sentence get_answers_and_questions_from_json get_edge_name_with_signature infer_vector_from_word low_case get_vectors_from_nodes_in_graph add_triplets_to_graph_bw get_chunks capitalize infer_vector_from_doc get_node_name_with_signature plot_graph get_types_from_nodes_in_graph get_words bin_data_into_buckets InputFeatures InputExample BinaryProcessor _truncate_seq_pair convert_example_to_feature convert_examples_to_features DataProcessor WikidataItems get_triplets_for_word_1_hop get_triplets_for_word_2_hops get_graph_from_wikidata_id get_wikidata_id_of_item_different_from_given_one_with_boundaries get_json_data infer_vector_from_vector_nodes get_wikidata_id_from_wikipedia_id convert_text_into_vector_sequence create_text_item_graph_dict get_item_mask_for_words get_json_data_many_wrong_ids get_wikidata_id_of_item_different_from_given_one train load_and_cache_examples get_mismatched compute_metrics get_eval_report evaluate get_adjacency_matrices_and_vectors_given_triplets create_vectors_from_triplets get_prediction_from_models find_position_of_best_match erase_edges_with_mask get_vector_list_from_sentence get_answers_and_questions_from_json find_position_of_best_match get_vector_list_from_sentence get_answers_and_questions_from_json get_edge_name_with_signature infer_vector_from_word low_case get_vectors_from_nodes_in_graph add_triplets_to_graph_bw get_chunks capitalize infer_vector_from_doc get_node_name_with_signature plot_graph get_types_from_nodes_in_graph get_words bin_data_into_buckets InputFeatures InputExample BinaryProcessor _truncate_seq_pair convert_example_to_feature convert_examples_to_features DataProcessor WikidataItems translate_from_url append json translate_from_url append json str get join json print set translate_from_url add sleep flush append infer_vector_from_word get_words append lower get_words zeros get_graph_from_wikidata_id append create_text_item_graph_dict DataFrame list reverse_lookup set list reverse_lookup set load join get_labels TensorDataset convert_examples_to_features save info tensor model tuple clip_grad_norm_ zero_grad DataLoader initialize list ceil master_params SummaryWriter format save_pretrained info trange enumerate int items join evaluate backward AdamW print add_scalar makedirs RandomSampler parameters tqdm_notebook WarmupLinearSchedule empty_cache step len get_dev_examples str matthews_corrcoef print info ravel flush argmax update join format print tuple squeeze DataLoader eval compute_metrics tqdm_notebook info append SequentialSampler numpy len create_vectors_from_triplets append read loads norm enumerate append infer_vector_from_word get_words enumerate list len append range predict enumerate to_unicode tokenize TweetTokenizer zeros zeros norm get_words replace infer_vector_from_doc nodes append append zeros nodes split lower lower add_edge get_node_name_with_signature get_edge_name_with_signature add_node draw_networkx_edge_labels show shell_layout draw_networkx list get_chunks append keys len text_b convert_tokens_to_ids text_c _truncate_seq_pair tokenize label float text_a len print pop len join getLogger print flush
# Impact-of-KG-Context-on-ED This repo contains the code and instructions for our paper : "Evaluating the Impact of Knowledge Graph Context on Entity Disambiguation Models", CIKM, 2020 Find the link to the paper here : https://arxiv.org/pdf/2008.05190.pdf ## Wikipedia Experiments (CONLL-AIDA Dataset) 1. Obtain the DCA (Dynamic Context Augmentation) model code from this repo : https://github.com/YoungXiyuan/DCA 2. Follow the instructions for running the repos from their github 3. Replace their entity context file with our KG Entity context file under the following folder in this repo: DCA/ALL_TRIPLES_ent2desc.json 4. Train till convergence : We got our results at epoch 295
3,067
mulkkyul/lstm-initStates
['time series']
['Modeling Financial Time Series using LSTM with Trainable Initial Hidden States']
lstm-initStates.py myDataloader.py Sequence pad_collate myDataset pad_sequence list zip
# Modeling Financial Time Series using LSTM with Trainable Initial Hidden States ![Architecture](figure/initStates.png) This is the PyTorch implementation of **"Modeling Financial Time Series using LSTM with Trainable Initial Hidden States"** [[arXiv]](https://arxiv.org/abs/2007.06848).
3,068
multimedia-berkeley/deep_thoughts
['experimental design']
['A Capacity Scaling Law for Artificial Neural Networks']
evaluate_gaussian.py evaluate_keras.py evaluate_gaussian_max_VC.py evaluate_gaussian_max_MK_L2h.py evaluate_MK.py evaluate_gaussian_Tnk_openann.py tnk.py evaluate_gaussian_max_VC_shift.py evaluate_gaussian_Tnk.py evaluate_gaussian_max_MK.py evaluate.py evaluate_gaussian_max_VC_L2.py R
# deep_thoughts
3,069
multitel-ai/urban-sound-tagging
['audio classification', 'environmental sound classification', 'audio tagging']
['CRNNs for Urban Sound Tagging with spatiotemporal context']
relabel.py data_prep.py utils/metrics.py training_system1.py sub_system3.py models/DCASE_baseline.py prepare_data/sonycust.py models/Time2vec.py training_system3.py training_system2.py activation/mish.py models/TALNet.py utils/metrics_dcase.py losses/DCASEmaskedLoss.py sub_system1.py torchlibrosa/stft.py torchlibrosa/augmentation.py optimizer/ralamb.py sub_system2.py config.py optimizer/lookahead.py count_parameters count_parameters count_parameters main DCASETALNetClassifier mixup_data main DCASETALNetClassifier main DCASETALNetClassifier Mish mish Masked_loss DCASE_Baseline TimeDistributed AutoPool Pooling_Head Normed_Linear AvgMaxPool2d TALNet TALNetV2_meta TALNetV3 ScaledDotProductAttention TALNetV2 MultiHead ConvBlockTALNet ConvBlock Time2Vec LookaheadAdam Lookahead Ralamb cleaning_annotation_baseline one_hot SONYCUST clean_annotation_and_use_relabel remove_duplicates SONYCUST_TALNet DropStripes SpecAugmentation Scalar STFT debug DFTBase ISTFT Spectrogram DFT magphase LogmelFilterBank Enframe binary_confusion_matrix auprc compute_macro_auprc compute_micro_auprc compute_micro_F1 macro_averaged_auprc evaluate confusion_matrix_fine micro_averaged_auprc parse_coarse_prediction parse_fine_prediction parse_ground_truth confusion_matrix_coarse randperm beta seed join EarlyStopping DCASETALNetClassifier path_to_summaries seed_everything ModelCheckpoint from_argparse_args fit Adam astype copy reset_index astype copy reset_index update list reset_index set_index astype copy dict rename zip agg clamp inf rfft zeros_like irdft idft LogmelFilterBank DFT device abs pt_frame_extractor forward seed power_to_db fft ifft complex64 matmul uniform pad ISTFT rdft real to mean Spectrogram Enframe int T STFT print stft frame dft dot magphase melW Tensor numpy imag istft precision_recall_curve concatenate ravel nanmean shape array flatten auprc flatten f1_score logical_and reduce logical_not logical_or tile sum confusion_matrix str confusion_matrix_fine DataFrame sort tolist astype maximum copy set parse_coarse_prediction parse_fine_prediction parse_ground_truth append ravel confusion_matrix_coarse enumerate values len list hstack astype maximum argsort array unique auc DataFrame keys enumerate len list argsort mean array append keys auc zeros read_csv warn from_dict join sorted str from_dict astype warn zeros keys read_csv len join str astype rename read_csv len
# UrbanNet [DCASE2020 Task 5](http://dcase.community/challenge2020/task-urban-sound-tagging-with-spatiotemporal-context) This git contains code for CRNNs we used to achieve first rank in Task 5 of the DCASE 2020 challenge. This task focuses on hierarchical multilabel urban sound tagging with spatiotemporal context. The technical report can be found [here](https://arxiv.org/pdf/2008.10413.pdf). ## Environement setup Python version recquired : 3.6 (Higher might work). We recommand first to create a new environment in conda/virtualenv then to activate it. Pip install ~~~bash pip install -r requirements.txt ~~~ Conda install
3,070
murukessanap/saunet
['medical image segmentation', 'semantic segmentation']
['SAUNet: Shape Attentive U-Net for Interpretable Medical Image Segmentation']
radam.py data/u.py models/mynn.py lib/utils/data/distributed.py lib/nn/modules/tests/test_numeric_batchnorm.py lib/nn/modules/tests/test_sync_batchnorm.py models/GSConv.py lib/utils/data/sampler.py loss.py lib/utils/th.py lib/nn/__init__.py train.py lib/utils/data/dataloader.py misc_functions.py models/custom_functions.py lib/utils/data/__init__.py lib/utils/__init__.py test_and_pack.py models/__init__.py lib/nn/modules/batchnorm.py lib/nn/modules/unittest.py utils.py lib/utils/data/dataset.py models/models.py data/augmentations.py lib/nn/parallel/__init__.py lib/nn/modules/replicate.py vanilla_backprop.py guided_backprop.py lib/nn/modules/__init__.py lib/nn/parallel/data_parallel.py models/attention_blocks.py smoothgrad.py AttrDict.py models/adaptive_avgmax_pool.py models/norm.py config.py data/ac17_dataloader.py lib/nn/modules/comm.py data/crop_and_pad_augmentations.py models/resnet.py data/test_loader.py AttrDict assert_and_infer_cfg GuidedBackprop dice_loss ImageBasedCrossEntropyLoss2d CrossEntropyLoss2d LabelSmoothSoftmaxCE DualLoss save_class_activation_images recreate_image save_gradient_images get_positive_negative_saliency convert_to_grayscale get_example_params format_np_output preprocess_image save_image apply_colormap_on_image AdamW RAdam PlainRAdam generate_smooth_grad undo_crop visualize_result evaluate save_as_nifti round_num main resample_to_orig eval adjust_learning_rate checkpoint main train group_weight create_optimizers process_range colorEncode AverageMeter accuracy intersectionAndUnion parse_devices unique NotSupportedCliException find_recursive VanillaBackprop AC17_2DLoad AC17Data augment_gamma PaddingCenterCropTest CenterCrop RandomCrop RandomSized AdjustGamma RandomErasing AdjustHue RandomRotate PaddingCenterCrop RandomVerticallyFlip AdjustBrightness AdjustContrast RandomHorizontallyFlip AdjustSaturation FreeScale Compose RandomTranslate ComposeTest RandomSizedCrop Scale random_crop get_lbs_for_random_crop center_crop get_lbs_for_center_crop pad_nd_image_and_seg crop AC17Test rotate_coords_3d elastic_deform_coordinates_2 pad_nd_image scale_coords center_crop_2D_image mask_random_squares resize_image_by_padding_batched random_crop_2D_image create_random_rotation create_matrix_rotation_z_3d center_crop_2D_image_batched find_entries_in_array illumination_jitter convert_seg_image_to_one_hot_encoding_batched random_crop_3D_image convert_seg_image_to_one_hot_encoding generate_elastic_transform_coordinates resize_image_by_padding transpose_channels rotate_coords_2d uniform mask_random_square create_matrix_rotation_2d generate_noise create_matrix_rotation_x_3d convert_seg_to_bounding_box_coordinates random_crop_3D_image_batched center_crop_3D_image_batched interpolate_img get_range_val general_cc_var_num_channels random_crop_2D_image_batched elastic_deform_coordinates create_matrix_rotation_y_3d uncenter_coords center_crop_3D_image resize_multichannel_image create_zero_centered_coordinate_mesh resize_segmentation _sum_ft SynchronizedBatchNorm2d _unsqueeze_ft _SynchronizedBatchNorm SynchronizedBatchNorm1d SynchronizedBatchNorm3d SyncMaster FutureResult SlavePipe execute_replication_callbacks CallbackContext DataParallelWithCallback patch_replication_callback TorchTestCase as_numpy handy_var NumericTestCase SyncTestCase handy_var _find_bn _async_copy_stream UserScatteredDataParallel dict_gather _async_copy DictGatherDataParallel async_copy_to _get_stream user_scattered_collate mark_volatile as_variable as_numpy DataLoaderIter _set_SIGCHLD_handler default_collate _worker_manager_loop DataLoader _worker_loop ExceptionWrapper pin_memory_batch random_split ConcatDataset Subset TensorDataset Dataset DistributedSampler SubsetRandomSampler WeightedRandomSampler RandomSampler BatchSampler SequentialSampler Sampler AdaptiveAvgMaxPool2d adaptive_avgmax_pool2d pooling_factor conv1x1 SEResNetBottleneck SEBottleneck SpatialAttentionBlock _MRF convbnrelu Bottleneck conv3x3 batchnorm DualAttBlock SEModule conv2d_same numerical_gradients_2d gradient_central_diff calc_pad_same convTri compute_normal compute_normal_2 compute_grad_mag compute_single_sided_diferences t GatedSpatialConv2d HighFrequencyGatedSpatialConv2d Conv2dPad CenterBlock SegmentationModule ConvRelu SAUNet conv1x1_bn_relu SegmentationModuleBase conv3x3 conv3x3_bn_relu ModelBuilder SkipConv DecoderBlock initialize_weights Norm2d initialize_weights Norm2d ResNet resnet50 Bottleneck load_url conv3x3 resnet18 BasicBlock resnet101 batch_weighting syncbn print immutable BatchNorm2d sum tuple sigmoid mean unsqueeze softmax float type range cat ndimension percentile sum min expand_dims abs clip join save_image min makedirs join save_image apply_colormap_on_image makedirs fromarray uint8 color_map new size astype alpha_composite copy convert get_cmap uint8 transpose astype repeat expand_dims fromarray save isinstance format_np_output unsqueeze_ Variable transpose thumbnail float32 float enumerate transpose round range copy max maximum preprocess_image convert alexnet generate_gradients Variable normal_ item zeros range fromarray int uint8 size crop astype round_num max zeros_like shape resize range undo_crop join uint8 imwrite min astype result max join str print Nifti1Image eye to_filename update visualize zeros_like visualize_result synchronize AverageMeter perf_counter tqdm eval save_as_nifti save_test_path cpu cuda range resample_to_orig AC17 SegmentationModule evaluate ComposeTest print set_device DataLoader ModelBuilder cuda build_unet DualLoss gpu update format num_class as_numpy print synchronize AverageMeter intersectionAndUnion average sum cuda enumerate num_class zero_grad num_epoch lr_encoder adjust_learning_rate cuda running_lr_encoder lr_pow append range update format param_groups mean item float enumerate time backward print max_iters AverageMeter average step segmentation_module len format ckpt print save state_dict _ConvNd isinstance bias _BatchNorm modules append weight Linear RAdam Adam group_weight SGD running_lr_encoder param_groups cos lr_encoder num_epoch num_class patch_replication_callback num_epoch UserScatteredDataParallel load2D range Compose start_epoch eval checkpoint create_optimizers named_parameters train append join filter walk concatenate cumsum sort flatten argsort shape nonzero empty zeros astype unique float sum histogram copy list map strip groups match func append split std min mean uniform power float max range append randint range len append range len dtype list get_lbs_for_random_crop tuple shape pad any get_lbs_for_center_crop zeros range len pad_nd_image tuple random append meshgrid range gaussian_filter len tuple astype range len list shape unique zeros enumerate list unique zeros range enumerate random append array range gaussian_filter len random array append abs max range gaussian_filter len create_matrix_rotation_z_3d reshape identity create_matrix_rotation_y_3d shape create_matrix_rotation_x_3d len reshape create_matrix_rotation_2d shape deepcopy range dtype astype map_coordinates unique zeros enumerate random gaussian_filter arange array zeros max len shape array len shape array len shape array len shape array len shape randint len shape randint len shape randint len shape randint len list ones tuple reshape shape array max list ones tuple reshape array max array array array array normal dot shape array range max deepcopy sum grey_dilation tuple min power sqrt any gaussian_gradient_magnitude append zeros abs array range gaussian_filter len pop int max lb astype extend copy argwhere append array range enumerate dtype astype unique resize zeros enumerate dtype list astype resize zeros range isinstance orig_type uniform normalvariate type list shape pad array range len randint get_range_val range copy range mask_random_square list hasattr __data_parallel_replicate__ modules enumerate len replicate data isinstance size sum modules isinstance is_tensor record_stream isinstance Sequence Mapping cuda zip len zip len device_count Stream Mapping Sequence isinstance is_tensor Mapping Sequence is_tensor isinstance Sequence Variable Mapping seed init_fn get set_num_threads _set_worker_signal_handlers collate_fn manual_seed get isinstance set_device put pin_memory_batch sum list isinstance Sequence new Mapping type zip _new_shared is_tensor Mapping is_tensor isinstance Sequence SIGCHLD signal getsignal randperm sum print max_pool2d avg_pool2d cat shape pad conv2d calc_pad_same conv2d_same shape repeat Tensor cuda clone shape gradient_central_diff list reversed shape pad conv2d repeat Tensor cuda range cat remainder print numerical_gradients_2d set_trace pi sign convTri atan remainder print numerical_gradients_2d set_trace pi sign convTri atan mul numerical_gradients_2d convTri sqrt max show normal print imshow float GatedSpatialConv2d gconv MODEL getattr layer fill_ isinstance modules zero_ BatchNorm2d weight kaiming_normal load_url ResNet load_state_dict load_url ResNet load_state_dict load_url ResNet load_state_dict join format urlretrieve write makedirs
murukessanap/saunet
3,071
mushfiqur11/SS-VideoCaptioning
['video captioning']
['Video captioning with stacked attention and semantic hard pull']
models_and_utils/utils.py models_and_utils/models.py M_Novel_Model M_JoinSeq M_Model M_Attention M_Embedding M_Decoder M_Encoder TokenizerWrap
# SS-VideoCaptioning This repository contains the Tensorflow implementation of our model "Semantically Sensible Video Captioning (SSVC)" <br> [[Code](https://github.com/mushfiqur11/SS-VideoCaptioning)] [[Paper](https://arxiv.org/pdf/2009.07335.pdf)] [[ArXiv](https://arxiv.org/abs/2009.07335)] ![Main Model](sample_pictures/model_w.png "SSVC Architecture") ## Authors [Md. Mushfiqur Rahman](https://github.com/mushfiqur11), [Thasin Abedin](), [Khondokar S. S. Prottoy](), [Ayana Moshruba](), [Fazlul Hasan Siddiqui](http://portfolio.duetbd.org/resume/siddiqui/) ## Requirements Install the following dependencies before running the model - Tensorflow 2.0 [install](https://www.tensorflow.org/install) - tqdm `pip install tqdm`
3,072
muzaluisa/Learning_Representations_for_Soft_Skill_Matching
['text classification']
['Learning Representations for Soft Skill Matching']
CVDataClass.py run_concatenated_cnn.py lstm_models.py run_cnn.py JobDataClass.py cnn_models.py run_concatenated_lstm.py utilities.py run_lstm.py pytorchtools.py textCNN textCNNWithEmbedding CVData JobData LSTMWithEmbedding LSTM EarlyStopping get_cv_data get_cv_data get_cv_data get_cv_data find_recall_for_fixed_precision from_numpy DataLoader TensorDataset CVData array get_word_indices_all len print recall_score precision_score append f1_score array range
# Learning Representations for Soft Skill Matching A code and dataset for the paper "Learning Representations for Soft Skill Matching" (the code includes PyTorch implementations of CNN, LSTM models with and without concatenated soft skill vectors). Please find Hierarchical Attention Network implementation here: https://github.com/EdGENetworks/anuvada Paper can be downloaded from Springer https://link.springer.com/chapter/10.1007/978-3-030-11027-7_15 or Arxiv https://arxiv.org/pdf/1807.07741.pdf Due to the fact that the original code was improved further, the results coming from current implementation are different than in the paper. Early stopping was modified and dataset was slightly processed. In case you want to download a large resource of soft skills similar to what used in the paper, please download publicly available list from here: https://datorium.gesis.org/xmlui/handle/10.7802/1707 We have as well new journal paper "Responsible team players wanted: an analysis of soft skill requirements in job advertisements" which provides the details of creating a resource of soft skills as well as contains a deeper analysis of soft skills on earnings: https://epjdatascience.springeropen.com/articles/10.1140/epjds/s13688-019-0190-z
3,073
mvandermerwe/BP-GPU-Message-Scheduling
['protein folding']
['Message Scheduling for Performant, Many-Core Belief Propagation']
benchmarks/generate-chain.py benchmarks/generate-ising.py edge_string edge_string str uniform exp write
# Message Scheduling for Performant, Many-Core Belief Propagation This repository holds source code for the paper ["Message Scheduling for Performant, Many-Core Belief Propagation," IEEE HPEC 2019](https://arxiv.org/abs/1909.11469) We provide our implementations of Randomized Belief Propagation (RnBP), our main contribution from this work, as well as Loopy Belief Propagation (LBP), Residual Belief Propagation (RBP), and Residual Splash (RS) on the GPU, and serial LBP, RBP, and Variable Elimination for comparison. ## Dependencies Our work depends on the following: * gcc/5.4.0 * cuda/9.1 * boost/1.66.0 * [cuRAND](https://developer.nvidia.com/curand) * [CUB](https://nvlabs.github.io/cub/) Other versions of GCC, CUDA, and Boost may work, but not confirmed.
3,074
mveres01/grasping
['object localization']
['Domain Randomization for Transferring Deep Neural Networks from Simulation to the Real World']
collect/split_train_test.py lib/utils.py lib/sample_load.py initialize/prepare_mesh.py initialize/prepare_candidates.py collect/decode_grasp_data.py collect/postprocess_split_data.py initialize/prepare_commands.py lib/python_config.py postprocess decode_raw_data merge_files parse_image decode_grasp parse_grasp estimate_object_pose convert_grasp_frame get_outlier_mask unproject_2d main get_image_matrix get_image_centroid load_object_datasets write_dataset split_dataset split_and_save_dataset load_grasp_data main plot_stats count_num_grasps split_train_test intersect_plane to_rad rand_step plot_bbox intersect_box get_mesh_properties get_corners_and_plances cvt4d plot_candidate main generate_candidates main main process_mesh calc_mesh_centroid format_htmatrix plot_grasps_and_mesh load_dataset_hdf5 float32 plot_mesh convert_grasp_frame plot_grasps plot_equal_aspect invert_htmatrix format_point calc_mesh_centroid get_unique_idx format_htmatrix rot_y sample_images sample_poses float32 rot_z plot_mesh plot_equal_aspect rot_x rxyz invert_htmatrix format_point mean T sum std tan float32 T cross sqrt dot eye sum T atleast_2d int8 copy mean where sum flatten paste save fromarray atleast_2d squeeze new shape unproject_2d asarray copy get_image_centroid int det join line dot eye randint get_image_matrix invert_htmatrix circle fit int T reshape hstack shape zeros range atleast_2d format_htmatrix reshape hstack estimate_object_pose dot convert_grasp_frame flatten invert_htmatrix str int atleast_2d astype float32 ravel range len asarray print reshape transpose flipud range update list atleast_2d all fromkeys print parse_image decode_grasp parse_grasp zip append empty keys enumerate join list get_unique_idx print sample_images File close get_outlier_mask create_dataset amin keys remove_from_dataset create_group join reader close append listdir open postprocess join remove decode_raw_data isinstance print makedirs merge_files listdir exists enumerate len int arange shuffle File float32 concatenate join list atleast_2d T print vstack append keys load_grasp_data list File close create_dataset keys create_group list arange reader load_object_datasets write_dataset print split_dataset close shuffle next keys open join subplots map set_color_codes set tight_layout despine savefig legend barplot sort_values read_csv join File close zeros enumerate flatten arange shuffle len writer asarray split_train_test writerow close where vstack rename unique open count_num_grasps str format_htmatrix reshape float32 any dot pinv asarray isinstance Axes3D autoscale get_corners_and_plances scatter figure Axes3D plot autoscale scatter figure T intersect_plane asarray rand_step print quaternion_matrix dot get_corners_and_plances quaternion_about_axis flatten empty quaternion_multiply len arange flatten generate_candidates plot_bbox plot_mesh savefig range hstack shuffle get_mesh_properties minimum plot_candidate read_csv int list append values load_mesh join print flatten zeros process array clip export_mesh mass_properties process_mesh eye T eye min max vertices dot sqrt sum len set_xlabel min set_xlim set_zlim array set_ylabel set_zlabel max set_ylim set_xlim add_subplot set_zlim scatter figure range set_ylim load_mesh join Axes3D calc_mesh_centroid triangles autoscale Poly3DCollection set_facecolor figure plot_equal_aspect vertices add_collection3d apply_transform format_htmatrix print reshape where plot_mesh dot convert_grasp_frame plot_grasps savefig zeros invert_htmatrix range list slice File astype float32 keys asarray pi asarray pi asarray pi concatenate_matrices rotation_matrix fromarray join uint8 str squeeze astype shape repeat save zeros range writer format_htmatrix reshape writerow hstack close dot range open reshape bitwise_and transform zeros kneighbors range fit
# grasping This project contains the code used for generating multi-modal grasps in V-REP, and described in the paper "An Integrated Simulator and Data Set that Combines Grasping and Vision for Deep Learning" (TBA). --------------------------- __EDIT 2017/12/09__: This repository is being deprecated in favour of a [newer version](https://github.com/mveres01/multi-contact-grasping), supporting the major following changes: * __Simplified pipeline__: Put meshes in a directory and immediately begin grasp experiments. This replaces the previous strategy of repeatedly switching between python scripts and the simulator for different phases of collection * __Communication via Python Remote API__: The new repository supports communication through a python remote API. No more need to communicate through .csv files! Major processes ("dropping" an object, "grasping" an object, and "lifting" an object) are segmented into seperate threaded simulation scripts, and launched by setting a simulation flag from a python script. Additionally, custom functions can be implemented on the server side, and called through generic remote API functions with ease. Samples implemented are: set / get functions for specifying joint angles and object poses, loading objects, and collecting images. * __Domain Randomization__: Visual scene properties (such as object colour / texture, table colour / texture, lighting, and camera pose) can be modified easily to collect a significant amount of sensory experience per grasp attempt. It can also be used to arbitrarily take images of the scene without any grasping experience, if someone is interested in e.g. segmentation algorithms. Domain randomization was introduced by [Tobin et. al.](https://arxiv.org/abs/1703.06907) * __View Images Immediately__: Images (RGB of object, RGB of object + gripper, object mask & depth) are saved in a dedicated folder whenever queried from the simulator. Visualize what images you're capturing right away! * __Definition of Grasp Success__: Previously, all fingers were required to be in contact with the object at the height of the object lift. In the new version, we use a proximity sensor attached to the robotic gripper to measure whether an object is present in the gripper or not. * __Grasp Candidate Generation__: Grasp candidates are now generated following the surface normals of a mesh object, with random orientations around the grippers local z-direction. Experimentally, this tends to give grasps with a higher probability of success then the pre- and post- multiplication method.
3,075
mwalmsley/galaxy-zoo-bayesian-cnn
['active learning']
['Galaxy Zoo: Probabilistic Morphology through Bayesian CNNs and Active Learning']
zoobot/tests/estimators/dummy_estimator_test.py zoobot/estimators/make_predictions.py zoobot/tests/active_learning/run_active_learning_test.py zoobot/active_learning/check_uncertainty.py zoobot/get_catalogs/gz2/download_gz_from_aws.py zoobot/estimators/run_estimator.py zoobot/tfrecord/read_tfrecord.py zoobot/active_learning/execute.py zoobot/tests/uncertainty/dropout_calibration_test.py zoobot/estimators/input_utils.py zoobot/tests/active_learning/execute_test.py zoobot/tests/active_learning/metrics/metrics_test.py zoobot/active_learning/simulation_timeline.py zoobot/tests/tfrecord/catalog_to_tfrecord_test.py zoobot/active_learning/iterations.py zoobot/active_learning/mock_panoptes.py zoobot/tfrecord/tfrecord_io.py zoobot/active_learning/create_panoptes_only_files.py zoobot/tfrecord/create_tfrecord.py zoobot/active_learning/metrics.py zoobot/estimators/dummy_column_estimator.py zoobot/tests/estimators/binomial_loss_test.py zoobot/tests/active_learning/metrics/analysis_test.py zoobot/tests/active_learning/active_learning_test.py zoobot/tests/active_learning/iterations_test.py zoobot/tests/uncertainty/conftest.py zoobot/tests/estimators/input_utils_test.py zoobot/get_catalogs/gz2/get_classifications.py zoobot/active_learning/active_learning.py zoobot/tests/estimators/make_predictions_test.py zoobot/active_learning/acquisition_utils.py zoobot/tests/conftest.py run_zoobot_on_panoptes.py zoobot/tests/active_learning/conftest.py zoobot/tests/estimators/dummy_image_estimator_test.py zoobot/active_learning/make_shards.py zoobot/tests/uncertainty/discrete_coverage_test.py zoobot/tests/tfrecord/create_tfrecord_test.py zoobot/active_learning/simulated_metrics.py zoobot/tests/__init__.py zoobot/uncertainty/sample_statistics.py zoobot/settings.py zoobot/estimators/bayesian_estimator_funcs.py zoobot/estimators/warm_start.py zoobot/tests/active_learning/mock_panoptes_test.py zoobot/tests/estimators/mnist_estimator.py zoobot/uncertainty/.ipynb_checkpoints/discrete_coverage-checkpoint.py zoobot/tests/gz2/get_classifications_test.py zoobot/tfrecord/catalog_to_tfrecord.py zoobot/tests/mnist.py zoobot/tests/active_learning/metrics/conftest.py zoobot/get_catalogs/gz2/main.py zoobot/tests/estimators/run_estimator_test.py zoobot/tests/gz2/main_test.py zoobot/tests/active_learning/metrics/simulation_timeline_test.py zoobot/tests/tfrecord/read_tfrecord_test.py zoobot/tests/active_learning/metrics/simulated_metrics_test.py zoobot/estimators/dummy_image_estimator.py zoobot/uncertainty/discrete_coverage.py zoobot/active_learning/default_estimator_params.py setup.py zoobot/active_learning/analysis.py zoobot/tfrecord/image_utils.py zoobot/estimators/estimator_funcs.py zoobot/tests/active_learning/acquisition_utils_test.py zoobot/get_catalogs/update_catalog_fits_loc.py zoobot/estimators/estimator_params.py zoobot/tests/uncertainty/sample_statistics_test.py zoobot/tests/active_learning/make_shards_test.py zoobot/uncertainty/dropout_calibration.py GlobalConfig sample_variance predictive_binomial_entropy get_mean_k_predictions show_acquisitions_from_tfrecords mutual_info_acquisition_func expected_binomial_entropy binomial_entropy save_acquisition_examples distribution_entropy create_db get_file_loc_df_from_db write_catalog_to_tfrecord_shards save_acquisition_to_db make_predictions_on_tfrecord add_tfrecord_to_db add_labelled_subjects_to_tfrecord add_labels_to_db subject_is_unlabelled add_catalog_to_db get_relative_loc get_latest_checkpoint_dir get_all_shard_locs make_predictions_on_tfrecord_batch smooth_loss show_subjects_by_iteration is_eval_log_entry verify_tfrecord_matches_catalog split_by_iter plot_log_metrics get_final_train_locs find_log compare_loss_over_time get_iteration_dirs compare_metrics get_smooth_metrics_from_log parse_eval_log_entry is_iteration_split get_metrics_from_log calculate_predictions compare_model_errors compare_with_mse save_metrics compare_models save_sample_distributions compare_with_baseline get_run_config get_acquisition_func get_train_callable ActiveConfig mock_acquisition_func pick_top_subjects get_labels Iteration request_labels load_shard_config ShardConfig make_database_and_shards load_iteration_state Model save_iteration_state get_labels request_labels verify_ready_to_plot SimulatedModel match_id_strs_to_catalog acquisitions_vs_values show_model_attr_hist_by_iteration simulated_models_over_time read_id_strs_from_tfrecord identify_catalog_subjects_history Timeline logging_hooks penalty_if_not_probability get_scalar_prediction BayesianModel estimator_wrapper dense_to_regression input_to_dense get_eval_metric_ops binomial_loss dummy_model_fn dummy_model_fn four_layer_binary_classifier four_layer_cnn get_eval_metric_ops three_layer_cnn default_three_layer_architecture default_params default_four_layer_architecture get_labels_from_batch get_images_from_batch random_rotation stratify_images ensure_images_have_batch_dimension preprocess_batch crop_random_size get_counts_from_batch load_batches_without_labels InputConfig load_batches_with_labels geometric_augmentation get_batch get_input make_labels_noisy predict_input_func load_batches_with_id_str load_batches_with_counts photographic_augmentation augment_images get_samples_of_images view_samples binomial_prob_per_k binomial_likelihood plot_samples load_predictor bin_prob_of_samples save_model eval_input generalised_loss train_input RunEstimatorConfig loss_instability early_stopper run_estimator save_model restart_estimator download_png_threaded download_images check_images_are_downloaded png_downloaded_correctly get_png_loc get_classification_results get_labels_and_images catalog batch_size channels visual_check_image random_features fits_native_dir predictor tfrecord_matrix_id_loc_distinct shard_locs random_labels serialized_matrix_id_example parsed_binary_example predictor_model_loc false_image_values serialized_matrix_label_example id_col columns_to_save parsed_example train_input_fn visual_check_image_data size stratified_data label_col n_examples tfrecord_dir png_native_dir serialized_matrix_label_id_example random_image tfrecord_matrix_ints_loc stratified_tfrecord_locs tfrecord_matrix_id_loc eval_input_fn true_image_values tfrecord_matrix_loc unique_id download_to_fits test_predictive_binomial_entropy probabilities n_samples test_predictive_and_expected_entropy_functional n_subjects test_get_mean_prediction test_show_acquisitions_from_tfrecords test_expected_binomial_entropy test_binomial_entropy_plotted test_save_acquisition_examples bin_probs_of_samples test_distribution_entropy test_binomial_entropy samples save_dir test_binomial_entropy_vectorized total_votes test_mutual_info_acquisition_func test_add_labels_to_db known_subject verify_db_matches_shards test_write_catalog_to_tfrecord_shards test_subject_is_unlabelled empty_shard_db verify_catalog_matches_shards test_dir test_get_all_shard_locs unknown_subject verify_db_matches_catalog test_make_predictions_on_tfrecord load_shardindex test_save_acquisition_to_db filled_shard_db_with_labels filled_shard_db test_add_tfrecord_to_db file_loc_of_image test_add_labelled_subjects_to_tfrecord test_get_latest_checkpoint_dir shard_config_ready mock_acquisition_func acquisition unlabelled_catalog acquisitions samples catalog_random_images mock_train_callable estimators_dir db_loc active_config labelled_catalog file_col n_subjects mock_get_samples_of_images images shard_config id_strs subjects train_callable_params test_get_train_callable baseline test_run test_get_acquisition_func test_record_train_records test_make_predictions test_get_latest_model previously_requested_subjects test_init initial_estimator_ckpt new_iteration test_get_train_records test_run test_prepare_shards test_make_database_and_shards test_write_and_load subjects_to_request subjects_requested_save_loc test_request_labels subjects_requested_save_loc_possible test_get_labels tfrecord_index_loc test_show_subjects_by_iteration eval_log_entry iteration_split_entry test_parse_eval_log_entry log_loc tfrecord_locs test_is_eval_log_entry test_is_iteration_split_entry test_get_metrics_from_log full_catalog states iteration_dir sim_model timeline model state save_dir n_acquired test_model_init test_show_mutual_info_vs_predictions test_acquisitions_vs_mean_prediction test_load_iteration_state test_save_iteration_state test_show_coverage tiny_catalog tiny_id_strs test_match_id_strs_to_catalog test_simulated_models_over_time test_show_model_attr_hist_by_iteration save_dir test_binomial_loss_1D_plot single_prediction single_label test_binomial_loss_1D batch_size train_input_fn test_training eval_input_fn labels estimator test_predict features test_eval test_training test_eval estimator test_predict test_get_batch test_predict_input_func_subbatch_with_labels batch_of_visual_check_image test_repeated_geometric_augmentations_on_image test_photometric_augmentations_on_image test_repeated_photometric_augmentations_on_image test_all_augmentations_on_batch test_predict_input_func_subbatch_no_labels test_get_batch_double_locs test_geometric_augmentations_on_image test_predict_input_func_with_id test_bin_prob_of_samples n_samples test_get_samples_of_subjects test_load_predictor test_binomial_likelihood_1D_predictions labels test_view_samples test_binomial_prob_per_k n_galaxies samples mean_rho_predictions n_draws test_get_samples_of_many_subjects total_votes log_dir tfrecord_train_loc example_tfrecords example_data model run_config labels true_image_values n_examples tfrecord_dir tfrecord_test_loc features test_run_experiment false_image_values test_get_classification_results example_classification_data published_data published_data_loc test_get_labels_and_images subject_manifest png_dir output_loc classifications test_write_catalog_to_train_test_records test_get_reader test_write_image_df_to_tfrecord extra_data_feature_spec test_serialize_image_example test_serialize_image_example_extra_data test_matrix_label_feature_spec test_load_examples_from_tfrecord test_show_example test_matrix_label_id_feature_spec test_show_examples test_load_examples_from_tfrecord_all n_subjects typical_vote_frac n_samples test_calibrate_predictions test_plot_coverage_df n_samples n_subjects volunteer_votes coverage_df_large true_p test_evaluate_discrete_coverage_bad_fractions test_evaluate_discrete_coverage coverage_df test_reduce_coverage_df reduced_df n_draws bin_prob_of_samples_by_k test_visualise_calibration_meaningful test_coverage_fraction true_params test_visualise_calibration test_check_coverage_fractions predictions typical_scatter samples_mean n_samples test_samples_to_posterior test_samples_to_interval samples samples_scale write_image_df_to_tfrecord split_df load_png_as_pil row_to_serialized_example load_decals_as_pil write_catalog_to_train_test_tfrecords get_reader float_list_to_feature float_to_feature int_to_feature str_to_feature uint8_array_to_feature value_to_feature serialize_image_example nonlinear_map dr2_style_rgb matrix_label_id_feature_spec matrix_label_feature_spec load_examples_from_tfrecord matrix_feature_spec custom_feature_spec matrix_label_counts_feature_spec id_label_counts_feature_spec id_feature_spec show_examples show_example matrix_id_feature_spec id_label_feature_spec load_dataset cast_bytes_of_uint8_to_float32 general_parsing_function plot_coverage_df reduce_coverage_df evaluate_discrete_coverage calibrate_predictions coverage_fraction visualise_calibration check_coverage_fractions samples_to_interval samples_to_posterior plot_coverage_df reduce_coverage_df evaluate_discrete_coverage calibrate_predictions mean stack append binomial_prob_per_k get_mean_k_predictions zeros range distribution_entropy expected_binomial_entropy bin_prob_of_samples predictive_binomial_entropy isinstance shuffle plot_galaxy_grid commit cursor connect add_catalog_to_db execute commit list cursor itertuples executemany write_image_df_to_tfrecord join format reset_index add_tfrecord_to_db enumerate len commit list cursor executemany zip values format concatenate debug extend shape append make_predictions_on_tfrecord_batch len get_samples_of_images format debug predict_input_func array len execute commit cursor fetchall cursor execute fetchone critical cursor DataFrame debug execute fetchone append write_image_df_to_tfrecord get_file_loc_df_from_db basename dirname sort int commit cursor execute fetchone range len execute cursor list DataFrame parse_eval_log_entry append is_iteration_split int strip find float split append lowess subplots set_title plot set_xlabel tight_layout set_ylabel savefig legend subplots set_title plot set_xlabel tight_layout set_ylabel savefig legend range len idxmin subplots reset_index set_title tight_layout set_ylabel savefig barplot append DataFrame smooth_loss split_by_iter get_metrics_from_log get_iteration_dirs join subplots load_examples_from_tfrecord custom_feature_spec tight_layout show_example savefig enumerate len decode load_examples_from_tfrecord id_label_counts_feature_spec append values join abs_error subplots set_xlabel close tight_layout square_error hist savefig bin_loss_per_subject legend mean_square_error format name mean_abs_error mean_bin_loss info join predict_input_func get_samples_of_images load_predictor show_mutual_info_vs_predictions show_acquisition_vs_label show_coverage set SimulatedModel Model mutual_info samples save_sample_distributions compare_binomial_and_abs_error save_acquisition_examples DataFrame join view_samples set_xlabel close tight_layout savefig ones_like mean compare_models Model predictions load compare_models Model compare_model_errors InputConfig assemble BayesianModel RunEstimatorConfig critical critical write_catalog_to_tfrecord_shards remove exists create_db IterationState remove format list astype warning DataFrame read_csv merge astype reset_index join format subplots set_title set_xlabel tight_layout verify_ready_to_plot scatterplot lower set_ylabel hist savefig append SimulatedModel Model enumerate id_feature_spec load_examples_from_tfrecord join subplots set_xlabel tight_layout hist getattr savefig enumerate dense l2_regularizer max_pooling2d dropout reshape conv2d image dense update tensor_summary dropout get_scalar_prediction histogram constant float32 identity cast histogram clip_by_value minimum maximum reduce_sum histogram clip_by_value abs cast histogram LoggingTensorHook dense minimize AdagradOptimizer sparse_softmax_cross_entropy accuracy input_layer argmax scalar update max_pooling2d reshape GradientDescentOptimizer conv2d softmax four_layer_cnn pr_curve_streaming_op get_eval_metric_ops minimize dense update tensor_summary softmax_cross_entropy_with_logits_v2 max_pooling2d dropout one_hot ones reshape conv2d reduce_mean image softmax histogram stop_gradient dense tensor_summary max_pooling2d dropout one_hot reshape conv2d image softmax histogram softmax_cross_entropy sample shape shuffle make_one_shot_iterator load_dataset repeat prefetch batch reshape image make_labels_noisy get_batch batch_size initial_size matrix_feature_spec channels shuffle tfrecord_loc repeat get_batch batch_size initial_size channels shuffle tfrecord_loc repeat matrix_id_feature_spec stratified_sample photographic_augmentation geometric_augmentation resize_images constant random_flip_left_right ensure_images_have_batch_dimension map_fn random_flip_up_down int uniform constant ensure_images_have_batch_dimension map_fn expand_dims load_batches_with_labels load_batches_with_id_str load_batches_without_labels InputConfig from_saved_model format model slice info zeros range len append around range binomial_prob_per_k pmf arange array arange plot binomial_prob_per_k axvline mean set_visible append array enumerate plot_samples subplots tight_layout legend early_stopping_window log_dir partial logging_hooks format evaluate save_model early_stopper Estimator estimator_wrapper rmtree info append train exists RunConfig log_dir format export_savedmodel info save_model Estimator partial estimator_wrapper format print check_images_are_downloaded sum len str join mkdir update urlretrieve open iterrows tqdm apply png_downloaded_correctly zeros exists len append join read_csv download_png_threaded match_galaxies_to_catalog_pandas to_csv join thumbnail open dict from_tensor_slices batch list shuffle zip remove TFRecordWriter write close serialize_image_example exists list remove TFRecordWriter write close serialize_image_example exists enumerate join remove TFRecordWriter write close serialize_image_example exists join remove TFRecordWriter write close serialize_image_example exists join remove TFRecordWriter write close serialize_image_example exists join remove TFRecordWriter write close serialize_image_example exists MagicMock str bytes time sha256 DataFrame join str mnist concatenate PrimaryHDU to_csv writeto mkdir load_data append DataFrame enumerate join mkdir append sum rand range rand distribution_entropy binomial_entropy binomial_entropy get_mean_k_predictions enumerate expected_binomial_entropy predictive_binomial_entropy join predictive_binomial_entropy subplots set_xlabel tight_layout mean expected_binomial_entropy scatter set_ylabel savefig bin_prob_of_samples mutual_info_acquisition_func save_acquisition_examples rand array len show_acquisitions_from_tfrecords randint copy execute commit cursor connect join execute commit cursor execute commit cursor fetchall verify_catalog_matches_shards verify_db_matches_shards write_catalog_to_tfrecord_shards execute str cursor fetchall execute cursor fetchall append load_examples_from_tfrecord set matrix_id_feature_spec unique load_shardindex load_examples_from_tfrecord Counter matrix_id_feature_spec unique load_shardindex fetchall cursor add_tfrecord_to_db execute enumerate execute cursor fetchone save_acquisition_to_db mock_get_samples_of_images make_predictions_on_tfrecord setattr make_predictions join load_examples_from_tfrecord add_labelled_subjects_to_tfrecord dirname matrix_id_feature_spec setattr fetchall list cursor add_labels_to_db execute get_latest_checkpoint_dir list uint8 rand astype PrimaryHDU writeto save zip DataFrame randint rand copy len copy ShardConfig prepare_shards copy ActiveConfig join time mkdir str join mkdir strpath mock_acquisition_func return_value mock_calls patch PropertyMock run train_callable assert_called_once get_train_callable patch get_acquisition_func param Iteration run_dir join format Iteration run_dir active_learning setattr make_predictions active_learning setattr make_predictions Iteration join acquired_tfrecords_dir record_train_records param load join estimators_dir Iteration copy initial_estimator_ckpt open active_learning setattr array prepare_shards load_shard_config join write mkdir verify_catalog_matches_shards verify_db_matches_shards make_database_and_shards connect dump param open join setattr strpath load open request_labels setattr pd get_labels join join show_subjects_by_iteration parse_eval_log_entry get_metrics_from_log save_iteration_state load_iteration_state save_iteration_state Model show_mutual_info_vs_predictions acquisitions_vs_mean_prediction match_id_strs_to_catalog show_coverage simulated_models_over_time enumerate show_model_attr_hist_by_iteration n_acquired binomial_loss join plot xlabel axvline float32 placeholder ylabel tight_layout ylim savefig linspace legend binomial_loss from_tensor_slices batch print append list numeric_column keys train print test_training predict print test_training evaluate geometric_augmentation join subplots set_title print tight_layout photographic_augmentation imshow shape savefig join subplots tight_layout imshow savefig geometric_augmentation enumerate join subplots tight_layout photographic_augmentation imshow savefig enumerate join subplots tight_layout imshow savefig augment_images InputConfig enumerate predict_input_func predict_input_func predict_input_func get_batch matrix_id_feature_spec id_feature_spec mean get_batch Counter load_predictor binomial_likelihood get_samples_of_images rand get_samples_of_images rand int range binomial_prob_per_k bin_prob_of_samples enumerate list shuffle zip remove TFRecordWriter write close serialize_image_example exists run_estimator setattr update DataFrame print to_csv values get_classification_results update example_classification_data get_labels_and_images write_catalog_to_train_test_tfrecords write_image_df_to_tfrecord join load_examples_from_tfrecord matrix_id_feature_spec DataFrame serialize_image_example serialize_image_example array parse_single_example parse_single_example join matrix_label_feature_spec load_examples_from_tfrecord reshape imshow clf savefig join matrix_label_feature_spec load_examples_from_tfrecord reshape imshow clf savefig join savefig subplots show_example join savefig show_examples zeros pmf range rand join subplots tight_layout savefig plot_coverage_df join subplots tight_layout savefig plot_coverage_df evaluate_discrete_coverage rand len reduce_coverage_df join subplots tight_layout savefig plot_coverage_df calibrate_predictions coverage_fraction check_coverage_fractions join visualise_calibration rand log10 logspace len join visualise_calibration check_coverage_fractions posterior linspace samples_to_posterior samples_to_interval dict uint8 dr2_style_rgb getdata int reset_index copy len write_image_df_to_tfrecord split_df to_csv remove format iterrows TFRecordWriter write close tqdm row_to_serialized_example warning exists update FLIP_TOP_BOTTOM reader transpose array update items list int_to_feature uint8_array_to_feature Example value_to_feature bytes tobytes reshape size join max putmask clip resize astype float32 pi dict shape mean zip nonlinear_map zeros array sin enumerate make_one_shot_iterator get_next load_dataset prefetch batch int64 float32 string int64 FixedLenFeature tight_layout subplots show_example enumerate format isinstance reshape text axis parse_single_example cast_bytes_of_uint8_to_float32 TFRecordDataset format partial from_tensor_slices isinstance constant print debug shuffle warning len int arange DataFrame min append float sum max range len reset_index reshape LogisticRegression array fit set_xlabel lineplot set_ylabel set_major_formatter legend StrMethodFormatter append set_xscale set_minor_formatter ScalarFormatter plot set_xlabel NullFormatter tight_layout set_context set set_ylabel axhline set_major_formatter legend subplot2grid savefig zeros_like coverage_fraction log10 logspace range len array fit KDEUnivariate argmax mean
[![DOI](https://zenodo.org/badge/185564932.svg)](https://zenodo.org/badge/latestdoi/185564932) [![astropy](http://img.shields.io/badge/powered%20by-AstroPy-orange.svg?style=flat)](http://www.astropy.org/) # "Zoobot" Galaxy Zoo Bayesian CNN and Active Learning - Public Release This repository contains code to simulate training a Bayesian CNN using active learning on Galaxy Zoo, for the paper: > Galaxy Zoo: Probabilistic Morphology through Bayesian CNNs and Active Learning, M. Walmsley et al, Monthly Notices of the Royal Society, 2019 (submitted) **This code is released for reproducibility only**. The code is an exact copy of the code used for the paper. As a research best practice, the code is documented, tested, and (we hope) fairly readable. However, we **strongly suggest** any users interested in further original research **wait for the launch of Yarin Gal's Bayesian Deep Learning Competition** (Q3 2019), which will include much of this code in a friendlier form. ## Installation The core features are provided as the `zoobot` package. Install as per Python convention: `pip install -r requirements.txt` `pip install -e zoobot`
3,076
mwolff31/attacking_neural_text_detectors
['misinformation']
['Attacking Neural Text Detectors']
download_dataset.py detector.py utils.py main.py attacks.py create_word attack Detector run_experiment load_json_file write_txt get_graph_data get_results load_misspelling_dict load_txt lower isupper create_word int asarray replace print min tolist shuffle choice load_misspelling_dict split append range len load_json_file write_txt time format list str print close tqdm set_description mkdir attack range predict len close close close close asarray print glob size len float32 load_txt range split arange show ylabel title scatter savefig append sum range format asarray plot glob size xlim uint8 xlabel float32 figure split
## Attacking Neural Text Detectors Code for "Attacking Neural Text Detectors" (https://arxiv.org/abs/2002.11768). Run ``python download_dataset.py`` to download the GPT-2 top k-40 neural text test set created by OpenAI. For more documentation regarding this and similar datasets, visit https://github.com/openai/gpt-2-output-dataset. OpenAI RoBERTa neural text detector can be downloaded by running ``wget https://storage.googleapis.com/gpt-2/detector-models/v1/detector-large.pt``. Install requirements via ``pip install -r requirements.txt``. Run ``python main.py`` to run a sample experiment.
3,077
myeongmy/aliasing_removal
['geometric matching']
['Convolutional neural network architecture for geometric matching']
train.py eval_pf.py demo.py geotnf/transformation.py image/normalization.py util/train_test_fn.py data/download_datasets.py geotnf/point_tnf.py model/cnn_geometric_model.py data/pf_dataset.py data/synth_dataset.py model/loss.py util/torch_util.py correct_keypoints download_PF_willow download_pascal PFDataset SynthDataset PointTnf PointsToUnitCoords PointsToPixelCoords TpsGridGen SynthPairTnf AffineGridGen GeometricTnf normalize_image NormalizeImageDict CNNGeometric FeatureExtraction FeatureL2Norm FeatureRegression FeatureCorrelation TransformedGridLoss str_to_bool save_checkpoint BatchTensorToVars train test squeeze numel expand_as le sum join remove basename print extractall close urlopen ZipFile makedirs join remove basename print extractall close urlopen open makedirs NormAxis clone expand_as NormAxis clone expand_as isinstance Variable size add expand div unsqueeze cuda is_cuda join basename copyfile dirname save makedirs format model pair_generation_tnf backward print zero_grad loss_fn step enumerate len format model pair_generation_tnf print eval loss_fn enumerate
# Image warping code for Aliasing removal - 1차 test: 2019.05.22 ### CNNGeometric PyTorch implementation ![](http://www.di.ens.fr/willow/research/cnngeometric/images/teaser.png) This is the implementation of the paper: I. Rocco, R. Arandjelović and J. Sivic. Convolutional neural network architecture for geometric matching. CVPR 2017 [[website](http://www.di.ens.fr/willow/research/cnngeometric/)][[arXiv](https://arxiv.org/abs/1703.05593)] using PyTorch ([for MatConvNet implementation click here](https://github.com/ignacio-rocco/cnngeometric_matconvnet)). If you use this code in your project, please cite use using: ```` @InProceedings{Rocco17,
3,078
nCheck/video-class-3d-resnet
['action recognition']
['Can Spatiotemporal 3D CNNs Retrace the History of 2D CNNs and ImageNet?']
opts.py classify.py normal.py models/resnext.py train.py dataset.py models/wide_resnet.py models/densenet.py utils.py models/pre_act_resnet.py cleaner.py temporal_transforms.py test.py mean.py main.py model.py generate_result_video/generate_result_video.py validation.py spatial_transforms.py models/resnet.py classify_video Video 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_mean generate_model parse_opts CenterCrop ToTensor Compose Scale Normalize LoopPadding TemporalCenterCrop calculate_video_results test get_video_length get_fps 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 Video Compose DataLoader sample_duration LoopPadding join format image_loader append exists get_default_image_loader append items list format deepcopy list IntTensor append listdir range len densenet169 densenet201 resnet50 densenet264 DataParallel resnet101 resnet34 resnet200 resnet18 resnet152 resnet10 cuda densenet121 parse_args set_defaults add_argument ArgumentParser topk size mean stack append range update time format model print Variable cpu AverageMeter size eval calculate_video_results append range enumerate len run decode format communicate len round float listdir Popen find 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
# Video Classification Using 3D ResNet This is a pytorch code for video (action) classification using 3D ResNet trained by [this code](https://github.com/kenshohara/3D-ResNets-PyTorch). The 3D ResNet is trained on the Kinetics dataset, which includes 400 action classes. This code uses videos as inputs and outputs class names and predicted class scores for each 16 frames in the score mode. In the feature mode, this code outputs features of 512 dims (after global average pooling) for each 16 frames. **Torch (Lua) version of this code is available [here](https://github.com/kenshohara/video-classification-3d-cnn).** ## Requirements * [PyTorch](http://pytorch.org/) ``` conda install pytorch torchvision cuda80 -c soumith
3,079
nachifur-ljw/automatic_label_correction_based_CCEDD
['cell segmentation', 'edge detection']
['Automatic Label Correction for the Accurate Edge Detection of Overlapping Cervical Cells']
ENDE_BCEloss/src/network_unet.py ENDE_BCEloss/src/loss.py ENDE_BCEloss/src/models.py data_processing/utils.py data_processing/edge_linear_base_gradient.py ENDE_BCEloss/src/network_rcf.py data_processing/flist.py ENDE_BCEloss/src/edge_detect.py ENDE_BCEloss/src/utils.py data_processing/datasets_generate.py ENDE_BCEloss/run.py data_processing/flist_train_val_test.py ENDE_BCEloss/src/metrics.py data_processing/data_processing.py data_processing/edge_linear.py ENDE_BCEloss/src/network_simple.py ENDE_BCEloss/main.py ENDE_BCEloss/src/config.py ENDE_BCEloss/src/dataset.py ENDE_BCEloss/show_eval_result.py data_processing gen_edge gen_edge_from_point interp_point edit_edge_base_grad gen_edge_base_gradient gen_edge_from_point_base_gradient local_linear_fit_edge gaussian_kernel limit_xy gen_flist gen_flist_train_val_test resave_config imshow_img_point data_split create_dir point_linear_dis set_flist_config imshow create_config Multiprocessing main load_config Config Dataset EdgeDetect AWBCELoss RCFLoss edge_nms EdgeUtils edge_thin sobel_filters interp interp2d EdgeEvaluation EdgeModel BaseModel upsample_filt RCF BaseNetwork make_bilinear_weights upsample interp_surgery DilateConv RCFSOURCE crop_caffe crop BaseNetwork ResnetBlock spectral_norm get_decoder ENDE get_features_merge get_encoder get_middle UNetSOURCE upconv2x2 BaseNetwork conv1x1 spectral_norm UpConv conv3x3 UNET DownConv save_config stitch_images init_config create_dir imshow create_config Progbar imsave genfromtxt join data_split gen_flist_train_val_test create_dir set_flist_config create_config gen_flist len join sorted print cpu_count close create_dir Multiprocessing process listdir imwrite convertScaleAbs interp1d Sobel max fromarray addWeighted CV_16S imshow append imread range size astype join print min zeros array join sorted print cpu_count close create_dir Multiprocessing process listdir interp_point convertScaleAbs imwrite imshow_img_point Sobel limit_xy fromarray addWeighted CV_16S imshow local_linear_fit_edge append imread COLOR_BGR2GRAY astype sqrt GaussianBlur edit_edge_base_grad join uint8 print zeros array cvtColor arange zeros_like linspace I argmax max ones identity gaussian_kernel array append sum range astype sqrt float int T mat zeros std len arange insert len astype sqrt interp append array range split argmax int print size argmin astype sqrt gaussian_kernel append abs array range sqrt exp pi join sorted print savetxt append walk seed genfromtxt sorted list int print shuffle savetxt floor append range len copyfile makedirs dot sqrt float array genfromtxt str list imwrite print savetxt append imread array range len gcf show axis set_window_title gcf show plot axis set_window_title imshow append manual_seed_all join seed load manual_seed print EdgeDetect setNumThreads test eval device is_available train SEED load_config Config list remove arange cos copy sobel_filters sin meshgrid interp2d range max convolve arctan2 float32 hypot array int reshape astype int32 uint8 astype int round int zeros upsample_filt from_numpy zeros abs range cuda Sequential spectral_norm Conv2d ReflectionPad2d InstanceNorm2d ReLU append append ResnetBlock range Sequential spectral_norm ReflectionPad2d Conv2d Sigmoid InstanceNorm2d ReLU append ConvTranspose2d Sequential spectral_norm Conv2d Sigmoid InstanceNorm2d ReLU append load join genfromtxt format save_config print close is_available open exists len fromarray int new squeeze shape paste range len fromarray squeeze save
# Local Label Point Correction for Edge Detection of Overlapping Cervical Cells Our unique contributions are summarized as follows: * We are the **first to propose a label correction method based on annotation points for edge detection and image segmentation**. By correcting the position of these label points, our label correction method can generate higher-quality label, which contributes 30–40 AP improvement on multiple baseline models. * We construct a **largest publicly cervical cell edge detection dataset** based on our LLPC. Our dataset is ten times larger than
3,080
nachonavarro/seasonal-esd-anomaly-detection
['time series', 'anomaly detection']
['Automatic Anomaly Detection in the Cloud Via Statistical Learning']
sesd.py setup.py test_sesd.py calculate_test_statistic calculate_critical_value seasonal_esd generalized_esd TestSESD abs mean median argmax std sqrt ppf STL median generalized_esd seasonal array fit calculate_test_statistic masked append calculate_critical_value array range len
# Anomaly Detection: Seasonal ESD <a href="https://travis-ci.com/nachonavarro/seasonal-esd-anomaly-detection.svg?branch=master"><img src="https://travis-ci.com/nachonavarro/seasonal-esd-anomaly-detection.svg?branch=master" /></a> Note: All credit goes to Jordan Hochenbaum, Owen S. Vallis and Arun Kejariwa at Twitter, Inc. Any errors in the code are, of course, my mistake. Feel free to fix them. ## Intro Seasonal ESD is an anomaly detection algorithm implemented at Twitter https://arxiv.org/pdf/1704.07706.pdf. What better definition than the one they use in their paper: > "we developed two novel statistical techniques > for automatically detecting anomalies in cloud infrastructure > data. Specifically, the techniques employ statistical learning > to detect anomalies in both application, and system metrics. > Seasonal decomposition is employed to filter the trend and
3,081
naivete5656/WSISPDR
['cell segmentation', 'instance segmentation', 'semantic segmentation']
['Weakly Supervised Cell Instance Segmentation by Propagating from Detection Response']
utils/matching.py propagation/gen_guided_model/guided_model.py likelymapgen.py networks/network_parts.py propagation/guided_function.py detection_predict.py networks/__init__.py utils/load.py utils/for_review.py networks/network_model.py propagate_main.py utils/__init__.py main.py propagation/gen_guided_model/__init__.py detection/__init__.py detection/custom_loss.py detection/detection_eval.py detection_train.py propagation/__init__.py propagation/gen_guided_model/guided_parts.py review.py parse_args Predict PredictFmeasure parse_args _TrainBase TrainNet like_map_gen parse_args parse_args UseMethods LinearReview SignMseLoss MseLoss eval_net UNet Up DoubleConv Inconv Down Outconv GuideCall Sequ GuidedModel GuidedBackpropReLU guide_relu EvaluationMethods CellImageLoad local_maxima target_peaks_gen gaus_filter remove_outside_plot show_res optimum associate gt_id_gen local_maxim add_argument ArgumentParser max str int imwrite gaus_filter loadtxt input_path print astype maximum copy mkdir Path zeros range g_size output_path imwrite criterion eval empty_cache numpy cuda net enumerate apply connectedComponentsWithStats astype peak_local_max zeros range int list exp LpMaximize value solve square delete LpProblem dict sqrt tile append zeros sum array range append arange delete unique plot close imshow gray savefig figure legend connectedComponentsWithStats peak_local_max append zeros range append zeros range where int pad GaussianBlur parse findall Path getroot append array str sorted list glob astype local_maxima zip array enumerate open
<h2 align="center">Weakly Supervised Cell Instance Segmentation<br>by Propagating from Detection Response</h2> by Kazuya Nishimura, Ker Dai Fei Elmer, Ryoma Bise [[Home]](http://human.ait.kyushu-u.ac.jp/~bise/researches-bise-CIA-en.html) [[Project]](https://naivete5656.github.io/WSISPDR/) [[Paper]](https://arxiv.org/abs/1911.13077) <!-- [[Paper]](https://arxiv.org/pdf/1804.00880) --> <!-- [[Supp]](http://yzhou.work/PRM/Supplementary.pdf) --> <!-- [[Poster]](http://yzhou.work/PRM/Poster.pdf) --> <!-- [[Presentation]](https://www.youtube.com/embed/lNqXyJliVSo?start=4615&end=4850&autoplay=1&controls=0) --> ![Illustration](./image/proposed_method_overview.png) ## Prerequisites - [python >= 3.6](https://www.python.org)
3,082
najoungkim/COGS
['semantic parsing']
['COGS: A Compositional Generalization Challenge Based on Semantic Interpretation']
src/OpenNMT-py/onmt/utils/report_manager.py src/OpenNMT-py/onmt/models/model.py src/OpenNMT-py/onmt/utils/distributed.py src/OpenNMT-py/onmt/utils/rnn_factory.py src/OpenNMT-py/onmt/tests/utils_for_tests.py src/OpenNMT-py/onmt/translate/greedy_search.py src/OpenNMT-py/onmt/utils/logging.py src/OpenNMT-py/tools/release_model.py src/OpenNMT-py/onmt/inputters/__init__.py src/OpenNMT-py/onmt/opts.py src/OpenNMT-py/onmt/utils/statistics.py src/OpenNMT-py/onmt/encoders/__init__.py src/OpenNMT-py/onmt/modules/sparse_losses.py src/OpenNMT-py/onmt/tests/test_copy_generator.py src/OpenNMT-py/server.py src/OpenNMT-py/onmt/inputters/image_dataset.py src/OpenNMT-py/onmt/decoders/cnn_decoder.py src/OpenNMT-py/tools/vid_feature_extractor.py src/OpenNMT-py/preprocess.py src/OpenNMT-py/onmt/tests/test_greedy_search.py src/OpenNMT-py/onmt/inputters/inputter.py src/OpenNMT-py/onmt/modules/structured_attention.py src/OpenNMT-py/onmt/decoders/decoder.py src/OpenNMT-py/onmt/trainer.py src/OpenNMT-py/onmt/encoders/transformer.py src/OpenNMT-py/onmt/model_builder.py src/OpenNMT-py/onmt/train_single.py src/OpenNMT-py/onmt/tests/test_audio_dataset.py src/OpenNMT-py/onmt/tests/test_structured_attention.py src/OpenNMT-py/onmt/modules/global_attention.py src/OpenNMT-py/onmt/inputters/vec_dataset.py src/OpenNMT-py/onmt/bin/translate.py src/OpenNMT-py/onmt/modules/__init__.py src/OpenNMT-py/onmt/utils/earlystopping.py src/OpenNMT-py/onmt/decoders/ensemble.py src/OpenNMT-py/tools/learn_bpe.py src/OpenNMT-py/onmt/inputters/audio_dataset.py src/OpenNMT-py/onmt/encoders/encoder.py src/OpenNMT-py/onmt/tests/test_beam_search.py src/OpenNMT-py/onmt/tests/test_models.py src/OpenNMT-py/translate.py src/OpenNMT-py/onmt/translate/penalties.py src/OpenNMT-py/onmt/utils/alignment.py src/OpenNMT-py/onmt/tests/test_attention.py src/OpenNMT-py/onmt/decoders/__init__.py src/OpenNMT-py/onmt/bin/server.py src/OpenNMT-py/tools/apply_bpe.py src/OpenNMT-py/tools/average_models.py src/OpenNMT-py/onmt/utils/optimizers.py src/OpenNMT-py/onmt/bin/average_models.py src/OpenNMT-py/onmt/encoders/mean_encoder.py src/OpenNMT-py/onmt/bin/release_model.py src/OpenNMT-py/onmt/utils/cnn_factory.py scripts/reformat_data_for_opennmt.py src/OpenNMT-py/tools/extract_embeddings.py src/OpenNMT-py/onmt/inputters/dataset_base.py src/OpenNMT-py/onmt/models/__init__.py src/OpenNMT-py/onmt/utils/__init__.py src/OpenNMT-py/onmt/translate/translation_server.py src/OpenNMT-py/tools/test_rouge.py src/OpenNMT-py/onmt/models/model_saver.py src/OpenNMT-py/onmt/modules/conv_multi_step_attention.py src/OpenNMT-py/onmt/tests/test_text_dataset.py src/OpenNMT-py/onmt/inputters/datareader_base.py src/OpenNMT-py/train.py src/OpenNMT-py/onmt/encoders/audio_encoder.py src/OpenNMT-py/onmt/translate/__init__.py src/OpenNMT-py/onmt/tests/test_image_dataset.py src/OpenNMT-py/onmt/modules/sparse_activations.py src/OpenNMT-py/onmt/bin/train.py src/OpenNMT-py/onmt/encoders/image_encoder.py src/OpenNMT-py/onmt/bin/preprocess.py src/OpenNMT-py/onmt/models/stacked_rnn.py src/OpenNMT-py/onmt/tests/test_simple.py src/OpenNMT-py/onmt/decoders/transformer.py src/OpenNMT-py/docs/source/conf.py src/OpenNMT-py/onmt/translate/decode_strategy.py src/OpenNMT-py/tools/embeddings_to_torch.py src/OpenNMT-py/onmt/utils/loss.py src/OpenNMT-py/setup.py src/OpenNMT-py/onmt/modules/gate.py src/OpenNMT-py/onmt/translate/translation.py src/OpenNMT-py/onmt/modules/average_attn.py src/OpenNMT-py/onmt/tests/test_translation_server.py src/OpenNMT-py/onmt/encoders/ggnn_encoder.py src/OpenNMT-py/onmt/tests/test_preprocess.py src/OpenNMT-py/onmt/translate/process_zh.py src/OpenNMT-py/onmt/modules/position_ffn.py src/OpenNMT-py/onmt/modules/source_noise.py src/OpenNMT-py/onmt/inputters/text_dataset.py src/OpenNMT-py/tools/create_vocabulary.py src/OpenNMT-py/onmt/modules/multi_headed_attn.py src/OpenNMT-py/onmt/modules/weight_norm.py src/OpenNMT-py/onmt/encoders/rnn_encoder.py src/OpenNMT-py/onmt/translate/translator.py src/OpenNMT-py/onmt/translate/beam_search.py src/OpenNMT-py/onmt/models/sru.py src/OpenNMT-py/onmt/modules/embeddings.py src/OpenNMT-py/onmt/__init__.py src/OpenNMT-py/onmt/modules/copy_generator.py src/OpenNMT-py/onmt/tests/test_embeddings.py src/OpenNMT-py/onmt/utils/parse.py src/OpenNMT-py/onmt/encoders/cnn_encoder.py src/OpenNMT-py/onmt/utils/misc.py src/OpenNMT-py/onmt/modules/util_class.py main setup build_model build_base_model build_encoder build_embeddings build_decoder load_test_model StoreLoggingLevelAction train_opts preprocess_opts DeprecateAction model_opts config_opts translate_opts build_trainer Trainer main _check_save_model_path _tally_parameters configure_process main average_models build_save_dataset process_one_shard build_save_vocab preprocess count_features main _get_parser maybe_load_vocab check_existing_pt_files main get_ctranslate2_model_spec main start _get_parser batch_producer ErrorHandler _get_parser main train run main _get_parser translate CNNDecoder DecoderBase StdRNNDecoder RNNDecoderBase InputFeedRNNDecoder EnsembleModel EnsembleGenerator EnsembleDecoderOutput EnsembleEncoder load_test_model EnsembleDecoder TransformerDecoder TransformerDecoderLayer AudioEncoder CNNEncoder EncoderBase GGNNAttrProxy GGNNEncoder GGNNPropogator ImageEncoder MeanEncoder RNNEncoder TransformerEncoder TransformerEncoderLayer audio_fields AudioSeqField AudioDataReader audio_sort_key MissingDependencyException DataReaderBase Dataset _join_dicts _dynamic_dict img_sort_key ImageDataReader image_fields batch_img _load_vocab _read_vocab_file batch_iter _old_style_nesting _merge_field_vocabs build_dataset_iter_multiple _build_field_vocab build_noise_field load_old_vocab _getstate build_vocab _pad_vocab_to_multiple _pool _old_style_vocab max_tok_len make_src filter_example MultipleDatasetIterator make_tgt parse_align_idx OrderedIterator AlignField patch_fields _build_fv_from_multifield old_style_vocab _setstate _build_fields_vocab build_dataset_iter DatasetLazyIter get_fields _old_style_field_list text_sort_key _feature_tokenize TextMultiField text_fields TextDataReader vec_sort_key VecSeqField vec_fields VecDataReader NMTModel ModelSaver ModelSaverBase build_model_saver check_sru_requirement load_sru_mod SRU_Compute SRUCell CheckSRU SRU StackedLSTM StackedGRU AverageAttention ConvMultiStepAttention seq_linear CopyGenerator CopyGeneratorLossCompute collapse_copy_scores CopyGeneratorLoss VecEmbedding PositionalEncoding Embeddings SourceContextGate ContextGate context_gate_factory TargetContextGate BothContextGate GlobalAttention MultiHeadedAttention PositionwiseFeedForward MaskNoise SenShufflingNoise InfillingNoise MultiNoise aeq NoiseBase SparsemaxFunction LogSparsemax _make_ix_like _threshold_and_support Sparsemax SparsemaxLossFunction SparsemaxLoss MatrixTree Cast Elementwise WeightNormLinear get_var_maybe_avg WeightNormConv2d WeightNormConvTranspose2d get_vars_maybe_avg TestAttention TestAudioDataReader TestAudioField TestBeamSearch GlobalScorerStub TestBeamWithLengthPenalty TestBeamSearchAgainstReferenceCase TestCopyGenerator TestCopyGeneratorLoss TestEmbeddings TestGreedySearch TestImageDataReader1Channel TestImageDataReader TestModel _add_test TestData _add_test test_load TestStructuredAttention TestTextDataReaderFromFS TestTextMultiField TestTextDataReader TestTranslationServer TestServerModel product_dict BeamSearch GNMTGlobalScorer DecodeStrategy sample_with_temperature GreedySearch PenaltyBuilder zh_traditional_hk zh_simplify_v2 wrap_str_func zh_traditional_tw zh_segmentator zh_traditional_standard zh_simplify Translation TranslationBuilder ServerModelError CTranslate2Translator get_function_by_path TranslationServer Timer ServerModel critical build_translator Translator max_tok_len to_word_align make_batch_align_matrix extract_alignment subword_map_by_spacer subword_map_by_joiner build_align_pharaoh GatedConv StackedCNN shape_transform all_gather_list all_reduce_and_rescale_tensors is_master multi_init Scorer LossScorer EarlyStopping AccuracyScorer PPLScorer PatienceEnum scorers_from_opts init_logger build_loss_compute shards LossComputeBase filter_shard_state LabelSmoothingLoss NMTLossCompute use_gpu sequence_mask _split_corpus split_corpus set_random_seed generate_relative_positions_matrix fn_args aeq tile check_model_config report_matrix relative_matmul noamwd_decay Optimizer build_torch_optimizer MultipleOptimizer FusedAdam rsqrt_decay exponential_decay noam_decay make_learning_rate_decay_fn AdaFactor ArgumentParser ReportMgr ReportMgrBase build_report_manager rnn_factory Statistics create_parser get_pairs isolate_glossary recursive_split read_vocabulary check_vocab_and_split encode BPE main read_files_batch read_embeddings calc_vocab_load_stats main convert_to_torch_tensor get_vocabs main write_embeddings create_parser replace_pair get_pair_statistics prune_stats get_vocabulary main update_pair_statistics test_rouge rouge_results_to_str collate_tensor VidDset finished_watcher vid_len FeatureExtractor read_to_imgs Reconstructor saver batch run update format print add_argument set ArgumentParser split append parse_args output_path makedirs print add_transform add_config_value Embeddings load use_gpu old_style_vocab update_model_opts build_base_model ckpt_model_opts validate_model_opts load_old_vocab fp32 data_type eval float gpu CopyGenerator share_embeddings Sequential xavier_uniform_ build_encoder device Cast pre_word_vecs_dec hasattr attention_dropout NMTModel LogSoftmax dec_rnn_size pre_word_vecs_enc half load_state_dict encoder share_decoder_embeddings param_init to vocab LogSparsemax load_pretrained_vectors param_init_glorot uniform_ base_field Linear decoder float32 parameters build_embeddings weight build_decoder len use_gpu build_base_model info add add_argument_group add add_argument_group add add_argument_group add add_argument_group add list keys data_to_noise dropout_steps gpu_verbose_level numericalize build_report_manager Trainer accum_count build_loss_compute world_size normalization get dropout average_decay MultiNoise base_field src_noise_prob accum_steps truncated_decoder average_every src_noise save_model dirname abspath makedirs named_parameters seed set_device set_random_seed data gpu_ranks build_trainer use_vocab build_model_saver warning log_file train_steps build_dataset_iter_multiple update_model_opts validate_model_opts load_old_vocab model_type init_logger iter _train_iter build_model train_from ckpt_model_opts close from_opt data_ids info load patch_fields _tally_parameters old_style_vocab _check_save_model_path build_dataset_iter configure_process train len load items list div_ float enumerate models average_models output fp32 save format save_data glob overwrite warning update config list defaultdict items examples zip format save_data collect iter info save Dataset load _load_vocab tgt_words_min_frequency tgt_vocab info src_vocab vocab_size_multiple data_type save defaultdict load_old_vocab train_ids train_tgt tgt_words_min_frequency src_words_min_frequency get save_data train_src vocab_cls tgt_vocab_size train_align src_vocab_size maybe_load_vocab check_existing_pt_files old_style_vocab _build_fields_vocab shard_iterator share_vocab tgt_words_min_frequency save_data tgt_vocab data_type tgt_vocab_size save share_vocab src_vocab_size src_vocab src_words_min_frequency build_vocab seed build_save_dataset validate_preprocess_args manual_seed info zip data_type from_opt init_logger log_file get_fields count_features config_opts ArgumentParser preprocess_opts preprocess _get_parser getattr get_ctranslate2_model_spec OpenNMTPyConverter model convert RotatingFileHandler setFormatter getLogger addHandler serve Formatter TranslationServer prefix_route Flask route add_argument start config data validate_train_opts pid gpu_ranks SimpleQueue set_random_seed ErrorHandler build_dataset_iter_multiple seed queue_size Process update_model_opts add_child validate_model_opts load_old_vocab model_type terminate Semaphore append world_size range train_from get_context start data_ids single_main Queue info load patch_fields join old_style_vocab build_dataset_iter len seed list src isinstance to tuple set_random_seed device put filter cycle init_logger log_file next_batch fields enumerate single_main multi_init model_opts train_opts list validate_translate_opts src zip shard_size build_translator tgt split_corpus info init_logger log_file enumerate translate_opts translate EnsembleModel items list models dict avg_raw_probs iter append AudioSeqField unk_token LongTensor Counter Vocab pad_token tokenize size max fill_ enumerate Field update defaultdict stoi zeros max enumerate len long max enumerate append split AlignField RawField Field load update get data items list _old_style_nesting _old_style_vocab from_iterable dict iter sum get_fields values _old_style_field_list len int extend Counter Vocab ceil len vocab _pad_vocab_to_multiple vocab_cls _read_vocab_file enumerate info len _build_field_vocab info get vocab defaultdict _build_fv_from_multifield build_noise_field vocab_cls _merge_field_vocabs dict info base_field len vocab itos is_word_start len bool enumerate load update _load_vocab defaultdict list items zip examples collect _build_fields_vocab iter info enumerate _pad_vocab_to_multiple sum Vocab Counter format info batch_size_fn warning append enumerate len sorted list batch_iter random_shuffler batch max len data list sorted glob hasattr split get partial TextMultiField Field append range VecSeqField save_model keep_checkpoint ModelSaver check_output compile getenv load check_sru_requirement Module bytes namedtuple stream Program device encode to compile get_function linear size view data size type_as index_select index_fill_ append index_add_ range len enumerate size dim arange cumsum sort _make_ix_like unsqueeze gather getattr append get_var_maybe_avg product_dict list join dirname abspath product_dict list product_dict list product_dict list join dirname abspath join setattr split product_dict list is_available join dedent list keys product values topk view lt div Multinomial masked_fill sample gather float argmax join import_module getattr from_opt load_test_model output open threshold ones div_ to_dense sum view size zip append sum enumerate str isinstance sort tolist append Tensor argmax enumerate sort list subword_map_by_joiner subword_map_by_spacer list endswith len accumulate startswith enumerate accumulate list world_size get_rank format init_process_group all_reduce_buffer element_size numel all_reduce zero_ div_ append list bytes tolist dumps get_world_size _out_buffers ByteTensor loads all_gather item append _in_buffer cuda range len append early_stopping_criteria set RotatingFileHandler setFormatter getLogger addHandler StreamHandler Formatter setLevel INFO FileHandler NLLLoss vocab SparsemaxLoss isinstance CopyGeneratorLoss copy_attn_force copy_loss_by_seqlength NMTLossCompute CopyGeneratorLossCompute copy_attn LabelSmoothingLoss device label_smoothing to len items requires_grad list isinstance clone append Tensor split items list backward filter_shard_state extend dict zip split next numel list view size contiguous range len seed manual_seed clamp transpose unsqueeze arange reshape transpose permute matmul format replace index zip max len endswith join list items initialize Adagrad loss_scale Adadelta MultipleOptimizer Adam SGD named_parameters FusedAdam append FP16_Optimizer AdaFactor ReportMgr tensorboard_log_dir SummaryWriter report_every SRU add_argument ArgumentParser add set get_pairs endswith tuple min extend index check_vocab_and_split append append recursive_split int split add set split open zip append enumerate split itos _old_style_vocab file read_files_batch load vocab _old_style_vocab info append next len dict items list itervalues zeros next Tensor len set keys len read_embeddings emb_file_enc emb_file_dec keys calc_vocab_load_stats output_file dict_file convert_to_torch_tensor emb_file_both get_vocabs output_dir cuda build_base_model set_device tolist encoder vocab use_gpu write_embeddings __dict__ decoder model_opts gpu int Counter split defaultdict index defaultdict enumerate join list items replace tuple escape sub iter append compile split items list items sorted list get_pair_statistics deepcopy replace_pair prune_stats write get_vocabulary dict update_pair_statistics max range values format Rouge155 output_to_dict strftime localtime convert_and_evaluate mkdir range len VideoCapture read cvtColor COLOR_BGR2RGB stack append collate_tensor sum model VidDset put eval FeatureExtractor to get put Reconstructor push flush
# COGS This repository contains the dataset used in the paper [COGS: A Compositional Generalization Challenge Based on Semantic Interpretation](https://www.aclweb.org/anthology/2020.emnlp-main.731/), accepted to EMNLP 2020. ## **Changelog** 2022/09/13: Fixed semantic roles of 50 examples in the generalization set. Affected subset is `obj_pp_to_sub_pp` only, where roles of animate subjects of unaccusative verbs were being marked as agent instead of theme. Example: ```
3,083
nakul-shahdadpuri/narknet
['multiple object tracking']
['Simple Online and Realtime Tracking']
classify/image.py classify/realtime.py classify/video.py load_model predict print getLayerNames readNet argmax int str float putText setInput NMSBoxes shape FONT_HERSHEY_PLAIN rectangle append imread forward range blobFromImage len
# Narknet Object Detection for Computer Vision using YOLOv3. This repository is a computer vision library , using YOLOv3 machine learning model. The program is implemented in python3 and will be converted to cython in due time. ## Dependencies: 1. **Python --3.7.6** 2. **Opencv --4.2.0** 3. **Axel --2.17.5** 4. **Conda --4.8.3** 5. **Numpy --1.18.1** 6. **Requests --2.23.0**
3,084
nakul-shahdadpuri/trackid
['multiple object tracking']
['Simple Online and Realtime Tracking']
yolov3_tf2/models.py deep_sort/kalman_filter.py run.py deep_sort/__init__.py tools/freeze_model.py deep_sort/nn_matching.py tools/generate_detections.py yolov3_tf2/batch_norm.py deep_sort/linear_assignment.py deep_sort/iou_matching.py yolov3_tf2/dataset.py deep_sort/detection.py deep_sort/preprocessing.py deep_sort/track.py yolov3_tf2/utils.py deep_sort/tracker.py main MjpegReader user_exit nayanam Detection iou iou_cost KalmanFilter _cosine_distance NearestNeighborDistanceMetric _nn_cosine_distance _nn_euclidean_distance _pdist non_max_suppression Track TrackState parse_args create_box_encoder _run_in_batches extract_image_patch main ImageEncoder generate_detections BatchNormalization VideoCapture tracks release destroyAllWindows str COLOR_BGR2RGB transform_images imshow YoloV3 append encoder expand_dims range predict non_max_suppression update track_id get_class create_box_encoder load_weights Tracker signal get_cmap SIGINT int read time isOpened NearestNeighborDistanceMetric print putText convert_boxes rectangle to_tlbr array cvtColor len print exit run prod maximum to_tlwh INFTY_COST asarray arange iou zeros enumerate len T inf dot float clip norm asarray _pdist _cosine_distance minimum concatenate astype maximum delete argsort append float len int f range len minimum int asarray tuple astype maximum any resize float array ImageEncoder image_shape join int asarray print loadtxt min astype copy IMREAD_COLOR save encoder imread listdir max range makedirs add_argument ArgumentParser mot_dir detection_dir model create_box_encoder output_dir parse_args generate_detections
# Trackid Using YOLOv3 and DEEPSORT, this project attempts to track multiple objects on a screen and assign them a unique id to reduce overcounting. This project return a cv2 screen with the classifications and also prints out the FPS and classes detected. ## Dependencies: 1. **Python --3.7.6** 2. **Conda --4.8.3** ## Installation ```sh git clone https://github.com/nakul-shahdadpuri/trackid.git cd trackid/
3,085
namedysx/CRAFT-tensorflow
['scene text detection']
['Character Region Awareness for Text Detection']
file_utils.py datagen.py loss.py craft.py augment.py net.py upconvBlock.py vgg.py text_utils.py augment_n.py OHEM.py tranc rot_img_and_padding crop_imgs rand_flip rand_augment random_color_distort crop_img rand_rot Random_crop Random_rot Random_scale Random_filp train test generator normalizeMeanVariance generate_target four_point_transform gen_gaussian procces_function add_affinity generate_affinity add_character get_files list_files saveResult loss CRAFT_net arous_conv MSE_OHEM_Loss get_result_img adjustResultCoordinates getDetBoxes_core getDetBoxes upsample upsampling_bilinear upconvBlock conv2d_transpose_strided vgg_16 vgg_arg_scope print int print random copy uniform crop_img getRotationMatrix2D warpAffine randint uniform rot_img_and_padding flip random uint8 random_saturation random_hue COLOR_HSV2BGR random_value astype float32 random_brightness randint clip cvtColor transpose tranc rand_flip crop_imgs random_color_distort uniform resize warpAffine radians cos getRotationMatrix2D sin randint flip randint int Random_scale normalizeMeanVariance reshape placeholder Saver resize global_variables_initializer imread CRAFT_net normalizeMeanVariance minimize Variable MSE_OHEM_Loss reshape placeholder AdamOptimizer get_variables_to_restore Saver GPUOptions imread piecewise_constant CRAFT_net astype float32 warpPerspective array getPerspectiveTransform int uint8 exp astype pi zeros range four_point_transform astype float32 copy min int32 max zeros transpose range add_character mean array transpose copy add_affinity zeros range len generate_affinity generate_target copy normalizeMeanVariance print shuffle copy dstack procces_function rand_augment resize append imread loadmat range enumerate len list_files join lower splitext append walk basename imwrite mkdir splitext array int reshape subtract multiply square greater reduce_sum cast top_k append range cond threshold imwrite roll max clip connectedComponentsWithStats argmin MORPH_RECT shape append minAreaRect range astype copy sqrt dilate int uint8 getStructuringElement reshape boxPoints min zeros array getDetBoxes_core array range len adjustResultCoordinates getDetBoxes saveResult conv2d batch_norm bilinear_upsample_weights resize_bilinear conv2d_transpose get_variable
A implement of paper :https://arxiv.org/abs/1904.01941 This is the result of training 200,000 steps. ![image](https://github.com/namedysx/CRAFT-tensorflow/blob/master/image/image/t.jpg) Result ![image](https://github.com/namedysx/CRAFT-tensorflow/blob/master/image/image/weight.jpg) ![image](https://github.com/namedysx/CRAFT-tensorflow/blob/master/image/image/weight_aff.jpg) ![image](https://github.com/namedysx/CRAFT-tensorflow/blob/master/image/image/res_text_image_word.jpg) ![image](https://github.com/namedysx/CRAFT-tensorflow/blob/master/image/image/res_text_image_char.jpg) Useage Down ckpt
3,086
nash169/learn-diffeomorphism
['density estimation']
['Euclideanizing Flows: Diffeomorphic Reduction for Learning Stable Dynamical Systems']
learn_diffeomorphism/diffeomorphism.py learn_diffeomorphism/coupling_layer.py learn_diffeomorphism/utils.py setup.py examples/test_model.py learn_diffeomorphism/kernel_machine.py examples/train_model.py learn_diffeomorphism/trainer.py learn_diffeomorphism/__init__.py learn_diffeomorphism/dynamics.py CouplingLayer Diffeomorphism Dynamics KernelMachine Trainer linear_map blk_matrix meshgrid size to
# Learn Diffeomorphism Repository containing implementation of a NVP (Non-Volume Preserving) network for Dynamical System learning via diffeomorphic mapping. Pytorch-based implementation of the paper: https://arxiv.org/abs/2005.13143 ### Authors/Maintainers - Bernardo Fichera ([email protected]) ### Run examples In order to train a model ```sh python(python3) -m examples.train_model --data <dataset_name> (ipython) run examples/train_model.py --data <dataset_name>
3,087
nashory/DeLF-pytorch
['image retrieval']
['Large-Scale Image Retrieval with Attentive Deep Local Features']
utils/__init__.py utils/logger.py helper/feeder.py extract/folder.py train/config.py helper/matcher.py helper/__init__.py train/delf.py train/solver.py train/dataloader.py helper/delf_helper.py train/layers.py utils/misc.py extract/extractor.py train/main.py extract/pca.py __to_tensor__ __is_cuda__ FeatureExtractor __build_delf_config__ __cuda__ __to_var__ DatasetFolder find_classes make_dataset ImageFolder accimage_loader default_loader has_file_allowed_extension pil_loader DelfPCA nms CalculateKeypointCenters GetDelfFeatureFromSingleScale GetDelfFeatureFromMultiScale GenerateCoordinates PrintResult DelfFeaturePostProcessing CalculateReceptiveBoxes ApplyPcaAndWhitening PrintGpuMemoryStats Feeder __build_delf_config__ __cuda__ get_ransac_image_byte read_image get_inliers load_image_into_numpy_array get_attention_image_byte str2bool get_loader __freeze_weights__ __load_weights_from__ __print_freeze_status__ __cuda__ __deep_copy_module__ __unfreeze_weights__ Delf_V1 WeightedSum2d Reshape SpatialAttention2d ConcatTable CMul Identity Flatten main plot_overlap savefig Logger LoggerMonitor AverageMeter mkdir_p compute_precision_top_k is_available parse_known_args add_argument print ArgumentParser lower sort join sorted has_file_allowed_extension append expanduser listdir walk stack repeat floor arange GenerateCoordinates cat FloatTensor index_select transpose matmul div float narrow nms CalculateKeypointCenters PrintResult index_select uniform __concat_tensors_in_list__ print format max_memory_cached max_memory_allocated print int ones_like view upsample size clamp squeeze t DelfFeaturePostProcessing index_select CalculateReceptiveBoxes round forward_for_serving norm CalculateKeypointCenters squeeze div ApplyPcaAndWhitening expand_as mul sort new clamp index_select resize_as_ long size convert astype uint8 cKDTree query array ransac fromarray uint8 format BytesIO print astype dstack shape save BytesIO plot_matches COLOR_BGR2RGB inverted axis close transformed getvalue DMatch KeyPoint drawMatches savefig tostring get_inliers append sum cvtColor column_stack CenterCrop ToTensor Compose Resize RandomCrop ImageFolder DataLoader RandomHorizontalFlip append parameters enumerate parameters enumerate str requires_grad format named_children print parameters enumerate print format load_state_dict print deepcopy format named_children cuda gpu_id seed finetune_epoch range manual_seed_all train_path_for_pretraining format keypoint_sample_size finetune_sample_size finetune_crop_size manual_seed is_available float train_path_for_finetuning keypoint_epoch keypoint_crop_size print manualSeed get_loader randint train Solver Delf_V1 asarray arange plot numbers enumerate len topk size t eq mul_ expand_as append sum max makedirs
# Pytorch Implementation of Deep Local Feature (DeLF) PyTorch Implementation of "Large-Scale Image Retrieval with Attentive Deep Local Features" reference: https://arxiv.org/pdf/1612.06321.pdf ## Prerequisites + PyTorch + python3 + CUDA ## Training DeLF There are 2 steps for DeLF training: (1) finetune stage, and (2) keypoint stage. Finetune stage loads resnet50 model pretrained on ImageNet, and finetune.
3,088
nasiryahm/STDWI
['causal inference']
['Spike-based causal inference for weight alignment']
paper_scripts/LIF_Comparison/plot_scripts/plot_correlation_set.py paper_scripts/LIF_Comparison/infer_weights.py paper_scripts/WienerProcess_Comparison/infer_weights.py weight_inference/__init__.py paper_scripts/LIF_Comparison/plot_scripts/plot_ratio_range.py paper_scripts/WienerProcess_Comparison/plot_scripts/plotting.py weight_inference/simulator.py paper_scripts/LIF_Comparison/plot_scripts/plot_inference_curve.py paper_scripts/WienerProcess_Comparison/simulate_networks.py paper_scripts/WienerProcess_Comparison/plot_scripts/multiPlot.py paper_scripts/LIF_Comparison/simulate_networks.py paper_scripts/LIF_Comparison/plot_scripts/plot_parameter_grid.py weight_inference/methods.py weight_inference/fitter.py paper_scripts/LIF_Comparison/plot_scripts/plot_comparisons.py stdwi rdd akrout bayes create_stdwi_trace akrout sign_alignment bayesian_hitting stdwi rdd random_sample_spike_train binary_spike_matrix pure_if_dynamics clip_spike_trains lif_dynamics spike_trains_to_xpsps firing_rates correlated_poisson_spike_train poisson_spike_train wiener_process xpsp_filterer int copy append zeros sum range len create_stdwi_trace int binary_spike_matrix copy append zeros range len int ones binary_spike_matrix copy bayesian_hitting shape append zeros range len size sum matmul repeat matmul zeros exp arange shape astype copy mean append max range sqrt copy normal RandomState sqrt int list RandomState astype append range int list RandomState append range append list int RandomState transpose where zip zeros range len zeros exp arange int int xpsp_filterer zeros enumerate arange astype shape append zeros range einsum asarray arange matmul append zeros range zeros enumerate len int astype zeros range len
# STDWI Implementation of a spike timing-dependent weight Inference (STDWI) method and competitors -- all of which are proposed as biologically plausible methods to solve the weight transport problem for the backpropagation of error algorithm. In this repository we have our implementation of the STDWI method, the regression discontinuity design (RDD) method by Guerguiev et al. and a modified rate-based method by Akrout et al. See [Example.ipynb](./Example.ipynb) for a walkthrough of simulating a feedforward network of leaky integrate and fire neurons and inference of the synaptic weights using these techniques. The scripts used to produce plots shown in our [arXiv pre-print](http://arxiv.org/abs/2003.03988) are located in the [paper_scripts](./paper_scripts/) folder. This repository contains a number of useful files and scripts: - `./weight_inference/` This folder contains a python library which contains all fundamental functions and code used to produce the relevant results - `./Example.ipynb` This file provides an example of loading the library enclosed and shows a single comparative example of weight inference - `./paper_scripts` This folder contains (in a set of sub-directories) the key python scripts which were executed to produce the data and plots for our submitted paper. Note that each of these scripts should be executed with their directory as the current path. Note also that for multiple repeats (seeds) or for parameter searches, these files require some modification (see comments). - `./conda_requirements.txt` This file describes the specific (conda-based) python environment and all packages which were installed and leveraged to carry out simulations.
3,089
natashamjaques/MultimodalAutoencoder
['denoising']
['Multimodal Autoencoder: A Deep Learning Approach to Filling In Missing Sensor Data and Enabling Better Mood Prediction']
autoencoder_classification_wrapper.py run_jobs.py comparison_algorithms/neural_net.py generic_wrapper.py feature_selection.py autoencoder_wrapper.py comparison_algorithms/logistic_regression.py data_funcs.py comparison_algorithms/svm.py comparison_algorithms/random_forest.py multimodal_autoencoder.py helper_funcs.py MMAEClassificationWrapper reload_dependencies reload_files MMAEWrapper compute_all_classification_metrics compute_classification_metric reload_dependencies binary_accuracy Wrapper ClassificationWrapper get_baseline get_friendly_label_name get_secs_mins_hours_from_secs MultimodalAutoencoder get_rmse reload_files bias_variable weight_variable email_about_job Job load_job_file run_jobs reload_files send_email run_job LRWrapper reload_dependencies reload_dependencies NeuralNetwork NNWrapper bias_variable weight_variable RFWrapper reload_dependencies reload_dependencies SVMWrapper reload reload len float tolist count metric compute_classification_metric sqrt random_uniform truncated_normal constant join login print starttls SMTP ehlo sendmail quit append readlines Job open str time read int get_secs_mins_hours_from_secs join print name write close command output_file popen split exists open name send_email email_about_job send_email run_job load_job_file
# MultimodalAutoencoder Code supporting the following paper: <br /> Jaques N., Taylor S., Sano A., Picard R.,<strong>"Multimodal Autoencoder: A Deep Learning Approach to Filling In Missing Sensor Data and Enabling Better Mood Prediction", </strong> International Conference on Affective Computing and Intelligent Interaction, October 2017, Texas, USA. <a href="https://affect.media.mit.edu/pdfs/17.Jaques_autoencoder_ACII.pdf">pdf</a> <br/> ## Description The MultimodalAutoencoder (MMAE) is designed to deal with data in which large, contiguous blocks of features go missing at once; specifically all the features extracted from the same data source or *modality*. For example, all the features extracted from a skin conductance sensor may go missing if the sensor experiences a technical issue when recording data for a particular sample. By randomly blocking out different modalities from the training data and learning to reconstruct them, the MMAE is able to reconstruct real missing data. ## Files, file names, and folders * multimodal_autoencoder.py - The main code for the MMAE model. * run_jobs.py - Code for running jobs to train the models on a server and emailing you when they finish. * generic_wrapper.py - Generic classes that can be inherited to build wrappers that will perform grid searches over hyperparameter settings for different models. * Any *wrapper* file - An inherited version of the generic wrapper for a specific model.
3,090
naturomics/DLF
['density estimation']
['Generative Model with Dynamic Linear Flow']
datasets/mnist.py demo.py datasets/lsun.py layers.py datasets/__init__.py ops.py optim.py graphics.py datasets/cifar10.py datasets/dataloader.py datasets/utils.py main.py datasets/celeba.py model.py datasets/imagenet.py main get_batch _save_raster save_raster save_image to_raster g_0 convnet g_k revnet2d split2d_reverse revnet2d_step split2d_prior split2d prior init_visualizations infer ResultLogger main train _print get_arguments Model codec invertible_1x1_conv logistic_logpdf flatten_sum actnorm assert_in_range gaussian_diag add_edge_padding logitic_logcdf linear_zeros default_initializer shape conv2d mixlogistic_logcdf conv2d_zeros allreduce_mean squeeze2d allreduce_sum mixlogistic_logpdf mixlogistic_invcdf linear unsqueeze2d polyak adam adamax DataLoader DataLoader load_cifar10 DataLoader DataLoader DataLoader DataLoader load_mnist bytes_feature maybe_download_and_extract int64_feature download_and_uncompress_zip append reshape array open decode batch_size Saver save Session run fromarray restore placeholder Model results_dir encode append expand_dims ceil range get_batch latest_checkpoint mean ConfigProto enumerate join uint8 time int print int32 zeros len fromarray save start Thread to_raster save_image int reshape min sqrt repeat ceil zeros range max clip invertible_1x1_conv num_parts conv2d conv2d_zeros relu int tanh conv2d_zeros split get_variable ycond tanh conv2d_zeros gaussian_diag split zeros get_variable write range flush len decode normal asarray top_shape float32 placeholder choice int32 makedirs num_gpus batch_size save ResultLogger steps_warmup max dataloader decay_rate run visualize initialize init_visualizations decay_steps get_element results_dir append initial_lr num_variables print_per_steps close lr power _print join time print min write nanmean num_gpus initialize join batch_size concatenate results_dir get_element save encode dataloader append run seed num_gpus num_classes debug train infer set_random_seed LocalCLIDebugWrapperSession DataLoader add_argument ArgumentParser append split2d split2d_reverse revnet2d get_shape transpose reshape get_shape transpose reshape as_list join convert_to_tensor concat get_collection pad add_to_collection tile zeros shape random_normal group apply average ExponentialMovingAverage range len polyak_epochs get_shape beta1 gradients Variable group maximum train_its sqrt pow assign_add assign weight_decay polyak zip append zeros abs polyak_epochs get_shape beta1 gradients Variable group square train_its sqrt pow assign_add assign weight_decay polyak zip append zeros join str astype float32 lower int32 empty range load_batch lower download_and_uncompress_zip join urlretrieve print endswith extractall close open makedirs
# Dynamic Linear Flow (DLF) Code for reproducing results in ["Generative Model with Dynamic Linear Flow"](https://arxiv.org/pdf/1905.03239) In our paper, we proposed Dynamic Linear Flow, a new family of exact likelihood-based methods. Our method benefits from the efficient computation of flow-based methods (RealNVP, Glow, etc.) and high density estimation performance of autoregressive methods (PixelCNN, PixelSNAIL etc.). DLF yields state-of-the-art performance in density estimation benchmarks and efficiently synthesizes high-resolution images. Additionally, DLF converges 10x faster than other flow-based models such as Glow. Read our [paper](https://arxiv.org/pdf/1905.03239) for more details. <p align="center"> <img src="imgs/DLFArch.png"> </p> ## Requirements - python3
3,091
naufalso/distributed-blackbox-adv-attack
['adversarial attack']
['A Distributed Black-Box Adversarial Attack Based on Multi-Group Particle Swarm Optimization']
utils/global_best_utils.py interface/attack.py helpers/dataset_helper.py utils/attack_utils.py helpers/mnist.py server/attack_server.py utils/base64_util.py helpers/google.py helpers/cifar10.py client/attack_client.py pso/distributed_multigroup_pso.py server/ai_model_server.py configure/server_configuration.py pso/multi_group_pso.py attack/google_attack.py main.py interface/server.py server/global_best_server.py attack/mgrr_pso_attack.py Google_Attack AttackClient Cifar10_Helpers Dataset_Helper Google_Vision_Helpers Mnist_Helpers IsIntegerValidator InterfaceAttack IsFloatValidator InterfaceServer Distributed_MGRR_PSO MGRR_PSO cifar10_predict cifar10_cw_predict mnist_predict fn mnist_cw_predict softmax ClientThread AttackThread AttackServer global_best_reset global_best_get global_best_update AttackTarget AttackResult Base64_Utils Global_Best_Utils sum exp reshape dumps decode_numpy get_json predict reshape dumps decode_numpy get_json predict reshape dumps decode_numpy get_json predict reshape dumps decode_numpy get_json predict print dumps decode_numpy get_json zeros astype dumps print dumps
# A Distributed Black-Box Adversarial Attack Based on Multi-Group Particle Swarm Optimization ### By: Naufal Suryanto, Hyoeun Kang, Yongsu Kim, Youngyeo Yun, Harashta Tatimma Larasati, Howon Kim ![Distributed Black-Box Adversarial Attack](./staticimg/attack_overview_new.png) Paper Source: [A Distributed Black-Box Adversarial Attack Based on Multi-Group Particle Swarm Optimization](https://www.mdpi.com/1424-8220/20/24/7158/htm)
3,092
navdeepkumar12/Tic
['stochastic optimization']
['Adam: A Method for Stochastic Optimization']
model1.py mnist.py test.py tools.py nn.py pm.py init.py gridcreation.py main.py play.py graphic.py nntraining.py dict_to_list go location_to_cordinate wline location plot grid check star Q_hist board circle init model model he adamax hadamard ones add pad uniform adam normal param relu momentum mse sequential softmax optimizer convolve3d convolve linear cre sigmoid convolve2d zeros layer model load_state play2 plot play model Filter Symmetry Path Valid_start_state finish_check_array_in_bool dump_Q Symmetry_update fprint value_list Result Toggle Update initialize_Q Chance array_to_string string_to_array cprint index load_Q Action SAS format cprint len append enumerate append int floor line list line location_to_cordinate map where array star circle location_to_cordinate plot location print copy shape imread tictac_board_adress flatten list array values load_Q hist dict_to_list line int imsize range str imwrite output_adress check go_board_adress imread imwrite output_adress flatten list location_to_cordinate location map ceil imsize format sqrt board join int print cprint array circle len Valid_start_state int str dump format list load print loadtxt getcwd len cprint filter savetxt initialize_Q keys exists open update format backward forward reshape cprint mean fprint zip append argmax y sum array load print open show imshow close format plot print grid cprint eval input load_state Action SAS print Toggle append load_state Action range SAS print format format write flush load format print open dump format print getcwd exists open join imr base_repr zeros range init_reward enumerate list array map enumerate str list join map where array finish_check_array_in_bool list map append array list map join list Result format str print map list sum array map max list Result format arange Q print rand map choice choose array len int list join str map index append choose join list Toggle path_length map Chance append Action range SAS join list Symmetry int format print map enumerate Toggle Symmetry_update alpha range len Chance flatten list array list print load_Q value_list values loadtxt savetxt exists int
# TicTacToe This trains agent to play TicTac via reinforcement learnig. To Train:- Run main.py. It will output Q<index> file which contains Q value function, and other plots and file. One set of output file indexed with 129 is provided. To change parameters for the training :- edit parameters values in pm.py To play with trained agent interactively:- 1) Run play.py, 2)enter 'Q<>' with which you want to play. ex Q10, Q129 (see which file was created. 3) Enter yes if want to play first , no if you want agent to play first. You must have opencv installed for graphics to run. # ALPHA GO nn.py has neural network library, like linear, relu, softmax, convolution, cre, mse forward and backpropagation. For theoritical proofs see nn.pdf.
3,093
naveenkamalpv/object-tracking-and-video-implementaion-of-yolov3
['multiple object tracking']
['Simple Online and Realtime Tracking']
utils/utils.py filterpy/hinfinity/hinfinity_filter.py filterpy/kalman/mmae.py filterpy/gh/__init__.py utils/parse_config.py filterpy/kalman/IMM.py filterpy/discrete_bayes/discrete_bayes.py filterpy/examples/__init__.py filterpy/__init__.py filterpy/kalman/tests/ukf2.py filterpy/kalman/kalman_filter.py filterpy/monte_carlo/resampling.py filterpy/stats/__init__.py filterpy/kalman/UKF.py filterpy/kalman/tests/test_fls.py filterpy/kalman/sigma_points.py filterpy/leastsq/__init__.py filterpy/kalman/CubatureKalmanFilter.py filterpy/stats/stats.py filterpy/leastsq/tests/test_lsq.py filterpy/kalman/tests/test_ekf.py filterpy/examples/GetRadar.py filterpy/kalman/tests/test_sensor_fusion.py utils/datasets.py filterpy/kalman/tests/test_ckf.py kalman-filter-master/kalman-filter.py filterpy/common/tests/test_discretization.py kalman-filter.py filterpy/examples/bearing_only.py filterpy/kalman/tests/test_imm.py filterpy/kalman/tests/test_ukf.py filterpy/common/helpers.py filterpy/examples/RadarUKF.py filterpy/memory/fading_memory.py sort.py filterpy/discrete_bayes/__init__.py filterpy/kalman/tests/test_information.py filterpy/hinfinity/__init__.py filterpy/gh/tests/test_gh.py filterpy/kalman/EKF.py filterpy/memory/tests/test_fading_memory.py filterpy/discrete_bayes/tests/test_discrete_bayes.py filterpy/kalman/tests/test_rts.py filterpy/kalman/tests/test_enkf.py filterpy/kalman/square_root.py filterpy/monte_carlo/__init__.py filterpy/stats/tests/test_stats.py filterpy/kalman/fading_memory.py filterpy/leastsq/least_squares.py filterpy/common/tests/test_helpers.py filterpy/kalman/fixed_lag_smoother.py filterpy/hinfinity/tests/test_hinfinity.py filterpy/kalman/ensemble_kalman_filter.py filterpy/kalman/unscented_transform.py filterpy/kalman/tests/test_mmae.py models.py filterpy/common/discretization.py filterpy/common/kinematic.py filterpy/kalman/tests/test_kf.py filterpy/kalman/tests/test_sqrtkf.py filterpy/examples/radar_sim.py filterpy/kalman/__init__.py filterpy/kalman/tests/test_fm.py filterpy/common/__init__.py filterpy/memory/__init__.py filterpy/kalman/information_filter.py filterpy/gh/gh_filter.py KalmanFilter example YOLOLayer create_modules Darknet EmptyLayer KalmanBoxTracker iou Sort convert_bbox_to_z associate_detections_to_trackers convert_x_to_bbox parse_args van_loan_discretization linear_ode_discretation order_by_derivative Q_discrete_white_noise Q_continuous_white_noise reshape_z inv_diagonal pretty_str pprint Saver outer_product_sum runge_kutta4 kinematic_state_transition kinematic_kf test_linear_ode test_kinematic near_eq test_Q_discrete_white_noise test_kinematic_filter test_save_properties test_outer_product test_saver_kf test_saver_ekf test_inv_diagonal test_saver_UKF update normalize predict test_predictions _predict hx fx get_radar hx fx RadarSim benedict_bornder_constants critical_damping_parameters GHFilterOrder optimal_noise_smoothing least_squares_parameters GHKFilter GHFilter optimal_test test_GHFilterOrder test_least_squares test_1d_array test_2d_array HInfinityFilter test_Hinfinity CubatureKalmanFilter spherical_radial_sigmas ckf_transform ExtendedKalmanFilter EnsembleKalmanFilter FadingKalmanFilter FixedLagSmoother IMMEstimator InformationFilter update predict_steadystate KalmanFilter batch_filter rts_smoother predict update_steadystate MMAEFilterBank JulierSigmaPoints MerweScaledSigmaPoints SimplexSigmaPoints SquareRootKalmanFilter UnscentedKalmanFilter unscented_transform test_1d test_ekf test_1d_const_vel test_circle test_fls test_batch_equals_recursive one_run_test_fls test_noisy_1d make_cv_filter generate_data ManeuveringTarget angle_between NoisySensor test_imm test_misshapen make_ca_filter test_against_kf test_1d test_1d_0P test_noisy_1d test_steadystate class_form test_procedural_batch_filter const_vel_filter const_vel_filter_2d PosSensor1 proc_form test_z_checks test_univariate test_default_dims test_1d_vel test_procedure_form test_functions test_z_dim test_batch_filter test_noisy_11d make_cv_filter generate_data ManeuveringTarget angle_between NoisySensor test_MMAE2 make_ca_filter test_rts sensor_fusion_test test_fusion single_measurement_test test_noisy_1d test_sigma_plot test_rts test_linear_rts _test_log_likelihood test_linear_2d_simplex test_simplex_sigma_points_1D test_fixed_lag test_scaled_weights test_circle kf_circle two_radar test_linear_1d RadarSim test_julier_sigma_points_1D test_radar test_batch_missing_data test_linear_2d_merwe LeastSquaresFilter LSQ test_listing_3_4 lsq2_plot test_second_order test_fig_3_8 LeastSquaresFilterOriginal near_equal test_lsq test_first_order test_big_data FadingMemoryFilter test_ghk_formulation dotest_2d_data dotest_1d systematic_resample residual_resample multinomial_resample stratified_resample plot_3d_covariance mul logpdf plot_gaussian_cdf plot_covariance_ellipse log_likelihood plot_discrete_cdf mul_pdf multivariate_multiply gaussian add plot_gaussian mahalanobis multivariate_gaussian _std_tuple_of norm_cdf rand_student_t NESS covariance_ellipse _validate_vector plot_covariance plot_gaussian_pdf likelihood _to_cov _eigsorted _is_inside_ellipse test_mahalanobis do_plot_test covariance_3d_plot_test test_norm_cdf test_multivariate_gaussian test_logpdf KalmanFilter example ImageFolder ListDataset parse_data_config parse_model_config compute_ap build_targets bbox_iou_numpy to_categorical weights_init_normal load_classes bbox_iou non_max_suppression update normal list KalmanFilter show plot reshape linspace legend append array range len pop int YOLOLayer Sequential ZeroPad2d MaxPool2d add_module Conv2d ModuleList EmptyLayer Upsample append BatchNorm2d LeakyReLU sum enumerate minimum maximum float sqrt linear_assignment iou concatenate reshape append zeros empty enumerate add_argument ArgumentParser eye zeros ravel array enumerate dot zeros expm T T expm inv dot vstack eye zeros f len is_col split print pretty_str T atleast_2d asarray shape zeros range len einsum zeros float range factorial KalmanFilter block_diag eye fill kinematic_state_transition ravel range enumerate kinematic_kf Q_discrete_white_noise linear_ode_discretation array range update kinematic_kf zeros array range predict update MerweScaledSigmaPoints UnscentedKalmanFilter Saver save to_array array diag predict update predict Saver save to_array range kinematic_kf update Saver save to_array ExtendedKalmanFilter range predict randint range diag randn Saver save Foo outer_product_sum randn int range zeros len normalize range randint randn sqrt posp randn array least_squares_parameters range update str Saver save to_array array range GHFilter update array range GHFilter update plot randn fx optimal_noise_smoothing append GHKFilter range x update randn GHFilterOrder fx range GHFilter update subplot T plot print append range array HInfinityFilter predict flatten shape sqrt cholesky empty range flatten shape range zeros reshape_z T inv ndim atleast_1d dot isscalar eye logpdf array reshape_z ndim atleast_1d dot isscalar array dot T array isscalar dot array isscalar update size save zip zeros predict enumerate T inv dot zeros range T mean_fn diag residual_fn dot shape zeros range update CKF y SI UKF scipy_mahalanobis shape Saver eye save to_array zeros range array MerweScaledSigmaPoints predict y P scipy_mahalanobis RadarSim Saver get_range save to_array subplot ylabel shape append range predict pos update asarray SI plot ExtendedKalmanFilter int eye zeros array x update asarray EnKF plot randn Saver Q_discrete_white_noise eye save append to_array legend array range predict update str asarray EnKF plot cos axis x Q_discrete_white_noise eye sin append legend array range predict one_run_test_fls range asarray xSmooth smooth FixedLagSmoother smooth_batch array enumerate show KalmanFilter plot print smooth_batch FixedLagSmoother cla mean legend rts_smoother abs array batch_filter y R randn scipy_mahalanobis batch_filter show shape legend append range predict update SI plot FadingKalmanFilter sqrt S T print eye zeros array KalmanFilter array Q_discrete_white_noise KalmanFilter array Q_discrete_white_noise update list set_commanded_speed ManeuveringTarget NoisySensor set_commanded_heading zip append array range randn Saver save to_array str subplot ylim scatter title append range predict update KalmanFilter plot IMMEstimator copy enumerate T dot figure zeros array len IMMEstimator KalmanFilter array update KalmanFilter P InformationFilter randn print plot copy sqrt eye append range array diag predict str KalmanFilter plot InformationFilter randn print copy append update T KalmanFilter InformationFilter print inv rand copy eye array range predict T KalmanFilter Q_discrete_white_noise eye array diag T KalmanFilter block_diag Q_discrete_white_noise array Saver to_array KalmanFilter show subplot T plot randn inv copy dot eye append array range update show T KalmanFilter y SI plot randn scipy_mahalanobis shape eye legend append zeros array range predict batch_filter KalmanFilter array batch_filter update KalmanFilter array range predict update KalmanFilter asarray plot randn copy Q_discrete_white_noise eye append array range predict update predict_steadystate y SI scipy_mahalanobis shape kinematic_kf zeros range predict update_steadystate KalmanFilter test_matrix_dimensions len Q_discrete_white_noise eye zip array batch_filter update randn Q_discrete_white_noise eye array range predict update randn const_vel_filter range predict update T test_matrix_dimensions const_vel_filter const_vel_filter_2d range array diag update T KalmanFilter predict update array diag predict update T KalmanFilter array update MMAEFilterBank subplot plot p generate_data print likelihood title Saver figure save to_array append legend make_ca_filter predict enumerate show KalmanFilter plot legend rts_smoother array batch_filter seed update subplot KalmanFilter asarray std format randn print plot show append array range predict seed update subplot KalmanFilter asarray std format randn print plot show Q axhline K append array range predict single_measurement_test sensor_fusion_test str SquareRootKalmanFilter save str JulierSigmaPoints scatter Wm sigma_points SimplexSigmaPoints figure range array MerweScaledSigmaPoints plot_covariance_ellipse range MerweScaledSigmaPoints linspace sigma_points JulierSigmaPoints unscented_transform zip unscented_transform sigma_points SimplexSigmaPoints zip y arange scipy_mahalanobis RadarSim get_range seed str subplot shape append range predict update SI plot JulierSigmaPoints print UnscentedKalmanFilter figure zeros array x len str asarray plot print UnscentedKalmanFilter figure rts_smoother array MerweScaledSigmaPoints batch_filter asarray plot print UnscentedKalmanFilter SimplexSigmaPoints rts_smoother append array range batch_filter update T print x UnscentedKalmanFilter append range array MerweScaledSigmaPoints predict MerweScaledSigmaPoints batch_filter UnscentedKalmanFilter append array range len arange RadarSim get_range seed subplot shape append range predict update JulierSigmaPoints print UnscentedKalmanFilter figure eye zeros x len arange P RadarSim get_range batch_filter seed subplot shape rts_smoother append range predict update asarray plot JulierSigmaPoints print UnscentedKalmanFilter figure eye zeros array x len R randn hx radians KalmanFilter JulierSigmaPoints print UnscentedKalmanFilter update radians KalmanFilter asarray plot randn cos axis x eye sin append legend hx_inv array range predict arange batch_filter show subplot ylabel ACSim noisy_reading ylim Q_discrete_white_noise legend rts_smoother append range update asarray plot tight_layout copy int xlabel UnscentedKalmanFilter figure RadarStation array diag len normal T KalmanFilter MerweScaledSigmaPoints ones copy UnscentedKalmanFilter Saver Q_discrete_white_noise save to_array append zeros rts_smoother array range batch_filter y diag scipy_mahalanobis Saver save to_array log_likelihood shape Q_discrete_white_noise predict update SI plot diagonal print UnscentedKalmanFilter zeros array MerweScaledSigmaPoints x update str plot LeastSquaresFilterOriginal lsq zip append enumerate GHFilter LeastSquaresFilter append plot LeastSquaresFilter list plot lsf0 len LeastSquaresFilterOriginal scatter append range LeastSquaresFilter plot lsf0 LeastSquaresFilterOriginal append LeastSquaresFilter append plot LeastSquaresFilter LSQ update scatter eye array range array LeastSquaresFilter update scatter FadingMemoryFilter update plot randn scatter FadingMemoryFilter append update FadingMemoryFilter fx GHKFilter range cumsum astype random searchsorted zeros range len list cumsum random zeros range len arange cumsum random zeros len cumsum atleast_1d squeeze T _validate_vector atleast_2d inv dot float dot T flatten sum exp asarray pi sqrt exp pi issparse warn pi flatten dot _to_cov log len dot asarray inv list plot cumsum set_xlabel set_ylabel gca range len norm arange plot set_xlabel set_xlim sqrt set_ylabel gca cdf set_ylim norm arange plot set_xlabel set_xlim axvline pdf sqrt set_ylabel gca set_ylim warn svd sqrt atan2 argsort eigh cos add_subplot pi linspace max atleast_2d set_xlabel title real sin gcf ones_like asarray set_xlim sqrt set_zlim set_zlabel kron T outer set_ylabel plot_surface _eigsorted set_ylim plot_covariance warn isscalar covariance_ellipse plot Ellipse set_xlim axis degrees add_patch title scatter gca _std_tuple_of set_ylim sqrt atleast_2d isscalar cholesky gammavariate gauss append dot zip T randn dot randint mahalanobis array range multivariate_gaussian random zip randn cos sin T covariance_ellipse print plot_covariance _is_inside_ellipse axis scatter append array range len norm_cdf logpdf gcf plot_3d_covariance multivariate_normal add_subplot scatter array rstrip strip open startswith append split dict strip split open data normal_ __name__ constant_ concatenate size maximum sum range clamp min max minimum eps expand_dims maximum data sort new squeeze size shape unsqueeze cuda unique bbox_iou append max is_cuda cat enumerate int fill_ FloatTensor ones concatenate size range unsqueeze bbox_iou zeros argmax log
# Object Tracking Object detection in images, and tracking across video frames ### Step1 : Open Object_Tracking.ipynb file in google colab ### Step2 : go through the code and add yolov3 weights in proper extention and run the code! References: 1. YOLOv3: https://pjreddie.com/darknet/yolo/ 2. Erik Lindernoren's YOLO implementation: https://github.com/eriklindernoren/PyTorch-YOLOv3 3. YOLO paper: https://pjreddie.com/media/files/papers/YOLOv3.pdf 4. SORT paper: https://arxiv.org/pdf/1602.00763.pdf 5. Alex Bewley's SORT implementation: https://github.com/abewley/sort
3,094
naver/cgd
['image retrieval']
['Combination of Multiple Global Descriptors for Image Retrieval']
evaluator.py test.py dataset.py Dataset ImageData Evaluator Model test test_txt format evaluate print data_dir ctx Compose Evaluator DataLoader Model train_txt zip recallk print_stats Dataset bbox_txt
# Combination of Multiple Global Descriptors for Image Retrieval This is the repository to reproduce the results of our paper **"[Combination of Multiple Global Descriptors for Image Retrieval](https://arxiv.org/abs/1903.10663)"**. **HeeJae Jun\*, Byungsoo Ko\*, Youngjoon Kim, Insik Kim, Jongtack Kim** (* Authors contributed equally.) @NAVER/LINE Vision ## Approach <div align="center"> <img src="figures/architecture.png"> </div> ## Prerequisite * Python 2.7 or above
3,095
naver/popeval
['optical character recognition']
['PopEval: A Character-Level Approach to End-To-End Evaluation Compatible with Word-Level Benchmark Dataset']
popEval.py _divide removeControversialBox removeNoncontroversialBox papagoEval make_pair getPolygon removeDoncareBox chunker process convex_hull _divide area zip append float enumerate join list STRtree representative_point min intersects index set dict query distance zip append keys range enumerate len max list join representative_point min removeNoncontroversialBox area index distance unique append float keys values enumerate _divide join removeControversialBox len removeNoncontroversialBox getPolygon removeDoncareBox split append chunker float enumerate _divide float reduce len fname
# popEval This proposed evaluation algorithm is not only applicable to current end-to-end tasks, but also suggests a new direction to redesign the evaluation concept for further OCR researches. Keywords: end-to-end evaluation; character level evaluation; character-oriented evaluation, optical character recognition; ## Usage ### Prediction and ground truth file format 8 coordinates( 4 points of (x,y) format ) and text. - Both (x,y) and (y,x) are acceptable. But all data should be consistent. - Order of points are not important. They will be reordered when evaluating. - The splitter between coordinates and text is <code>##::</code> by default. #### Example.
3,096
naver/sqlova
['semantic parsing']
['A Comprehensive Exploration on WikiSQL with Table-Aware Word Contextualization']
wikisql/annotate.py sqlova/utils/__init__.py train_decoder_layer.py sqlova/utils/utils.py sqlova/__init__.py wikisql/lib/common.py train.py wikisql/lib/dbengine.py sqlnet/dbengine.py sqlova/utils/wikisql_formatter.py sqlova/utils/utils_wikisql.py add_question.py train_shallow_layer.py sqlova/model/nl2sql/wikisql_models.py predict.py annotate_ws.py add_csv.py evaluate_ws.py bert/modeling.py wikisql/evaluate.py wikisql/lib/table.py bert/tokenization.py bert/convert_tf_checkpoint_to_pytorch.py wikisql/lib/query.py csv_to_sqlite get_types is_num get_refined_rows csv_to_json get_table_name question_to_json find_sub_list annotate_example_ws check_wv_tok_in_nlu_tok annotate is_valid_example annotate_example predict construct_hyper_param tokenize_corenlp get_bert infer print_result test tokenize_corenlp_direct_version get_data get_models get_opt train report_detail construct_hyper_param get_bert print_result test get_data get_models get_opt train report_detail construct_hyper_param get_bert print_result test get_data get_models get_opt train report_detail convert BERTPooler BertForSequenceClassification BERTIntermediate BERTOutput BERTSelfOutput BertForSQuAD2 BertForWikiSQL gelu BERTLayerNorm BERTSelfAttention BertConfig BERTLayer BERTAttention BertForQuestionAnswering BERTEncoder BERTEmbeddings BertNoAnswer BertModel FullTokenizer BasicTokenizer WordpieceTokenizer printable_text convert_tokens_to_ids load_vocab whitespace_tokenize convert_to_unicode _is_whitespace _is_control _is_punctuation DBEngine Loss_sw_se Loss_s2s SAP WOP Loss_sc Loss_wn Loss_wo FT_Scalar_1 WCP Seq2SQL_v1 SCP FT_s2s_1 WNP Loss_wv_se Decoder_s2s Loss_wc WVP_se Loss_sa topk_multi_dim json_default_type_checker generate_perm_inv ensure_dir load_jsonl sort_and_generate_pr_w gen_sql_q_from_i_vg hs_to_idx make_w2i_wemb get_cnt_wc_list cal_prob_sa pred_sa cal_prob get_cnt_wc find_sub_list cal_prob_select pred_wn encode_hpu cal_prob_wo tokenize_nlu1 get_wemb_h get_bert_output_s2s get_cnt_sw get_pnt_idx1 gen_i_vg_from_pnt_idxs load_w2i_wemb cal_prob_tot cal_prob_wvi_se find_where_pnt_belong is_whitespace_g_wvi generate_sql_i word_to_idx1 pred_wc get_cnt_sc pred_sc_beam cal_prob_sc get_wemb_bert words_to_idx get_fields_1 generate_w2i_wemb update_w2i_wemb generate_sql_q get_cnt_wo_list pred_sc generate_sql_q_s2s cal_prob_where load_wikisql_data cal_prob_wc gen_g_pnt_idx get_cnt_x_list pred_sw_se find_sql_where_op gen_pnt_i_from_pnt encode get_wv1 get_g_wvi_bert generate_w2i_wemb_e2k_headers generate_sql_q1_s2s save_for_evaluation pred_wvi_se_beam get_wemb_n get_g_wvi_bert_from_g_wvi_corenlp get_loader_wikisql get_bert_output pred_pnt_idxs get_cnt_lx_list_s2s sort_pr_wc get_g_wvi_bert_from_sql_i generate_inputs get_fields get_cnt_wv_list get_cnt_sc_list gen_pnt_n get_mean_grad get_cnt_sa pred_wvi_se generate_sql_q1 pred_wo get_g get_cnt_lx_list tokenize_hds1 check_sc_sa_pairs get_cnt_wv generate_w2i_wemb_table merge_wv_t1_eng pred_wc_sorted_by_prob get_cnt_sw_list get_wemb_h_FT_Scalar_1 get_g_wvi_corenlp pred_wc_old get_cnt_wvi_list gen_l_hpu load_wikisql get_cnt_wn cal_prob_wn remap_sc_idx generate_inputs_s2s convert_pr_wvi_to_string save_for_evaluation_aux get_wc1 get_cnt_wo get_wo1 get_squad_style_ans get_tbl_context generate_wikisql_bert get_qas annotate is_valid_example annotate_example detokenize count_lines DBEngine Query Table join format create_engine match compile append is_num append float enumerate join after word originalText append CoreNLPClient deepcopy join format str annotate append len find_sub_list append enumerate deepcopy str check_wv_tok_in_nlu_tok annotate append print format set join beam_forward sort_and_generate_pr_w pred_sw_se generate_sql_i generate_sql_q model DBEngine convert_pr_wvi_to_string eval get_wemb_bert zip append get_g_wvi_corenlp get_fields get_g enumerate seed manual_seed_all print add_argument manual_seed is_available parse_args load join FullTokenizer print load_state_dict print_status to from_json_file BertModel Adam bert_type load num_target_layers print get_bert to Seq2SQL_v1 do_lower_case hS lS dr is_available load_state_dict no_pretraining iS hidden_size len get_loader_wikisql load_wikisql toy_model bS toy_size model DBEngine zero_grad get_g get_cnt_x_list get_cnt_lx_list pred_sw_se get_cnt_sw_list get_g_wvi_corenlp get_g_wvi_bert_from_g_wvi_corenlp enumerate join Loss_sw_se generate_sql_i backward sort_pr_wc convert_pr_wvi_to_string get_wemb_bert step get_fields print sort_and_generate_pr_w generate_sql_q model DBEngine tensor report_detail get_g get_cnt_x_list get_cnt_lx_list pred_sw_se append beam_forward eval get_cnt_sw_list get_g_wvi_corenlp get_g_wvi_bert_from_g_wvi_corenlp enumerate join Loss_sw_se generate_sql_i convert_pr_wvi_to_string get_wemb_bert get_fields append originalText annotate append sentence originalText token join beam_forward sort_and_generate_pr_w generate_sql_q print DBEngine tokenize_corenlp_direct_version eval get_wemb_bert execute_return_query show_table print max_seq_length FT_s2s_1 generate_sql_q get_mean_grad gen_sql_q_from_i_vg gen_g_pnt_idx gen_i_vg_from_pnt_idxs append Loss_s2s mean pred_pnt_idxs get_cnt_lx_list_s2s named_parameters get_bert_output_s2s std len gen_sql_q_from_i_vg gen_g_pnt_idx gen_i_vg_from_pnt_idxs EG_forward Loss_s2s pred_pnt_idxs get_cnt_lx_list_s2s print get_bert_output_s2s len list FT_Scalar_1 num_hidden_layers get_wemb_h_FT_Scalar_1 get_wemb_n get_bert_output hidden_size forward_EG num_hidden_layers cal_prob get_wemb_h_FT_Scalar_1 get_wemb_n get_bert_output hidden_size save from_json_file tf_checkpoint_path transpose bert_config_file shape from_numpy getattr list_variables append state_dict pytorch_dump_path format zip BertModel load_variable int print fullmatch split isinstance PY3 PY2 isinstance PY3 PY2 OrderedDict append strip split category category startswith startswith category ord to cross_entropy to cross_entropy to cross_entropy binary_cross_entropy sigmoid shape to enumerate enumerate to enumerate enumerate len zeros enumerate len makedirs topk reshape shape unravel_index numpy range append enumerate isinstance print shuffle load_wikisql_data load_w2i_wemb print join load join DataLoader append get_fields_1 get append len word_to_idx1 len append to range enumerate append words_to_idx len unsqueeze_ to pack_padded_sequence lstm pad_packed_sequence argsort shape generate_perm_inv float array squeeze size new_zeros shape encode to max enumerate len append append append get_wo1 append get_wc1 enumerate get_wv1 len append append join stack save generate_w2i_wemb generate_w2i_wemb_table update_w2i_wemb items list update_w2i_wemb enumerate update_w2i_wemb items list values tokenize append tokenize append tokenize enumerate len append gen_l_hpu convert_tokens_to_ids len model_bert generate_inputs_s2s append to tokenize enumerate gen_l_hpu convert_tokens_to_ids len model_bert append to generate_inputs tokenize enumerate to max range len to sum max range enumerate len get_bert_output num_hidden_layers get_wemb_h get_wemb_n hidden_size to max enumerate len append item append topk tolist append item append item list sort len append enumerate append sort list enumerate list argsort append range len append list argmax enumerate squeeze append argmax range enumerate split int topk squeeze sqrt item ceil zeros numpy range append split append enumerate pred_sa pred_wn pred_sc pred_wc pred_wvi_se pred_wo get lower find_sub_list find_sql_where_op index append enumerate len append enumerate find_sub_list find_sql_where_op index append enumerate len enumerate append enumerate enumerate enumerate sort len array_equal array enumerate sort array_equal append array enumerate len list len argsort array enumerate list argsort append array enumerate len list argsort array range enumerate len list argsort append array range enumerate len list argsort lower append array range enumerate len get_cnt_wn get_cnt_sa get_cnt_sc get_cnt_wv get_cnt_wc get_cnt_wo get_cnt_wv_list get_cnt_sc_list get_cnt_wo_list get_cnt_wvi_list get_cnt_wc_list len append zip execute bool range append len requires_grad mean append tensor abs std append merge_wv_t1_eng range enumerate join join enumerate len enumerate append tolist argsort enumerate generate_sql_q1 append enumerate range len arange append enumerate get_pnt_idx1 len append enumerate item append generate_sql_q1_s2s enumerate enumerate enumerate find_where_pnt_belong enumerate append gen_pnt_i_from_pnt enumerate join merge_wv_t1_eng index append enumerate append enumerate len mean to max enumerate cal_prob_select cal_prob_wn cal_prob_where cal_prob_wc cal_prob_wvi_se cal_prob_sc cal_prob_wo cal_prob_sa cal_prob_tot append enumerate append enumerate append enumerate append softmax enumerate item append softmax enumerate item append softmax enumerate item list sigmoid cpu array append enumerate append softmax enumerate item append numpy enumerate append tokenize enumerate len append deepcopy enumerate append lower find join join zip compile
# SQLova - SQLova is a neural semantic parser translating natural language utterance to SQL query. The name is originated from the name of our department: **S**earch & **QLova** ([Search & Clova](https://clova.ai/ko/research/publications.html)). ### Authors - [Wonseok Hwang](mailto:[email protected]), [Jinyeong Yim](mailto:[email protected]), [Seunghyun Park](mailto:[email protected]), and [Minjoon Seo](https://seominjoon.github.io). - Affiliation: Clova AI Research, NAVER Corp., Seongnam, Korea. - The updated version of manuscript is available from [arXiv](https://arxiv.org/abs/1902.01069). - The manuscript is significantly re-written to improve readability. - The detailed description of the model and human evaluation process have added. - To be presented at [KR2ML Workshop at NeurIPS 2019](https://kr2ml.github.io/2019/#about). - [The old version](https://ssl.pstatic.net/static/clova/service/clova_ai/research/publications/SQLova.pdf).
3,097
navidstuv/NuClick
['instance segmentation', 'interactive segmentation', 'semantic segmentation']
['NuClick: A Deep Learning Framework for Interactive Segmentation of Microscopy Images']
train.py models/losses.py utils/guidingSignals.py utils/utils.py test.py data_handler/generate_train_validation_npy_files.py utils/ModelCheckpointMGPU.py config.py data_handler/customImageGenerator.py data_handler/npyDataOps.py test_all_images.py models/models.py DefaultConfigs main main flip_axis img_to_array DirectoryIterator random_zoom load_img transform_matrix_offset_center albumentation_transform Iterator NumpyArrayIterator _list_valid_filenames_in_directory list_pictures random_rotation random_shear ImageDataGenerator _count_valid_files_in_directory random_shift array_to_img apply_transform loadData infosToNumpyData getLoss weighted_binary_crossentropy dice_coef_loss dice_coef_loss_bce complex_loss_bceWeighted dice_coef binary_crossentropy residual_conv multiScaleConv_block get_MultiScale_ResUnet _conv_bn_relu getModel generateGuidingSignal jitterClicks ModelCheckpointMGPU predictPatchs readImageFromPathAndGetClicks readImageAndCentroids readImageAndGetSignals extract_centroids readImageAndGetClicks getClickMapAndBoundingBox _unsharp_mask_single_channel generateInstanceMap postProcessing predictSingleImage sharpnessEnhancement contrastEnhancement getPatchs_gland getPatchs generateInstanceMap_gland getClickMapAndBoundingBox postProcessing show getcwd readImageAndGetSignals readImageAndGetClicks testTimeJittering predictSingleImage sharpnessEnhancement getModel sum range imsave concatenate copy load_weights getPatchs lossType label2rgb predictPatchs uint8 print float32 generateInstanceMap contrastEnhancement zeros modelType len images_path exists mat_path imshow format save_path testTimeAug mkdir readImageAndCentroids listdir join figure transform_matrix_offset_center pi uniform array apply_transform uniform array apply_transform uniform array transform_matrix_offset_center apply_transform uniform array transform_matrix_offset_center apply_transform uint8 Compose astype dot float array rollaxis min stack randint max zeros swapaxes image_data_format transpose asarray max reshape transpose image_data_format asarray resize convert open endswith _recursive_list join sorted basename _recursive_list relpath endswith dirname append join format ndarray print loadmat mkdir save append listdir array len load join flatten sum flatten binary_crossentropy weighted_binary_crossentropy dice_coef_loss ValueError l2 _conv_bn_relu concatenate _conv_bn_relu add residual_conv multiScaleConv_block concatenate Model _conv_bn_relu Input compile standard_deviation uint8 zeros_like skeletonize_3d distance_transform_edt min float32 mean shape uniform floor argwhere randint max zeros len zeros_like min argwhere randint max gaussian clip range copy _unsharp_mask_single_channel percentile rescale_intensity copy setMouseCallback join namedWindow waitKey copy imshow imread array destroyAllWindows setMouseCallback namedWindow Tk withdraw waitKey copy imshow askopenfilename imread array wm_attributes destroyAllWindows join list asarray tolist len array loadmat keys open tolist delete append zeros range len uint8 ndarray tolist delete zeros array range len uint8 ndarray randint where unique zeros array range len predict_generator squeeze flow ImageDataGenerator len remove_small_holes reconstruction remove_small_objects array range len zeros range argwhere len zeros range len setMouseCallback namedWindow Tk withdraw waitKey copy shape imshow askopenfilename zeros imread wm_attributes destroyAllWindows predictPatchs concatenate float32 copy postProcessing sharpnessEnhancement contrastEnhancement getPatchs_gland zeros generateInstanceMap_gland range len center_of_mass list remove unique
# NuClick Clicks inside the nuclei or draw a scribble inside glands to obtain segmentation. This is Keras implementation of NuClick ([link to paper ](https://arxiv.org/abs/2005.14511) ) ![alt text](gifs/11.gif "H&E")![alt text](gifs/22.gif "H&E") ![alt text](gifs/33.gif "H&E") ## Dataset The **datasets** released as part of NuClick paper are: - Images of white blood cells (WBC) in blood sample images with their segmentation masks ([Download](https://warwick.ac.uk/fac/sci/dcs/research/tia/data/nuclick/hemato_data.zip)) - Datasets of lymphocyte segmentation in Immunohistochemistry (IHC) images ([Download](https://warwick.ac.uk/fac/sci/dcs/research/tia/data/nuclick/ihc_nuclick.zip)) ## Requirements
3,098
navysanghvi/MGpi
['imitation learning']
['MGpi: A Computational Model of Multiagent Group Perception and Interaction']
train.py sim_interact.py train_model.py test_group.py test.py simulate.py sim_interact_dyn.py sim_data GroupInteract data_to_input getSocPoolWts noisy obs_module_input self_enc_input data_noise stack_data data_per_agt CommModels open GroupInteract dump run_all pos gaze mode mean array einsum arctan2 arange range copy len max T arange concatenate transpose append array enumerate append transpose array vstack len load list T arange glob obs_module_input data_noise data_per_agt self_enc_input append max range open T arange stack append zeros range len
# MGpi: A Computational Model of Multiagent Group Perception and Interaction ## Synthetic Dataset (Group Layouts) https://www.dropbox.com/s/e1rzcbeeu86eh96/interaction_data.zip?dl=0 ## Dependency Installations This installs dependencies in a virtual environment, inheriting system packages. Run ```chmod u+x setup.sh; ./setup.sh``` ## Simulating Communication Interactions This will generate training data for our MGpi Network 1. Download and extract the Synthetic Dataset linked above 2. Run ```source virt_mgpi/bin/activate```. This activates the virtual environment with dependencies installed.
3,099