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
gongzhitaao/adversarial-classifier
['adversarial attack']
['Adversarial and Clean Data Are Not Twins']
src/table_1_svhn.py src/table_2.py src/table_1_mnist.py src/figure_2.py src/table_1_cifar10.py src/figure_1.py random_orthogonal maybe_download dot shape norm random print makedirs
gongzhitaao/adversarial-classifier
2,200
google-research/lottery-ticket-hypothesis
['network pruning']
['The Lottery Ticket Hypothesis: Finding Sparse, Trainable Neural Networks']
foundations/union.py mnist_fc/runners/train.py foundations/trainer.py mnist_fc/constants.py datasets/dataset_mnist.py mnist_fc/reinitialize.py foundations/pruning.py mnist_fc/locations.py mnist_fc/argfiles/lottery_experiment_argfile.py foundations/paths.py mnist_fc/train.py foundations/model_base.py mnist_fc/lottery_experiment.py mnist_fc/argfiles/reinitialize_argfile.py mnist_fc/runners/reinitialize.py foundations/model_fc.py mnist_fc/download_data.py mnist_fc/runners/lottery_experiment.py foundations/dataset_base.py setup.py foundations/save_restore.py foundations/pruning_test.py argfile_runner.py foundations/experiment.py main run DatasetMnist DatasetSplit DatasetBase experiment ModelBase ModelFc initial masks final trial summaries log run prune_by_percent PruningTest standardize save_network write_log restore_network read_log train union intersect graph trial initialization run main download train train train main main main main main call check_output split Fire items list ones prune_masks shape train_once range items list prune_by_percent_once items list Exists DeleteRecursively MakeDirs ListDirectory string_types isinstance array log run initial GFile get_train_handle final get global_variables_initializer close FileWriter save_network get_current_weights minimize get_test_handle masks get_validate_handle training_loop summaries loss iteritems iteritems save_network load_data ModelFc partial experiment prune_by_percent PRUNE_PERCENTS HYPERPARAMETERS items list maybe_restore where choice shape standardize DatasetMnist placeholders union Session OPTIMIZER_FN print format range initial experiment masks run train
# The Lottery Ticket Hypothesis ## Authors This codebase was developed by Jonathan Frankle and David Bieber at Google during the summer of 2018. ## Background This library reimplements and extends the work of Frankle and Carbin in "The Lottery Ticket Hypothesis: Finding Small, Trainable Neural Networks" (https://arxiv.org/abs/1803.03635). Their paper aims to explore why we find large, overparameterized networks easier to train than the smaller networks we can find by pruning or distilling. Their answer is the lottery ticket
2,201
google-research/mma
['active learning']
['Combining MixMatch and Active Learning for Better Accuracy with Fewer Labels']
mixmatch_lineargrow.py libml/data.py libml/utils.py mixmatch.py libml/train.py libml/layers.py scripts/create_datasets.py libml/models.py libml/data_pair.py MixMode MixMatch main MixMatch_LinearGrow augment_mirror DynamicDataset compute_mean_std record_parse_orig DataSet record_parse_mnist augment_zoom augment_noise default_parse record_parse augment_shift dataset augment_resize memoize stack_augment closed_form_uniform_argmax PData smart_shape PMovingAverage shakeshake interleave_offsets renorm interleave entropy_from_logits mse_from_logits logit_norm kl_divergence_from_logits entropy_penalty ResNet ConvNet ShakeNet MultiModel Model ClassifyFully ClassifySemi EasyDict find_latest_checkpoint setup_tf getter_ema smart_shape get_latest_global_step get_latest_global_step_in_subdir average_gradients get_low_confidence_from_each_clusters ilog2 para_cat get_available_gpus get_config para_mean idx_to_fixlen get_class_dist model_vars para_list fixlen_to_idx gpu _load_cifar10 _save_files _is_installed_folder _int64_feature _load_svhn_extra _load_svhn_extra_combine_extra _encode_png _load_fashionmnist _save_as_tfrecord _bytes_feature _is_installed _load_mnist _load_cifar100 split join report_kimg MixMatch_LinearGrow ilog2 train_lineargrow width train_dir parse_single_example float32 cast decode_image float32 pad cast parse_single_example decode_image parse_single_example decode_image para_parse max get_available_gpus len stack repeat shuffle pad uniform resize_image_with_pad list arange random_uniform zeros enumerate print get_next sqrt prefetch sum sorted sum Categorical entropy_from_logits Categorical softmax square append sum range range interleave_offsets len T astype append zeros range shape random_uniform len split ConfigProto log_device_placement ERROR set_verbosity shape join Glob compile NewCheckpointReader find_latest_checkpoint get_latest_global_step max average getter tuple ConfigProto list_local_devices append reduce_mean zip zip enumerate get_available_gpus len isinstance len zip get_available_gpus enumerate isinstance len zip get_available_gpus enumerate reshape astype labels_ append argmax range fit array OrderedDict reshape transpose _encode_png list concatenate print _load_svhn_extra keys len _encode_png unflatten _encode_png unflatten print join join list items join list items frozenset makedirs
# MMA - Combining MixMatch and Active Learning for Better Accuracy with Fewer Labels Code for the paper: "[Combining MixMatch and Active Learning for Better Accuracy with Fewer Labels](https://arxiv.org/abs/1912.00594)" by Shuang Song, David Berthelot, and Afshin Rostamizadeh. This is not an officially supported Google product. ## Setup ### Install dependencies ```bash sudo apt install python3-dev python3-virtualenv python3-tk imagemagick virtualenv -p python3 --system-site-packages env3 . env3/bin/activate pip install -r requirements.txt
2,202
google/asymproj_edge_dnn
['link prediction']
['Learning Edge Representations via Low-Rank Asymmetric Projections']
create_dataset_arrays.py deep_edge_trainer.py edge_nn.py third_party/node2vec/node2vec.py RandomNegativesPerNode NumberNodes LargestSubgraph SampleTestEdgesAndPruneGraph SampleNegativeEdges WalkPairsWriter LargestUndirectedSubgraph main CreateDatasetFiles MakeDirectedNegatives SimulateWalks TrainNegatives Description DatasetFileName Evaluator estimate_AUC ModelFileName TrainPairsReader main OutFile InFile PickLearnRate PlusEpsilon EdgeNN Graph alias_draw alias_setup add_edge DiGraph Graph LargestUndirectedSubgraph edges connected_component_subgraphs list is_connected sort map zip deepcopy int add_edge to_undirected is_connected print shuffle edges append range remove_edge len list nodes has_edge set add randint len list print nodes append enumerate len add_edge sorted nodes __class__ edges append set join list dump NumberNodes concatenate print len shuffle LargestSubgraph directed SampleTestEdgesAndPruneGraph SampleNegativeEdges edges save open array MakeDirectedNegatives makedirs num_walks AddPair save max edges range Graph Write simulate_walks enumerate join RandomNegativesPerNode print min WalkPairsWriter preprocess_transition_probs walk_length array len load join add_edge list context DiGraph Graph print CreateDatasetFiles output_dir directed input read_edgelist exists SimulateWalks run output concatenate next_pairs_array DatasetFileName Exists save Session run restore global_variables train_on_pairs uniform build_net global_variables_initializer Evaluator MakeDirs T EdgeNN TrainPairsReader TrainNegatives array len pop len append zeros enumerate int rand floor len
# Learning Edge Representations via Low-Rank Asymmetric Projections Implementation of [ACM CIKM 2017 paper](https://arxiv.org/abs/1705.05615) _Learning Edge Representation via Low-Rank Asymmetric Projections_. As described below, this repository includes: 1. Code to process a graph (i.e. create training files). 1. Code to train node embeddings and edge function, using our method, and evaluation code on link prediction tasks. 1. Dataset files, that are used in our paper. If you use this code, then you should: 1. Note that this is **not** an official Google product. Please direct your
2,203
google/ffn
['boundary detection', 'semantic segmentation']
['Flood-Filling Networks']
ffn/utils/object_utils.py ffn/training/augmentation.py compute_partitions.py ffn/utils/ortho_plane_visualization.py ffn/utils/geom_utils.py ffn/inference/align.py ffn/inference/inference_flags.py ffn/inference/executor.py ffn/inference/resegmentation.py ffn/training/model.py ffn/utils/vector_pb2.py ffn/inference/resegmentation_pb2.py ffn/inference/consensus_pb2.py ffn/training/optimizer.py ffn/inference/resegmentation_analysis.py ffn/inference/storage.py ffn/utils/proofreading.py train.py run_inference.py build_coordinates.py ffn/inference/inference_utils.py ffn/inference/inference.py ffn/utils/png_to_h5.py ffn/utils/bounding_box_pb2.py ffn/training/inputs.py ffn/utils/bounding_box.py ffn/utils/segmentation.py ffn/training/models/convstack_3d.py ffn/inference/seed.py ffn/training/mask.py ffn/utils/decision_point.py ffn/training/import_util.py ffn/training/variables.py ffn/inference/inference_pb2.py setup.py ffn/inference/movement.py ffn/inference/consensus.py ffn/inference/segmentation.py main _int64_feature _bytes_feature compute_partitions load_mask _query_summed_volume adjust_bboxes _summed_volume_table main main train_canvas_size save_flags get_example train_eval_size _get_offset_and_scale_map _get_permutable_axes train_ffn train_labels_size define_data_input fixed_offsets fov_moves get_batch EvalTracker main run_training_step _get_reflectable_axes train_image_size max_pred_offsets prepare_ffn Aligner Alignment compute_consensus_for_segmentations compute_consensus ThreadingBatchExecutor BatchExecutor visualize_state DynamicImage no_halt Canvas Runner _cmap_rgb1 self_prediction_halt request_from_flags options_from_flags TimedIter StatCounter Counters compute_histogram_lut match_histogram timer_counter get_policy_fn BaseMovementPolicy FaceMaxMovementPolicy MovementRestrictor get_scored_move_offsets get_starting_location get_target_path get_canvas process process_point IncompleteResegmentationError evaluate_pair_resegmentation compute_iou InvalidBaseSegmentatonError evaluate_endpoint_resegmentation evaluate_segmentation_result parse_resegmentation_filename PolicyGrid3d PolicyPeaks PolicyInvertOrigins BaseSeedPolicy PolicyPeaks2d PolicyMax PolicyGrid2d make_labels_contiguous _get_index_dtype clear_dust clean_up split_segmentation_by_intersection reduce_id_bits split_disconnected_components dequantize_probability legacy_segmentation_path checkpoint_path threshold_segmentation object_prob_path clip_subvolume_to_bounds build_mask legacy_subvolume_path atomic_file legacy_object_prob_path load_segmentation_from_source quantize_probability load_origins segmentation_path get_existing_subvolume_path load_segmentation subvolume_path get_corner_from_path get_existing_corners save_subvolume decorated_volume reflection permute_axes xy_transpose PermuteAndReflect import_symbol soften_labels load_from_numpylike create_filename_queue ravel_lom_dims ravel_zyx_dims get_offset_scale offset_and_scale_patches unravel_lom_dims lom_radius redundant_lom lom_dims unravel_zyx_dims load_patch_coordinates_from_filename_queue load_patch_coordinates make_seed crop update_at crop_and_pad FFNModel optimizer_from_flags FractionTracker _predict_object_mask ConvStack3DFFNModel BoundingBox OrderlyOverlappingCalculator containing intersections intersection _required find_decision_points ToVector3j To3Tuple ToNumpy3Vector load_equivalences concat_ortho_planes cut_ortho_planes normalize_image ObjectReview GraphUpdater ObjectClassification Base watershed_expand relabel make_labels_contiguous items list defaultdict TFRecordOptions GZIP concatenate shuffle split partition_volumes info max values enumerate cumsum astype int32 masks _summed_volume_table build_mask BoundingBox clear_dust load_mask _query_summed_volume set shape prod _summed_volume_table unique info zeros sum array enumerate len append adjusted_by all array adjust_bboxes BoundingBox Parse segmentation_output_dir join dump bounding_box request_from_flags start Runner MakeDirs run append run image_offset_scale_map split soften_labels load_from_numpylike constant batch_size train_coords reshape ones tolist train_image_size logical_and transform_axes train_labels_size offset_and_scale_patches PermuteAndReflect shuffle_batch equal load_patch_coordinates split list float32 placeholder define_tf_graph chain input_image_size sorted popleft train_image_size extend set add any crop_and_pad deque get_scored_move_offsets array logit load_example get_offsets add_patch crop_and_pad make_seed _batch range zip concatenate MakeDirs train_dir seed int time task train_ffn model_name import_symbol split_segmentation_by_intersection split_min_size reduce_id_bits Process load_segmentation_from_source segmentation2 getpid unique info compute_consensus_for_segmentations segmentation1 sqrt power pi sin fromarray concat_ortho_planes expit ndarray as_strided isinstance concatenate reshape cut_ortho_planes strides shape UpdateFromPIL deltas scored_coords _cmap_rgb1 array inference_options Parse InferenceOptions Parse inference_request InferenceRequest time uint8 cumulative_distribution equalize_adapthist tolist astype array range cumulative_distribution range zeros insert set add shape unravel_index argmax array enumerate get logit move_threshold movement_policy_args movement_policy_name loads import_symbol unravel_index tuple argmax shape update str join id_a id_b point md5 Exists output_directory MakeDirs info error array log_info _deregister_client points info process_point range len int all array float sum max info int sum CopyFrom list ComputeOverlapCounts items ravel segmentation_radius start EndpointSegmentationResult parse_resegmentation_filename int max evaluate_segmentation_result PairResegmentationResult point radius compute_iou from_a segmentation_radius from_b float sum array parse_resegmentation_filename origin arange zeros_like csr_matrix reshape size unique len reshape unique shape max label any list clear_dust copy dict unique zip ravel split_disconnected_components uint64 setdefault bitwise_and dict remap_input unique zip zeros ravel bitwise_or enumerate len HasField split Rename digitize linspace nan astype float32 MakeDirs reduce_id_bits dirname tuple basename search append get_corner_from_path join Glob legacy_segmentation_path Exists checkpoint_path segmentation_path legacy_object_prob_path object_prob_path get_existing_subvolume_path shape BoundingBox intersection invert Alignment expression reshape channels SerializeToString mask align_and_crop logical_not shape WhichOneof clip_subvolume_to_bounds eval fatal expand_bounds decorated_volume zeros values get_existing_subvolume_path min_size threshold HasField split_cc mask convert_to_tensor transpose as_list set_shape rsplit import_module getattr info int Glob search group parse_single_example TFRecordOptions GZIP read dtype list _num_channels iter next array values set_shape py_func array tuple array list tuple extend pad zip append array tuple list full array learning_rate conv3d conv relu minimum BoundingBox isinstance end size maximum start any extend minimum list end map maximum start sum groupby product sort concat shift argmin square where roll watershed_expand mean append DataFrame array Vector3j isinstance ndarray isinstance Graph list rollaxis copy append array enumerate zeros swapaxes isnan zeros sigmoid shape asarray zeros_like csr_matrix reshape size uint64 append uint64 list make_labels_contiguous ones distance_transform_edt astype logical_not shape any zip
# Flood-Filling Networks Flood-Filling Networks (FFNs) are a class of neural networks designed for instance segmentation of complex and large shapes, particularly in volume EM datasets of brain tissue. For more details, see the related publications: * https://arxiv.org/abs/1611.00421 * https://doi.org/10.1101/200675 This is not an official Google product. # Installation No installation is required. To install the necessary dependencies, run:
2,204
google/meta_tagger
['word embeddings', 'part of speech tagging', 'morphological tagging']
['Morphosyntactic Tagging with a Meta-BiLSTM Model over Context Sensitive Token Encodings']
test.py test_short_cw.py layers.py test_cw.py reader.py train_cw.py mlp dropout linear_with_dropout lstm_layers random_mask read_file_to_stringio Reader Test run_testing main Vocab read_corpus main Vocab read_corpus run_training test parameters Model Vocab SntId Accuracies log_training_time main Dataset as_list dropout reshape orthogonal_initializer shape append range len concat LSTMCell DropoutWrapper bidirectional_dynamic_rnn CudnnCompatibleLSTMCell range ones zeros random_uniform shape expand_dims random_mask seek StringIO GFile extend startswith append expanduser add_dataset_and_index char_sentences_to_buckets_index_sc sentences_ids output_dir pred_id tag_id to_char_corpus word_id char_id Vocab Reader expanduser sentences_to_buckets read_corpus test read char_sentences parameters id_tag Test run_testing print testing_data char_id Vocab output_dir pred_id expanduser HParams word_id read_corpus config Exists read_file_to_stringio parse_json HParams default_timer info index_batches_end batches index_batches_start extend simple_eval write_string shape predictions_m Accuracies zip append zeros batches_ch run lowercase summaries_acc char_sentences_to_buckets_index_sc acc_c sentences build_char_vocab ConfigProto sentences_ids dev assign Saver set_verbosity output_dir tag_id exponential_decay to_char_corpus word_id str list acc_m placeholder char_id Model Vocab Reader SntId append expanduser snt check_for_unknown_pretrained_embeddings init_id_tag sentences_to_buckets ceil read_corpus LazyAdamOptimizer batch_char_size startswith info embeddings learning_rate_decay float task_name keys acc_w INFO embedding_dict load enumerate task learning_rate constant build_word_vocab minimize Variable sort write float32 index Testmodel char_sentences parameters batch_word_size id_tag train Dataset Test split run_training
# Software and hardware requirements - python 2.7 - numpy - Tensorflow 1.5+ - For fast training, a Nvidia graphic card or GPU # Credits This code is based on the paper: https://arxiv.org/abs/1805.08237 Bernd Bohnet, Ryan McDonald, Gonçalo Simões, Daniel Andor, Emily Pitler, Joshua Maynez. Morphosyntactic Tagging with a Meta-BiLSTM Model over Context Sensitive Token Encodings. ACL, 2018.
2,205
google/quickshift
['semantic segmentation']
['Quickshift++: Provably Good Initializations for Sample-Based Mean Shift']
setup.py __init__.py
google/quickshift
2,206
google/uis-rnn
['speaker diarization']
['Fully Supervised Speaker Diarization']
tests/contrib/range_search_crp_alpha_test.py demo.py tests/uisrnn_test.py tests/contrib/contrib_template_test.py uisrnn/utils.py uisrnn/contrib/contrib_template.py tests/utils_test.py uisrnn/uisrnn.py uisrnn/__init__.py uisrnn/evals.py tests/evals_test.py uisrnn/contrib/range_search_crp_alpha.py uisrnn/arguments.py setup.py uisrnn/contrib/__init__.py uisrnn/loss_func.py tests/integration_test.py main diarization_experiment TestComputeSequenceMatchAccuracy TestIntegration _generate_random_sequence TestUISRNN TestEstimateTransitionBias TestConcatenateTrainingData TestResizeSequence TestEnforceClusterIdUniqueness TestSamplePermutedSegments TestExampleFunction TestRangeSearchCrpAlpha str2bool parse_arguments compute_sequence_match_accuracy get_list_inverse_index regularization_loss weighted_mse_loss sigma2_prior_loss parallel_predict CoreRNN BeamState UISRNN enforce_cluster_id_uniqueness output_result concatenate_training_data estimate_transition_bias sample_permuted_segments resize_sequence Logger pack_sequence generate_random_string example_function _get_normalized_id _get_cdf estimate_crp_alpha _get_cdf_single _get_n_kt _get_cluster_id_single _get_k_t load output_result print compute_sequence_match_accuracy tolist UISRNN save zip append predict fit parse_arguments diarization_experiment rand vstack parse_known_args parse_args add_argument ArgumentParser dict enumerate sorted linear_sum_assignment get_list_inverse_index set zip zeros sum len float mm diag view partial predict_single get_context close map share_memory Pool ndarray isinstance tolist append generate_random_string enforce_cluster_id_uniqueness list concatenate shuffle shape zip enumerate permutation concatenate append range len sample_permuted_segments where unique append range len sort pack_padded_sequence choice zeros to range len rnn_dropout format learning_rate batch_size sigma_alpha mean rnn_depth rnn_hidden_size crp_alpha zip sigma_beta regularization_weight range len ceil int _get_cdf range _get_cdf_single log _get_cluster_id_single range set _get_n_kt sum _get_k_t len array zeros set enumerate len _get_normalized_id enumerate set array len
# UIS-RNN [![Python application](https://github.com/google/uis-rnn/workflows/Python%20application/badge.svg)](https://github.com/google/uis-rnn/actions/workflows/pythonapp.yml) [![PyPI Version](https://img.shields.io/pypi/v/uisrnn.svg)](https://pypi.python.org/pypi/uisrnn) [![Python Versions](https://img.shields.io/pypi/pyversions/uisrnn.svg)](https://pypi.org/project/uisrnn) [![Downloads](https://pepy.tech/badge/uisrnn)](https://pepy.tech/project/uisrnn) [![codecov](https://codecov.io/gh/google/uis-rnn/branch/master/graph/badge.svg)](https://codecov.io/gh/google/uis-rnn) [![Documentation](https://img.shields.io/badge/api-documentation-blue.svg)](https://google.github.io/uis-rnn) ## Overview This is the library for the *Unbounded Interleaved-State Recurrent Neural Network (UIS-RNN)* algorithm. UIS-RNN solves the problem of segmenting and clustering sequential data by learning from examples. This algorithm was originally proposed in the paper [Fully Supervised Speaker Diarization](https://arxiv.org/abs/1810.04719). The work has been introduced by
2,207
gorayni/seeing_and_hearing
['action recognition']
['Seeing and Hearing Egocentric Actions: How Much Can We Learn?']
IO/misc.py test_epic_challenge_audio.py models/fusion.py fusion_main.py evaluation/create_fusion_verb_plus_noun_challenge_submission.py test_epic_challenge_tsn.py evaluation/create_audio_challenge_submission.py test_epic_challenge_fusion.py preprocessing/create_annotations.py preprocessing/create_action_audio_pytable.py tsn_test_main.py extract_tsn_features.py tsn_main.py evaluation/create_weighted_action_challenge_submission.py IO/dataset.py evaluation/create_fusion_action_challenge_submission.py models/audio.py extract_audio_features.py audio/__init__.py evaluation/create_weighted_verb_plus_noun_challenge_submission.py IO/__init__.py preprocessing/calculate_spectrograms_stats.py preprocessing/extract_segments.py evaluation/plots.py audio_main.py evaluation/__init__.py main train test extract main fc_output_hook extract main add_path avgpool_output_hook main train test main test main test main add_path eval_video main add_path eval_video to_frames calculate_energy extract_spectrogram normalize to_windows extract_log_energy main to_submission_struct main to_submission_struct main to_submission_struct main to_submission_struct main to_submission_struct plot_verb_acc calculate_acc plot_action_acc_diff plot_diff plot_baradel_verb_cm plot_action_prec_diff plot_class_acc plot_noun_acc_diff calculate_prec_diff plot_verb_cm plot_noun_acc calculate_acc_diff _plot_diff plot_verb_acc_diff show_performance_measures plot_noun_cm show_action_performance_measures plot_action_cm load_tsn_results measure_verb_plus_noun_performance calculate_largest_class_baseline calculate_random_baseline cartesian_product read_results top_n_accuracy to_subcategory_scores build_categories_indices load_audio_results find_weights _calculate_probability load_data_from_logs load_npz_results random_accuracy_baseline add_min_value _split_train_test_sets measure_action_performance measure_performance EpicEmbeddingsDataset EpicTSNDataset EpicSegment EpicTSNTestDataset EpicEmbeddingsTestDataset EpicAudioTestSet EpicAudioDataset Resize ToFloatTensor filter_action_classes timestamp_to_seconds count_num_classes default_to_regular build_action_classes_map build_classes_map filter_classes seconds_to_timestamp action_classes get_duration EpicClass TraditionalDilated Traditional VGG TraditionalDilated16 make_layers LateFusion main main TestActionSegment get_audio_fpath ActionSegment baradel_split_sets split_action_training_set extract_segments split_training_set main to_csv format view model criterion float size backward zero_grad print dataset step cuda CrossEntropyLoss enumerate len int list format view model savez float size len print eval append dataset numpy cuda CrossEntropyLoss enumerate TraditionalDilated SGD DataLoader save cuda EpicAudioDataset open seed str splits exit VGG Adam device_count test_epoch format snapshot_pref replace Compose arc test lr mkdir startswith manual_seed type checkpoint load log_interval weights_file audio_hdf5 print parameters classes_map train count_num_classes extract get_original_labels EpicAudioTestSet EpicSegment register_forward_hook dump eval dict isfile insert EpicVideoFlowDataset dataset num_classes EpicVideoDataset load_state_dict modality realpath lower EpicTSNTestDataset enumerate join weights TSN len modalities LateFusion embeddings_pkl EpicEmbeddingsDataset asarray Variable challenge_test_sets name EpicEmbeddingsTestDataset test_crops Path arch class_type eval_video append gulp_test_dir float time savez EpicTSNDataset accuracy_score save_scores gulp_dir int read stft mean power abs list copy shape append zeros range int16 int astype zeros range read calculate_energy mean normalize to_windows items list defaultdict add_min_value astype union1d dict load_audio_results float enumerate to_submission_struct adict format to_subcategory_scores argsort load_npz_results range build_categories_indices append sum list test_model conf keys load_tsn_results accuracy_score format set_title show_confusion_matrix list format ListedColormap set_title as_hex reversed show_confusion_matrix accuracy_score list format ListedColormap set_title as_hex reversed show_confusion_matrix accuracy_score accuracy_score format set_title show_confusion_matrix print_table verb show_performance_measures noun action diag argmax confusion_matrix sum diag argmax confusion_matrix sum argmax precision_score format text grid get_xticklabels set_visible axhline set_ylabel setp barplot enumerate set_style subplots _plot_diff subplots_adjust format subplots text get_xticklabels grid set_visible axhline set_style set_ylabel setp barplot enumerate calculate_acc_diff calculate_acc_diff asarray nonzero calculate_acc_diff asarray nonzero calculate_prec_diff calculate_acc calculate_acc join list loadtxt sort EvalResult append float listdir load asarray namedtuple mean argmax load argmax asarray namedtuple reshape list len argmax list asarray namedtuple append list enumerate namedtuple top_n_accuracy recall_score precision_score accuracy_score argmax _split_train_test_sets _calculate_probability len hstack asarray zeros sum unique zip seed asarray _calculate_probability namedtuple recall_score _split_train_test_sets precision_score zeros accuracy_score range len asarray namedtuple recall_score argsort precision_score tile unique accuracy_score result_type len ix_ empty enumerate cartesian_product asarray accuracy_score argmax len list product shape zeros range abs min dict items list measure_performance namedtuple to_subcategory_scores list scores product namedtuple measure_performance shape groundtruth zeros sum range isinstance floor list map split timestamp_to_seconds start_timestamp stop_timestamp iterrows sorted defaultdict product noun_class verb_class zeros sorted iterrows defaultdict noun_class verb_class zeros len as_posix load_from load open load load_from sorted value_counts as_posix open load load_from sorted value_counts as_posix open list isinstance values Conv2d open_file range segments sqrt power sum spectrograms Int32Col Float32Col StringCol Int32Col Float32Col StringCol video_id format replace create_earray Float64Atom create_table get_audio_fpath std_dev extract_spectrogram is_test max iterrows audio_dir verb_class participant_id narration num_secs hdf5_fname video_id noun_class size close mean root get_duration flush to_frames norm_stats_json row std_stats_json min stats_json append iterrows verb_class noun_class seed defaultdict StratifiedShuffleSplit arange asarray size shuffle extract_segments bincount isin next append split next StratifiedShuffleSplit split extract_segments int iterrows asarray StratifiedShuffleSplit logical_not verb_class bincount append isin next split baradel_split_sets load_from filter_action_classes verbs split_action_training_set as_posix build_action_classes_map build_classes_map nouns train_labels split_training_set action_classes
# Action Recognition on Epic Kitchens challenge This repository contains the code used in the paper [ Seeing and Hearing Egocentric Actions: How Much Can We Learn?](http://openaccess.thecvf.com/content_ICCVW_2019/papers/EPIC/Cartas_Seeing_and_Hearing_Egocentric_Actions_How_Much_Can_We_Learn_ICCVW_2019_paper.pdf) <center><img src="images/multimodal_model.png" height="400"></img></center> If you use this code or its database, please consider citing: @InProceedings{Cartas_2019_ICCV, Author = {Alejandro Cartas and Jordi Luque and Petia Radeva and Carlos Segura and Mariella Dimiccoli}, Title = {Seeing and Hearing Egocentric Actions: How Much Can We Learn?}, Booktitle = {The IEEE International Conference on Computer Vision (ICCV) Workshops},
2,208
gordicaleksa/pytorch-neural-style-transfer
['style transfer']
['A Neural Algorithm of Artistic Style', 'Exploring the Neural Algorithm of Artistic Style']
utils/video_utils.py utils/utils.py models/definitions/vgg_nets.py reconstruct_image_from_representation.py neural_style_transfer.py build_loss neural_style_transfer make_tuning_step reconstruct_image_from_representation make_tuning_step Vgg16 Vgg16Experimental Vgg19 save_and_maybe_display prepare_model gram_matrix get_uint8_range generate_out_img_name total_variation load_image save_image prepare_img create_video_from_intermediate_results total_variation squeeze zip neural_net neural_net LBFGS device prepare_img make_tuning_step squeeze Adam tuning_step prepare_model to range asarray astype join Variable print float32 step makedirs neural_net LBFGS device save_image prepare_img make_tuning_step show squeeze step Adam tuning_step prepare_model imshow title get_uint8_range to range astype join uint8 Variable print makedirs float32 numpy len int astype float32 resize unsqueeze load_image Compose stack imwrite show join uint8 imwrite moveaxis astype copy imshow get_uint8_range numpy ndarray isinstance style_feature_maps_indices Vgg16 Vgg19 layer_names Vgg16Experimental content_feature_maps_index bmm size transpose view str join print call listdir which len
## Neural Style Transfer (optimization method) :computer: + :art: = :heart: This repo contains a concise PyTorch implementation of the original NST paper (:link: [Gatys et al.](https://www.cv-foundation.org/openaccess/content_cvpr_2016/papers/Gatys_Image_Style_Transfer_CVPR_2016_paper.pdf)). It's an accompanying repository for [this video series on YouTube](https://www.youtube.com/watch?v=S78LQebx6jo&list=PLBoQnSflObcmbfshq9oNs41vODgXG-608). <p align="left"> <a href="https://www.youtube.com/watch?v=S78LQebx6jo" target="_blank"><img src="https://img.youtube.com/vi/S78LQebx6jo/0.jpg" alt="NST Intro" width="480" height="360" border="10" /></a> </p> ### What is NST algorithm? The algorithm transfers style from one input image (the style image) onto another input image (the content image) using CNN nets (usually VGG-16/19) and gives a composite, stylized image out which keeps the content from the content image but takes the style from the style image. <p align="center">
2,209
gouthamvgk/facemesh_coreml_tf
['face detection']
['BlazeFace: Sub-millisecond Neural Face Detection on Mobile GPUs', 'LFFD: A Light and Fast Face Detector for Edge Devices']
convert_blazeface.py live_demo.py layers.py utils.py create_blazeface_coreml_pipeline.py convert_facemesh.py create_blazeface create_facenet down_sampling face_block res_block predict_frame get_clean_name restore_variables process_detections create_letterbox_image get_landmarks_crop xywh_to_tlbr convert_to_orig_points process_landmarks sigmoid Input face_block clip_by_value down_sampling Input res_block pad pad drawContours process_landmarks zip COLOR_BGR2RGB astype float32 circle rectangle create_letterbox_image get_landmarks_crop resize process_detections expand_dims cvtColor get_clean_name format name print transpose assign variables clip copy uint8 min resize fill zeros expand_dims min astype copy int32 xywh_to_tlbr convert_to_orig_points non_max_suppression COLOR_BGR2RGB astype float32 int32 resize append cvtColor astype int32 xywh_to_tlbr
# Face Mesh - Coreml This repository contains the code for converting tflite models of blazeface and facemesh present in the [Mediapipe](https://github.com/google/mediapipe/tree/master/mediapipe/models) library to coreml and tensorflow. Blazeface is intended for realtime face detection while facemesh is used to detect 468-3D facial landmarks. ## Requirements - tensorflow == 2.2.0 - coremltools == 3.4 - matplotlib - opencv - PIL ## Blazeface conversion Run `python convert_blazeface.py` to convert the tflite model of blazeface present in `tflite_models` folder to tensorflow and keras version. Converted models are placed in `keras_models` and `coreml_models` folders. Blazeface accepts inputs of size 128x128x3 and outputs 896 proposals where each proposal contains a bounding box and 6 facial landmarks along with confidence. NMS should be run on the proposal boxes to filter duplicates. Original mediapipe version uses weighted NMS while here normal NMS is used for simplicity. Use [Netron](https://github.com/lutzroeder/netron) to visualize the network from .h5 or .mlmodel file
2,210
goyalanil/PB-MVBoost
['document classification', 'text classification']
['Multiview Boosting by Controlling the Diversity and the Accuracy of View-specific Voters']
example_run.py MVL/PB_MVBoost.py MVL/__init__.py MVL/MV_Cbound_opt.py main read_data MV_Cbount_opt PB_MVBoost load open PB_MVBoost read_data learn
Multiview Learning Algorithm PB-MVBoost ======================================== Implementation for Multiview Learning Algorithm PB-MVBoost Related Paper: ``` Goyal, Anil, Emilie Morvant, Pascal Germain, and Massih-Reza Amini. "Multiview Boosting by Controlling the Diversity and the Accuracy of View-specific Voters." Neurocomputing, 358, 2019, pp. 81-92. ``` Link to HAL Archive Version:
2,211
gozdesahin/crop-rotate-augment
['text augmentation', 'data augmentation', 'part of speech tagging']
['Data Augmentation via Dependency Tree Morphing for Low-Resource Languages']
augment_benchmark.py SP/augmenter.py augment.py SP/chunker.py IO/conllud.py main augment main augment rotate_file crop_file conllUDsent conllUDtoken conllUD cropper rotator chunker chunk perm parse_args augment add_argument ArgumentParser join cropper outfile write close rotate maxrot conllUD operation infile sents crop rotator open join prob write rotate maxrot conllUD sents rotator open join cropper prob write conllUD sents crop open time int str print prob crop_file input rotate_file walk
# crop-rotate-augment The code for our EMNLP18 paper "Data Augmentation via Dependency Tree Morphing for Low-Resource Languages". First you need to download UD treebanks v2.1. You can do so by running '**sh preprocess.sh**' Then you can either experiment with the method parameters and single connlu files by running '**sh augment_single.sh**'. File parameters are: - **infile**: UD file to augment - **outfile**: Name of the output file - **maxrot**: Maximum number of rotations per sentence - **prob**: Probability of the augmentation operation - **operation**: rotate or crop We also provide the script, **augment_all.sh** to augment all training UD files. The parameters are:
2,212
gpapagiannis/sinkhorn-imitation
['imitation learning']
['Imitation Learning with Sinkhorn Distances']
imitation-learning/test_policy.py RL/common.py utils/zfilter.py RL/agent.py utils/math.py models/ot_critic.py models/mlp_critic.py agent/trpo_gym.py imitation-learning/gail.py models/mlp_policy.py utils/running.py utils/replay_memory.py imitation-learning/airl.py imitation-learning/generate_expert_traj.py imitation-learning/ablation.py imitation-learning/subsample_trajectory.py models/mlp_policy_disc.py utils/__init__.py utils/tools.py imitation-learning/behaviour-cloning.py utils/torch.py imitation-learning/SIL.py RL/trpo.py models/mlp_discriminator.py imitation-learning/ot_utils.py train_trpo ablated_sil sil_step airl airl_step bc main_loop gail_step gail main_loop cosine_distance cosine_critic W_p optimal_transport_plan calculate_wassertstein critic_W_p sil sil_step subsample testpolicy Value Discriminator Policy DiscretePolicy OTCritic Agent merge_log collect_samples estimate_advantages conjugate_gradients line_search trpo_step normal_entropy normal_log_density Memory ZFilter NormaliseObservation assets_dir str2bool set_flat_params_to compute_flat_grad get_flat_params_from to_device get_flat_grad_from ZFilter RunningStat estimate_advantages min_batch_size assets_dir to_device device max_kl open trpo_step tau env_name to range dump format collect_samples damping gamma max_iter_num join time l2_reg print empty_cache estimate_advantages randint numpy to_device max_kl trpo_step tau append to sum range optimal_transport_plan item damping gamma cosine_distance T l2_reg empty_cache dataset_size mm diag len min_batch_size assets_dir to_device device max_kl open seed tau env_name input append sum range dump format collect_samples eval item damping gamma max_iter_num load join time print l2_reg sil_step critic_lr empty_cache dataset_size len estimate_advantages zero_grad to_device max_kl tensor log trpo_step ones step randperm discrim_criterion tau discriminator append to range mean item damping gamma batch backward print clamp l2_reg clone zeros numpy len min_batch_size assets_dir to_device device open seed env_name input append to range dump format collect_samples airl_step eval max_iter_num load join time print empty_cache dataset_size len format backward print get_log_prob size zero_grad mean randperm item cpu to step range seed join dump format assets_dir bc to_device device env_name dataset_size open estimate_advantages zero_grad to_device max_kl tensor trpo_step ones step randperm discrim_criterion tau discriminator append to range damping gamma batch backward l2_reg clone zeros numpy len min_batch_size assets_dir to_device device open seed gail_step env_name input append to range dump format collect_samples eval max_iter_num load join time print empty_cache dataset_size len print step hstack traj_count reset render running_state append to numpy range sinkhorn emd Variable ones clone empty_cache to numpy T Variable dot append zeros to range abs sum unsqueeze to mm T unsqueeze sum abs cost_fn to mm T zero_grad log_actual_sinkhorn step cosine_critic backward min_batch_size assets_dir to_device device max_kl open seed tau env_name input append sum range dump format collect_samples eval item damping gamma max_iter_num load join time print l2_reg sil_step critic_lr empty_cache dataset_size len load subsampling dump format asarray join print len assets_dir env_name append randint number_of_traj range open episodes numpy running_state tensor argmax mm stdev render append to sum range format hstack optimal_transport_plan item cosine_distance T print empty_cache reset randint dataset_size step diag len custom_reward randn min range Memory dict put render reset unsqueeze running_state sample step max push append dict sum max min list size reversed tensor_type mean to_device device type std range Avp_f size clone dot zeros range set_flat_params_to item set_flat_params_to get_loss line_search conjugate_gradients grad get_flat_params_from dot parameters Fvp sqrt fmin_l_bfgs_b tensor numpy detach pow log pi pow log pi isinstance append parameters cat view int list view size copy_ parameters prod view shape append zeros cat list view grad shape append zeros cat enumerate
# Imitation Learning with Sinkhorn Distances Code for the experiments in the work: Imitation Learning with Sinkhorn Distances. ## Prerequisites * A version of python 3 * To run the experiments, first install the MuJoco simulator (https://github.com/openai/mujoco-py) and OpenAIGym (https://gym.openai.com/docs/). * Other project specific requirements can be installed directly via: ``` pip install -r requirements.txt ``` * We recommend running the experiments on a GPU of memory at least 16GB, to efficienlty obtain the Sinkhorn distance.
2,213
gpapamak/epsilon_free_inference
['density estimation']
['Fast ε-free Inference of Simulation Models with Bayesian Conditional Density Estimation', 'Fast $ε$-free Inference of Simulation Models with Bayesian Conditional Density Estimation']
util/LossFunction.py demos/lotka_volterra_demo/lv_abc.py demos/bayesian_linear_regression_demo/blr_mdn.py demos/mixture_of_gaussians_demo/mog_main.py demos/mixture_of_gaussians_demo/mog_mdn.py demos/lotka_volterra_demo/lv_main.py util/mdn.py util/Trainer.py util/MarkovJumpProcess.py demos/mg1_queue_demo/mg1_main.py demos/mg1_queue_demo/mg1_mdn.py util/pdf.py util/StepStrategy.py util/DataStream.py demos/bayesian_linear_regression_demo/blr_res.py demos/mixture_of_gaussians_demo/mog_res.py util/NeuralNet.py demos/bayesian_linear_regression_demo/blr_main.py demos/bayesian_linear_regression_demo/blr_abc.py demos/lotka_volterra_demo/lv_res.py demos/mg1_queue_demo/mg1_abc.py demos/lotka_volterra_demo/lv_mdn.py demos/mg1_queue_demo/mg1_res.py demos/mixture_of_gaussians_demo/mog_abc.py util/helper.py run_mcmc_abc show_smc_abc_results show_rejection_abc_results show_mcmc_abc_results run_smc_abc show_true_posterior gen_observed_data load_sims_from_prior calc_posterior gen_y_data run_sims_from_prior gen_xy_data calc_dist get_prior show_mdn_posterior_with_bootstrapping show_mdn_posterior show_mdn_with_proposal_posterior train_mdn_with_proposal train_mdn_on_sims_from_prior train_mdn_proposal_prior gather_results_for_rejection_abc gather_results_for_smc_abc gather_results_for_mcmc_abc plot_results plot_learnt_posteriors gather_results_for_mdn_abc run_mcmc_abc show_smc_abc_results show_rejection_abc_results show_mcmc_abc_results run_smc_abc do_pilot_run get_obs_stats load_sims_from_prior calc_summary_stats calc_dist sum_stats_hist test_LotkaVolterra run_sims_from_prior sim_prior_params show_mdn_posterior_with_bootstrapping show_mdn_posterior show_mdn_with_proposal_posterior train_mdn_with_proposal train_mdn_on_sims_from_prior train_mdn_proposal_prior gather_results_for_rejection_abc gather_results_for_smc_abc gather_results_for_mcmc_abc plot_results gather_results_for_mdn_abc run_mcmc_abc show_smc_abc_results show_rejection_abc_results show_mcmc_abc_results run_smc_abc do_pilot_run show_histograms eval_prior calc_size_of_queue sim_prior gen_observed_data sim_likelihood load_sims_from_prior calc_summary_stats test_mg1 run_sims_from_prior calc_dist show_mdn_posterior show_mdn_with_proposal_posterior show_mdn_with_bootstrapping_posterior train_mdn_with_proposal train_mdn_on_sims_from_prior train_prior_proposal_with_bootstrapping gather_results_for_rejection_abc gather_results_for_smc_abc gather_results_for_mcmc_abc plot_results gather_results_for_mdn_abc run_mcmc_abc show_smc_abc_results show_rejection_abc_results show_mcmc_abc_results run_smc_abc show_histograms sim_prior sim_joint sim_likelihood calc_posterior run_sims_from_prior calc_dist show_true_posterior show_mdn_posterior show_mdn_with_proposal_posterior show_mdn_with_bootstrapping_posterior train_mdn_with_proposal train_mdn_on_sims_from_prior train_proposal_prior_with_bootstrapping gather_results_for_rejection_abc gather_results_for_smc_abc gather_results_for_mcmc_abc plot_results plot_learnt_posteriors gather_results_for_mdn_abc DataStream DataSubSampler IndexSubSampler discrete_sample load ess_importance probs2contours ess_mcmc isdistribution plot_pdf_marginals disp_imdata plot_hist_marginals save regularizerSvi accuracy multiCrossEntropy weightDecay squareError crossEntropy MarkovJumpProcess SimTooLongException LotkaVolterra replicate_gaussian_mdn MDN_SVI MDN NeuralNetSvi NeuralNet Gaussian fit_mog MoG fit_gaussian LinearDecay Adam StepStrategy AdaDelta ConstantStep Trainer load format randn print calc_posterior copy gen_y_data array save calc_dist float get_prior range append randn gen_y_data save get_prior log exp ones solve logsumexp append sum range format empty_like mean float empty load T print outer dot cholesky calc_dist load int show format subplots vlines set_title suptitle print set_xlabel load_sims_from_prior plot_hist_marginals mean sqrt hist float std range load str show format subplots suptitle plot print plot_hist_marginals mean set_ylabel std range load show exp format suptitle print plot_hist_marginals dot sqrt zip range zeros eye gen_y_data randn get_prior save gen_xy_data dot Pm T P sqrt sum array load plot_pdf_marginals get_prior calc_posterior load format print gen_y_data save calc_dist empty get_prior range load format concatenate empty range int MDN load_sims_from_prior Trainer save train regularizerSvi add_subplot Trainer gen_y_data save get_prior show set_title get_mog range sps format size set_xlim empty load int project_to_gaussian print MDN_SVI hist mps figure calc_dist train load int regularizerSvi format sps Trainer gen_y_data mps get_mog save train empty get_prior range load format print plot_pdf_marginals sqrt calc_mean_and_cov get_mog a range n_outputs load show format suptitle print plot_pdf_marginals ndim sqrt calc_mean_and_cov xs zip a range subplots add_subplot calc_mean_and_cov show set_title plot_pdf_marginals set_xlabel append a range format plot set_xlim sqrt load print hist set_ylabel figure array load fit_gaussian load_sims_from_prior calc_posterior array linspace save append kl get_prior load format get_prior ess_mcmc fit_gaussian calc_posterior save zip append kl array load exp ess_importance fit_gaussian calc_posterior array save zip append kl get_prior load format calc_posterior get_mog save kl get_prior update load show subplots rc set_xlabel set_xlim subplots_adjust loglog set_ylabel savefig get_xlim legend set_ylim subplots set_yticklabels linspace get_prior show exp set_xlabel savefig get_mog legend range update format plot set_xlim calc_posterior sqrt stack eval load S rc set_yticks subplots_adjust hist diag set_ylim exp LotkaVolterra load_sims_from_prior sim_time calc_summary_stats zip LotkaVolterra calc_summary_stats sim_prior_params sim_time len log ess_mcmc log log len var mean sqrt dot append update int show plot LotkaVolterra print xlabel rc sim_time ylabel calc_summary_stats ylim savefig linspace figure legend show int format plot LotkaVolterra xlabel sim_time ylabel calc_summary_stats title figure save linspace legend format std LotkaVolterra print sim_time calc_summary_stats mean save sim_prior_params array append load int str format subplots set_title show LotkaVolterra print sim_time calc_summary_stats flatten sqrt hist append array enumerate time LotkaVolterra sim_time calc_summary_stats sim_prior_params array append LotkaVolterra calc_summary_stats append sim_time array LotkaVolterra sim_time calc_summary_stats append array prune_negligible_components ndim log log log S diag m sqrt eval log S diag m sqrt eval log S diag m sqrt eval log S sqrt eval calc_mean_and_cov m diag arange flatten log semilogy range format errorbar plot set_xticklabels semilogx set_xticks array sim_likelihood sim_likelihood sim_prior rand cumsum rand empty max range append float len percentile load linspace dot sim_likelihood calc_summary_stats sim_prior T sim_likelihood eig dot sqrt empty range show int calc_size_of_queue subplots set_title plot format print suptitle set_xlabel sim_likelihood calc_summary_stats sqrt set_ylabel hist load show sim_prior suptitle sim_likelihood calc_summary_stats plot_hist_marginals empty range sim_prior sim_likelihood regularizerSvi sim_likelihood add_subplot Trainer save show set_title calc_summary_stats get_mog range sps format set_xlim empty load int eval_prior project_to_gaussian print MDN_SVI hist mps figure calc_dist train len eval_prior sim_likelihood replicate_gaussian_mdn subplots add_subplot calc_mean_and_cov show set_title plot_pdf_marginals set_xlabel append a range format plot set_xlim sqrt load print hist set_ylabel figure array len format print calc_mean_and_cov fit_mog print calc_mean_and_cov fit_mog format print calc_mean_and_cov fit_mog sqrt var sim_joint set_title set_xlabel set_title discrete_sample size asarray randn sim_prior sim_likelihood abs subplots plot sim_joint set_xlabel hist set_ylabel sim_joint load regularizerSvi sim_likelihood add_subplot Trainer save show set_title get_mog range sps format asarray set_xlim empty prune_negligible_components int project_to_gaussian print MDN_SVI hist mps figure calc_dist train asarray gen subplots linspace xs show list set_title n_components set_xlabel shape legend meshgrid asarray plot eval_comps stack zip get_cmap contour reshape set_ylabel set_ylim set_title asarray collections list shape meshgrid setp sum asarray probs2contours eval_comps concatenate contour vlines reshape set_ylabel subplots ndarray isinstance mpl_connect flatten set_visible plot_page prod rand sum zeros_like mean shape sum range ones_like asarray cumsum reshape flatten shape argsort show list asarray subplots probs2contours plot concatenate vlines reshape set_xlim ndim shape eval linspace meshgrid contour range set_ylim show int asarray subplots vlines plot set_xlim sqrt hist range set_ylim dump close open close open mean vector matrix sum vector matrix vector eq argmax mean sum sum log zeros_like get_value mWms set_value ValueError MDN parms Wms sWUs ones_like astype bms sbUs zip mbms isinstance mWUs sWms sbms mbUs WUs bUs MDN_SVI dot T mean outer T exp format randn ones print logsumexp dot shape sum array range
# Fast ε-free Inference of Simulation Models with Bayesian Conditional Density Estimation Code for reproducing the experiments in the paper: > G. Papamakarios and I. Murray, _Fast ε-free Inference of Simulation Models with Bayesian Conditional Density Estimation_, NeurIPS 2016. > [[arXiv]](https://arxiv.org/abs/1605.06376) [[bibtex]](https://gpapamak.github.io/bibtex/epsilon_free_inference.bib) ## This folder contains #### **`demos`** Folder containing four subfolders, one for each demo in the paper. * `mixture_of_gaussians_demo` - `mog_main.py` --- sets up the model - `mog_abc.py` --- runs ABC methods
2,214
gpapamak/maf
['density estimation']
['Masked Autoregressive Flow for Density Estimation']
util.py datasets/cifar10.py ml/models/nvps.py ml/models/mades.py datasets/gas.py ml/loss_functions.py pdfs.py datasets/miniboone.py datasets/power.py ml/step_strategies.py ml/models/layers.py ml/data_streams.py datasets/bsds300.py datasets/mnist.py collect_results.py experiments.py ml/models/mafs.py datasets/__init__.py datasets/hepmass.py ml/models/neural_nets.py run_experiments.py ml/trainers.py main collect_results result calc_bits_per_pixel fit_and_evaluate_gaussian save_model train_maf_cond evaluate_random_numbers train_maf_on_made load_model train_made train_cond evaluate_logprob train_maf is_conditional train_realnvp_cond is_data_loaded train_made_cond evaluate create_model_id load_data train_mog_made_cond train_maf_on_made_cond train train_mog_made train_realnvp MoG fit_gaussian Generator Gaussian fit_mog run_experiments_miniboone run_experiments_mnist run_experiments_bsds300 run_experiments_hepmass run_experiments_cifar10 run_experiments_power main run_experiments_gas discrete_sample logit one_hot_encode save whiten make_folder plot_pdf_marginals disp_imdata isposint probs2contours calc_whitening_transform select_theano_act_function load copy_model_parms ess_importance ess_mcmc isdistribution plot_hist_marginals logistic BSDS300 CIFAR10 GAS get_correlation_numbers load_data load_data_and_clean load_data_and_clean_and_split load_data_no_discrete_normalised_as_array HEPMASS load_data_no_discrete load_data_no_discrete_normalised load_data load_data_normalised load_data MINIBOONE MNIST POWER load_data_split_with_noise load_data load_data_normalised IndexSubSamplerSeq DataStream DataSubSampler IndexSubSampler SviRegularizer MultiCrossEntropy SquareError CrossEntropy WeightDecay Accuracy LinearDecay Adam StepStrategy AdaDelta ConstantStep ModelCheckpointer SGD BatchNorm create_masks ConditionalGaussianMade MixtureOfGaussiansMade GaussianMade create_weights_SVI create_degrees ConditionalMixtureOfGaussiansMade create_weights_conditional create_weights MaskedAutoregressiveFlow ConditionalMaskedAutoregressiveFlow_on_MADE ConditionalMaskedAutoregressiveFlow MaskedAutoregressiveFlow_on_MADE FeedforwardNet RealNVP ConditionalRealNVP CouplingLayer ConditionalCouplingLayer log n_dims load_model calc_bits_per_pixel evaluate_logprob fit_and_evaluate_gaussian format make_folder product print write result close load_data calc_bits_per_pixel open print collect_results format MNIST POWER GAS HEPMASS BSDS300 CIFAR10 MINIBOONE create_model_id save make_folder create_model_id parms WeightDecay SGD parms train WeightDecay SGD save_model GaussianMade train n_dims ConditionalGaussianMade save_model n_labels n_dims train_cond save_model train MixtureOfGaussiansMade n_dims save_model n_labels n_dims train_cond ConditionalMixtureOfGaussiansMade RealNVP train save_model n_dims save_model n_labels n_dims train_cond ConditionalRealNVP MaskedAutoregressiveFlow train save_model n_dims ConditionalMaskedAutoregressiveFlow save_model n_labels n_dims train_cond train save_model n_dims MaskedAutoregressiveFlow_on_MADE save_model n_labels n_dims train_cond ConditionalMaskedAutoregressiveFlow_on_MADE N argmax log show logsumexp disp_imdata getattr is_conditional gen range format n_labels hstack astype n_dims mean sqrt eval stack alpha empty image_size int print argsort logistic zeros std x n_labels range logsumexp log mean eval sqrt getattr logistic is_conditional N empty std zeros x show calc_random_numbers format fit_gaussian print plot_hist_marginals Gaussian getattr is_conditional kl x n_labels fit_gaussian ones MoG mean sqrt eval getattr logistic append N std range x dot T mean outer T exp format randn ones print logsumexp dot shape sum array range train_maf_on_made train_made load_data train_maf train_mog_made train_realnvp train_maf_on_made train_made load_data train_maf train_mog_made train_realnvp train_maf_on_made train_made load_data train_maf train_mog_made train_realnvp train_maf_on_made train_made load_data train_maf train_mog_made train_realnvp train_maf_on_made train_made load_data train_maf train_mog_made train_realnvp train_maf_on_made train_made_cond train_realnvp_cond train_maf train_made load_data train_maf_cond train_mog_made_cond train_maf_on_made_cond train_mog_made train_realnvp train_maf_on_made train_made_cond train_realnvp_cond train_maf train_made load_data train_maf_cond train_mog_made_cond train_maf_on_made_cond train_mog_made train_realnvp dict subplots ndarray isinstance mpl_connect flatten set_visible plot_page prod rand sum zeros_like mean shape sum range ones_like asarray cumsum reshape flatten shape argsort show list asarray subplots probs2contours plot concatenate vlines reshape set_xlim ndim shape eval linspace meshgrid contour range set_ylim show int asarray subplots vlines plot set_xlim sqrt hist range set_ylim dump close open close open T eig mean sqrt dot dot copy softmax softplus relu parms get_value set_value zip zeros makedirs read_pickle drop corr sum get_correlation_numbers mean any load_data std drop int as_matrix read_csv load_data drop mean std load_data_no_discrete int T Counter load_data_no_discrete_normalised append load int mean vstack load_data std int RandomState rand hstack shuffle delete load_data zeros load_data_split_with_noise mean vector matrix sum vector matrix vector eq argmax mean sum sum log max arange isinstance min shuffle append randint array astype zip append shared enumerate concatenate astype zip append shared zeros enumerate shared astype concatenate ones astype zip append shared zeros enumerate
# Masked Autoregressive Flow for Density Estimation Code for reproducing the experiments in the paper: > G. Papamakarios, T. Pavlakou, I. Murray, _Masked Autoregressive Flow for Density Estimation_, NeurIPS 2017.</br> > [[arXiv]](https://arxiv.org/abs/1705.07057) [[bibtex]](https://gpapamak.github.io/bibtex/maf.bib) ## How to run the code To run all experiments for a particular dataset, run: ``` python run_experiments.py <dataset> ``` This will train and save all models associated with that dataset.
2,215
gpauloski/kfac_pytorch
['stochastic optimization']
['Optimizing Neural Networks with Kronecker-factored Approximate Curvature']
tests/load_balance.py examples/cnn_utils/engine.py tests/block_divide.py kfac/layers/base.py kfac/layers/conv.py kfac/layers/linear.py kfac/utils.py kfac/layers/embedding.py kfac/scheduler.py examples/cnn_utils/cifar_resnet.py tests/communication.py examples/cnn_utils/datasets.py kfac/layers/__init__.py kfac/__init__.py examples/rnn_utils/lstm.py examples/rnn_utils/utils.py examples/horovod_cifar10_resnet.py kfac/comm.py kfac/modules/__init__.py examples/torch_language_model.py examples/torch_imagenet_resnet.py kfac/preconditioner.py examples/cnn_utils/optimizers.py examples/utils.py examples/torch_cifar10_resnet.py examples/horovod_imagenet_resnet.py kfac/layers/utils.py setup.py tests/worker_allocator.py kfac/modules/lstm.py main parse_args main parse_args main parse_args parse_args parse_args train evaluate get_dataset LabelSmoothLoss create_lr_schedule accuracy Metric save_checkpoint resnet110 resnet20 ResNet LambdaLayer resnet44 test resnet1202 resnet56 resnet32 get_model _weights_init BasicBlock get_cifar get_imagenet make_sampler_and_loader train test get_optimizer LSTMModel DistributedSampler HorovodBackend CommGroup TorchBackend _horovod_is_initialized Ops _get_comm_backend init_comm_backend _torch_distributed_is_initialized CommBackend KFAC CommMethod KFACParamScheduler load_balance get_block_boundary partition_grad_ranks partition_inv_ranks try_contiguous get_trace print_trace trace clear_trace WorkerAllocator KFACLayer Conv2dLayer EmbeddingLayer LinearMultiLayer LinearLayer get_triu reshape_data get_inverse fill_triu get_elementwise_inverse update_running_avg append_bias_ones get_cov get_eigendecomp module_requires_grad get_kfac_layers LSTMLayer LSTMCellKFAC LSTMCellBase LSTMCell LSTM TestBlockDivide factorize get_group broadcast TestLoadBalance TestLoadBalance add_argument ArgumentParser resume_from_epoch backend model verbose save_checkpoint batches_per_allreduce base_lr cuda exists get_optimizer seed set_device step checkpoint_format init_comm_backend rank load_state_dict get_cifar parse_args to range CrossEntropyLoss format size test timedelta init manual_seed zip train load join time log_dir isinstance print summary get_model epochs local_rank makedirs set_start_method resnet152 resnet101 LabelSmoothLoss resnet50 label_smoothing get_imagenet DistributedDataParallel get_rank module GradScaler init_process_group get_world_size fp16 penn_treebank_dataset join format print data_dir wikitext_2_dataset len set_num_threads barrier tuple LabelEncoder verbose vocab_size dataset makedirs exp Metric avg add_scalar exp eval Metric avg add_scalar save resnet110 resnet20 resnet44 resnet56 resnet32 weight kaiming_normal_ __name__ print data_dir Compose barrier CIFAR10 makedirs val_dir ImageFolder train_dir set_num_threads DistributedSampler DataLoader set_epoch eval Metric avg add_scalar COMM_OPT create_lr_schedule LambdaLR size SGD DistributedOptimizer parameters lr_decay horovod warmup_epochs broadcast_optimizer_state broadcast_parameters append KFAC HYBRID_OPT KFACParamScheduler MEM_OPT state_dict _get_comm_backend _torch_distributed_is_initialized _horovod_is_initialized size items list sum len print items list format contiguous sorted list min index zip range len list t size symeig new_tensor eig max diag fill_ reciprocal clone view cat triu_indices triu_indices new_empty isinstance RNNCellBase Embedding LSTMCellBase Conv2d Linear sync allreduce
# Distributed K-FAC Preconditioner for PyTorch [![DOI](https://zenodo.org/badge/240976400.svg)](https://zenodo.org/badge/latestdoi/240976400) [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/gpauloski/kfac_pytorch/main.svg)](https://results.pre-commit.ci/latest/github/gpauloski/kfac_pytorch/main) [![Tests](https://github.com/gpauloski/kfac_pytorch/actions/workflows/tests.yml/badge.svg)](https://github.com/gpauloski/kfac_pytorch/actions) [![Integration](https://github.com/gpauloski/kfac_pytorch/actions/workflows/integration.yml/badge.svg)](https://github.com/gpauloski/kfac_pytorch/actions) K-FAC, Kronecker-factored Approximate Curvature, is a second-order optimization method based on an efficient approximation of the Fisher information matrix (see the [original paper](https://arxiv.org/abs/1503.05671)). This repository provides a PyTorch implementation of K-FAC as a preconditioner to standard PyTorch optimizers with support for single-device or distributed training. The distributed strategy is implemented using KAISA, a **K-FAC**-enabled, **A**daptable, **I**mproved, and **S**c**A**lable second-order optimizer framework, where the placement of the second-order computations and gradient preconditioning is controlled by the *gradient worker fraction* parameter (see the [paper](https://arxiv.org/abs/2107.01739) for more details). KAISA has been shown to reduce time-to-convergence in [PyTorch distributed training](https://pytorch.org/tutorials/intermediate/ddp_tutorial.html) applications such as ResNet-50, Mask R-CNN, and BERT. ## Publications
2,216
gpleiss/ciq_experiments
['gaussian processes']
['Fast Matrix Square Roots with Applications to Gaussian Processes and Bayesian Optimization']
svgp/crps.py bayesopt/ciq_bo/__init__.py svgp/models.py bayesopt/ciq_bo/utils.py svgp/custom_loader.py bayesopt/ciq_bo/gp.py svgp/load_uci_data.py super_resolution/sr.py svgp/util.py svgp/uci_regression.py svgp/logger.py bayesopt/ciq_bo/thompson_sampling.py train_gp GP ThompsonSampling latin_hypercube standardize from_unit_cube to_unit_cube inv_matmul get_downsample_matrix quantile_stats mvn_sample downsample_img unnormalize_img do_gibbs normalize_img get_laplace_mat get_low_res_data Phi phi crps multi_crps BatchDataloader set_seed load_robopush_data load_uci_data load_airline_data load_precip_data load_covtype_data get_logger ApproximateSingleLayerGP main do_eval Welford AverageMeter result_class output_class initialize GaussianLikelihood fit_gpytorch_model train ExactMarginalLogLikelihood eval GP to arange rand zeros float range size randn range reshape squeeze GaussianBlur2d size empty_like matmul t downsample_img repeat item cpu zeros range randn reshape mv repeat item zeros range randn reshape Laplacian empty_like matmul t item cpu zeros range tolist mvn_sample cuda inv_matmul unnormalize_img append NonLazyTensor double range format size mean sqrt item normalize_img time print mv cpu zeros std sqrt phi pi sum size phi sqrt unsqueeze float Phi is_available manual_seed_all manual_seed mod ArrTime set_seed print size randperm floor read_pickle cuda DepTime values int format set_seed print size randperm floor cuda float long load int format set_seed print clamp size randperm floor float cuda int format set_seed print size randperm floor float sum cuda int format set_seed print size randperm numpy floor cuda Tensor sum fit_transform Formatter setup_logger size sqrt eval cat item cpu train crps do_eval mul add_ MultiStepLR save argmax cuda log initialize list set_seed BatchDataloader step Adam OrderedDict shape set_postfix append NGD sum get_logger range format replace VariationalELBO size load_uci_data set mean item join time print to_csv tqdm dict parameters train numpy
# msMINRES-CIQ Experiments Code to reproduce the experiments in "Fast Matrix Square Roots with Applications to Gaussian Processes and Bayesian Optimization" by Geoff Pleiss, Martin Jankowiak, David Eriksson, Anil Damle, and Jacob R. Gardner (NeurIPS 2020). ** N.B. ** This code requires a currently-unreleased feature in GPyTorch. The feature will be added shortly. ## System Requirements: - Python 3.7 - PyTorch 1.6 - GPyTorch 1.3 - NumPy
2,217
grammatical/pretraining-bea2019
['unsupervised pre training', 'grammatical error correction']
['Neural Grammatical Error Correction Systems with Unsupervised Pre-training on Synthetic Data']
systems/tools/tc.py systems/tools/rescore.py rescore_features read_feature_weights parse_user_args main iterate_nbest config str join input top_best sort rescore_features len write iterate_nbest read_feature_weights parse_user_args append normalize float enumerate split endswith append int rstrip split readline write exit split add_argument ArgumentParser
# Neural GEC Systems with Unsupervised Pre-Training on Synthetic Data This repository contains models, system configurations and outputs of our winning GEC systems in [the BEA 2019 shared task](https://www.cl.cam.ac.uk/research/nl/bea2019st/) described in R. Grundkiewicz, M. Junczys-Dowmunt, K. Heafield: [Neural Grammatical Error Correction Systems with Unsupervised Pre-training on Synthetic Data](https://www.aclweb.org/anthology/W19-4427), BEA 2019. ## Citation ``` @inproceedings{grundkiewicz-etal-2019-neural,
2,218
gramuah/ccnn
['object counting']
['Towards perspective-free object counting with deep learning']
src/gen_features.py tools/gen_ucsd_dataset.py src/test.py tools/gen_ucsd_extranotation.py tools/gen_ucsd_dotmaps.py tools/gen_ucf_results.py tools/gen_ucf_dataset.py src/utils.py tools/gen_ucf_dotmaps.py dispHelp getGtPos hFlipImages genPDensity genDensity trasposeImages computeMeanIm extractEscales main initGenFeatFromCfg loadImage cropAtPos dispHelp initTestFromCfg CaffePredictor testOnImg gameMetric main gameRec resizePatches importImagesFolder genRandomPos resizeDensityPatch shuffleRows takeIndexFromList cartesian getMasks extendName resizeListDens cfgFromFile extendImNames generateRandomOdd cropPerspective get_dense_pos resizeMaxSize batch shuffleWithIndex dispHelp main writeToFile dispHelp main dispHelp main dispHelp main dispHelp main dispHelp main gaussian_filter getGtPos zeros_like float32 zeros gaussian_filter T max where slice append astype float32 tile zeros len float32 shape append transpose range len append fliplr append range resize DATASET FLIP TRAIN_FEAT NR cfgFromFile CNN_PW_OUT TRAIN_FEAT_LIST RESIZE SPLIT TRAINVAL_LIST USE_PERSPECTIVE PERSPECTIVE_MAP IM_FOLDER DOT_ENDING SIG N_SCALES COLOR CNN_PW_IN PW print dispHelp getopt initGenFeatFromCfg genDensity vstack extractEscales open str len shape loadImage append sum resizePatches hFlipImages format genPDensity close extendName resizeListDens enumerate genRandomPos print loadtxt File write array resizeMaxSize cropAtPos int shape append zeros range process sum DATASET PERSPECTIVE_MAP DOT_ENDING SIG RESIZE N_SCALES TEST_LIST USE_PERSPECTIVE USE_MASK COLOR RESULTS_OUTPUT cfgFromFile IM_FOLDER MASK_FILE PW initTestFromCfg CaffePredictor abs set_device testOnImg gameMetric savetxt range get asarray mean set_mode_cpu int time set_mode_gpu zeros loadmat float resize dtype size repeat zeros prod range cartesian int slice start stop append resize sum max min resizeDensityPatch enumerate shape enumerate resize reshape range len rfind sep append loadtxt extendName print squeeze append append loadmat get seed list asarray arange permutation len asarray take arange shuffle append randint join writeToFile arange ones where imwrite astype logical_and int32 std sorted glob rfind loc pmapx min mask
# Towards perspective-free object counting with deep learning By [Daniel Oñoro-Rubio](https://es.linkedin.com/in/daniel-oñoro-71062756) and [Roberto J. López-Sastre](https://gram.web.uah.es/people/rober/). GRAM, University of Alcalá, Alcalá de Henares, Spain. This is the official code repository of the work described in our [ECCV 2016 paper](https://gram.web.uah.es/data/publications/eccv2016-onoro.pdf). This repository provides the implementation of CCNN and Hydra models for object counting. ## Cite us Was our code useful for you? Please cite us: @inproceedings{onoro2016, Author = {O\~noro-Rubio, D. and L\'opez-Sastre, R.~J.}, Title = {Towards perspective-free object counting with deep learning},
2,219
gramuah/ia
['action detection']
['The Instantaneous Accuracy: a Novel Metric for the Problem of Online Human Behaviour Recognition in Untrimmed Videos', 'Rethinking Online Action Detection in Untrimmed Videos: A Novel Online Evaluation Protocol']
source/online_eval_online_action_detection.py source/compute_instantaneous_accuracy.py parse_input_args build_grid instantaneous_accuracy OnlineEvalOAD add_argument ArgumentParser ones int floor build_grid int cumsum ceil zeros float sum enumerate
# Instantaneous Accuracy This repository contains the code of the Instantaneous Accuracy metric. The metric was presented [here](https://arxiv.org/pdf/2003.09970.pdf) and extended [here](https://arxiv.org/pdf/2003.12041.pdf). <p align="center"> <img src="./png/ia.png" alt="Online Evaluation for Online Action Detection" title="Instantaneous Accuracy" width="652" zoom="343" align="center" /> </p> ### Citation If you find anything of this repository useful for your projects, please consider citing these works: ```bibtex @inproceedings{Baptista2019iccvw, Title = {The Instantaneous Accuracy: a Novel Metric for the Problem of Online Human Behaviour Recognition in Untrimmed Videos},
2,220
grimpil/nyt-summ
['document summarization', 'extractive summarization']
['The Role of Discourse Units in Near-Extractive Summarization']
lexical/untokenizer.py lexical/idf.py doc.py lexical/splitter.py resources/__init__.py sentence.py corpus.py lexical/sanitizer.py lexical/stemmer.py lexical/tokenizer.py main.py lexical/wordlists/__init__.py utils/timer.py NYTCorpus NYTDoc add_args Sentence IDFTable idf_smoothing Sanitizer Splitter split stem tokenize Tokenizer untokenize Untokenizer load_set load_dict load_list load_set Timer add_argument compile join dirname set join dirname join dirname
Extraction and pre-processing of summarization datasets from the New York Times Annotated Corpus ([LDC2008T19](https://catalog.ldc.upenn.edu/LDC2008T19)). ### Installation This library was developed and tested under Python 3.4. Feel free to send me errors or pull requests for extending compatibility to earlier versions of Python. We depend on [NLTK](http://www.nltk.org/) for first-pass sentence splitting and [spaCy](https://spacy.io/) for verb detection via part-of-speech tagging. ``` $ pip install nltk $ pip install spacy $ python -m spacy download en_core_web_sm ``` ### Usage
2,221
gruberto/PixelAccurateDepthBenchmark
['depth estimation']
['Pixel-Accurate Depth Evaluation in Realistic Driving Scenarios']
src/Evaluator.py src/Dataset.py src/gated.py src/results.py src/visualize.py src/metrics.py src/evaluate.py Dataset evaluate_mt print_result_rainfall print_result_clear print_result_visibility evaluation_worker Evaluator get_valid load_gated Metric colorize_error colorize_depth colorize_pointcloud_emphasize_clutter colorize_pointcloud crop_rgb_to_gated visualize print join get_header range print join get_header range print join get_header range print_result_rainfall print_result_clear get_fog_sequence Pool Dataset len get_clear_sequence imap savetxt print_result_visibility append format hstack get_rain_sequence enumerate join print reshape get_header array makedirs evaluate_samples_binned evaluate_samples Evaluator join astype float32 zeros imread clip enumerate mean amin amax tuple ScalarMappable argwhere Normalize jet zeros range circle tuple ScalarMappable argwhere Normalize jet zeros range circle logical_and ScalarMappable argwhere Normalize jet zeros abs range circle uint8 astype ScalarMappable Normalize jet resize imwrite load_gated load_rgb colorize_pointcloud error_image load_depth_groundtruth colorize_depth apply load_depth append format createCLAHE Evaluator create_top_view enumerate join print Dataset makedirs
PixelAccurateDepthBenchmark ============================ <img src="./doc/teaser.png" width="800"> This repo contains the code and data for [Pixel-Accurate Depth Evaluation in Realistic Driving Scenarios](https://arxiv.org/pdf/1906.08953.pdf) by [Tobias Gruber](https://scholar.google.de/citations?user=w-VeQ5cAAAAJ&hl=de), [Mario Bijelic](http://mariobijelic.de/wordpress/), [Felix Heide](http://www.cs.princeton.edu/~fheide/), [Werner Ritter](https://www.xing.com/profile/Werner_Ritter7) and [Klaus Dietmayer](https://www.uni-ulm.de/en/in/institute-of-measurement-control-and-microtechnology/institute/staff/institutional-administration/prof-dr-ing-klaus-dietmayer/). NEWS: Coda and data are available now! # Introduction This work presents an evaluation benchmark for depth estimation and completion using high-resolution depth measurements with angular resolution of up to 25" (arcsecond), akin to a 50 megapixel camera with per-pixel depth available. Existing datasets, such as the KITTI benchmark, provide only sparse reference measurements with an order of magnitude lower angular resolution - these sparse measurements are treated as ground truth by existing depth estimation methods. We propose an evaluation in four characteristic automotive scenarios recorded in varying weather conditions (day, night, fog, rain). As a result, our benchmark allows to evaluate the robustness of depth sensing methods to adverse weather and different driving conditions. Using the proposed evaluation data, we show that current stereo approaches provide significantly more stable depth estimates than monocular methods and lidar completion in adverse weather. ## Dataset overview <img src="./doc/dataset.gif" width="800"> ## Some results
2,222
gs18113/AdaIN-TensorFlow2
['style transfer']
['Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization']
train.py model.py functions.py data.py get_training_set get_coco_test_set get_wikiart_set get_test_set get_coco_training_set get_image_from_coco get_image_from_wikiart expand_moments_dim adain Net get_decoder str2bool train_step random_crop float32 cast resize reduce_min TRAIN load load TEST random_crop read_file resize reduce_min decode_jpeg join list_files ignore_errors apply get_coco_training_set get_wikiart_set get_coco_test_set get_wikiart_set sqrt moments divide expand_moments_dim isinstance trainable_variables list gradient apply_gradients zip
# AdaIN-TensorFlow2 AdaIN(from the paper Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization, https://arxiv.org/abs/1703.06868) implementation with TensorFlow 2 Original PyTorch code: https://github.com/naoto0804/pytorch-AdaIN Includes TFLite conversion for mobile/embedded usage. ## Requirements * tensorflow >= 2.0.0 * tensorflow_datasets ## Note * **Most of the code is from naoto0804/pytorch-AdaIN https://github.com/naoto0804/pytorch-AdaIN**. * This code was written for studying, so the code may be hard to understand. I'll try my best to improve code readability.
2,223
gsoh/HCNAF
['density estimation']
['HCNAF: Hyper-Conditioned Neural Autoregressive Flow and its Application for Probabilistic Occupancy Map Forecasting']
HCNAF_PRECOG_Carla/train_PRECOG_Carla.py HCNAF_PRECOG_Carla/util_dataset_PRECOG_Carla.py HCNAF_Gaussians/train_hcnaf_gaussians.py HCNAF_Gaussians/exp_naf.py HCNAF_PRECOG_Carla/util_PRECOG_Carla.py HCNAF_Gaussians/test_hcnaf_gaussians.py HCNAF_Gaussians/exp_hcnaf_gaussians.py HCNAF_PRECOG_Carla/test_PRECOG_Carla.py HCNAF_PRECOG_Carla/util_visualize_PRECOG_Carla.py HCNAF_PRECOG_Carla/hcnaf_PRECOG_Carla.py HCNAF_Gaussians/hcnaf_gaussians.py HCNAF_Gaussians/util_gaussians.py HCNAF_PRECOG_Carla/encoder.py sample_dataset FourDiamond Mixture Distr NByN TenByTen SwissRoll create_HCNAF Tanh_HCNAF HyperNN_L3 compute_NLL conditional_AF_layer MaskedWeight compute_log_p_x HyperNN_L2 HyperNN_L2b Sequential_HCNAF HyperNN_L2s main main train_gaussians plot_de_2d_multiple plot_de_2d_data load_state plot_de_2d save_state CoordConvBlock coordconv_E32_HW200_lidar_simple coordconv_E64_HW200_lidar_complex BlockNet BlockSet CoordConv define_enc_n_save_spec coordconv_E64_HW200_lidar_simple coordconv_E96_HW200_lidar_simple NormalizeModule ConvBlock create_HCNAF Tanh_HCNAF HyperNN_WB conditional_AF_layer MaskedWeight compute_log_p_x LSTM_model Sequential_HCNAF define_encoder_2channel_lidar HyperNN_PRECOG_Carla_NoLidar HyperNN_PRECOG_Carla_All_faster_temporal compute_log_p_x_skip_HyperNet HyperNN_PRECOG_Carla_NoLidar_faster_temporal HyperNN_PRECOG_Carla_All main compute_extra_nats main train_HCNAF_PRECOG_Carla collect_inputs_and_compute_loss_PRECOG SubsetSequentialSampler from_json_dict split_dataidx split_dataloader set_dataloader_PRECOG_Carla load_json DatasetFolderSamples_PRECOG_Carla load_state save_state_intermediate save_state load_state_intermediate plot_POMap_PRECOG_Carla list RandomState randn sampler choice append array range len sum model print eval format dim_o dim_h_flow format Tanh_HCNAF HyperNN_L3 print MaskedWeight conditional_AF_layer device HyperNN_L2 HyperNN_L2b HyperNN_L2s n_layers_flow to sum range append create_HCNAF ArgumentParser device open compute_NLL pprint load_state_dict plot_de_2d parse_args loadfilename __dict__ plot_de_2d_multiple NByN dataparallel load_state load print add_argument loadpath SimpleNamespace clip_grad_norm_ zero_grad iterations last_iteration device save_state round str to range state_dict format eval best_iteration item resume_training float backward print best_loss parameters train step iterations DataParallel ReduceLROnPlateau n_layers_flow dataset hypernet_layers Adam train_gaussians format replace mkdir resume_training add_noise dim_h_flow batch_dim path parameters print str format save print load int loadfilename format isinstance view axis imshow DataLoader path TensorDataset figure savefig device Tensor to numpy cat int loadfilename format isinstance view axis imshow DataLoader path TensorDataset figure savefig device Tensor to numpy int loadfilename format view axis imshow DataLoader path TensorDataset figure savefig device Tensor to numpy print join to format define_enc_n_save_spec define_enc_n_save_spec define_enc_n_save_spec define_enc_n_save_spec sum model HyperNN_PRECOG_Carla_NoLidar HyperNN_PRECOG_Carla_All_faster_temporal HyperNN_PRECOG_Carla_NoLidar_faster_temporal HyperNN_PRECOG_Carla_All coordconv_E96_HW200_lidar_simple coordconv_E64_HW200_lidar_complex coordconv_E64_HW200_lidar_simple coordconv_E32_HW200_lidar_simple format loadfilename print data_subset num_perturbations eye MultivariateNormal zeros batch_size whichset_to_plot max save_folder_POMap plot_method shape iter DatasetFolderSamples_PRECOG_Carla next plot_index compute_extra_nats batch_size_test plot_POMap_PRECOG_Carla join num_workers set_dataloader_PRECOG_Carla forecast_which_frame device tensor max_num_actors view transpose permute time_normalization to HW_img range cat item sample dim_c_EncInput enumerate temporal repeat num_perturbations len num_epoch forecast_which_frame save_state round str save_state_intermediate iter range state_dict format resume_training float enumerate last_epoch best_epoch time join print best_loss path eye MultivariateNormal zeros train step len num_epoch round dim_h_dt dataset_name max_num_actors HW_img num_seq_input_sdv sdv_hist_length_sec ablation_mode int train_HCNAF_PRECOG_Carla temporal sdv_hist_tgap dim_traffic loss seed format print shuffle randint len format print sampler DataLoader iter next len load from_json_dict open items list asarray isinstance AttrDict format print DataLoader iter next len print str format save print load int b_size_plot eval normalization HW_img
# HCNAF - Hyper-conditioned Neural Autoregressive Flow <p align="center"> <img align="middle" src="HCNAF_CVPR_presentation_frontpage.png"/> </p> - Pytorch implementation of HCNAF by Geunseob (GS) Oh, Jean-Sebastien Valois - [Link to the paper - CVPR 2020](http://openaccess.thecvf.com/content_CVPR_2020/html/Oh_HCNAF_Hyper-Conditioned_Neural_Autoregressive_Flow_and_its_Application_for_Probabilistic_CVPR_2020_paper.html) ## Requirements - Python 3 - PyTorch - NumPy
2,224
gtolias/tma
['adversarial attack']
['Targeted Mismatch Adversarial Attack: Query with a Flower to Retrieve the Tower']
tma.py cirtorchclone/imageretrievalnet.py test.py eval_retrieval.py attack_queries.py utils.py main config_qimname_a extract_vectors_a compute_map_and_print loader GaussianSmoothing hist_per_channel tma reproduce eval_sim center_crop img_loader CroW extract_ss ImageRetrievalNet extract_vectors init_network extract_ssl extract_regional_vectors extract_ms extract_local_vectors crow extract_ssr compute_map_and_print init_network ext_attack gpu_id save dataset cuda parse_args dir_cache sum download_test get_data_root update format Compose eval image_resize network_offtheshelf Normalize image_size load join T print dot argsort configdataset extract_vectors_a isfile numpy split eval cuda ImagesFromList DataLoader format compute_map concatenate print around append range len data Sequential clamp_ unsqueeze floor interpolate GS features cuda Parameter Adam ceil range detach eval item poolattack print clone step array len sum FloatTensor reshape squeeze size div unsqueeze type size max imresize floor crop open manual_seed_all seed manual_seed str format print squeeze unsqueeze item cpu cuda count_nonzero shape numpy zeros float sum enumerate get children list format basename join get_data_root print ImageRetrievalNet load_url load_state_dict startswith ReLU append Rpool Linear eval cuda ImagesFromList DataLoader pow zeros clone interpolate eval cuda ImagesFromList DataLoader eval cuda ImagesFromList DataLoader
# Targeted mismatch adversarial attack (TMA) This is a Python package that uses Pytorch to implement our paper: ``` @conference{TRC19, title = {Targeted Mismatch Adversarial Attack: Query with a Flower to Retrieve the Tower}, author = {Tolias, Giorgos and Radenovi{\'c}, Filip and Chum, Ondrej} booktitle = {International Conference on Computer Vision (ICCV)}, year = {2019} } ```
2,225
gttugsuu/Constrained-Neural-Style-Transfer-for-Decorated-Logo-Generation
['style transfer']
['Constrained Neural Style Transfer for Decorated Logo Generation']
utility.py distance_transform.py StyleTransfer.py model.py dist_t dist_loss numpy_to_image load_vgg_model style_loss_func content_dist content_loss_func shape_loss_func load_image save_image astype cvtColor COLOR_BGR2GRAY DIST_L2 multiply distanceTransform sum numpy_to_image sum imwrite multiply abs numpy_to_image Variable avgpool conv2d_relu zeros loadmat sum content_loss run dist_t run squeeze reduce_sum pow rgb_to_grayscale run print imread array resize print astype imwrite
gttugsuu/Constrained-Neural-Style-Transfer-for-Decorated-Logo-Generation
2,226
gttugsuu/Guided-Neural-Style-Transfer-for-Shape-Stylization
['style transfer']
['Guided neural style transfer for shape stylization']
utility/vgg_network.py utility/utility.py main.py utility/loss_fns.py closure weight_maker get_style_patch_weights divide_patches smoothnes_loss mrf_loss_fn get_patches content_loss_fn save_plot save_images postp GramMSELoss load_image dist_cv2 GramMatrix VGG update save_plot format backward squeeze zero_grad clone write smoothnes_loss mrf_loss_fn postp item vgg save append enumerate append range append clone sqrt zeros to sum range len sorted divide_patches get_patches squeeze_ sorted max_pool1d unsqueeze_ divide_patches conv3d len shape unsqueeze get_patches max range cat enumerate enumerate pad sum clone postpa postpb invert resize invert prep Variable Compose convert to open list new paste postp zip save sum max DIST_L2 asarray squeeze convert grey_erosion distanceTransform unsqueeze postp to cat savefig close legend plot
# Guided Neural Style Transfer for Shape Stylization This is the repository for the implementation of "Guided Neural Style Transfer for Shape Stylization" by G. Atarsaikhan, B. K. Iwana and S. Uchida. ## Table of Contents 1. [Introduction](#introduction) 2. [Results](#results) 3. [Requirements](#requirements) 4. [Running the code](#running-the-code) ## Introduction We propose a combination of the Gram matrix-based style transfer and Patch matching-based style transfer for shape stylization. This is achieved by adding "Distance transform module" and "Shape matching module" to the regular neural style transfer. <!-- ![Whole process](readme_files/whole_process.png) -->
2,227
gudovskiy/al-fk-self-supervision
['active learning']
['Deep Active Learning for Biased Datasets via Fisher Kernel Self-Supervision']
vaal/vgg.py vaal/mnist.py svhn/run_plot.py mnist/visualize_tsne.py imagenet/custom_models/resnet.py svhn/main_descr.py svhn/custom_models/resnet.py svhn/gen_descr.py mnist/run_plot.py svhn/run.py vaal/results.py vaal/custom_datasets.py imagenet/run_plot.py vaal/main.py vaal/svhn.py mnist/custom_datasets/mnist.py vaal/sampler.py vaal/solver.py vaal/resnet.py imagenet/custom_datasets/__init__.py imagenet/custom_models/model.py vaal/utils.py mnist/custom_models/model.py svhn/custom_datasets/svhn.py svhn/utils.py mnist/run.py vaal/run.py imagenet/unsup.py imagenet/custom_datasets/folder.py imagenet/run.py mnist/unsup.py mnist/custom_datasets/utils.py mnist/main_descr.py mnist/utils.py imagenet/custom_models/vgg.py mnist/gen_descr.py vaal/model.py imagenet/custom_models/__init__.py imagenet/main_descr.py imagenet/gen_descr.py svhn/custom_datasets/utils.py svhn/unsup.py svhn/custom_models/model.py vaal/arguments.py imagenet/custom_datasets/dali.py main main main HybridTrainPipe HybridValPipe is_image_file DatasetFolder make_dataset ImageFolder accimage_loader default_loader has_file_allowed_extension pil_loader BasicBlockMC conv1x1 ResNet resnet50 Bottleneck resnet152 conv3x3 resnet34 resnet18 BasicBlock resnet101 vgg19 VGG vgg16_bn vgg19_bn vgg11_bn make_layers vgg11 vgg13 vgg13_bn vgg16 main main main init_seeds main MNIST read_label_file get_int read_image_file list_files download_url check_integrity gen_bar_updater list_dir makedir_exist_ok get_miss NetMC exp_lr_scheduler test get_miss_and_cm gen_descr gen_mc save lenet train NetMSA main main main init_seeds SVHN list_files download_url check_integrity gen_bar_updater list_dir makedir_exist_ok get_miss exp_lr_scheduler test gen_descr gen_mc save train BasicBlockMC conv1x1 ResNet resnet50 Bottleneck resnet152 conv3x3 resnet34 resnet101 resnet10 BasicBlock get_args imagenet_test_transformer imagenet_train_transformer ImageNet cifar10_transformer CIFAR10 CIFAR100 main MNIST read_image_file get_int mnist_transformer read_label_file LeNet VAE Discriminator View normal_init kaiming_init BasicBlockMC conv1x1 ResNet resnet50 Bottleneck resnet152 conv3x3 resnet34 resnet18 resnet10 BasicBlock resnet101 AdversarySampler Solver svhn_transformer SVHN list_files download_url check_integrity gen_bar_updater init_seeds list_dir makedir_exist_ok vgg19 VGG vgg16_bn _vgg vgg19_bn vgg11_bn vgg13 vgg11 make_layers vgg13_bn vgg16 DALIClassificationIterator save_folder HybridValPipe SGD ArgumentParser arch cuda FP16_Optimizer DDP set_device train_size exit build run_folder device_count subtype_method load_state_dict append parse_args format augment_method init_process_group ensemble_index get_world_size test distributed imbalance_ratio fp16 noisy_ratio batch load join print add_argument network_to_half gen_descr parameters isfile local_rank gpu descriptor_length validate save_checkpoint save HybridTrainPipe max list topk view len argmin tolist epochs sum range cat size set start_epoch lr unique item sample get_miss ensemble_size augment_size sort clone min t index_select reset cpu zeros train mm round mkdir enumerate int extend randint lower join sorted has_file_allowed_extension append expanduser keys walk 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 Conv2d load_url make_layers VGG load_state_dict load_url make_layers VGG load_state_dict load_url make_layers VGG load_state_dict load_url make_layers VGG load_state_dict load_url make_layers VGG load_state_dict load_url make_layers VGG load_state_dict load_url make_layers VGG load_state_dict load_url make_layers VGG load_state_dict DataLoader init_seeds device to MNIST save_model lt squeeze ge seed manual_seed_all manual_seed subplots Ellipse dataset str strftime set_printoptions shape ylim scatter colorbar imshow savefig PdfPages fit_transform update astype tight_layout copy add_axes close xlim set_size_inches reshape text confusion_matrix plot_tsne get_miss_and_cm subplots_adjust add_patch numpy array md5 hexdigest makedirs join urlretrieve print expanduser makedir_exist_ok expanduser list expanduser list NetMC NetMSA format print eval unsqueeze dataset len format print dataset eval to len format print dataset eval to len model zero_grad unsqueeze dataset view to rot90 cross_entropy format param_groups size exp_lr_scheduler item flip enumerate backward print repeat step len sample_steps mul model log2 save dataset max exit to sum range detach format size mean eval softmax float enumerate print repeat cpu zeros std len sample_steps arange zeros_like randn model cos zero_grad flatten floor save dataset round get_rotation_matrix2d log argmax view ones transpose squeeze exit matmul eq permute sin meshgrid to double range cat detach cross_entropy ones_like format warp_affine size grad isfinite eval stack nonzero diagonal float descriptor_length long view_as enumerate load bmm print reshape t repeat cholesky cpu zeros mm len param_groups SVHN load_url ResNet load_state_dict out_path add_argument mkdir ArgumentParser parse_args arange out_path num_images initial_budget pretrained log_name SubsetRandomSampler LeNet VAE Discriminator resnet18 CIFAR100 budget setdiff1d CIFAR10 resnet10 ImageNet data_path sample_for_labeling Solver fill_ kaiming_normal_ weight isinstance fill_ normal_ zero_ isinstance load_state_dict_from_url make_layers VGG load_state_dict
# Deep Active Learning for Biased Datasets via Fisher Kernel Self-Supervision [https://arxiv.org/abs/2003.00393](https://arxiv.org/abs/2003.00393) ## Abstract Active learning (AL) aims to minimize labeling efforts for data-demanding deep neural networks (DNNs) by selecting the most representative data points for annotation. However, currently used methods are ill-equipped to deal with biased data. The main motivation of this paper is to consider a realistic setting for pool-based semi-supervised AL, where the unlabeled collection of train data is biased. We theoretically derive an optimal acquisition function for AL in this setting. It can be formulated as distribution shift minimization between unlabeled train data and weakly-labeled validation dataset. To implement such acquisition function, we propose a low-complexity method for feature density matching using Fisher kernel (FK) self-supervision as well as several novel pseudo-label estimators. Our FK-based method outperforms state-of-the-art methods on MNIST, SVHN, and ImageNet classification while requiring only 1/10th of processing. The conducted experiments show at least 40% drop in labeling efforts for the biased class-imbalanced data compared to existing methods. ## BibTex Citation If you like our [paper](https://arxiv.org/abs/2003.00393) or code, please cite it using the following BibTex: ``` @InProceedings{Gudovskiy_2020_CVPR, author = {Gudovskiy, Denis and Hodgkinson, Alec and Yamaguchi, Takuya and Tsukizawa, Sotaro}, title = {Deep Active Learning for Biased Datasets via Fisher Kernel Self-Supervision},
2,228
guillemram97/wp-hungarian
['word embeddings']
['Unsupervised Alignment of Embeddings with Wasserstein Procrustes', 'On a Novel Application of Wasserstein-Procrustes for Unsupervised Cross-Lingual Learning']
dico_builder.py iterative_hungarian.py get_nn_avg_dist build_dictionary get_candidates make_matrix solve procrustes topk hasattr GpuIndexFlatIP contiguous GpuIndexFlatConfig search add numpy cat StandardGpuResources IndexFlatIP cpu mm range append sub_ exp_ get_nn_avg_dist div_ gather topk view transpose from_numpy dico_max_rank expand_as append range cat size startswith float int min type_as clone mul_ cpu mm list LongTensor set get_candidates cat float mm max numpy svd transpose matmul solve_dense
The code in this repository is a support for the experiments in the paper [On a Novel Application of Wasserstein-Procrustes for Unsupervised Cross-Lingual Learning](https://arxiv.org/abs/2007.09456). # Running directions (GPU required) Code [iterative_hungarian](iterative_hungarian.py) takes one initialisation matrix `W_0` and refines it. Experiments from **Section 5.1** are recreated the following way (this example shows English-Spanish): 1. The source and target embeddings can be downloaded in the following way (change link for other languages): - English fastText Wikipedia embeddings: `curl -Lo wiki.en.vec https://dl.fbaipublicfiles.com/fasttext/vectors-wiki/wiki.en.vec` - Spanish fastText Wikipedia embeddings: `curl -Lo wiki.es.vec https://dl.fbaipublicfiles.com/fasttext/vectors-wiki/wiki.es.vec` 2. Obtaining the initialisation matrix - [MUSE](https://github.com/facebookresearch/MUSE): `python unsupervised.py --src_lang en --tgt_lang es --src_emb data/wiki.en.vec --tgt_emb data/wiki.es.vec --n_refinement 5` - [Procrustes](https://github.com/facebookresearch/MUSE): `python supervised.py --src_lang en --tgt_lang es --src_emb data/wiki.en.vec --tgt_emb data/wiki.es.vec --n_refinement 5 --dico_train default`
2,229
guillermo-jimenez/ECGDelNet
['data augmentation', 'semantic segmentation']
['ECG-DelNet: Delineation of Ambulatory Electrocardiograms with Mixed Quality Labeling Using Neural Networks']
utils/logger.py utils/modules.py utils/losses.py utils/train.py utils/transforms.py utils/bash.py utils/inference.py utils/evaluation.py utils/check.py utils/disambiguator.py utils/evaluation2.py utils/architecture2D.py utils/modules2D.py utils/data_structures.py main.py dataexporter.py utils/architecture.py utils/mask_generator.py utils/visualization.py main FlatNet FlatNet shuffle_split_array check_weights_exist series_to_supervised WaveInformation MetricsStorage DataStorage save_data DataGenerator ConfigParser Wave ExecutionInformation WaveMetricsStorage Signal supervised_to_series save_fiducials load_data Database Registry select_optimizer select_loss select_kernel_initializer get_correspondence_between_predicted_leads retrieve_fiducials evaluate save_results wave_fiducials get_correspondence_between_gt_and_predicted metric_computation compute_dice_score compute_wave_metrics wave_evaluation_from_metrics get_correspondence_between_predicted_leads retrieve_fiducials evaluate save_results wave_fiducials get_correspondence_between_gt_and_predicted metric_computation compute_dice_score compute_wave_metrics wave_evaluation_from_metrics predict_multi predict predict_single lr_scheduler write_summary retrieve_terminal_size conditional_makedir print_summary JaccardLoss DiceLoss soft_orthogonal_regularizer PoolingModule StemModule spectral_res_iso_reg OutputModule AtrousMiddleModule LevelModule soft_orthogonal_regularizer PoolingModule MergeModule StemModule spectral_res_iso_reg OutputModule AtrousMiddleModule LevelModule train_cross_val train_epochs train_all train_fold SignalPower amplifier_saturation GetDistanceMap additive_white_gaussian_noise pacemaker_spikes DistanceMapTransform DataAugmentationTransform random_spikes sinusoidal_noise plot_signal plot_mask plot_markers plot_all describe init_P init_T DataFrame exists seed list train_cross_val train_all asarray MetricsStorage DataStorage set zip keys join T sort_index data_path dict load_data init_QRS read_csv len ExecutionInformation range evaluate len permutation zeros pad range dtype range zeros dict asarray astype replace retrieve_fiducials results concatenate save_results test metric_computation predict T wave_evaluation_from_metrics P to_csv dict DataFrame QRS T wave_fiducials QRS P pad values diff T any T any sum get_correspondence_between_predicted_leads asarray hstack get_correspondence_between_gt_and_predicted dict append zeros range len asarray len T P validity compute_wave_metrics QRS test predict_multi predict_single tqdm series_to_supervised append window batch_size ones squeeze morphologyEx MORPH_CLOSE ceil zeros round range predict series_to_supervised window batch_size ones squeeze morphologyEx MORPH_CLOSE dstack ceil zeros round range append mkdir Path columns mean eps sum batch_flatten mean eps sum batch_flatten Conv1D SeparableConv1D Conv1D SeparableConv1D Conv1D SeparableConv1D Conv1D SeparableConv1D Conv1D SeparableConv1D Conv2D SeparableConv2D Conv2D SeparableConv2D Conv2D SeparableConv2D Conv2D SeparableConv2D Conv2D SeparableConv2D Conv2D SeparableConv2D seed time format asarray list evaluate print len ExecutionInformation tolist set_random_seed set check_weights_exist range train_fold seed time format create_model evaluate print compile ExecutionInformation set_random_seed lower select_loss train_fold clear_session train_epochs create_model valid evaluate write_summary DataGenerator state select_loss lower load_weights summary train compile str logger batch_size print EarlyStopping fit_generator CSVLogger ModelCheckpoint list GetDistanceMap keys clip zeros_like logical_not log values dist_transform SignalPower normal sqrt uniform len SignalPower convolve size interp1d sqrt uniform shape linspace interp randint sum zeros SignalPower arange pi sqrt uniform sin len SignalPower int sqrt uniform shape randint float zeros len shape uniform zeros abs max amplifier_saturation additive_white_gaussian_noise pacemaker_spikes random_spikes sinusoidal_noise plot window set_xlabel set_xlim set_yticks sampling_freq set_xticks set_ylabel linspace gca tick_params axvspan plot window set_xlabel set_xlim set_yticks sampling_freq set_xticks set_ylabel linspace gca tick_params axvspan plot window set_xlabel set_xlim set_yticks sampling_freq set_xticks twinx linspace set_ylabel gca fill_between axvspan tick_params asarray plot window sort set_xlabel tolist set_xlim sampling_freq set_yticks set_xticks set_ylabel linspace gca tick_params range axvspan len
# ECGDelNet [TO BE UPDATED] ECG delineator network for ambulatory 2-lead recordings
2,230
gump88/SAN-CWS
['chinese word segmentation']
['Investigating Self-Attention Network for Chinese Word Segmentation']
model/optim.py model/transformer.py utils/data.py utils/__init__.py model/crf.py model/cnn.py utils/metric.py model/cws.py model/word_attention.py model/__init__.py utils/functions.py main.py utils/alphabet.py model/sequence.py load_model_decode predict_check evaluate load_data_setting data_initialization lr_decay recover_label save_data_setting train batchify_with_label CNNModel log_sum_exp CRF CWS ScheduledOptim Seq FNNLayer positional_embedding LayerNormalization MultiHeadAttention EncoderBlock get_attn_padding_mask ScaledDotProductAttention ResidualConnection TransformerEncoder LongTensor randn Tensor Attention zeros Alphabet Data load_external_pos read_instance build_pretrain_embedding normalize_word load_pos_to_idx norm2one load_token_pos_prob load_tencent_dic read_seg_instance load_pretrain_emb get_ner_BIO fmeasure_from_singlefile readTwoLabelSentence readSentence fmeasure_from_file reverse_style get_ner_BMES get_ner_fmeasure print biword_alphabet_size word_alphabet_size fix_alphabet build_alphabet sum numpy append size numpy range print deepcopy print show_data_summary print param_groups raw_Ids train_texts time get_ner_fmeasure print train dev_texts raw_texts HP_gpu eval test_Ids train_Ids test_texts batchify_with_label range dev_Ids len max byte LongTensor sort tolist cuda zip Tensor long enumerate len use_sgd HP_clip clip_grad_norm_ zero_grad SGD save str generate_instance predict_check Adam lr_decay ScheduledOptim train_Ids use_warmup_adam range state_dict HP_lr HP_iteration use_bert shuffle HP_gpu use_adadelta neg_log_likelihood_loss batchify_with_label HP_lr_decay flush time collect Adadelta HP_batch_size print backward evaluate step_and_update_lr step use_adam len load time evaluate print load_state_dict CWS max view list size is_cuda expand mul_ float cuda log cat size expand isdigit print load keys set print len open split print lower open split print float open split print readlines len normalize_word append get_index range split readlines len normalize_word lower append get_index range split items print len dict sqrt uniform norm2one empty load_pretrain_emb sqrt sum square dict get_ner_BIO list print set intersection get_ner_BMES range len index len str replace upper reverse_style append range len str replace upper reverse_style append range len append readlines split append readlines split print readSentence get_ner_fmeasure print readTwoLabelSentence get_ner_fmeasure
Investigate self-attention network for Chinese Word Segmentation ==== Investigate self-attention network for Chinese Word Segmentation. Models and results can be found at our paper [Investigate self-attention network for Chinese Word Segmentation](https://arxiv.org/abs/1907.11512). Requirement: ====== Python: 3.6.2 PyTorch: 1.0.1 Input format:
2,231
guoheidanqq/deeplearningjeffheatonT81
['time series']
['Applications of Deep Neural Networks with Keras']
py/mpg_server_1.py py/image_web_server_1.py py/image_server_1.py upload_image allowed_file send_index send_root upload_image allowed_file calc_mpg load preprocess_input read BytesIO img_to_array ANTIALIAS print secure_filename resize decode_predictions filename append expand_dims predict open json print append zeros float predict
# T81 558:Applications of Deep Neural Networks [Washington University in St. Louis](http://www.wustl.edu) Instructor: [Jeff Heaton](https://sites.wustl.edu/jeffheaton/) **The content of this course changes as technology evolves**, to keep up to date with changes [follow me on GitHub](https://github.com/jeffheaton). * Section 1. Fall 2020, Monday, 2:30 PM, Online * Section 2. Fall 2020, Monday, 6:00 PM, Online # Course Description Deep learning is a group of exciting new technologies for neural networks. Through a combination of advanced training techniques and neural network architectural components, it is now possible to create neural networks that can handle tabular data, images, text, and audio as both input and output. Deep learning allows a neural network to learn hierarchies of information in a way that is like the function of the human brain. This course will introduce the student to classic neural network structures, Convolution Neural Networks (CNN), Long Short-Term Memory (LSTM), Gated Recurrent Neural Networks (GRU), General Adversarial Networks (GAN) and reinforcement learning. Application of these architectures to computer vision, time series, security, natural language processing (NLP), and data generation will be covered. High Performance Computing (HPC) aspects will demonstrate how deep learning can be leveraged both on graphical processing units (GPUs), as well as grids. Focus is primarily upon the application of deep learning to problems, with some introduction to mathematical foundations. Students will use the Python programming language to implement deep learning using Google TensorFlow and Keras. It is not necessary to know Python prior to this course; however, familiarity of at least one programming language is assumed. This course will be delivered in a hybrid format that includes both classroom and online instruction. # Textbook I am in the process of creating a textbook for this course. You can find a draft [here](https://arxiv.org/abs/2009.05673). If you would like to cite the material from this course/book, please use the following bibtex citation:
2,232
guopengf/CG-SAMR
['data augmentation']
['Lesion Mask-based Simultaneous Synthesis of Anatomic and MolecularMR Images using a GAN']
pytorch_networks.py MultiscaleDiscriminator UnetSkipConnectionBlock scale_residue_est MultilabelDiscriminator DiceLoss get_norm_layer GANLoss ResnetBlock define_D scale_residue_conf GlobalGenerator_stretch_atlas_cguide weights_init define_G UnetGenerator init_weights init_net GlobalGenerator_stretch_atlas NLayerDiscriminator GlobalGenerator print_network define_Unet print apply init_weights to DataParallel normal_ __name__ fill_ BatchNorm2d partial InstanceNorm2d get_norm_layer print GlobalGenerator apply GlobalGenerator_stretch_atlas_cguide GlobalGenerator_stretch_atlas cuda get_norm_layer print UnetGenerator apply cuda MultiscaleDiscriminator get_norm_layer print apply MultilabelDiscriminator cuda print parameters isinstance
# CG-SAMR Pytorch Code for the paper ["Lesion Mask-based Simultaneous Synthesis of Anatomic and Molecular MR Images using a GAN"](https://arxiv.org/abs/2006.14761) , presented at MICCAI 2020 and its Journal Extension: ["Anatomic and Molecular MR Image Synthesis Using Confidence Guided CNNs"](https://arxiv.org/abs/2008.02859) # About this repo: This repo hosts the code for the CG-SAMR and SAMR # Citation: ```bash @inproceedings{guo2020lesion, title={Lesion Mask-Based Simultaneous Synthesis of Anatomic and Molecular MR Images Using a GAN},
2,233
gupta-abhay/setr-pytorch
['medical image segmentation', 'semantic segmentation']
['Rethinking Semantic Segmentation from a Sequence-to-Sequence Perspective with Transformers']
setr/HybridSETR.py setr/IntmdSequential.py setr/ResNet.py setr/PositionalEncoding.py setr/Transformer.py setr/SETR.py HybridSegmentationTransformer IntermediateSequential FixedPositionalEncoding LearnedPositionalEncoding conv3x3 ResNetV2Model conv1x1 PreActBottleneck SETR_Naive_H SETR_MLA_S SETR_Naive SETR_PUP_S SETR_PUP_L SegmentationTransformer SETR_Naive_S SETR_MLA SETR_PUP_H SETR_Naive_L SETR_MLA_H SETR_MLA_L SETR_PUP PreNorm Residual PreNormDrop FeedForward SelfAttention TransformerModel SETR_Naive SETR_Naive SETR_Naive SETR_PUP SETR_PUP SETR_PUP SETR_MLA SETR_MLA SETR_MLA
# Segmentation Transformer Implementation of [Segmentation Transformer](https://arxiv.org/abs/2012.15840) in PyTorch, a new model to achieve SOTA in semantic segmentation while using transformer style encoders. ![SETR](./static/setr.png) ## Features - [x] SETR - [x] SETR-Naive - [x] SETR-PUP - [x] SETR-MLA - [x] SETR-Hybrid To Do:
2,234
gurdaspuriya/cawa
['information retrieval', 'text classification', 'text summarization']
['CAWA: An Attention-Network for Credit Attribution']
Code/scripts/myF1.py Code/scripts/twoLayerNN.py Code/scripts/myAUC.py Code/cawa.py Code/scripts/qualitative_sov.py Code/scripts/mySOV.py Code/scripts/myF1optimal.py Code/scripts/logisticRegression.py test_stats_class get_args evaluate segment_stats_seg train masked_attention_loss class_attention GaussuanConv1d valid_stats_seg usage sentence_encoder BatchLoader binary_classifier get_loss_simple test_performance get_loss classifier compute_auc compute_f1 compute_f1 compute_sov compute_sov get_loss DocClassifier test_performance classifier get_loss_simple add_argument ArgumentParser size expand float sum log attention_model criterion FloatTensor Variable backward size clip_grad_norm_ zero_grad masked_attention_loss parameters s_encoder step range len attention_model criterion FloatTensor Variable size zero_grad eval s_encoder range len compute_f1 list get_next_batch evaluate compute_auc batch_count set numpy append BatchLoader empty array range len list get_next_batch evaluate batch_count set numpy compute_sov append BatchLoader empty array range len list get_next_batch evaluate batch_count set numpy compute_sov append BatchLoader empty array range len len extend append fit_transform range fit transform extend append range predict len exp tolist index decision_function transform range append len exp decision_function classes_ transform range len sum astype auc linspace zeros float round range enumerate len append f1_score recall_score precision_score arange copy int min set append float max range len sum model zero_grad DocClassifier Adam LongTensor float NLLLoss get_feature_names backward Variable parameters loss_function transform train step get_feature_names LongTensor Variable float data Variable float data Variable float
# cawa Credit Attribution with Attention The folder Code contains the python code for Credit Attribution With Attention (CAWA) and other helper scripts for evaluation. The code uses Pytorch framework. The folder Data contains the preprocessed data for the five text datasets: Movies, Ohsumed, TMC2007, Patents and Delicious. usage: python Code/cawa.py <arguments> Following arguments can be used -d DATAPATH, --datapath DATAPATH: Path to the folder containing data files. -c CLASSES, --classes CLASSES: Number of classes.
2,235
gurkanwar-singh/Style_Transfer
['style transfer']
['A Neural Algorithm of Artistic Style']
utils/style_util.py utils/vgg_util.py gram_matrix content_loss_calculate style_loss_calculate layers_and_mean conv_relu pooling vgg_func pow shape reduce_sum run transpose matmul list reshape len reduce_sum gram_matrix shape pow zip range run layers_and_mean constant relu reshape size conv2d Variable zeros conv_relu pooling
gurkanwar-singh/Style_Transfer
2,236
guruL/Character-Region-Awareness-for-Text-Detection-
['scene text detection']
['Character Region Awareness for Text Detection']
source/train_ReCTS.py source/dataset/IC13.py source/dataset/SynthText.py source/dataset/transutils.py source/eval.py source/dataset/ReCTS.py source/utils/iou.py source/models/craft.py source/train.py source/models/network.py source/models/ohem.py source/utils/inference.py source/models/utils.py source/train_SynthText.py source/models/vgg16_bn.py source/dataset/__init__.py source/dataset/datautils.py source/train_IC13.py eval_IC13 read_image load_imgs_dir run run run run triangle_center gaussian_kernel_2d_opencv create_affine_boxes box_center aff_gaussian rotate sorted_boxes rotate_point find_min_rectangle IC13 ReCTS SynthText random_resize_collate RedomRescale RandomCrop Rescale Random_change CRAFT double_conv Base_up_block Base_down_block Base_with_bn_block UP_VGG MSE_OHEM_Loss init_weights vgg16_bn get_detct_box iou match_detect append join listdir int ANTIALIAS size transpose shape tile resize zeros array open join listdir uint8 connectedComponentsWithStats reshape astype range numpy CV_32S read_image zero_grad DataLoader save format_time FloatTensor squeeze Adam MSELoss to CrossEntropyLoss range crite ReCTS vgg type enumerate load backward print parameters SmoothL1Loss train step format MSE_OHEM_Loss IC13 loss_fn UP_VGG SynthText round round sorted append triangle_center box_center zip min max int getGaussianKernel warpPerspective getPerspectiveTransform getRotationMatrix2D warpAffine transpose dot array int zip transpose from_numpy stack resize append data isinstance fill_ Conv2d xavier_uniform_ normal_ zero_ BatchNorm2d Linear uint8 connectedComponentsWithStats astype CV_32S abs min max sorted iou delete enumerate
# Character-Region-Awareness-for-Text-Detection- https://arxiv.org/abs/1904.01941 ## Train You can train SynthText data use ``` python source/train_SynthText.py ``` Dont forget to change your data path. Testing on Synthetic data it seems not bad even I only trained one epoch on SynthText data. I only use one 1080Ti for training, so training for me is really slow.
2,237
gurushantj/MTCNN
['face detection', 'face alignment']
['Joint Face Detection and Alignment using Multi-task Cascaded Convolutional Networks']
RNet.py data_gen/PNetHardPositive.py detect_face.py ONet.py PNet.py data_gen/tools.py Constants.py main.py mtcnn_util/mtcnn_util.py data_gen/CreateTFRecordTraining.py data_gen/gen_shuffle_data.py MTCNNMain ONet PNet RNet generate_data_for_cls generate_data_for_bb createFeature createTFRecord main parse_arguments check_corners main nms detect_face_12net convert_to_square view_bar bbreg get_model_filenames detect_face pad detect_face_24net int64_feature bytes_feature generateBoundingBox rerec get_meta_data IoU imresample Mode MTCNNUtil int BytesList Features print Feature astype float32 tostring Example append imread array range split format TFRecordWriter print write shuffle SerializeToString close createTFRecord len format TFRecordWriter print write shuffle SerializeToString close createTFRecord len imwrite input_size resize max open str list map shape ceil imread range close mkdir float join int print reshape min write split randint IoU array len add_argument ArgumentParser format flush int float write flush get_meta_data join listdir int match listdir where vstack pnet nms transpose pad ceil append expand_dims range imresample hstack astype copy bbreg tile generateBoundingBox empty zeros int rnet onet int32 rerec amin len pnet int nms transpose astype copy range vstack int32 generateBoundingBox ceil amin expand_dims empty imresample append len where vstack pnet nms transpose pad ceil append expand_dims range imresample hstack astype copy bbreg generateBoundingBox empty zeros int rnet int32 rerec amin len argsort maximum zeros_like minimum reshape transpose vstack transpose hstack where fix flipud vstack empty ones astype where int32 expand_dims transpose maximum tile resize minimum maximum maximum copy
# MTCNN Contains the implementation of the MTCNN paper excluding face key points. - Tensorflow 2.1.0 - opencv 4.2.0 - python3 # Testing - To detect the faces from an input image,use following command: python3 detect_face.py \<input image path\> \<output image path\> # Sample Result
2,238
guxd/DialogWAE
['response generation']
['DialogWAE: Multimodal Response Generation with Conditional Wasserstein Auto-Encoder']
train.py configs.py helper.py sample.py data.py data/DailyDial/parser.py models/dialogwae_gmp.py models/__init__.py experiments/metrics.py modules.py experiments/__init__.py models/dialogwae.py config_DialogWAE_GMP config_DialogWAE DailyDialCorpus SWDACorpus SWDADataLoader DailyDialDataLoader gData indexes2sent gVar sent2indexes timeSince asHHMMSS Decoder ContextEncoder Encoder MixVariation Variation main evaluate save_model load_model main parse_data Metrics DialogWAE DialogWAE_GMP config_DialogWAE floor time zeros max enumerate append revert_sent from_numpy ndarray cuda isinstance sim_bleu replace append print float write maximum indexes2sent mean sim_bow div_distinct sample next_batch range enumerate split model epoch_init ivocab Metrics dataset open seed word2vec vocab format n_samples eval manual_seed is_available load evaluate print data_path expname print save print load join zip endswith print len exit write close split encode enumerate open getopt exit parse_data
# DialogWAE It is a PyTorch implementation of the DialogWAE model described in [**DialogWAE: Multimodal Response Generation with Conditional Wasserstein Auto-Encoder**](https://arxiv.org/abs/1805.12352). ## Dependency - PyTorch 0.4.0 - Python 3.6 - NLTK ``` pip install -r requirements.txt ```
2,239
guxinqian/AP3D
['person re identification', 'video based person re identification', 'human detection']
['Appearance-Preserving 3D Convolution for Video-based Person Re-identification']
train.py models/inflate.py test-all.py tools/data_manager.py transforms/spatial_transforms.py models/NonLocal.py tools/losses.py tools/video_loader.py models/__init__.py tools/eval_metrics.py models/AP3D.py models/ResNet.py tools/utils.py transforms/temporal_transforms.py tools/samplers.py extract main test main train test APP3DC API3D P3DA P3DB P3DC C2D APP3DA I3D APP3DB APM inflate_batch_norm inflate_pool inflate_conv inflate_linear NonLocalBlock1D NonLocalBlockND NonLocalBlock2D NonLocalBlock3D ResNet503D Bottleneck3D AP3DResNet50 weights_init_classifier AP3DNLResNet50 weights_init_kaiming init_model get_names DukeMTMCVidReID init_dataset get_names Mars iLIDSVID evaluate compute_ap_cmc TripletLoss RandomIdentitySampler AverageMeter read_json save_checkpoint Logger write_json mkdir_if_missing image_loader video_loader VideoDataset ImageDataset accimage_loader get_default_image_loader get_default_video_loader pil_loader MultiScaleCornerCrop CenterCrop MultiScaleRandomCrop ToTensor Compose Random2DTranslation Scale RandomCrop Normalize RandomHorizontalFlip CornerCrop TemporalBeginCrop LoopPadding TemporalCenterCrop TemporalRandomCrop init_dataset init_model test_epochs VideoDataset query DataLoader Logger arch dataset cuda str load_state_dict sum format Compose resume is_available load join gallery print gpu model FloatTensor cpu size bn mean test_frames ceil cuda range cat div squeeze expand shape expand_as append range cat format asarray eval stack addmm_ enumerate time norm evaluate print extend t zeros numpy len TemporalRandomCrop MultiStepLR save_checkpoint save_dir round seed max_epoch Adam train_dense CrossEntropyLoss range state_dict manual_seed_all TemporalBeginCrop start_epoch timedelta manual_seed time parameters TripletLoss use_cpu train step update max time data format model backward float size AverageMeter zero_grad print criterion_xent item step criterion_htri enumerate model cuda bn mean cpu data Parameter out_channels Conv3d in_channels bias repeat zeros Parameter in_features bias repeat out_features Linear BatchNorm3d num_features _check_input_dim AvgPool2d isinstance MaxPool2d AvgPool3d MaxPool3d data normal_ kaiming_normal_ __name__ constant_ data normal_ __name__ constant_ flatten argwhere in1d zeros range len compute_ap_cmc setdiff1d format print argsort shape intersect1d argwhere zeros range len makedirs join copy dirname save mkdir_if_missing dirname mkdir_if_missing append exists image_loader get_default_image_loader
## [Appearance-Preserving 3D Convolution for Video-based Person Re-identification](http://arxiv.org/abs/2007.08434) #### Requirements: Python=3.6 and Pytorch=1.0.0 ### Training and test ```Shell # For MARS python train.py --root /home/guxinqian/data/ -d mars --arch ap3dres50 --gpu 0,1 --save_dir log-mars-ap3d # python test-all.py --root /home/guxinqian/data/ -d mars --arch ap3dres50 --gpu 0 --resume log-mars-ap3d ``` ### Citation
2,240
guxinqian/TKP
['person re identification', 'video based person re identification']
['Temporal Knowledge Propagation for Image-to-Video Person Re-identification']
train.py models/inflate.py models/non_local.py utils/eval_metrics.py transforms/spatial_transforms.py utils/losses.py utils/utils.py test.py models/__init__.py utils/video_loader.py transforms/temporal_transforms.py models/ResNet.py utils/data_manager.py utils/samplers.py main_ilids.py main train extract_vid_feature test main extract_vid_feature test main train test inflate_batch_norm inflate_pool inflate_conv inflate_linear NONLocalBlock1D NONLocalBlock2D _NonLocalBlockND NONLocalBlock3D Classifier Bottleneck3d ImgResNet50 weights_init_classifier VidNonLocalResNet50 weights_init_kaiming init_model get_names MultiScaleCornerCrop CenterCrop MultiScaleRandomCrop ToTensor Compose Random2DTranslation Scale RandomCrop Normalize RandomHorizontalFlip CornerCrop TemporalBeginCrop LoopPadding TemporalCenterCrop TemporalRandomCrop DukeMTMCVidReID init_dataset get_names Mars iLIDSVID_i2v evaluate compute_ap_cmc FeatureBasedTKP SimilarityBasedTKP HeterogeneousTripletLoss RandomIdentitySampler AverageMeter read_json save_checkpoint Logger write_json mkdir_if_missing image_loader video_loader VideoDataset ImageDataset accimage_loader get_default_image_loader get_default_video_loader pil_loader init_dataset init_model VideoDataset TemporalRandomCrop query MultiStepLR DataLoader SimilarityBasedTKP HeterogeneousTripletLoss Logger gpu_devices save_checkpoint dataset save_dir cuda round seed str max_epoch Adam load_state_dict sum CrossEntropyLoss range state_dict manual_seed_all FeatureBasedTKP format pretrain Compose ImageDataset vid_arch start_epoch resume timedelta manual_seed is_available load join time gallery evaluate print empty_cache train step img_arch data img_model zero_grad classifier max criterion_i2v view criterion_tkp_f update format size criterion_tkp_d item float enumerate time criterion backward print AverageMeter vid_model step model FloatTensor size ceil mean test_frames cpu cuda range cat div cuda squeeze shape expand_as append range cat asarray format eval stack enumerate time norm evaluate print extend cpu zeros numpy gallery_img device_count query_img len train_dense TemporalBeginCrop mean vid_model data Parameter out_channels Conv3d in_channels bias repeat zeros Parameter in_features bias repeat out_features Linear BatchNorm3d num_features _check_input_dim AvgPool2d isinstance MaxPool2d AvgPool3d MaxPool3d data normal_ kaiming_normal_ __name__ constant_ data normal_ __name__ constant_ flatten argwhere in1d zeros range len compute_ap_cmc setdiff1d format print argsort shape intersect1d argwhere zeros range len makedirs join copy dirname save mkdir_if_missing dirname mkdir_if_missing append exists image_loader get_default_image_loader
## [Temporal Knowledge Propagation for Image-to-Video Person Re-identification](https://arxiv.org/abs/1908.03885) #### Requirements: Python=3.6 and Pytorch=1.0.0 ### Training and test ```Shell # For MARS python train.py --root /data/datasets/ -d mars --save_dir log-mars python test.py --root /data/datasets/ -d mars --resume log-mars/best_model.pth.tar --save_dir log-mars # For DukeMTMC-VideoReID python train.py --root /data/datasets/ -d dukevid --save_dir log-duke
2,241
guyrosin/generating_timelines
['word embeddings']
['Generating Timelines by Modeling Semantic Change']
events_classifier.py linear_regression_alignment.py models_manager.py word2vec_specific_model.py word2vec_specific_wiki_model.py word2vec_model.py word2vec_wiki_model.py max_heap.py word_timeline.py global_to_temp_model.py classifier.py utils.py create_event_to_affected_words_script.py peak_detection.py Classifier filter_affected_words filter_related_words_by_similarity generate_negatives_from_same_time EventClassifier GlobalToTempModel filter_model_vocab apply_w2v_regression align_embeddings fit_w2v_regression MaxHeap Method ModelsManager AlignmentMethod find_peaks pad_with_zeros AutoNumber Word2VecModelBase Word2VecSpecificModel Word2VecSpecificWikiModel Word2VecWikiModel WordOnthology append calc_changed_score heapify append info similarity MaxHeap calc_changed_score add vocab array Vocab enumerate int remove ndarray fit LinearRegression set intersection sample vector_size keys enumerate len astype float32 copy index2word vector_size KeyedVectors apply_w2v_regression fit_w2v_regression insert items sorted list sort pad_with_zeros unique append array amax
# Generating Timelines by Modeling Semantic Change ### Author: Guy Rosin ([email protected]) This repository provides the data and implementation of the paper: >Generating Timelines by Modeling Semantic Change<br> >Guy D. Rosin and Kira Radinsky<br> >CoNLL 2019<br> >http://arxiv.org/abs/1909.09907 ## Dependencies - Python 3.6 - numpy
2,242
gwastro/bns-machine-learning-search
['time series']
['Detection of gravitational-wave signals from binary neutron star mergers using machine learning']
test_data.py network_application_example.py main evaluate_ts_from_generator whiten_data time_series_generator generate flatten predict_generator TimeSeries aLIGOZeroDetHighPower int to_timeseries sample_rate inverse_spectrum_truncation delta_f interpolate to_frequencyseries append type len show subplots load_model plot time_series_generator print set_xlabel grid subplots_adjust set_ylabel savefig evaluate_ts_from_generator save generate load_timeseries sample_times aLIGOZeroDetHighPower project_wave cumsum pi save round seed resample_to_delta_t colored_noise uniform range arccos add_into splitext get_td_waveform power float enumerate start_time int prepend_zeros randint delta_t len
# Detection of gravitational-wave signals from binary neutron star mergers using machine learning Marlin B. Schäfer<sup>1, 2</sup>, Frank Ohme<sup>1, 2</sup>, Alexander H. Nitz<sup>1, 2</sup> <sub>1. [Albert-Einstein-Institut, Max-Planck-Institut for Gravitationsphysik, D-30167 Hannover, Germany](http://www.aei.mpg.de/obs-rel-cos)</sub> <sub>2. Leibniz Universität Hannover, D-30167 Hannover, Germany</sub> ## Introduction As two neutron stars merge, they emit gravitational waves that can potentially be detected by earth bound detectors. Matched-filtering based algorithms have traditionally been used to extract quiet signals embedded in noise. We introduce a novel neural-network based machine learning algorithm that uses time series strain data from gravitational-wave detectors to detect signals from non-spinning binary neutron star mergers. For the Advanced LIGO design sensitivity, our network has an average sensitive distance of 130 Mpc at a false-alarm rate of 10 per month. Compared to other state-of-the-art machine learning algorithms, we find an improvement by a factor of 6 in sensitivity to signals with signal-to-noise ratio below 25. However, this approach is not yet competitive with traditional matched-filtering based methods. A conservative estimate indicates that our algorithm introduces on average 10.2 s of latency between signal arrival and generating an alert. We give an exact description of our testing procedure, which can not only be applied to machine learning based algorithms but all other search algorithms as well. We thereby improve the ability to compare machine learning and classical searches. This repository contains three files and an image. It is supplementary material to [`[1]`](#publication). The contents of the files can be summarized as: * The trained neural network is stored in the file 'network.hdf' and can be loaded by [Keras](https://keras.io/). * The module 'test_data.py' contains a function which generates two [hdf files](https://www.hdfgroup.org/). The first file stores simulated data for the two gravitational wave detectors in Hanford and Livingston, where many gravitational-wave signals were added into the noise background. The second file contains information about the location in time and the parameters of these additive signals.
2,243
gyutaaa/gyutaekim-2016011728
['unity']
['Unity: A General Platform for Intelligent Agents']
examples/train_ml_agents.py animalai/animalai/communicator_objects/__init__.py animalai/animalai/envs/environment.py animalai_train/animalai_train/curriculum_aai.py animalai_train/setup.py animalai_train/animalai_train/meta_curriculum_aai.py animalai/animalai/envs/arena_config.py animalai_train/animalai_train/environment_factory_aai.py examples/train_baselines_dqn.py animalai/animalai/envs/tests/test_envs_aai.py examples/load_config_and_play.py animalai/animalai/communicator_objects/arenas_configurations_proto_pb2.py examples/train_curriculum.py animalai_train/animalai_train/trainer_controller_aai.py examples/train_demonstration.py animalai/animalai/envs/tests/test_arena_config.py animalai_train/animalai_train/simple_env_manager_aai.py animalai_train/animalai_train/run_training_aai.py animalai_train/animalai_train/subprocess_env_manager_aai.py animalai_train/animalai_train/run_options_aai.py animalai/animalai/envs/gym/environment.py animalai/animalai/communicator_objects/vector_proto_pb2.py animalai/animalai/communicator_objects/arena_configuration_proto_pb2.py examples/train_baselines_ppo2.py animalai/animalai/communicator_objects/items_to_spawn_proto_pb2.py animalai/setup.py Vector3 ArenaConfig constructor_item RGB constructor_arena Item Arena AnimalAIEnvironment PlayTrain AnimalAIGym test_item test_vector3 yaml_config test_arena test_bad_arena_config test_arena_config test_rgb test_reset_arena_config test_play_initialization test_basic_initialization CurriculumAAI create_environment_factory_aai MetaCurriculumAAI RunOptionsAAI try_create_meta_curriculum run_training_aai SimpleEnvManagerAAI SubprocessEnvManagerAAI worker_aai TrainerControllerAAI load_config_and_play main main make_aai_env construct_mapping construct_mapping PlayTrain print add_constructor Vector3 to_proto RGB to_proto to_proto to_proto ArenaConfig to_proto assert_called_once close MockCommunicator AnimalAIEnvironment call_args assert_called_once close MockCommunicator AnimalAIEnvironment call_args assert_called_once obs bytes ArenaConfig zip n_agents SerializeToString close get_agent_group_spec get_step_result MockCommunicator AnimalAIEnvironment assert_called_with observation_shapes validate_environment_path start_learning set_all_curricula_to_lesson_num MetaCurriculumAAI FloatPropertiesChannel get_property_dict_copy get_timer_root reset_timers put _send_response StepResponse list _generate_all_results set_actions action set_configuration EngineConfigurationChannel external_brains payload items EnvironmentResponse reset step randint AnimalAIEnvironment ArenaConfig proc1 configure learn ArenaConfig print AnimalAIGym save make_aai_env
# Animal-AI 2.0.0 <p align="center"> <img height="300" src="documentation/PrefabsPictures/steampunkFOURcrop.png"> </p> | ![](examples/notebook_data/animal-cyl-fail.gif) | ![](examples/notebook_data/agent-cyl-fail.gif) | |---|---| | ![](examples/notebook_data/animal-cyl-pass.gif) | ![](examples/notebook_data/agent-cyl-pass.gif) | ## Overview The [Animal-AI Testbed](http://animalaiolympics.com/AAI) introduces the study of animal cognition to the world of AI. It provides an environment for testing agents on tasks taken from, or inspired by, the animal cognition literature.
2,244
gzb126/picture-Style-Transfer
['style transfer']
['A Neural Algorithm of Artistic Style']
main.py deprocess_image Evaluator gram_matrix total_variational_loss content_loss preprocess_image style_loss expand_dims preprocess_input img_to_array load_img astype dot transpose batch_flatten permute_dimensions gram_matrix square
# Keras-Style-Transfer (KeSTra) An implementation of "A Neural Algorithm of Artistic Style" (http://arxiv.org/abs/1508.06576) in Keras The code present in this repository is presented in this [blog](https://medium.com/@singhal.amogh1995/utilising-cnns-to-transform-your-model-into-a-budding-artist-1330dc392e25). The code is written in Keras 2.2.2 # Preview This is a 5-sec gif of **Chicago city** painted in the style of **Rain Princess** <p align="center"> <img src="https://media.giphy.com/media/i4ElhKepMTcIZiqcma/giphy.gif" width="480" height="270"/> </p> ### Content Image and Style Image
2,245
gzrjzcx/ML-agents
['unity']
['Unity: A General Platform for Intelligent Agents']
ml-agents-envs/mlagents/envs/communicator_objects/unity_rl_input_pb2.py ml-agents-envs/mlagents/envs/communicator_objects/unity_to_external_pb2.py gym-unity/gym_unity/envs/__init__.py ml-agents/mlagents/trainers/learn.py ml-agents-envs/mlagents/envs/communicator_objects/custom_observation_pb2.py ml-agents/mlagents/trainers/meta_curriculum.py ml-agents/mlagents/trainers/tests/test_barracuda_converter.py ml-agents/mlagents/trainers/ppo/models.py gym-unity/gym_unity/__init__.py ml-agents/mlagents/trainers/trainer_controller.py ml-agents/mlagents/trainers/tests/test_curriculum.py ml-agents/mlagents/trainers/action_info.py ml-agents-envs/mlagents/envs/communicator.py ml-agents-envs/mlagents/envs/communicator_objects/custom_reset_parameters_pb2.py ml-agents/mlagents/trainers/tests/test_ppo.py ml-agents-envs/mlagents/envs/tests/test_rpc_communicator.py ml-agents-envs/setup.py ml-agents-envs/mlagents/envs/rpc_communicator.py ml-agents/mlagents/trainers/tests/test_trainer_controller.py ml-agents/setup.py ml-agents/mlagents/trainers/barracuda.py ml-agents-envs/mlagents/envs/tests/test_envs.py ml-agents/mlagents/trainers/ppo/trainer.py ml-agents-envs/mlagents/envs/communicator_objects/unity_rl_output_pb2.py ml-agents-envs/mlagents/envs/communicator_objects/unity_rl_initialization_output_pb2.py ml-agents-envs/mlagents/envs/communicator_objects/unity_input_pb2.py ml-agents/mlagents/trainers/tests/test_meta_curriculum.py ml-agents/mlagents/trainers/bc/trainer.py ml-agents/mlagents/trainers/curriculum.py ml-agents-envs/mlagents/envs/communicator_objects/agent_action_proto_pb2.py ml-agents/mlagents/trainers/tests/test_policy.py ml-agents/mlagents/trainers/ppo/policy.py ml-agents-envs/mlagents/envs/communicator_objects/space_type_proto_pb2.py ml-agents/mlagents/trainers/tests/test_learn.py ml-agents-envs/mlagents/envs/communicator_objects/brain_parameters_proto_pb2.py ml-agents/mlagents/trainers/tests/test_demo_loader.py ml-agents/mlagents/trainers/models.py ml-agents/mlagents/trainers/__init__.py ml-agents-envs/mlagents/envs/communicator_objects/agent_info_proto_pb2.py ml-agents-envs/mlagents/envs/communicator_objects/environment_parameters_proto_pb2.py ml-agents-envs/mlagents/envs/tests/test_subprocess_unity_environment.py ml-agents/mlagents/trainers/exception.py gym-unity/gym_unity/tests/test_gym.py ml-agents/mlagents/trainers/buffer.py ml-agents/mlagents/trainers/bc/online_trainer.py ml-agents-envs/mlagents/envs/communicator_objects/engine_configuration_proto_pb2.py ml-agents/mlagents/trainers/ppo/__init__.py ml-agents/mlagents/trainers/tensorflow_to_barracuda.py ml-agents-envs/mlagents/envs/communicator_objects/unity_to_external_pb2_grpc.py ml-agents/mlagents/trainers/policy.py ml-agents-envs/mlagents/envs/mock_communicator.py gym-unity/setup.py ml-agents-envs/mlagents/envs/communicator_objects/unity_message_pb2.py ml-agents-envs/mlagents/envs/environment.py ml-agents-envs/mlagents/envs/communicator_objects/custom_action_pb2.py ml-agents/mlagents/trainers/bc/policy.py ml-agents-envs/mlagents/envs/base_unity_environment.py ml-agents/mlagents/trainers/bc/__init__.py ml-agents-envs/mlagents/envs/communicator_objects/unity_output_pb2.py ml-agents-envs/mlagents/envs/exception.py gym-unity/gym_unity/envs/unity_env.py ml-agents-envs/mlagents/envs/communicator_objects/header_pb2.py ml-agents-envs/mlagents/envs/brain.py ml-agents-envs/mlagents/envs/communicator_objects/demonstration_meta_proto_pb2.py ml-agents-envs/mlagents/envs/communicator_objects/resolution_proto_pb2.py ml-agents-envs/mlagents/envs/communicator_objects/__init__.py ml-agents-envs/mlagents/envs/subprocess_environment.py ml-agents/mlagents/trainers/demo_loader.py ml-agents-envs/mlagents/envs/__init__.py ml-agents/mlagents/trainers/tests/test_trainer_metrics.py ml-agents/mlagents/trainers/tests/test_buffer.py ml-agents-envs/mlagents/envs/communicator_objects/command_proto_pb2.py ml-agents/mlagents/trainers/trainer.py ml-agents-envs/mlagents/envs/socket_communicator.py ml-agents/mlagents/trainers/bc/models.py ml-agents/mlagents/trainers/bc/offline_trainer.py ml-agents/mlagents/trainers/tests/test_bc.py ml-agents-envs/mlagents/envs/communicator_objects/unity_rl_initialization_input_pb2.py ml-agents/mlagents/trainers/trainer_metrics.py UnityGymException ActionFlattener UnityEnv create_mock_vector_braininfo test_gym_wrapper test_multi_agent test_branched_flatten setup_mock_unityenvironment create_mock_brainparams ActionInfo BarracudaWriter compress Build sort lstm write fuse_batchnorm_weights trim gru Model summary Struct parse_args to_json rnn BufferException Buffer Curriculum make_demo_buffer load_demonstration demo_to_buffer CurriculumError MetaCurriculumError TrainerError create_environment_factory run_training prepare_for_docker_run try_create_meta_curriculum main load_config MetaCurriculum LearningModel Policy UnityPolicyException get_layer_shape pool_to_HW flatten process_layer process_model basic_lstm get_attr ModelBuilderContext order_by get_epsilon get_tensor_dtype replace_strings_in_list get_tensor_dims by_op remove_duplicates_from_list by_name convert strides_to_HW get_tensor_data gru UnityTrainerException Trainer TrainerController TrainerMetrics BehavioralCloningModel OfflineBCTrainer OnlineBCTrainer BCPolicy BCTrainer PPOModel PPOPolicy PPOTrainer get_gae discount_rewards test_barracuda_converter test_dc_bc_model test_cc_bc_model test_visual_cc_bc_model test_bc_policy_evaluate dummy_config test_visual_dc_bc_model assert_array test_buffer location default_reset_parameters test_init_curriculum_bad_curriculum_raises_error test_init_curriculum_happy_path test_increment_lesson test_get_config test_load_demo basic_options test_docker_target_path test_run_training test_init_meta_curriculum_happy_path test_increment_lessons_with_reward_buff_sizes default_reset_parameters MetaCurriculumTest test_increment_lessons measure_vals reward_buff_sizes test_set_all_curriculums_to_lesson_num test_get_config test_set_lesson_nums test_init_meta_curriculum_bad_curriculum_folder_raises_error more_reset_parameters basic_mock_brain test_take_action_returns_action_info_when_available basic_params test_take_action_returns_nones_on_missing_values test_take_action_returns_empty_with_no_agents test_rl_functions test_ppo_model_dc_vector_curio test_ppo_model_dc_vector_rnn test_ppo_model_cc_vector_rnn test_ppo_policy_evaluate test_ppo_model_cc_visual dummy_config test_ppo_model_dc_vector test_ppo_model_dc_visual test_ppo_model_cc_visual_curio test_ppo_model_dc_visual_curio test_ppo_model_cc_vector_curio test_ppo_model_cc_vector test_initialize_online_bc_trainer basic_trainer_controller assert_bc_trainer_constructed test_initialize_trainer_parameters_uses_defaults dummy_bad_config test_take_step_adds_experiences_to_trainer_and_trains test_initialize_trainer_parameters_override_defaults test_initialize_invalid_trainer_raises_exception test_start_learning_trains_until_max_steps_then_saves dummy_config dummy_offline_bc_config_with_override test_initialization_seed test_initialize_ppo_trainer test_start_learning_updates_meta_curriculum_lesson_number assert_ppo_trainer_constructed test_take_step_resets_env_on_global_done test_start_learning_trains_forever_if_no_train_model dummy_offline_bc_config trainer_controller_with_take_step_mocks trainer_controller_with_start_learning_mocks dummy_online_bc_config TestTrainerMetrics BaseUnityEnvironment safe_concat_np_ndarray BrainInfo BrainParameters safe_concat_lists Communicator UnityEnvironment UnityWorkerInUseException UnityException UnityTimeOutException UnityEnvironmentException UnityActionException MockCommunicator RpcCommunicator UnityToExternalServicerImplementation SocketCommunicator worker EnvironmentResponse EnvironmentCommand UnityEnvWorker SubprocessUnityEnvironment UnityToExternalServicer UnityToExternalStub add_UnityToExternalServicer_to_server test_initialization test_reset test_close test_step test_handles_bad_filename test_rpc_communicator_checks_port_on_create test_rpc_communicator_create_multiple_workers test_rpc_communicator_close mock_env_factory MockEnvWorker SubprocessEnvironmentTest create_mock_vector_braininfo sample UnityEnv setup_mock_unityenvironment step create_mock_brainparams create_mock_vector_braininfo UnityEnv setup_mock_unityenvironment step create_mock_brainparams setup_mock_unityenvironment create_mock_vector_braininfo create_mock_brainparams UnityEnv Mock list Mock array range join isdir print replaceFilenameExtension add_argument exit verbose source_file ArgumentParser target_file sqrt topologicalSort list hasattr layers addEdge Graph print inputs set len list hasattr layers print filter match trim_model compile data layers print tensors float16 replace layers dumps data dtype layers isinstance print name tensors inputs outputs shape zip array_without_brackets to_json globals Build tanh mad tanh mul Build concat add sigmoid sub mad _ tanh mul Build concat add sigmoid mad Buffer reset_local_buffers number_visual_observations append_update_buffer append range enumerate make_demo_buffer load_demonstration number_steps read suffix BrainParametersProto from_agent_proto DemonstrationMetaProto ParseFromString AgentInfoProto append from_proto _DecodeVarint32 start_learning int str format create_environment_factory print TrainerController external_brains put try_create_meta_curriculum load_config SubprocessUnityEnvironment list MetaCurriculum reset_parameters keys chmod format basename isdir glob copyfile copytree prepare_for_docker_run replace int Process join docopt getLogger print run_training start Queue info append randint setLevel range endswith len HasField hasattr get_attr tensor_shape ndarray isinstance shape int_val bool_val float_val ListFields name ndarray isinstance str tensor_content ndarray product isinstance get_tensor_dtype print get_tensor_dims unpack int_val bool_val array float_val enter append add set name find_tensor_by_name split name lstm find_tensor_by_name find_forget_bias split get_layer_shape id Struct tensor hasattr name patch_data input_shapes out_shapes input get_attr append replace_strings_in_list tensors astype op zip enumerate print float32 patch_data_fn model_tensors map_ignored_layer_to_its_input co_argcount len items list get_tensors hasattr name print process_layer eval ModelBuilderContext layers verbose Struct process_model open compress node GraphDef Model dims_to_barracuda_shape insert get_tensor_dims inputs MessageToJson ParseFromString cleanup_layers read memories print sort write trim summary list zeros_like size reversed range asarray tolist discount_rewards join remove _get_candidate_names convert _get_default_tempdir dirname abspath isfile next BCPolicy evaluate close reset MockCommunicator reset_default_graph UnityEnvironment reset_default_graph reset_default_graph reset_default_graph reset_default_graph flatten list range len get_batch Buffer assert_array append_update_buffer make_mini_batch append reset_agent array range Curriculum Curriculum Curriculum make_demo_buffer load_demonstration dirname abspath MagicMock basic_options MagicMock MetaCurriculum assert_has_calls MetaCurriculumTest increment_lessons assert_called_with MetaCurriculumTest increment_lessons assert_called_with assert_not_called MetaCurriculumTest set_all_curriculums_to_lesson_num MetaCurriculumTest dict update MetaCurriculumTest MagicMock basic_mock_brain basic_params Policy BrainInfo get_action MagicMock basic_mock_brain basic_params Policy BrainInfo get_action MagicMock basic_mock_brain ActionInfo basic_params Policy BrainInfo get_action evaluate close reset MockCommunicator PPOPolicy reset_default_graph UnityEnvironment reset_default_graph reset_default_graph reset_default_graph reset_default_graph reset_default_graph reset_default_graph reset_default_graph reset_default_graph reset_default_graph reset_default_graph assert_array_almost_equal array discount_rewards dummy_offline_bc_config TrainerController assert_called_with BrainInfoMock basic_trainer_controller assert_bc_trainer_constructed dummy_offline_bc_config summaries_dir model_path keep_checkpoints BrainInfoMock basic_trainer_controller assert_bc_trainer_constructed summaries_dir model_path keep_checkpoints dummy_offline_bc_config_with_override BrainInfoMock basic_trainer_controller assert_bc_trainer_constructed summaries_dir model_path keep_checkpoints dummy_online_bc_config BrainInfoMock basic_trainer_controller assert_ppo_trainer_constructed summaries_dir dummy_config model_path keep_checkpoints initialize_trainers BrainInfoMock dummy_bad_config basic_trainer_controller MagicMock basic_trainer_controller start_learning assert_called_once MagicMock assert_not_called dummy_config trainer_controller_with_start_learning_mocks assert_called_once_with start_learning assert_called_once MagicMock dummy_config trainer_controller_with_start_learning_mocks assert_called_once_with start_learning MagicMock dummy_config trainer_controller_with_start_learning_mocks assert_called_once_with lesson MagicMock basic_trainer_controller take_step assert_called_once MagicMock trainer_controller_with_take_step_mocks assert_called_once MagicMock ActionInfo take_step outputs assert_not_called trainer_controller_with_take_step_mocks assert_called_once_with extend copy external_brains global_done payload reset _send_response reset_parameters env_factory step method_handlers_generic_handler add_generic_rpc_handlers UnityEnvironment close MockCommunicator UnityEnvironment close MockCommunicator reset str local_done print agents step close reset MockCommunicator UnityEnvironment len UnityEnvironment close MockCommunicator close RpcCommunicator close RpcCommunicator close RpcCommunicator
<img src="docs/images/unity-wide.png" align="middle" width="3000"/> <img src="docs/images/image-banner.png" align="middle" width="3000"/> # Unity ML-Agents Toolkit (Beta) [![docs badge](https://img.shields.io/badge/docs-reference-blue.svg)](docs/Readme.md) [![license badge](https://img.shields.io/badge/license-Apache--2.0-green.svg)](LICENSE) **The Unity Machine Learning Agents Toolkit** (ML-Agents) is an open-source Unity plugin that enables games and simulations to serve as environments for training intelligent agents. Agents can be trained using reinforcement learning, imitation learning, neuroevolution, or other machine learning methods through a simple-to-use Python API. We also provide implementations (based on TensorFlow)
2,246
h2oai/xai_guidelines
['explainable artificial intelligence']
['Proposed Guidelines for the Responsible Use of Explainable Machine Learning']
data_maker_and_getter.py DataMakerAndGetter
# Responsible Use Guidelines for Explainable Machine Learning A proposal for a 180-minute hands-on tutorial at ACM FAT* 2020, Barcelona, Spain. All tutorial code and materials are available here: https://github.com/h2oai/xai_guidelines. All materials may be re-used and re-purposed, even for commerical applications, with proper attribution of the authors. #### For the tutorial outline, please see: [responsible_xai.pdf](responsible_xai.pdf). #### To use the code examples for this tutorial: 1. Navigate to [https://aquarium.h2o.ai](https://aquarium.h2o.ai). 2. Click `Create a new account` below the login. Follow the Aquarium instructions to create a new account. 3. Check the registered email inbox and use the temporary password sent there to login to Aquarium. 4. Click `Browse Labs` in the upper left. 5. Find `Open Source MLI Workshop` and click `View Details`.
2,247
h2r/ImitateLearning-Movo
['imitation learning']
['Deep Imitation Learning for Complex Manipulation Tasks from Virtual Reality Teleoperation']
old_stack/util/old/simulation/gym-imitate/imitate_gym/crnn.py old_stack/simulation/gym-imitate/imitate_gym/envs/imitate_env.py old_stack/util/old/simulation/gym-imitate/imitate_gym/envs/__init__.py old_stack/test_baxter.py old_stack/util/old/simulation/2dsim.py old_stack/simulation/gym-imitate/imitate_gym/crnn.py old_stack/util/toggler.py src/model.py old_stack/simulation/gym-imitate/imitate_gym/buttons_data.py old_stack/util/record.py old_stack/util/old/simulation/gym-imitate/imitate_gym/envs/buttons.py old_stack/util/old/simulation/gym-imitate/imitate_gym/gym_eval.py train.py verify_data.py old_stack/util/old/test_baxter.py 3d_eval.py sim_eval.py old_stack/models/crnn.py old_stack/models/imitation_net.py old_stack/simulation/gym-imitate/imitate_gym/envs/__init__.py src/datasets.py superval_results_compile.py simulation/sim.py old_stack/crnn.py old_stack/simulation/gym-imitate/setup.py old_stack/util/old/publishers/rightPosePublisher.py old_stack/publishers/rightGripperPublisher.py util/parse_data.py old_stack/util/old/publishers/rightGripperPublisher.py old_stack/util/old/simulation/gym-imitate/imitate_gym/__init__.py old_stack/util/old/simulation/gym-imitate/imitate_gym/envs/imitate_env.py superval_3dval.py old_stack/simulation/gym-imitate/imitate_gym/__init__.py src/loss_func.py src/model0.py old_stack/util/old/simulation/gym-imitate/setup.py old_stack/util/old/crnn.py sim_eval0.py old_stack/util/old/publishers/toggletest.py old_stack/publishers/rightVelPublisher.py util/plot_loss.py superval.py old_stack/simulation/gym-imitate/imitate_gym/envs/buttons.py old_stack/util/parse_data.py old_stack/util/old/simulation/gym-imitate/imitate_gym/buttons_data.py modeltests.py mellow.py old_stack/util/old/publishers/rightVelPublisher.py old_stack/publishers/rightPosePublisher.py old_stack/publishers/toggletest.py old_stack/simulation/gym-imitate/imitate_gym/gym_eval.py translate_tau distance ImitateEval main get_tau sighandler mellowmax2 mellowmax SpatialAttention2d ChannelAttention2d Novograd SpatialSoftmax Model CoordConv2d train apply_film get_tau_ process_images sim distance get_tau distance get_tau_ sim process_images Config evaluate distance arrange print_open_fds get_pcts plot parse_path errorfill Novograd train print2 verify_data BehaviorCloneLoss AttentionCRNN SpatialCRNN CRNNDataset SpatialSoftmax train BehaviorCloneLoss SpatialCRNN CRNNDataset SpatialSoftmax train BehaviorCloneLoss get_prediction SpatialSoftmax Model BaxterDataset train callback calc_changes main run next_move BehaviorCloneLoss AttentionCRNN SpatialCRNN CRNNDataset SpatialSoftmax train ButtonsEnv goal_distance ImitateEnv clean_data extract_number compare_names parse_param_2 preprocess_images ImitateRecorder toggle BehaviorCloneLoss AttentionCRNN SpatialCRNN CRNNDataset SpatialSoftmax train callback calc_changes main run next_move BehaviorCloneLoss AttentionCRNN SpatialCRNN CRNNDataset SpatialSoftmax train ButtonsEnv goal_distance ImitateEnv get_start build_map line get_neighbors derot plan sim distance get_obstacles get_next_move overlap get_tau ImitationLMDB BehaviorCloneLoss LossException fix_rot SpatialAttention2d ChannelAttention2d SpatialSoftmax Model CoordConv2d apply_film SpatialAttention2d ChannelAttention2d Model0 SpatialSoftmax CoordConv2d apply_film extract_number parse_trajectory parse_raw_data norm_img compare_names serialize_pyarrow get_row clean_kuka_data create_lmdb preprocess_image preprocess_images split_vector split_vector2 load_file filter_loss plot_file translate_tau distance ImitateEval main get_tau sighandler mellowmax2 mellowmax SpatialAttention2d ChannelAttention2d Novograd SpatialSoftmax Model CoordConv2d train apply_film get_tau_ process_images sim distance get_tau_ sim process_images Config evaluate distance arrange print_open_fds get_pcts plot parse_path errorfill Novograd train print2 verify_data BehaviorCloneLoss AttentionCRNN SpatialCRNN CRNNDataset SpatialSoftmax train BehaviorCloneLoss SpatialCRNN CRNNDataset SpatialSoftmax BehaviorCloneLoss get_prediction SpatialSoftmax Model BaxterDataset train callback calc_changes main run next_move BehaviorCloneLoss AttentionCRNN SpatialCRNN CRNNDataset SpatialSoftmax train ButtonsEnv goal_distance ImitateEnv clean_data extract_number compare_names parse_param_2 preprocess_images ImitateRecorder toggle BehaviorCloneLoss AttentionCRNN SpatialCRNN CRNNDataset SpatialSoftmax train callback calc_changes main run next_move BehaviorCloneLoss AttentionCRNN SpatialCRNN CRNNDataset SpatialSoftmax train ButtonsEnv goal_distance ImitateEnv get_start build_map line get_neighbors derot plan sim distance get_obstacles get_next_move overlap get_tau ImitationLMDB BehaviorCloneLoss LossException fix_rot SpatialAttention2d ChannelAttention2d SpatialSoftmax Model CoordConv2d apply_film SpatialAttention2d ChannelAttention2d Model0 SpatialSoftmax CoordConv2d apply_film extract_number parse_trajectory parse_raw_data norm_img compare_names serialize_pyarrow get_row clean_kuka_data create_lmdb preprocess_image preprocess_images split_vector split_vector2 load_file filter_loss plot_file int print input eval translate_tau change_start ImitateEval move_to_button get_tau move_to_start a_size exp omega sum max log exp size sum log model zero_grad device MSELoss to format close eval zero_ trange backward write tqdm Novograd parameters isnan any step shape view input eval sum view squeeze unsqueeze amin amax Surface get_start model set_caption get_tau_ K_ESCAPE distance set_visible blit resize tick fromarray list rect view FloatTensor squeeze get_size to set_mode range cat get update product Clock framerate init zero_ fill K_r item flip K_s uint8 frombytes print convert process_images tostring isnan any Rect zeros quit get_tau circle permute SRCALPHA str ones rotate int rotation randint numpy print listdir format set list combinations sorted Surface get_start model set_caption randint K_ESCAPE use_tau set_visible blit save resize tick fromarray rect list eval_traj view FloatTensor squeeze get_size color Model load_state_dict sum set_mode cat zero_eof get update range product LongTensor Clock framerate eval init zero_ fill item flip load uint8 frombytes print weights convert process_images tostring isnan any abstract_tau Rect zeros quit get_tau circle split mean list len zip fill_between plot show list use xlabel ylabel title figure legend range enumerate errorfill print save_path float l2_norm Adam attention makedirs old_print flush load show model print data_dir squeeze weights min imshow eval Model DataLoader load_state_dict permute ImitationLMDB max mode arange save cuda str squeeze ylabel title savefig load_state_dict legend append range state_dict plot load time criterion xlabel len item Model load FloatTensor Variable model eval Model load_state_dict resize cpu type cuda array position absolute concatenate print calc_changes render next_move step array make str reset mkdir range enumerate run sorted len save resize walk range open open writer sorted list ceil append range walk format shuffle zip float pop int print writerow tqdm read_csv len extract_number findall sorted remove print append rmdir range walk read_csv len terminate Popen print choice uniform randint round line derot linefunc rand randint abs abs list rand overlap product range min max range frombytes zoom ones pooler transpose astype float32 MaxPool2d tostring convolve2d unsqueeze numpy range save_folder color get_obstacles num_traj makedirs remainder abs pop int sorted remove simulation list append range walk read_csv split_vector len preprocess_images simulation reshape transpose array split_vector2 print join dest_dir format read_csv unique stack plot
# Targetable Visuomotor Imitation Learning Code repository for the paper "Learning Deep Parameterized Skills for Re-Targetable Visuomotor Control" by the H2R Lab in collaboration with MERL. Read the paper here: https://arxiv.org/abs/1910.10628
2,248
h2r/parameterized-imitation-learning
['imitation learning']
['Deep Imitation Learning for Complex Manipulation Tasks from Virtual Reality Teleoperation']
old_stack/util/old/simulation/gym-imitate/imitate_gym/crnn.py old_stack/simulation/gym-imitate/imitate_gym/envs/imitate_env.py old_stack/util/old/simulation/gym-imitate/imitate_gym/envs/__init__.py old_stack/test_baxter.py old_stack/util/old/simulation/2dsim.py old_stack/simulation/gym-imitate/imitate_gym/crnn.py old_stack/util/toggler.py src/model.py old_stack/simulation/gym-imitate/imitate_gym/buttons_data.py old_stack/util/record.py old_stack/util/old/simulation/gym-imitate/imitate_gym/envs/buttons.py old_stack/util/old/simulation/gym-imitate/imitate_gym/gym_eval.py train.py verify_data.py old_stack/util/old/test_baxter.py 3d_eval.py sim_eval.py old_stack/models/crnn.py old_stack/models/imitation_net.py old_stack/simulation/gym-imitate/imitate_gym/envs/__init__.py src/datasets.py superval_results_compile.py simulation/sim.py old_stack/crnn.py old_stack/simulation/gym-imitate/setup.py old_stack/util/old/publishers/rightPosePublisher.py old_stack/publishers/rightGripperPublisher.py util/parse_data.py old_stack/util/old/publishers/rightGripperPublisher.py old_stack/util/old/simulation/gym-imitate/imitate_gym/__init__.py old_stack/util/old/simulation/gym-imitate/imitate_gym/envs/imitate_env.py superval_3dval.py old_stack/simulation/gym-imitate/imitate_gym/__init__.py src/loss_func.py src/model0.py old_stack/util/old/simulation/gym-imitate/setup.py old_stack/util/old/crnn.py sim_eval0.py old_stack/util/old/publishers/toggletest.py old_stack/publishers/rightVelPublisher.py util/plot_loss.py superval.py old_stack/simulation/gym-imitate/imitate_gym/envs/buttons.py old_stack/util/parse_data.py old_stack/util/old/simulation/gym-imitate/imitate_gym/buttons_data.py modeltests.py mellow.py old_stack/util/old/publishers/rightVelPublisher.py old_stack/publishers/rightPosePublisher.py old_stack/publishers/toggletest.py old_stack/simulation/gym-imitate/imitate_gym/gym_eval.py translate_tau distance ImitateEval main get_tau sighandler mellowmax2 mellowmax SpatialAttention2d ChannelAttention2d Novograd SpatialSoftmax Model CoordConv2d train apply_film get_tau_ process_images sim distance get_tau distance get_tau_ sim process_images Config evaluate distance arrange print_open_fds get_pcts plot parse_path errorfill Novograd train print2 verify_data BehaviorCloneLoss AttentionCRNN SpatialCRNN CRNNDataset SpatialSoftmax train BehaviorCloneLoss SpatialCRNN CRNNDataset SpatialSoftmax train BehaviorCloneLoss get_prediction SpatialSoftmax Model BaxterDataset train callback calc_changes main run next_move BehaviorCloneLoss AttentionCRNN SpatialCRNN CRNNDataset SpatialSoftmax train ButtonsEnv goal_distance ImitateEnv clean_data extract_number compare_names parse_param_2 preprocess_images ImitateRecorder toggle BehaviorCloneLoss AttentionCRNN SpatialCRNN CRNNDataset SpatialSoftmax train callback calc_changes main run next_move BehaviorCloneLoss AttentionCRNN SpatialCRNN CRNNDataset SpatialSoftmax train ButtonsEnv goal_distance ImitateEnv get_start build_map line get_neighbors derot plan sim distance get_obstacles get_next_move overlap get_tau ImitationLMDB BehaviorCloneLoss LossException fix_rot SpatialAttention2d ChannelAttention2d SpatialSoftmax Model CoordConv2d apply_film SpatialAttention2d ChannelAttention2d Model0 SpatialSoftmax CoordConv2d apply_film extract_number parse_trajectory parse_raw_data norm_img compare_names serialize_pyarrow get_row clean_kuka_data create_lmdb preprocess_image preprocess_images split_vector split_vector2 load_file filter_loss plot_file translate_tau distance ImitateEval main get_tau sighandler mellowmax2 mellowmax SpatialAttention2d ChannelAttention2d Novograd SpatialSoftmax Model CoordConv2d train apply_film get_tau_ process_images sim distance get_tau_ sim process_images Config evaluate distance arrange print_open_fds get_pcts plot parse_path errorfill Novograd train print2 verify_data BehaviorCloneLoss AttentionCRNN SpatialCRNN CRNNDataset SpatialSoftmax train BehaviorCloneLoss SpatialCRNN CRNNDataset SpatialSoftmax BehaviorCloneLoss get_prediction SpatialSoftmax Model BaxterDataset train callback calc_changes main run next_move BehaviorCloneLoss AttentionCRNN SpatialCRNN CRNNDataset SpatialSoftmax train ButtonsEnv goal_distance ImitateEnv clean_data extract_number compare_names parse_param_2 preprocess_images ImitateRecorder toggle BehaviorCloneLoss AttentionCRNN SpatialCRNN CRNNDataset SpatialSoftmax train callback calc_changes main run next_move BehaviorCloneLoss AttentionCRNN SpatialCRNN CRNNDataset SpatialSoftmax train ButtonsEnv goal_distance ImitateEnv get_start build_map line get_neighbors derot plan sim distance get_obstacles get_next_move overlap get_tau ImitationLMDB BehaviorCloneLoss LossException fix_rot SpatialAttention2d ChannelAttention2d SpatialSoftmax Model CoordConv2d apply_film SpatialAttention2d ChannelAttention2d Model0 SpatialSoftmax CoordConv2d apply_film extract_number parse_trajectory parse_raw_data norm_img compare_names serialize_pyarrow get_row clean_kuka_data create_lmdb preprocess_image preprocess_images split_vector split_vector2 load_file filter_loss plot_file int print input eval translate_tau change_start ImitateEval move_to_button get_tau move_to_start a_size exp omega sum max log exp size sum log model zero_grad device MSELoss to format close eval zero_ trange backward write tqdm Novograd parameters isnan any step shape view input eval sum view squeeze unsqueeze amin amax Surface get_start model set_caption get_tau_ K_ESCAPE distance set_visible blit resize tick fromarray list rect view FloatTensor squeeze get_size to set_mode range cat get update product Clock framerate init zero_ fill K_r item flip K_s uint8 frombytes print convert process_images tostring isnan any Rect zeros quit get_tau circle permute SRCALPHA str ones rotate int rotation randint numpy print listdir format set list combinations sorted Surface get_start model set_caption randint K_ESCAPE use_tau set_visible blit save resize tick fromarray rect list eval_traj view FloatTensor squeeze get_size color Model load_state_dict sum set_mode cat zero_eof get update range product LongTensor Clock framerate eval init zero_ fill item flip load uint8 frombytes print weights convert process_images tostring isnan any abstract_tau Rect zeros quit get_tau circle split mean list len zip fill_between plot show list use xlabel ylabel title figure legend range enumerate errorfill print save_path float l2_norm Adam attention makedirs old_print flush load show model print data_dir squeeze weights min imshow eval Model DataLoader load_state_dict permute ImitationLMDB max mode arange save cuda str squeeze ylabel title savefig load_state_dict legend append range state_dict plot load time criterion xlabel len item Model load FloatTensor Variable model eval Model load_state_dict resize cpu type cuda array position absolute concatenate print calc_changes render next_move step array make str reset mkdir range enumerate run sorted len save resize walk range open open writer sorted list ceil append range walk format shuffle zip float pop int print writerow tqdm read_csv len extract_number findall sorted remove print append rmdir range walk read_csv len terminate Popen print choice uniform randint round line derot linefunc rand randint abs abs list rand overlap product range min max range frombytes zoom ones pooler transpose astype float32 MaxPool2d tostring convolve2d unsqueeze numpy range save_folder color get_obstacles num_traj makedirs remainder abs pop int sorted remove simulation list append range walk read_csv split_vector len preprocess_images simulation reshape transpose array split_vector2 print join dest_dir format read_csv unique stack plot
# Targetable Visuomotor Imitation Learning Code repository for the paper "Learning Deep Parameterized Skills for Re-Targetable Visuomotor Control" by the H2R Lab in collaboration with MERL. Read the paper here: https://arxiv.org/abs/1910.10628
2,249
habernal/emnlp2015
['word embeddings']
['Exploiting Debate Portals for Semi-Supervised Argumentation Mining in User-Generated Web Discourse']
code/experiments/src/main/python/segeval/window/pk.py code/experiments/src/main/python/segeval/__init__.py code/experiments/src/main/python/segeval/agreement/test.py code/experiments/src/main/python/segeval/util/__init__.py code/experiments/src/main/python/segeval/similarity/segmentation_test.py code/experiments/src/main/python/segeval/data/tsv_test.py code/experiments/src/main/python/segeval/ml/test.py code/experiments/src/main/python/segeval/window/windowdiff.py code/experiments/src/main/python/segeval/metric.py code/experiments/src/main/python/segeval/agreement/__init__.py code/experiments/src/main/python/segeval/window/__init__.py code/experiments/src/main/python/segeval/window/windowdiff_test.py code/experiments/src/main/python/segeval/compute.py code/experiments/src/main/python/segeval/agreement/bias_test.py code/experiments/src/main/python/segeval/agreement/kappa_test.py code/experiments/src/main/python/segeval/data/test.py code/experiments/src/main/python/segeval/util/math.py code/experiments/src/main/python/segeval/similarity/boundary_test.py code/experiments/src/main/python/segeval/util/math_test.py code/experiments/src/main/python/segeval/similarity/__init__.py code/experiments/src/main/python/segeval/data/jsonutils_test.py code/experiments/src/main/python/segeval/format_test.py code/experiments/src/main/python/segeval/similarity/distance/multipleboundary.py code/experiments/src/main/python/segeval/data/jsonutils.py code/experiments/src/main/python/segeval/data/__init__.py code/experiments/src/main/python/segeval/window/pk_test.py code/experiments/src/main/python/segeval/test.py code/experiments/src/main/python/segeval/similarity/boundary.py code/experiments/src/main/python/segeval/ml/__init__.py code/experiments/src/main/python/segeval/agreement/pi_test.py code/experiments/src/main/python/segeval/similarity/distance/multipleboundary_test.py code/experiments/src/main/python/segeval/window/test.py code/experiments/src/main/python/segeval/util/lang.py code/experiments/src/main/python/segeval/format.py code/experiments/src/main/python/segeval/data/tsv.py code/experiments/src/main/python/segeval/agreement/bias.py code/experiments/src/main/python/segeval/agreement/pi.py code/experiments/src/main/python/segeval/data/samples.py code/experiments/src/main/python/segeval/agreement/kappa.py code/experiments/src/main/python/segeval/similarity/weight.py code/experiments/src/main/python/segeval/similarity/weight_test.py code/experiments/src/main/python/segeval/similarity/distance/__init__.py code/experiments/src/main/python/segeval/similarity/segmentation.py code/experiments/src/main/python/segeval/similarity/test.py code/experiments/src/main/python/segeval/util/test.py summarize compute_pairwise_values convert_masses_to_positions convert_nltk_to_masses boundary_string_from_masses convert_positions_to_masses TestFormat TestModule TestExamples TestImport module __artstein_poesio_bias_linear__ artstein_poesio_bias_linear TestBias __fleiss_kappa_linear__ fleiss_kappa_linear TestKappa fleiss_pi_linear __fleiss_pi_linear__ TestPi TestAgreement __potential_boundaries__ __fnc_metric__ __boundaries__ actual_agreement_linear __actual_agreement_linear__ __write_json__ output_linear_mass_json input_linear_mass_json TestJsonUtils TestUtils TestDataset input_linear_positions_tsv input_linear_mass_tsv TestTsv load_nested_folders_dict get_coders DataIOError name_from_filepath Dataset TestML TestConfusionMatrix __recall__ __fmeasure__ ConfusionMatrix __value_micro_macro__ precision _InnerConfusionMatrix recall fmeasure __precision__ __boundary_similarity__ boundary_similarity TestBoundary segmentation_similarity __segmentation_similarity__ TestSegmentation TestSimilarity weight_s weight_t weight_t_scale weight_s_scale weight_a TestWeight boundary_confusion_matrix __boundary_statistics__ __boundary_confusion_matrix__ boundary_statistics __overlaps_existing__ __has_substitutions__ __additions_substitutions_sets__ __additions_substitutions__ __boundary_edit_distance__ __transpositions__ boundary_edit_distance __optional_set_edits__ TestInnerFncOfMultipleBoundaries TestMultipleBoundaries identify_types enum mean var std stderr TestMath TestTestCase UtilTestCase TestCase __fnc_metric__ SegmentationMetricError pk __pk__ TestPairwisePkMeasure TestPk TestWindow __window_diff__ __create_paired_window__ window_diff TestWindowDiffPositions TestPairwiseWindowDiff TestWindowDiffMasses __compute_window_size__ compute_window_size dict tuple __per_group__ list extend enumerate add dict list dict Decimal append sum keys range __actual_agreement_linear__ len list values dict Decimal append sum __actual_agreement_linear__ len update boundary_types hasattr boundary_format dict boundary_string_from_masses convert_nltk_to_masses mass identify_types convert_positions_to_masses boundary_string_from_masses convert_nltk_to_masses convert_positions_to_masses mass list __potential_boundaries__ dict append get_coders keys range len join dump isdir open update __write_json__ properties load items list tuple dict Dataset open dict name_from_filepath Dataset items list convert_positions_to_masses input_linear_mass_tsv list isinstance union set keys values join list items isdir dict splitext __iadd__ append fnc_load listdir Dataset items list isinstance dict classes __compute__ classes classes __recall__ Decimal __precision__ str dict dict dict set dict __boundary_statistics__ len dict __boundary_statistics__ len max list boundary_string_from_masses convert_nltk_to_masses fnc_weight_s zip symmetric_difference fnc_weight_a min mass extend boundary_edit_distance intersection identify_types fnc_weight_t convert_positions_to_masses len dict __boundary_statistics__ cm dict abs len list permutations sorted set Addition zip append sum list discard sorted dict append Transposition range len Difference set dict zip enumerate list __additions_substitutions_sets__ values sim extend __transpositions__ a_b b_a __optional_set_edits__ list range add set list dict zip range len Decimal mean Decimal isinstance convert_nltk_to_masses mass __compute_window_size__ position convert_masses_to_positions range len tuple list zip list convert_nltk_to_masses zip mass __compute_window_size__ Decimal position convert_masses_to_positions sum convert_positions_to_masses range len int list fnc_round mean Decimal __list_coder_masses__ convert_positions_to_masses dict update
# Exploiting Debate Portals for Argumentation Mining in User-Generated Web Discourse Source code, data, and supplementary materials for our EMNLP 2015 article. Please use the following citation: ``` @InProceedings{habernal-gurevych:2015:EMNLP, author = {Habernal, Ivan and Gurevych, Iryna}, title = {Exploiting Debate Portals for Semi-Supervised Argumentation Mining in User-Generated Web Discourse}, booktitle = {Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing}, month = {September}, year = {2015}, address = {Lisbon, Portugal},
2,250
hadyelsahar/relation-discovery-2-entities
['word embeddings', 'relation extraction']
['Unsupervised Open Relation Extraction']
utils/__init__.py utils/vectorizers/typevectorizer.py data/diego-NYT-FB/script-preprocessing.py encoders/cnn/cnn_distmult.py utils/vectorizers/glovevectorizer.py run_notraining.py evaluation/evaluation.py encoders/relation_encoders/typepredictor.py encoders/keras/cnndistmult.py utils/vectorizers/attention_vectorizer.py evaluation/__init__.py utils/corenlpclient.py Run fixtype get_entities parallelize_dataframe CNN_DISTMULT CNNDISTMULT CNNDISTMULT ClusterEvaluation Parse CoreNlPClient DepAttentionVectorizer GloveVectorizer TypeVectorizer join array_split concat close map Pool iterrows print annotate encode append
# unsupervised relation discovery between two entities Unsupervised Open Relation Extraction. ESWC (Satellite Events) 2017: 12-16 Hady ElSahar, Elena Demidova, Simon Gottschalk, Christophe Gravier, Frédérique Laforest: ### Loading the CoreNLP Server and get it running - make sure you have java-8 installed - download and unzip `stanford-corenlp-2015-12-09` - for more infor check [CoreNLP Server Webpage](http://stanfordnlp.github.io/CoreNLP/corenlp-server.html) ``` mkdir ./utils/corenlp
2,251
hahnec/plenopticam
['information retrieval', 'camera calibration']
['PlenoptiCam v1.0: A light-field imaging framework']
plenopticam/gui/widget_path.py plenopticam/scripts/metrics/refo_metrics.py plenopticam/scripts/metrics/brisque_analysis.py plenopticam/lfp_refocuser/top_level.py plenopticam/gui/widget_cmnd.py plenopticam/lfp_extractor/lfp_rearranger.py plenopticam/lfp_calibrator/grid_fitter.py plenopticam/gui/widget_menu.py tests/unit_test_all.py plenopticam/lfp_calibrator/centroid_sorter.py plenopticam/scripts/metrics/centroid_error_analysis.py plenopticam/bin/__init__.py plenopticam/cfg/cfg.py plenopticam/lfp_calibrator/line_fitter.py tests/unit_test_cli.py plenopticam/bin/cli_script.py tests/unit_test_custom.py plenopticam/lfp_extractor/lfp_color_eq.py plenopticam/lfp_aligner/lfp_devignetter.py plenopticam/gui/widget_view.py tests/unit_test_err.py plenopticam/lfp_aligner/lfp_rotator.py plenopticam/lfp_extractor/__init__.py setup.py plenopticam/misc/errors.py plenopticam/lfp_calibrator/pitch_estimator.py plenopticam/lfp_refocuser/lfp_shiftandsum.py plenopticam/lfp_calibrator/__init__.py plenopticam/misc/data_downloader.py plenopticam/misc/gamma_converter.py plenopticam/lfp_reader/top_level.py plenopticam/misc/__init__.py plenopticam/misc/file_rw.py plenopticam/lfp_extractor/lfp_exporter.py plenopticam/gui/widget_about.py plenopticam/lfp_aligner/lfp_local_resampler.py plenopticam/main.py plenopticam/lfp_calibrator/non_max_supp.py tests/unit_test_illum.py plenopticam/lfp_aligner/top_level.py plenopticam/gui/widget_cnfg.py plenopticam/gui/widget_file.py plenopticam/scripts/metrics/refo_metrics_rev.py docs/source/conf.py plenopticam/lfp_calibrator/top_level.py plenopticam/scripts/metrics/recolour_analysis.py plenopticam/gui/constants.py plenopticam/scripts/metrics/recolour_transfer_script.py plenopticam/lfp_calibrator/centroid_drawer.py plenopticam/scripts/dev/test_grid_fit.py plenopticam/misc/os_ops.py plenopticam/lfp_calibrator/centroid_refiner.py plenopticam/misc/normalizer.py tests/unit_test_calib.py plenopticam/lfp_aligner/cfa_processor.py plenopticam/gui/widget_pbar.py plenopticam/misc/data_proc.py plenopticam/lfp_extractor/lfp_viewpoints.py plenopticam/scripts/metrics/recolour_copy_views.py plenopticam/lfp_aligner/lfp_microlenses.py plenopticam/lfp_calibrator/centroid_extractor.py plenopticam/lfp_extractor/top_level.py plenopticam/scripts/metrics/brisque_analysis_flip.py plenopticam/lfp_refocuser/cls_refo_slices.py plenopticam/cfg/constants.py tests/unit_test_gui.py plenopticam/lfp_extractor/lfp_depth.py tests/unit_test_exe.py plenopticam/scripts/metrics/scale_max_plot.py plenopticam/lfp_refocuser/__init__.py tests/unit_test_plt.py plenopticam/lfp_extractor/hex_corrector.py plenopticam/misc/type_checks.py plenopticam/misc/circle_drawer.py plenopticam/lfp_reader/constants.py plenopticam/scripts/metrics/wht_img_plt_script.py plenopticam/lfp_aligner/lfp_resampler.py plenopticam/misc/status.py plenopticam/lfp_extractor/lfp_cropper.py plenopticam/cfg/__init__.py plenopticam/gui/widget_ctrl.py plenopticam/lfp_calibrator/cali_finder.py plenopticam/lfp_extractor/lfp_outliers.py plenopticam/lfp_extractor/lfp_contrast.py plenopticam/lfp_calibrator/find_centroid.py plenopticam/lfp_reader/lfp_decoder.py plenopticam/lfp_refocuser/lfp_scheimpflug.py plenopticam/lfp_aligner/lfp_global_resampler.py plenopticam/lfp_reader/__init__.py plenopticam/scripts/metrics/vign_metric.py plenopticam/scripts/metrics/refo_metrics_plt.py plenopticam/gui/top_level.py plenopticam/lfp_aligner/__init__.py plenopticam/scripts/metrics/blur_metric.py plenopticam/scripts/metrics/refoc_metrics.py plenopticam/lfp_aligner/cfa_outliers.py plenopticam/__init__.py plenopticam/scripts/copy_thumbs.py main parse_options usage PlenopticamConfig NumpyTypeEncoder PlenopticamApp main_app AbtWidget CmndWidget CnfgWidget DoubleSpinbox TwoStringVars CtrlWidget PropagatingThread FileWidget MenuWidget MenuBtns PathWidget PbarWidget main ViewWidget CfaOutliers CfaProcessor LfpDevignetter LfpGlobalResampler LfpLocalResampler LfpMicroLenses LfpResampler LfpRotator LfpAligner CaliFinder CentroidDrawer CentroidExtractor CentroidRefiner CentroidSorter find_centroid GridFitter LineFitter NonMaxSuppression PitchEstimator LfpCalibrator HexCorrector LfpColorEqualizer LfpContrast LfpCropper LfpDepth LfpExporter LfpOutliers LfpRearranger LfpViewpoints LfpExtractor LfpDecoder LfpReader ClsRefoSlices LfpScheimpflug LfpShiftAndSum LfpRefocuser draw_circle bresenham_circle DataDownloader eq_channels suppress_user_warning robust_awb img_resize create_gauss_kernel safe_get PlenopticamError LfpTypeError LfpAttributeError try_tiff_import load_img_file save_img_file save_gif place_dnp GammaConverter Normalizer select_file rm_file get_img_list rmdir_p remove_readonly idx_str_sort mkdir_p PlenopticamStatus isint islist isfloat rint str2list isbool str2type mkdir_p michelson_contrast blur_metric brisque_metric brisque_metric psnr hist_dist w2_metric stat_vars hist_conv chi2_dist w2_dist im2mat float_norm uint8_norm michelson_contrast brisque_metric crop_imgs blur_metric michelson_contrast brisque_metric crop_imgs blur_metric michelson_contrast brisque_metric crop_imgs blur_metric psnr plot_centroids PlenoptiCamTesterCalib PlenoptiCamTesterCli PlenoptiCamTesterCustom PlenoptiCamErrorTester ExecutableTester TKinterTestCase PlenoptiCamTesterGui PlenoptiCamTesterIllum PlenopticamTesterPlt print join getopt mainloop strip exit str2list str2type usage save_params validate select_file PlenopticamStatus wht_bay exp_path cond_lfp_align LfpCalibrator abspath cond_auto_find LfpReader sorted dirname lfp_img status_msg load_img_file parse_options cfg mkdir_p vp_img_linear default_values join isdir LfpExtractor print PlenopticamConfig CaliFinder LfpRefocuser load_cal_data LfpAligner len join PlenopticamApp resizable mainloop dict list PARAMS_KEYS zip pack Tk resizable mainloop ravel draw_circle meshgrid exp arange dtype list f shape linspace zeros interp2d range argmax mean sum range len print type_norm copy sign mean shape dot range yuv_conv zeros abs array diag filterwarnings chmod try_tiff_import st_mode imwrite suppress_user_warning __contains__ stat exists try_tiff_import suppress_user_warning type_norm __contains__ any imread open mimwrite join dtype asarray reshape astype array makedirs rmtree chmod func S_IWRITE remove isfile update Tk withdraw askopenfilename join sorted list int load_img_file sort reshape sqrt lower zip append listdir len float int float isfloat isint islist shape abs fft2 sum min max get_score BRISQUE mean asarray max sqrt sum hist_conv square dot abs sum trace stat_vars w2_dist fftshift join str load_img_file sort save_img_file mkdir_p splitext append enumerate list subplots grid tick_params max show list use ConnectionPatch imshow savefig set_path_effects append range asarray plot add_artist text min Stroke array
hahnec/plenopticam
2,252
halbielee/SEC_pytorch
['semantic segmentation']
['Seed, Expand and Constrain: Three Principles for Weakly-Supervised Image Segmentation']
CRF/krahenbuhl2013/__init__.py CRF/krahenbuhl2013/CRF.py evaluation.py utils/util_loss.py utils/util_args.py utils/sec_loss.py utils/util_loader.py network/DeepLab_LargeFOV.py utils/dataset/coco.py utils/dataset/voc.py CRF/setup.py network/__init__.py utils/util.py main.py test_multiprocess.py parse_args _pickle_method ConfusionMatrix preprocess predict_mask parser_args save_mask_multiprocess CRF deeplab_large_fov make_layers DeepLabLargeFOV contrain_loss SeedingLoss balanced_seed_loss save_checkpoint adjust_learning_rate get_parameters load_model get_args data_loader expand_loss_layer seed_loss_layer softmax_layer crf_layer constrain_loss_layer COCODataset preprocess preprocess VOCDataset add_argument ArgumentParser parse_args add_argument ArgumentParser transpose astype array zoom argmax max exp model zoom transpose astype float32 CRF from_numpy imread sum cuda log join format imwrite load_model pred_path print trained smooth split_size gpu_id eval getpid predict_mask cuda enumerate len reshape astype add_pairwise_energy DenseCRF set_unary_energy enumerate Conv2d modules isinstance Conv2d join save makedirs load format print load_state_dict isfile state_dict parse_args add_argument debug ArgumentParser COCODataset VOCDataset DataLoader train_list sum exp max detach sum view sort float sum max data sum zoom transpose CRF shape zeros round array range exp mean new_tensor sum log
# Seed, Expand, Constrain: Three Principles for Weakly-Supervised Image Segmentation PyTorch implementation of "Seed, Expand, Constrain: Three Principles for Weakly-Supervised Image Segmentation", ECCV2016 This is not the official repository for this paper. For the official, please see the following links. - Paper : [https://arxiv.org/abs/1603.06098](https://arxiv.org/abs/1603.06098) - Official code : [caffe implmentation](https://github.com/kolesman/SEC) ## Introduction
2,253
halecakir/Sent2LogicalForm
['semantic parsing']
['Language to Logical Form with Neural Attention']
utils/log.py Dynet/Seq2Seq.py utils/decorators.py Dynet/mnnl.py utils/nlp_utils.py utils/io_utils.py RNNSequencePredictor SequencePredictor BiRNNSequencePredictor FFSequencePredictor Layer read_vocab Seq2Seq read_data Options logging Description IOUtils WhyperDescription UntaggedDescription Application Permission NLPUtils split
# Overview ## Data [Geoquery data](https://github.com/halecakir/ThesisExperiments/tree/master/data) has been used. There are total 880 sentences-logical form pair (600 train, 280 test). ## Models ### Sequence-to-Sequence ![enter image description here](https://github.com/halecakir/Sent2LogicalForm/blob/master/extra/lstm.jpg) ### Sequence-to-Sequence + Attention ![enter image description here](https://github.com/halecakir/Sent2LogicalForm/blob/master/extra/attention.jpg) ## Attention Weight Matrix ### Sentence 1 : How high is m0?
2,254
halimiqi/www21
['denoising']
['Mask-GVAE: Blind Denoising Graphs via Partition']
utils_mvgrl.py graph_kernel/shortest_path_kernel.py optimizer.py pygraph/__init__.py pygraph/kernels/unfinished/treePatternKernel.py pygraph/utils/graphdataset.py pygraph/utils/model_selection_precomputed.py gcn/metrics.py gcn/models.py graph_kernel/graphlet_kernels.py pygraph/kernels/unfinished/weisfeilerLehmanKernel.py pygraph/kernels/treeletKernel.py pygraph/kernels/else/sp_sym.py pygraph/utils/unfinished/openblassettings.py initializations.py graph_kernel/convenient_tools.py pygraph/kernels/untilHPathKernel.py pygraph/kernels/unfinished/cyclicPatternKernel.py gcn/train.py layers.py input_data.py pygraph/kernels/else/ssp_sym.py utils.py pygraph/utils/unused/suffix_tree.py ops.py pygraph/utils/graphfiles.py gcn/utils.py pygraph/kernels/spKernel.py graph_kernel/random_walk_kernel.py pygraph/utils/utils.py pygraph/kernels/weisfeilerLehmanKernel.py pygraph/utils/trie.py main_budget.py gcn/inits.py graph/train.py gcn/layers.py pygraph/kernels/structuralspKernel.py pygraph/utils/kernels.py preprocessing.py graph_kernel/WL_subtree_kernel.py pygraph/kernels/marginalizedKernel.py pygraph/kernels/commonWalkKernel.py pygraph/kernels/else/rwalk_sym.py gcn/train_test.py graph/dataset.py pygraph/kernels/randomWalkKernel.py graph/dataset_new.py pygraph/utils/isNotebook.py pygraph/kernels/unfinished/pathKernel.py mask_gvae.py pygraph/utils/parallel.py pygraph/utils/__init__.py weight_variable_glorot parse_index_file load_data dropout_sparse get_layer_uid GraphiteSparse_simple Scale Graphite_simple GraphConvolution GraphConvolutionSparse_denseadj Dense InnerProductDecoder GraphConvolution_denseadj GraphConvolutionSparse zeros Graphite GraphiteSparse FullyConnect Layer get_new_adj train_one_graph test_one_graph get_new_feature train add_noises_on_adjs mask_gvae print_mu print_similarity batch_normal print_mu2 Optimizer preprocess_graph_e sparse_to_tuple preprocess_graph construct_feed_dict mask_test_edges construct_feed_dict_trained randomly_flip_features denoise_ratio largest_connected_components randomly_delete_edges load_npz_edges train_val_test_split_tabular load_data_subgraphs preprocess_graph WL_no_label WL PSNR randomly_add_edges flip_features_fix_attr add_edges_between_labels load_npz k_edgedel PSNR_with_features get_noised_indexes normalize_adj preprocess_features sparse_to_tuple compute_heat compute_ppr ones zeros uniform glorot get_layer_uid sparse_dropout dot GraphConvolution Dense Layer masked_softmax_cross_entropy masked_accuracy Model GCN MLP run run preprocess_features normalize_adj sparse_to_tuple sample_mask construct_feed_dict chebyshev_polynomials parse_index_file load_data preprocess_adj load download process load download process get_negative_expectation MLP local_global_loss_ train GCN Model GCNLayer global_global_loss_ get_positive_expectation distancem_to_affinitym save_matrix kernelm_to_distancem normalize_kernel_matrix _4_graphlet_contains_3star is_3star random_combination compute34graphlet compute_all_connected_34graphlet compare_graphlets compute_all_connected_34graphlet_2_categories_plus_predict graphlet_index count_graphlets_sampling compute_all_connected_345graphlet_2_categories_plus_predict count_all_connected_3graphlets count_graphlets computekgraphlet generate_graphlets findPaths number_of_graphlets count_all_connected_4graphlets count_all_connected_5graphlets norm kernel_matrix_rw_no_memory random_walk_kernel get_max_path compute_shortest_path_2_categories_plus_predict shortest_path_kernel_matrix compute_splom compute_WL_kernel_2_cat_plus_predict compute_mle_wl_kernel orig_graph_map_WL commonwalkkernel find_walks _commonwalkkernel_brute _commonwalkkernel_exp wrapper_cw_exp _commonwalkkernel_geo find_all_walks wrapper_cw_geo find_all_walks_until_length wrapper_marg_do _marginalizedkernel_do wrapper_untotter marginalizedkernel _fp_labled_do _fixed_point _sd_do _sylvester_equation _cg_unlabled_do computeW filterGramMatrix wrapper_fp_labled_do wrapper_se_do _conjugate_gradient getLabels wrapper_sd_do _se_do computeVK randomwalkkernel _cg_labled_do wrapper_cg_labled_do func_fp _spectral_decomposition _randomwalkkernel_kron wrapper_cg_unlabled_do spkernel wrapper_sp_do wrapper_getSPGraph spkernel_do structuralspkernel ssp_do_trie traverseBothTriee get_shortest_paths structuralspkernel_do get_sps_as_trie wrapper_ssp_do_trie traverseTrie2v getAllEdgeKernels wrapper_ssp_do getAllNodeKernels wrapper_getSP_trie traverseBothTriem traverseTrie2u traverseTrie2e traverseBothTrieu wrapper_getSP_naive traverseBothTriev traverseTrie2m _treeletkernel_do find_all_paths treeletkernel get_canonkeys find_paths wrapper_get_canonkeys wrapper_treeletkernel_do wrapper_find_all_path_as_trie wrapper_uhpath_do_kernelless find_all_paths_until_length _untilhpathkernel_do_kernelless wrapper_find_all_paths_until_length find_all_path_as_trie wrapper_uhpath_do_naive _untilhpathkernel_do_trie wrapper_uhpath_do_trie paths2labelseqs untilhpathkernel _untilhpathkernel_do_naive _wl_edgekernel_do compute_kernel_matrix _wl_userkernel_do weisfeilerlehmankernel wrapper_compute_subtree_kernel _wl_kernel_do wrapper_wl_iteration wl_iteration _wl_spkernel_do compute_subtree_kernel _fp_labled_do _fixed_point _sd_do _sylvester_equation _cg_unlabled_do computeW filterGramMatrix wrapper_fp_labled_do wrapper_se_do _conjugate_gradient getLabels wrapper_sd_do _se_do computeVK randomwalkkernel _cg_labled_do wrapper_cg_labled_do func_fp _spectral_decomposition _randomwalkkernel_kron wrapper_cg_unlabled_do spkernel wrapper_sp_do wrapper_getSPGraph spkernel_do structuralspkernel wrapper_getSP wrapper_ssp_do get_shortest_paths structuralspkernel_do get_patterns _cyclicpatternkernel_do cyclicpatternkernel _pathkernel_do_el pathkernel _pathkernel_do_nl _pathkernel_do_l _pathkernel_do_unl get_shortest_paths treepatternkernel _treepatternkernel_do _wl_edgekernel_do _wl_userkernel_do weisfeilerlehmankernel _wl_subtreekernel_do _wl_spkernel_do get_dataset_attributes loadDataset loadFromDS loadTXT loadSDF saveGXL loadMAT loadCT loadFromXML loadGXL saveDataset isNotebook deltakernel kernelsum kernelproduct polynomialkernel gaussiankernel linearkernel trial_do compute_gram_matrices printResultsInTable model_selection_for_precomputed_kernel read_gram_matrices_from_file parallel_trial_do parallel_me parallel_gm Trie getSPLengths untotterTransformation direct_product get_node_labels getSPGraph get_edge_labels graph_deepcopy graph_isIdentical floydTransformation set_num_threads get_num_procs num_threads get_num_threads _SNode STree sqrt random_uniform append int strip open list format lil_matrix from_dict_of_lists tolil tuple sort min adjacency_matrix parse_index_file max range len sparse_retain floor cast ones_like squeeze copy flatten argsort eval stack dia_matrix append array range seed int eliminate_zeros dia_matrix randomly_add_edges append sum range len tolil eval tocoo Saver save exponential_decay Session add_noises_on_adjs SparseTensor get_variable run restore list ones sparse_to_tuple train_one_graph test_one_graph append sum learn_rate_init_gen range update format build_model preprocess_graph construct_feed_dict mean learn_rate_init float print mask_gvae tqdm eye global_variables_initializer epochs array len update time tocoo eliminate_zeros ones sparse_to_tuple print preprocess_graph dia_matrix eye run array get_noised_indexes SparseTensor update int tocsr tocoo eliminate_zeros csr_matrix sparse_to_tuple realD_tilde preprocess_graph copy dia_matrix get_new_adj eval PSNR WL_no_label eye get_noised_indexes run argmax print mean append sum print mean bincount unique append argmax max len print mean unique append argmax max data shape transpose tocoo tocoo flatten coo_matrix array eye sum diags diags tocoo flatten dot coo_matrix eye sum array dict update 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 bincount connected_components print format append train_test_split arange A1 tocsr power format all print preprocess_graph argsort append array todense ones copy choice argwhere triu len seed todense ones copy choice argwhere append triu array len todense copy choice argwhere triu len seed tolil choice range len seed tolil argsort range len len intersection set todense asarray reshape squeeze set difference argwhere append argmax range load arange shuffle len spnorm max log norm spnorm log print from_scipy_sparse_matrix compute_mle_wl_kernel update int print squeeze from_scipy_sparse_matrix compute_mle_wl_kernel argwhere set_node_attributes enumerate fractional_matrix_power matmul eye sum to_numpy_array diag sum to_numpy_array diag eye to_tuple range isinstance len ndarray diags isinstance flatten dot sum array diags flatten coo_matrix eye sum array random_uniform sqrt random_uniform sparse_retain floor cast sparse_tensor_dense_matmul matmul softmax_cross_entropy_with_logits cast float32 argmax cast equal update time preprocess_features format evaluate print model_func max_degree construct_feed_dict epochs chebyshev_polynomials load_data append global_variables_initializer dataset range Session Graph reset_default_graph zeros tolist sample_mask shape vstack zeros normalize_adj eye list normalize_adj format chebyshev_recurrence print eye append range eigsh join format basename system dirname abspath makedirs max relabel_nodes exists list nodes dirname append range format concatenate set from_edgelist keys enumerate join print zeros array len join list max csr_matrix hstack process array dirname abspath save append vstack download to_numpy_array range values enumerate print exp log softplus sqrt exp log softplus mm t sum cuda enumerate mm t sum cuda range arange model StratifiedKFold zero_grad numpy accuracy_score cuda view Adam Model load_state_dict predict state_dict shuffle load GridSearchCV local_global_loss_ backward fit LinearSVC parameters split step embed zeros range len exp std zeros sqrt range len save fill_diagonal compare_graphlets enumerate combinations list todense zeros range sorted list tuple sample range len list random_combination todense zeros range print count_graphlets_sampling adjacency_matrix read_gexf generate_graphlets zeros sum enumerate concatenate print adjacency_matrix read_gexf generate_graphlets zeros sum enumerate adjacency_matrix convert_node_labels_to_integers nodes findPaths combinations convert_node_labels_to_integers neighbors nodes adjacency_matrix findPaths combinations sorted subgraph convert_node_labels_to_integers neighbors nodes adjacency_matrix findPaths array time concatenate print read_gexf zeros sum enumerate time T normalize_kernel_matrix concatenate ones print dot sqrt read_gexf zeros sum range enumerate len time T normalize_kernel_matrix concatenate ones print delete dot sqrt read_gexf zeros sum range enumerate len sum time norm lil_matrix ones adj_matrix print identity dot kron lsqr time random_walk_kernel print read_gexf zeros len floyd_warshall print adjacency_matrix read_gexf max floyd_warshall lil_matrix print adjacency_matrix read_gexf zeros triu max time todense asarray print compute_splom asarray todense lil_matrix normalize_kernel_matrix concatenate sqrt zeros range compute_splom len tuple degree str list sorted nodes range get neighbors set keys deepcopy time print convert_node_labels_to_integers order dict set_node_attributes zeros len get deepcopy list str sorted print tuple convert_node_labels_to_integers node degree order neighbors set read_gexf set_node_attributes zeros range len time concatenate print set zeros range keys orig_graph_map_WL len set_edge_attributes time partial print get_dataset_attributes lower parallel_gm set_node_attributes zeros len T exp todense eig direct_product zeros range len todense direct_product identity len list Counter set dict dot join extend append find_all_walks range extend find_walks set_edge_attributes int time list partial join print close get_dataset_attributes tqdm imap_unordered parallel_gm set_node_attributes zeros Pool range len items list number_of_nodes deltakernel nodes copy range len time _spectral_decomposition print _fixed_point warn get_dataset_attributes lower _randomwalkkernel_kron _conjugate_gradient _sylvester_equation range len zeros parallel_gm partial dlyap full reshape len zeros parallel_gm partial todense cg identity full len computeVK cg identity full computeW zeros parallel_gm partial computeVK fixed_point full computeW partial transpose eig parallel_gm append zeros todense exp inv identity array diag len append edges set zeros list items shape nodes kn ke zeros number_of_nodes edges int time list partial join isinstance print close get_dataset_attributes tqdm imap_unordered parallel_gm zip zeros Pool range len nodes product edges kn ssp_do_trie get_dataset_attributes get_shortest_paths Pool structuralspkernel_do list get_sps_as_trie parallel_gm append range partial close imap_unordered zip combinations_with_replacement int time join isinstance print tqdm zeros len getAllNodeKernels product getAllEdgeKernels range len getAllNodeKernels traverseBothTriee traverseBothTriev getAllEdgeKernels traverseBothTriem root traverseBothTrieu product nodes kn ke product edges items list root traverseTrie2m append items list append range len items list root traverseTrie2v append items list append range len items list root append traverseTrie2e items list append range len items list root append traverseTrie2u append items list combinations list all_shortest_paths nodes insertWord combinations list Trie all_shortest_paths nodes get_canonkeys get_dataset_attributes Pool list parallel_gm append range partial close imap_unordered zip combinations_with_replacement set_edge_attributes int time _treeletkernel_do join print tqdm set_node_attributes zeros len sub_kernel array keys set update int list number_of_nodes tuple find_all_paths sort nodes extend Counter from_iterable append range values len find_paths list extend enumerate set_edge_attributes int time list partial join zip print close get_dataset_attributes tqdm imap_unordered parallel_gm set_node_attributes zeros Pool range len traverseTrie2t traverseTrie2m root traverseTrie1t traverseTrie1m minimum list maximum Counter set sum len minimum list maximum Counter set sum len append print range insertWord traverseGraph Trie nodes paths2labelseqs _wl_edgekernel_do time _wl_userkernel_do _wl_kernel_do print get_dataset_attributes _wl_spkernel_do lower set_node_attributes update int list compute_kernel_matrix sort tuple nodes Counter set dict append zeros range values enumerate append sort nodes tuple wl_iteration partial parallel_gm compute_subtree_kernel range len list array keys set update int join list sort nodes set edges append zeros range len update int join list sort nodes set edges append zeros range len update int join list base_kernel sort nodes set append zeros range tqdm ke kn nodes edges time list print _cyclicpatternkernel_do tqdm zeros range len connected_component_subgraphs join add_edges_from list biconnected_component_subgraphs Graph set simple_cycles to_directed edges append range len update time _pathkernel_do_el print _pathkernel_do_unl _pathkernel_do_nl _pathkernel_do_l tqdm get_dataset_attributes zeros range len range len range len range len len append shortest_path update int time print _treepatternkernel_do tqdm lower zeros range len sum kernel_h values _wl_subtreekernel_do zeros update int list join sort nodes Counter set dict enumerate append zeros matrix keys range values len update get_all_node_num get_edge_attr_dim get_node_attr_dim get_node_label_num is_node_labeled get_edge_label_num any get_all_edge_num is_edge_labeled Graph add_edge parse Graph text iter getroot add_node str list SubElement Element write nodes close dict edges ElementTree keys __name__ open add_edge list items Graph transpose tolist nonzero zip append loadmat add_node enumerate int add_edge add_node strip splitlines listdir enumerate split loadFromDS loadTXT strip loadGXL list dirname getroot iter append range parse splitlines loadFromXML pop loadSDF tqdm loadMAT split len parse dirname getroot iter append loadGXL replace splitlines dirname loadCT split append loadGXL float range len dirname makedirs __name__ exp sum array len k1 k2 k1 k2 delete where clf Pool list tolist len strftime colorbar imshow savefig append sum range format partial loadDataset close estimator copy mean lower imap_unordered __name__ enumerate load join time isinstance print ParameterGrid tqdm any amin std amax makedirs SVC accuracy_score list len uniform append train_test_split range KernelRidge KFold predict RandomState copy mean sqrt enumerate int mean_squared_error split zeros array fit trial_do format print len delete estimator copy colorbar imshow any savefig clf append range enumerate load tolist items sorted format list print OrderedDict tabulate cpu_count int list parallel_me combinations_with_replacement range len list shortest_path zeros keys len add_edge list number_of_nodes Graph nodes add_nodes_from range floyd_warshall_numpy update add_edge Graph graph convert_node_labels_to_integers nodes add_nodes_from to_directed edges add_node update add_edge product DiGraph edges add_node deepcopy list items add_edge DiGraph is_directed Graph nodes edges add_node values set values set int openblas_set_num_threads set_num_threads get_num_threads
# www21 The Implemention of paper "Mask-GVAE: Blind Denoising Graphs via Partition"<sup>[1]</sup>. It is accepted by the WWW 2021: International World Wide Web Conferences . ![Mask-GVAE](https://github.com/halimiqi/www21/blob/master/Mask-GVAE_model.png) ## Usage To train the Mask-GVAE model, please run the *main_budget.py* as `python main_budget.py` The default dataset is PTC_MR with noise edges added. To change the other dataset, please run `python main_budget.py --dataset=[Your dataset index]`. For the modification of other parameters, please visit the main_budget.py. ## Environment The model is implemented based on python=3.6.7 and tensorflow=1.13. Other requirements of the enviorment is listed in *requirements.txt*. ## Setting
2,255
hankcs/multi-criteria-cws
['chinese word segmentation']
['Effective Neural Solution for Multi-Criteria Word Segmentation']
convert_corpus.py official_scorer.py statistics.py make_dataset.py utils.py model.py make_joint_corpus extract_conll convert_sxu convert_cncorpus remove_pos convert_all_sighan2008 split_train_dev convert_sighan2008_dataset convert_ctb normalize convert_zhuxian make_bmes preprocess convert_sighan2005_dataset to_sentence_list convert_file combine_files convert_all_sighan2005 convert_conll bmes_tag read_file add_word BiLSTM_CRF pick_subset init_logger expand_instances eprint analysis count convert_instance get_chunks read_pretrained_embeddings evaluate_file CWSEvaluator to_tag_strings append_tags evaluate_bmes restore_sentence split_tagstring bmes_to_index to_id_list NEREvaluator sortvals make_sure_path_exists combine_bmes_to_raw get_chunk_type bmes_tag minibatches CSVLogger is_dataset_tag get_processing_word bmes_to_words Progbar ord append sub split update add set preprocess append remove exists make_sure_path_exists bmes_tag make_sure_path_exists convert_file format split_train_dev make_sure_path_exists convert_file format split_train_dev format print convert_file split_train_dev make_bmes make_sure_path_exists format print convert_file make_bmes combine_files make_sure_path_exists remove_pos format print convert_file make_bmes combine_files make_sure_path_exists remove_pos format print convert_file make_bmes combine_files make_sure_path_exists format print convert_file make_bmes combine_files extract_conll make_sure_path_exists remove format dirname exists append_tags makedirs print make_bmes convert_sighan2005_dataset format print convert_sighan2008_dataset make_bmes format Counter setFormatter format getLogger addHandler StreamHandler Formatter mkdir setLevel INFO FileHandler append append len append sentence extend enumerate print Counter format print len set sum keys values count items list uniform iter next array values len append strip split append range len append zip append get_chunk_type enumerate append enumerate CWSEvaluator list zip print NEREvaluator result items list len makedirs
# multi-criteria-cws Codes and corpora for paper "[Effective Neural Solution for Multi-Criteria Word Segmentation](https://arxiv.org/abs/1712.02856)" (accepted & forthcoming at SCI-2018). ### Dependency * Python3 * dynet ## Quick Start Run following command to prepare corpora, split them into train/dev/test sets etc.: ```bash python3 convert_corpus.py ```
2,256
hanselowski/embedding_decomp
['word embeddings']
['Analyzing Structures in the Semantic Vector Space: A Framework for Decomposing Word Embeddings']
utils/tree.py utils/methods.py utils/corpuscont.py utils/AbstractBranch.py abstractBranches findIndx root_branches store_corpus retrieve_corpus unit find_sim_set find_sim_cos length find_insts find_vecs cosine find_sim root_branches min_proj_vec sort_disct hyper_test Tree append str print findIndx Tree root zeros range append len list print len root Tree append keys range split close write open append lower length dot items sorted list unit print reversed dot range str sorted unit print reversed cosine range values print unit append list items sorted length min dot list print reversed cosine sort_disct keys values norm cosine items sorted list unit print length reversed lower cosine append hyper_test range
hanselowski/embedding_decomp
2,257
hao-cheng/dynamic_speaker_model
['text generation']
['A Dynamic Speaker Model for Conversational Interactions']
src/eval_user_model.py src/model/user_model_helper.py data_script/swda_utils/treebank_work_detokenizer.py src/model/__init__.py src/model/model_helper.py src/model/nn_helper.py src/__init__.py data_script/swda_utils/swda_functions.py data_script/process_predictor_data.py src/model/tagger_model_helper.py src/model/py_data_lib/__init__.py src/model/hierarchical_predictor_model.py src/model/hierarchical_user_model.py src/model/configure.py src/model/configure_helper.py data_script/swda_utils/swda.py src/train_user_model.py src/eval_tagger_model.py src/model/py_data_lib/data_interface.py src/train_tagger_model.py src/model/sequence_model_helper.py data_script/swda_utils/analyze_corpus.py src/model/attention_cell.py update_user_dialog extract_caller_dialog merge_two_party_user_dialog assert_caller_attribute main merge_utterance_based_on_act_tag extract_utterances_by_damsl_act_tag save_utterances_by_raw_act_tag extract_utterances_by_raw_act_tag extract_conversations save_utterances_by_damsl_act_tag CorpusReader Utterance Metadata Transcript count_matches tag_counts act_tags_and_rootlabels swda_education_region TreebankWordDetokenizer main main main main AttentionCell TaggerModelConfiguration UserModelConfiguration UserModelConfig TaggerModelConfig RNNConfig OptConfig int_str2bool convert_str_by_type convert_optional_str_by_type HierarchicalPredictorModel HierachicalUserModel build_optimizer compute_and_apply_gradient layer_normalize bilinear_attention layer_norm_fully_connected_layer single_directional_lstm build_embeddings fusion_network bilstm_sequence_representation_model highway_net build_sequence_encoder_network build_rnn_sentence_representation build_unidirectional_sequence_representation recurrent_attention_predictor build_sequence_generation_network compute_sequence_xentropy_loss train_model eval_model restore_model _build_initializer softmax run_epoch train_model _build_initializer run_epoch eval_model Token index_sentence DialogActDataContainer index_user_dialog_with_dialog_act UserDialog DataContainer Sentence read_vocab TwoPartyDialog write_jsonable_object_to_file index_sentence_w_dialog_act index_user_dialog read_two_party_dialog read_user_dialog text_words join parse_from_text_sentence format print text swda_filename search damsl_act_tag assert_caller_attribute sub nlp Sentence append pop tokens print sentences append len topic gender list sentences education parse_from_json_string session_id Sentence append TwoPartyDialog to_json_string dialect len iter_transcripts from_caller_education merge_two_party_user_dialog session_id from_caller_sex transcript_index to_caller_dialect_area append utterances CorpusReader update_user_dialog format conversation_no topic_description from_caller_dialect_area to_caller_education print UserDialog to_caller_sex merge_utterance_based_on_act_tag config ArgumentParser out_basedir seek exit extract_caller_dialog parse_known_args readfp SafeConfigParser split_dialog getattr parse_args set_defaults StringIO update format SEEK_SET mkdir vars items read join print add_argument write dict swda_basedir len CorpusReader join list defaultdict items iter_transcripts Counter pos_lemmas lower append utterances join str format list items write close sort_values append most_common DataFrame open CorpusReader join list defaultdict items iter_transcripts Counter pos_lemmas lower append utterances join str format list items write close sort_values append most_common DataFrame open CorpusReader join format iter_transcripts caller write close conversation_no pos_lemmas lower append utterances open CorpusReader items sorted defaultdict list iter_transcripts print CorpusReader items sorted defaultdict list print iter_utterances CorpusReader defaultdict tree_is_perfect_match print iter_utterances writer CorpusReader tree_is_perfect_match writerow iter_utterances open MacIntyreContractions model_indir eval_model parse_from_txt_file eval_data_filename print_usage TaggerModelConfig UserModelConfig pretrain_model_dir model_outdir train_data_filename update_user_model_related_parameter pretrain_model_config TaggerModelConfiguration save_model_dir rnn_param_config train_model parse_from_dict UserModelConfiguration type_func print AdamOptimizer GradientDescentOptimizer list print clip_by_global_norm apply_gradients zip compute_gradients CoupledInputForgetGateLSTMCell BasicLSTMCell fully_connected sparse_softmax_cross_entropy_with_logits exp max print variance_scaling_initializer random_uniform_initializer truncated_normal_initializer get_checkpoint_state model_checkpoint_path restore update time format eval_func concatenate print train_or_eval_model dict shape infer_model softmax extract_batches unique append argmax print ConfigProto format DialogActDataContainer ConfigProto DialogActDataContainer get_global_step min max run DataContainer DataContainer dict get word_form tokens get word_form tokens sentence_label sentences index_sentence sentences index_sentence_w_dialog_act
# A Dynamic Speaker Model for Conversational Interactions This repository includes the codes and models for the paper [A Dynamic Speaker Model for Conversational Interactions](https://www.aclweb.org/anthology/N19-1284) for reproducing the experiment results on Switchboard Dialog Act classification. ``` @InProceedings{Cheng2019NAACL, author = {Hao Cheng and Hao Fang and Mari Ostendorf}, title = {A Dynamic Speaker Model for Conversational Interactions}, booktitle = {Proc. Annual Conference of the North American Chapter of the Association for Computational Linguistics (NAACL)}, year = {2019},
2,258
haofeixu/rdn4depth
['depth estimation']
['Region Deformer Networks for Unsupervised Depth Estimation from Unconstrained Monocular Videos']
prepare.py nets.py train.py dataset/align.py dataset/gen_data_kitti.py dataset/kitti_raw_loader.py util.py project.py inference.py reader.py evaluate.py dataset/gen_data_cityscapes.py model.py main mask_image_stack create_output_dirs _recursive_glob main collect_input_images _run_inference Model _relu decoder egomotion_net _residual_block_first _residual_block encoder_resnet encoder_simple decoder_simple disp_net region_deformer_net _conv _bn _resize_like encoder decoder_resnet main _axis_angle2mat spatial_transformer get_region_deformer_params region_deformer _pixel2cam _egomotion_axisangle2mat _bilinear_sampler _cam2pixel get_transform_mat rigid_residual_flow_warp compute_rigid_flow compute_residual_flow _meshgrid_abs inverse_warp _euler2mat _egomotion_vec2mat DataReader main train _recursive_glob collect_input_images natural_keys save_flags gray2rgb count_parameters make_intrinsics_matrix pack_pred_depths get_vars_to_save_and_restore crop_cityscapes get_imagenet_vars_to_restore save_image format_number sub2ind normalize_depth_for_display is_a_numpy_array generate_depth_map get_multi_scale_intrinsics read_file_data read_text_lines check_path load_image atoi get_seq_middle save_command info load_velodyne_points get_focal_length_baseline read_calib_file compute_errors get_seq_start_end align compute_mask_bbox_height align_segs compute_overlap crop gen_data_cityscapes dump_example concat_image_seq gen_data_kitti kitti_raw_loader median seg_postfix seg_dir resize max generate_depth_map logical_and mask read_file_data shape min_depth read_text_lines append imread range format pred_file astype copy mean load join kitti_dir max_depth print compute_errors test_file_list float32 int32 zeros len Supervisor Model Saver get_vars_to_save_and_restore expand_dims reduce tile read_text_lines dirname normpath _recursive_glob join relpath MakeDirs dirname append range len filter walk extend _run_inference device encoder decoder_selected decoder encoder_selected value _residual_block _residual_block_first constant get_shape batch_normalization gen_data_kitti img_height align_seg dump_root gen_data dataset_dir gen_data_cityscapes img_width align_segs seq_length spatial_transformer constant _pixel2cam ones reshape concat _cam2pixel transpose matmul shape _meshgrid_abs tile expand_dims ones_like spatial_transformer ones reshape transpose square matmul shape pow stack linspace tile expand_dims matrix_inverse _egomotion_axisangle2mat insert min len matmul append max range _egomotion_vec2mat shape cast int32 reshape constant _pixel2cam ones reshape transpose concat _cam2pixel matmul shape _meshgrid_abs tile expand_dims ones_like ones reshape transpose square matmul shape pow stack linspace tile expand_dims spatial_transformer reshape transpose shape _meshgrid_abs tile expand_dims matmul slice concat matmul ones_like ones reshape transpose concat float32 matmul cast linspace expand_dims ones concat cos pi clip_by_value sin zeros expand_dims norm squeeze matmul stack eye zeros equal _axis_angle2mat constant slice concat tile expand_dims constant slice squeeze concat tile expand_dims _euler2mat _bilinear_sampler cast float32 seed checkpoint_dir save_flags imagenet_ckpt save_command pretrained_ckpt set_random_seed summary_freq Model warning MakeDirs train train_steps global_step endswith Supervisor Saver get_vars_to_save_and_restore get_imagenet_vars_to_restore ConfigProto resize cmap astype float32 delete get_cmap read uint8 COLOR_BGR2RGB transpose fromstring IMREAD_COLOR imdecode resize cvtColor uint8 astype int gray2rgb clip int int is_a_numpy_array isinstance format_number get_shape list items name num_elements info trainable_variables list sorted remove replace basename name extend index warning list_variables info global_variables replace list_variables info join check_path makedirs join argv check_path stack array append stack make_intrinsics_matrix range load join replace squeeze read_text_lines save zeros enumerate maximum mean sqrt abs log format print isfile append split reshape set reshape read_calib_file int T sub2ind read_calib_file reshape hstack min dot shape vstack round eye zeros load_velodyne_points any sum compute_mask_bbox_height list remove zeros_like flatten unique float compute_overlap sorted format align replace concatenate endswith print glob save open array range len int float resize imwrite open str sorted basename list append imread range replace glob readlines close hstack mkdir float crop int join items print makedirs write zfill isfile len hstack enumerate join get_train_example_with_idx uint8 concat_image_seq print astype imsave makedirs seed endswith kitti_raw_loader listdir makedirs
## rdn4depth A new learning based method to estimate depth from unconstrained monocular videos without ground truth supervision. The core contribution lies in Region Deformer Networks (RDN) for modeling various forms of object motions by the bicubic function. More details can be found in our paper: >[Region Deformer Networks for Unsupervised Depth Estimation from Unconstrained Monocular Videos](https://arxiv.org/abs/1902.09907) > >[Haofei Xu](https://github.com/haofeixu), [Jianmin Zheng](http://www.ntu.edu.sg/home/asjmzheng/), [Jianfei Cai](http://www.ntu.edu.sg/home/asjfcai/) and [Juyong Zhang](http://staff.ustc.edu.cn/~juyong/) > >[IJCAI 2019](https://www.ijcai19.org) <p align="center"><img width=60% src="https://github.com/haofeixu/rdn4depth/blob/master/assets/demo.gif"></p> Any questions or discussions are welcomed! ## RDN
2,259
haotian-liu/yolact_edge
['real time instance segmentation', 'instance segmentation', 'semantic segmentation']
['YolactEdge: Real-time Instance Segmentation on the Edge']
pkg_usage.py yolact_edge/utils/augmentations.py yolact_edge/utils/tensorboard_helper.py run_coco_eval.py yolact_edge/data/youtube_vis.py yolact_edge/scripts/convert_darknet.py yolact_edge/inference.py train.py yolact_edge/scripts/augment_bbox.py yolact_edge/layers/modules/multibox_loss.py yolact_edge/data/flying_chairs.py yolact_edge/scripts/optimize_bboxes.py yolact_edge/layers/warp_utils.py yolact_edge/scripts/parse_eval.py yolact_edge/utils/logging_helper.py yolact_edge/layers/functions/detection.py data/scripts/mix_sets.py yolact_edge/scripts/cluster_bbox_sizes.py yolact_edge/utils/merge_model.py yolact_edge/data/sampler_utils.py yolact_edge/layers/interpolate.py yolact_edge/data/coco.py yolact_edge/layers/modules/optical_flow_loss.py yolact_edge/yolact.py yolact_edge/scripts/unpack_statedict.py yolact_edge/utils/__init__.py yolact_edge/utils/functions.py yolact_edge/scripts/plot_loss.py yolact_edge/backbone.py yolact_edge/utils/timer.py yolact_edge/data/config.py eval.py yolact_edge/layers/output_utils.py yolact_edge/utils/misc.py yolact_edge/utils/tensorrt.py yolact_edge/layers/__init__.py setup.py yolact_edge/scripts/compute_masks.py yolact_edge/layers/functions/__init__.py yolact_edge/scripts/bbox_recall.py yolact_edge/scripts/save_bboxes.py yolact_edge/layers/box_utils.py yolact_edge/data/__init__.py yolact_edge/scripts/make_grid.py yolact_edge/layers/modules/__init__.py prep_benchmark prep_metrics APDataObject get_transformed_cat calc_map Detections evalvideo prep_display CustomDataParallel print_maps evalimages parse_args savevideo prep_coco_cats get_coco_cat evalimage bbox_iou str2bool evaluate mask_iou badhash set_lr replace compute_validation_loss multi_gpu_rescale prepare_data setup_eval compute_validation_map train str2bool prepare_flow_data DarkNetBlock ConvBNAct DarkNetBackbone darknetconvlayer ResNetBackboneGN InvertedResidual VGGBackbone Bottleneck _make_divisible ResNetBackbone MobileNetV2Backbone construct_backbone YOLACTEdgeInference parse_args str2bool SPA FlowNetMiniTRT FPN FlowNetMiniPreConvs predict_flow conv Cat conv_bn_lrelu conv_relu FlowNetUnwrap conv_bn_relu FlowNetMiniTRTWrapper ShuffleCatAlt PredictionModuleTRT PredictionModule build_flow_convs FlowNetMini shuffle_cat NoReLUBottleneck deconv conv_only conv_bn conv_lrelu FlowNetMiniPredLayer Concat Yolact PredictionModuleTRTWrapper FPN_phase_1 FPN_phase_2 make_net deconv_no_relu ShuffleCatChunk ShuffleCat COCOAnnotationTransform get_label_map COCODetection Config set_cfg set_dataset FlyingChairs collate_fn_flying_chairs build_batch_data_sampler InfiniteSampler collate_fn_youtube_vis_eval collate_fn_youtube_vis get_label_map YoutubeVISAnnotationTransform YoutubeVISEval YoutubeVIS detection_collate index2d decode intersect log_sum_exp jaccard center_size match sanitize_coordinates point_form encode crop change InterpolateModule postprocess display_lincomb undo_image_transformation deform_op generate_grid_as tensor_as Detect MultiBoxLoss OpticalFlowLoss random_sample_crop intersect prep_box augment_boxes jaccard_numpy make_priors jaccard to_relative intersect process to_relative sigmoid mask_iou logit paint_mask add_randomize test_uniqueness randomize update_centery update_scale update_centerx add render export update_angle update_spacing optimize intersect compute_recall pretty_str jaccard compute_hits print_out to_relative make_priors step grabMAP plot_train smoother plot_val SwapChannels ComposeVideo ToTensor ToAbsoluteCoords RandomBrightness PhotometricDistort enable_if RandomSaturation Resize RandomRot90 BaseTransform RandomSampleCrop ToPercentCoords RandomFlip Pad intersect SSDAugmentation Lambda Compose FastBaseTransform ConvertColor BackboneTransform Expand jaccard_numpy RandomHue ConvertFromInts RandomMirror RandomContrast do_nothing PrepareMasks SSDAugmentationVideo BaseTransformVideo ToCV2Image RandomLightingNoise init_console ProgressBar SavePath MovingAverage log_once _ColorfulFormatter setup_logger is_distributed_initialized barrier get_world_size get_rank is_main_process SummaryHelper convert_to_tensorrt enable total_time enable_all start reset disable disable_all stop print_stats env seed output_web_json add_argument ArgumentParser set_defaults display_text top_k cuda FONT_HERSHEY_DUPLEX undo_image_transformation shape prod range cat LINE_AA reversed get_color cumprod display_bboxes putText min rectangle repeat numpy items view matmul t start stop crowd_func len set start output_coco_json stop push sum range iou_func add_gt_positives show imwrite imshow title unsqueeze output_coco_json float prep_display str join basename print glob evalimage mkdir enumerate VideoCapture eval_network transform_frame MovingAverage ThreadPool put cleanup_and_exit save video_multiframe CAP_PROP_FPS get_next_frame cuda get_avg video list apply_async exit add append get isdigit format asarray reversed Queue int time print extract_frame len VideoCapture CAP_PROP_FRAME_HEIGHT MovingAverage VideoWriter CAP_PROP_FPS CAP_PROP_FRAME_COUNT get_avg round VideoWriter_fourcc release add set_val range get FastBaseTransform total_time ProgressBar CAP_PROP_FRAME_WIDTH print reset prep_benchmark MovingAverage dump_web prep_metrics benchmark image DataLoader calc_map Detections evalvideo get_avg prep_display video show str list display evalimages add set_val imshow title eval_stride iter savevideo range dump prep_coco_cats max_images output_web_json total_time ProgressBar shuffle YoutubeVISEval evalimage zip enumerate fast_nms print sort mask_proto_debug enable_all reset output_coco_json disable split print_stats len class_names getLogger values print_maps get_ap info append sum range enumerate len info getLogger setattr getattr max_iter num_gpus batch_size tuple warmup_rescale lr save_interval add_images cos SGD clip seed SummaryHelper add_text name transpose get_interrupt iter prepare_flow_data Yolact convert_image info manual_seed random_seed start_iter item keys enumerate join time barrier setup_eval parameters step InfiniteSampler getLogger MovingAverage lr_warmup_until zero_grad DistributedDataParallel set_step DataLoader interpolate compute_validation_map MultiBoxLoss max build_batch_data_sampler is_video multi_gpu_rescale add train_flow ceil append init_process_group setup_logger set resume mkdir is_available FlyingChairs iteration disable_all array num_gpus backward_and_log save_folder deform_op joint cuda OpticalFlowLoss set_device next sum range save_path perf_counter COCODetection init_weights stack gamma net extra_loss max_memory_allocated remove get_latest criterion extend reset numpy delayed_settings add_scalar batch_size pi base_backward save_weights YoutubeVIS max_iter set_lr argv lr_warmup_init format replace load_weights lr is_distributed_initialized backward keep_latest prepare_data filter len param_groups Variable cuda Variable cuda parse_args int max selected_layers type max add_layer sum size permute view contiguous append encode_channels conv_lrelu enumerate eval replace eval append BatchSampler append enumerate append FloatTensor clamp size min expand max intersect expand_as size expand use_yolo_regressors size jaccard encode max range center_size log cat cat point_form max max min long clamp sanitize_coordinates size expand size expand_as faster_rcnn_scale sanitize_coordinates interpolate save min_size view mask_proto_mask_activation squeeze range size gt_ max_size float long crop mask_size use_tensorrt_safe_mode display_lincomb contiguous mask_proto_debug t index_select center_size preserve_aspect_ratio zeros numpy min_size faster_rcnn_scale subtract_means astype float32 preserve_aspect_ratio resize max_size normalize numpy array clip show exp size astype matmul t argsort imshow zeros float numpy range float clone expand size generate_grid_as permute grid_sample append prep_box concatenate random_sample_crop print uniform randint array minimum clip maximum intersect minimum maximum copy choice uniform float array range jaccard_numpy list range product zip shape tile reshape copy exp reshape draw_idle cos square pi imshow set_data tile sin clip render render render render render exp pi set_val uniform render test_uniqueness str set_text draw_idle stack append len randomize add clear str set_text print draw_idle stack save len sum print reshape astype int32 abs range max jaccard float make_priors x_func minimize size min compute_hits cat ndarray isinstance print pretty_str MovingAverage append get_avg range len show basename smoother plot xlabel ylabel title legend append show basename plot xlabel ylabel title legend init setattr getattr log getLogger setFormatter join format getLogger addHandler StreamHandler Formatter _ColorfulFormatter dirname colored open DEBUG setLevel makedirs is_distributed_initialized torch2trt_flow_net_int8 getLogger to_tensorrt_flow_net warning torch2trt_max_calibration_images has_trt_cached_module register_forward_hook calib_images to_tensorrt_protonet torch2trt_prediction_module_int8 trained_model torch2trt_backbone_int8 ceil range cat torch2trt_spa_int8 format pull_calib_dataset debug torch2trt_fpn_int8 disable_tensorrt to_tensorrt_prediction_head info setattr to_tensorrt_spa join remove torch2trt_protonet_int8 use_tensorrt_safe_mode to_tensorrt_backbone use_fp16_tensorrt any to_tensorrt_fpn split add remove clear append perf_counter stop print start pop format print total_time find max len
# YolactEdge: Real-time Instance Segmentation on the Edge ``` ██╗ ██╗ ██████╗ ██╗ █████╗ ██████╗████████╗ ███████╗██████╗ ██████╗ ███████╗ ╚██╗ ██╔╝██╔═══██╗██║ ██╔══██╗██╔════╝╚══██╔══╝ ██╔════╝██╔══██╗██╔════╝ ██╔════╝ ╚████╔╝ ██║ ██║██║ ███████║██║ ██║ █████╗ ██║ ██║██║ ███╗█████╗ ╚██╔╝ ██║ ██║██║ ██╔══██║██║ ██║ ██╔══╝ ██║ ██║██║ ██║██╔══╝ ██║ ╚██████╔╝███████╗██║ ██║╚██████╗ ██║ ███████╗██████╔╝╚██████╔╝███████╗ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚══════╝╚═════╝ ╚═════╝ ╚══════╝ ``` **YolactEdge**, the first competitive instance segmentation approach that runs on small edge devices at real-time speeds. Specifically, YolactEdge runs at up to 30.8 FPS on a Jetson AGX Xavier (and 172.7 FPS on an RTX 2080 Ti) with a ResNet-101 backbone on 550x550 resolution images. This is the code for [our paper](https://arxiv.org/abs/2012.12259).
2,260
haoxiangsnr/FullSubNet
['speech enhancement']
['FullSubNet: A Full-Band and Sub-Band Fusion Model for Real-Time Single-Channel Speech Enhancement']
audio_zen/acoustics/beamforming.py audio_zen/acoustics/filtebank.py audio_zen/model/base_model.py audio_zen/acoustics/utils.py audio_zen/model/module/sequence_model.py audio_zen/trainer/base_trainer.py recipes/dns_interspeech_2020/dataset_inference.py audio_zen/utils.py recipes/dns_interspeech_2020/dataset_train.py recipes/dns_interspeech_2020/fullband_baseline/trainer.py tools/calculate_metrics.py recipes/dns_interspeech_2020/fullband_baseline/model.py audio_zen/inferencer/base_inferencer.py recipes/dns_interspeech_2020/train.py audio_zen/loss.py recipes/dns_interspeech_2020/inference.py recipes/dns_interspeech_2020/dataset_validation.py audio_zen/dataset/base_dataset.py tools/preprocessing_dataset.py audio_zen/acoustics/feature.py audio_zen/constant.py audio_zen/metrics.py recipes/dns_interspeech_2020/fullsubnet/trainer.py recipes/dns_interspeech_2020/inferencer.py tools/delete_slience.py audio_zen/acoustics/mask.py audio_zen/model/module/causal_conv.py recipes/dns_interspeech_2020/fullsubnet/model.py audio_zen/model/module/feature_norm.py tools/find_wavs.py si_snr_loss NB_PESQ WB_PESQ STOI SI_SDR SDR _scale_bss_eval check_nan basename load_checkpoint set_requires_grad merge_config prepare_device expand_path print_tensor_info prepare_empty_dir initialize_module ExecutionTime mvdr_beamformer apply_crf_filter pmwf_mvdr apply_beamforming_vector MVDRBeamformer apply_beamformer_vector_at_utterance_level get_power_spectral_density_matrix trace get_power_spectral_density_matrix_with_mask_norm load_wav bark_to_hz DirectionalFeatureComputer drop_band batch_shuffle_frequency bark_filter_bank ChannelWiseLayerNorm mag_phase ChannelDirectionalFeatureComputer overlap_cat aligned_subsample hz_to_bark subsample norm_amplitude tailor_dB_FS is_clipped stft activity_detector istft inverse_filterbank apply_filterbank build_complex_ideal_ratio_mask compress_cIRM decompress_cIRM complex_mul transform_pesq_range BaseDataset BaseInferencer BaseModel TemporalBlock Chomp1d CausalConvBlock TemporalConvNet CausalTransConvBlock cumulative_norm CumulativeMagSpectralNorm _print_networks SequenceModel BaseTrainer Dataset Dataset Dataset main cumulative_norm Inferencer entry Model Trainer Model Trainer pre_processing get_basename compute_metric load_wav_paths_from_scp shrink_multi_channel_path main check_two_aligned_list main offset_and_limit T transpose solve dot log10 nan sum bss_eval_sources sum broadcast_arrays load basename print abspath splitext expanduser mkdir print join import_module getattr print parameters print set_deterministic device splitext einsum mean sum einsum size expand view reshape transpose matmul shape inverse eye view size trace inverse eye einsum einsum reshape dim shape complex cos sin abs max mean sqrt randint pad ndim append zeros randint len size split append cat enumerate int exp min log10 tailor_dB_FS sum len shape stack repeat gather arange shape index_select append range int hz_to_bark bark_to_hz print shape floor linspace zeros range reshape size transpose reshape size matmul stack square exp is_tensor log dtype arange cumsum reshape size square expand_as pow sqrt device sum print parameters enumerate initialize_module inferencer_class inferencer ndim seed init_process_group print set_device DistributedSampler train Adam trainer_class DataLoader manual_seed initialize_module append expanduser abspath append range len get_basename as_posix print load_wav_paths_from_scp absolute is_dir check_two_aligned_list find_files append zip enumerate export_dir pre_processing metric_types print sr absolute mean lower estimated reference prepare_empty_dir Dataset compute_metric split append enumerate
<div align="center"> <h1> FullSubNet </h1> <p> Full-Band and Sub-Band Fusion Model for Real-Time Single-Channel Speech Enhancement </p> <a href="https://github.com/haoxiangsnr/FullSubNet/"><img src="https://img.shields.io/badge/Platform-linux-lightgrey" alt="version"></a> <a href="https://github.com/haoxiangsnr/FullSubNet/"><img src="https://img.shields.io/github/stars/haoxiangsnr/FullSubNet?color=yellow&amp;label=FullSubNet&amp;logo=github" alt="Generic badge"></a> <a href='https://fullsubnet.readthedocs.io/en/latest/?badge=latest'>
2,261
harhro94/T-CorEx
['time series']
['Efficient Covariance Estimation from Temporal Data']
scripts/run_syn_smooth.py tcorex/experiments/misc.py tcorex/covariance.py tests/test_corex.py scripts/blessing_of_dimensionality.py scripts/run_stocks.py tests/test_tcorex.py scripts/run_syn_sudden.py tcorex/experiments/vis_utils.py tcorex/base.py tcorex/__init__.py tcorex/experiments/data.py scripts/run_portfolio_optimization.py tcorex/corex.py scripts/scalability-plot.py examples/sample_run.py tcorex/experiments/fmri_utils.py scripts/append_json.py setup.py tcorex/experiments/baselines.py tcorex/tcorex.py tcorex/tcorex_learnable.py main main main main main main main load g TCorexBase mean_impute save to_numpy g_inv get_u_from_w Corex get_w_from_u _compute_diff_row_norms _inverse compute_diff_row_norms _diag_from_left _diag_from_right calculate_nll_score frob_diffs_given_factors _compute_diff_norm_fro _compute_inverses diffs _estimate_diff_norm spectral_diffs_given_factors reorder TCorex TCorexLearnable entropy Diagonal SparsePCA FactorAnalysis TCorex GroundTruth PCA GraphLasso Baseline BigQUIC LVGLASSO OAS QUIC LinearCorex LTGL TimeVaryingGraphLasso LedoitWolf sample_from_modular generate_modular generate_general modular_sufficient_params make_buckets generate_approximately_modular load_modular_sudden_change load_trading_economics load_sp500 load_modular_smooth_change modular_matrix_from_params plot_clusters_probabilistic plot_most_important compute_variance_of_cluster plot_least_varying plot_clusters plot_biggest make_sure_path_exists plot_for_next_timestep plot_cov_matrix test_corex test_tcorex_on_synthetic_data test_tcorex_real_data TCorex format subplots set_title plot print get_covariance set_xlabel clusters colorbar select load_modular_sudden_change imshow diffs savefig set_ylabel save fit adjusted_rand_score generate_approximately_modular ArgumentParser PyCorex output_dir argmax snr str n_observed Corex parse_args set_defaults n_hidden n_samples choice make_sure_path_exists join add_argument repeat float64 train_cnt qp linspace load_sp500 exists percentile name ones val_cnt shape savetxt prefix nt concatenate start_period astype mean matrix date noise_var len start_date end_date test_cnt commodities evaluate log_return data_type max_std n_segments load_modular_smooth_change min_std bs m shuffle timeit min set add nvs append tanh clip arctanh clip T where mean nan append enumerate len cpu requires_grad detach format print make_sure_path_exists dirname ws to_numpy get_weights len append norm range len sorted list range len shape range zeros_like shape range zeros_like T _diag_from_right inv dot shape eye cholesky _inverse sum range len normal T norm reshape dot range format print _compute_inverses _estimate_diff_norm range len svd T norm dot trace inner sum format print _compute_diff_norm_fro _compute_inverses range len T dot shape zeros sum range _compute_diff_row_norms format print _compute_inverses range len normal ones sign sqrt uniform zeros range len zeros array modular_matrix_from_params modular_sufficient_params int normal ones choice sqrt append zeros array range make_spd_matrix list reshape shuffle zeros range seed reshape generate_modular range seed multivariate_normal append zeros float range modular_matrix_from_params concat drop fillna seed list columns sorted dirname append fit_transform range shuffle pivot_table zip join sort_index print read_pickle dropna StandardScaler array read_csv len drop fillna seed list columns sorted dirname append fit_transform range shuffle pivot_table join sort_index print read_pickle dropna StandardScaler array len list append array range enumerate len print argsort scatter figure gca max range print copy argsort scatter figure gca sum max range print argsort scatter figure gca sum max range int plot_prob_atlas shape Nifti1Image zeros range int shape Nifti1Image zeros range dirname makedirs show colorbar imshow title figure show list format xlabel print ylabel mean bar title ylim xticks range len load join list format calculate_nll_score print get_covariance tqdm mean realpath shape Corex dirname append range fit load join list format TCorex calculate_nll_score print get_covariance tqdm mean realpath shape dirname append range fit load join list format TCorex calculate_nll_score print get_covariance tqdm mean realpath shape dirname append range fit
# Correlation Explanation Methods Official implementation of linear correlation explanation (linear CorEx) and temporal correlation explanation (T-CorEx) methods. #### Linear CorEx Linear CorEx searches for independent latent factors that explain all correlations between observed variables, while also biasing the model selection towards modular latent factor models – directed latent factor graphical models where each observed variable has a single latent variable as its only parent. This is useful for covariance estimation, clustering related variables, and dimensionality reduction, especially in the high-dimensional and under-sampled regime. The complete description of the method is presented in NeurIPS 2019 [paper](https://papers.nips.cc/paper/9691-fast-structure-learning-with-modular-regularization) *"Fast structure learning with modular regularization"* by Greg Ver Steeg, Hrayr Harutyunyan, Daniel Moyer, and Aram Galstyan. If you want to cite this paper, please use the following BibTex entry:
2,262
harish2704/pottan-ocr
['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']
pottan_ocr/dataset.py pottan_ocr/custom_training.py pottan_ocr/ocr_hocr.py pottan_ocr/model.py pottan_ocr/string_converter.py pottan_ocr/custom_dataset.py pottan_ocr/ocr_server.py pottan_ocr/data_gen.py pottan_ocr/train.py pottan_ocr/utils.py resize_img get_bg_value CustomDataset compute_pred_size read_from_zip WeightsSaver ctc_lambda_func renderText getTrainingTexts TextDataset main DataGen threadInitializer processInThread KerasCrnn main resize_img ocr_images resize_img ocr_images do_ocr OcrTask main encodeStrList decodeStr encodeStr encodeStrListRaw decodeStrList WeightsSaver ctc_lambda_func DataGenerator showImg normalizeBatch normaizeImg averager readYaml loadTrainedModel writeFile myOpen dump_graph_old writeJson dump_graph readJson readLines readFile int size BILINEAR resize get_config list from_config tuple unique set_font_description set_text random get_data set_size get_font_description resize font_description_from_string get_size FORMAT_A8 rotate width create_layout Context height create_context show_layout astype choice FontDescription get_pixel_extents ImageSurface int invert uint8 BILINEAR translate atan array readLines __getitem__ TextDataset DataGen print output createDataset testencoding input testEncoding Bidirectional Reshape Sequential add Dense ZeroPadding2D MaxPooling2D TimeDistributed convRelu LSTM decodeStr append argmax array predict writeFile readFile crnn hocr resize_img load_model pq append encode get value replace ocr_images getchildren zip crop remove convert max int imageFile cleanFiles getOcrResult jsonify getLineSegs add OcrTask save makedirs append extend encodeStr list zip append decodeStr create_file_writer graph FileWriter show imshow expand_dims astype list stack zip load list print keys cuda load_state_dict crnn
## Notice: This project is not relevent anymore since latest version of tesseract ocr is using same technology ( CNN-RNN models ) and it is capable of detecting complex scripts with very high accuracy . A web demo of latest tesseract ocr can be seen in the link given below https://harish2704.github.io/ml-tesseract-demo/ [![Join the chat at https://gitter.im/pottan-ocr/Lobby](https://badges.gitter.im/pottan-ocr/Lobby.svg)](https://gitter.im/pottan-ocr/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) # pottan-ocr A stupid OCR for malayalam language. It can be Easily configured to process any other languages with complex scripts ## Client side web Demo of individual line recognition https://harish2704.github.io/pottan-demo/ ## Screenshot of complete page OCR ![Screenshot](https://i.imgur.com/CqeBYox.png) ## Installation
2,263
harishpuvvada/BitCoin-Value-Predictor
['sentiment analysis', 'stock market prediction']
['Sentiment Analysis of Twitter Data for Predicting Stock Market Movements']
Data_Extraction.py
# BitCoin-Value-Predictor ## Abstract: The project attempts to predict the future value of Bitcoins by identifying the correlation between social media sentiment and market sentiment. We will achieve this by collecting user feeds from social media such as twitter, facebook and linkedin. Once we have our corpus we will map their associated sentiments using IBM Watson’s Natural Language Understanding API. While mapping sentiments to our corpus we attempt to capture granular level categories namely joy, anger, happiness, etc. We use these as feature vectors to our ML/DL algorithms. Then we compare the results of the different algorithms and choose the one with the best accuracy score. ## Technologies: * Programming Languages: Python, Java * Big data technologies: Spark ML, Spark-SQL, Hadoop Mapreduce * Libraries: Pandas, Matplotlib, Scikit-learn, TensorFlow , Keras ## Data Sources: 1. Twitter Api to get the tweets about BitCoins/Cryptocurrencies. 2. LinkedIn Api to get the corpus on blogs.
2,264
harsh19/SPINE
['word embeddings', 'denoising']
['SPINE: SParse Interpretable Neural Embeddings']
code/evaluation/visualization/visualize_online.py code/evaluation/extrinsic_downstream/newsgroups/classify.py code/evaluation/extrinsic_downstream/np_bracketing/get_data.py code/model/model.py code/evaluation/extrinsic_downstream/TREC/create_data.py code/evaluation/extrinsic_downstream/np_bracketing/classify_bracketing.py code/evaluation/intrinsic/evaluate_wordSim.py code/evaluation/extrinsic_downstream/TREC/classify.py code/model/utils.py code/evaluation/extrinsic_downstream/newsgroups/get_newsgroup_data.py code/model/main.py loadVectors getFeats trainAndTest getOneHot main get_everything get_Xy loadVectors getFeats trainAndTest getOneHot main loadVectors getFeats trainAndTest getOneHot main get_label read_lines get_Xy evaluate loadData loadTestData getSimilarityScoreForWords getSimilarity load_vectors find_top_participating_dimensions load_top_dimensions main Solver SPINEModel get_noise_features compute_sparsity DataHandler dump_vectors print readlines split array len zeros zeros enumerate score print fit load int loadVectors print trainAndTest append array open word_tokenize lower append range len int dump fetch_20newsgroups print get_Xy open len array extend max get_label print readlines array readlines print loadData loadTestData spearmanr array time sorted print readlines close tqdm split open enumerate append len append print range len print append str getWordsList dump_vectors info vars train getSpineEmbeddings Solver parse_args count_nonzero size str print len write close range open make_blobs
## SPINE: SParse Interpretable Neural Embeddings SPINE is a tool to transform existing representations into more interpretable ones. It is a novel extension of the k-sparse autoencoder that is able to enforce stricter sparsity constraints. It is highly expressive and facilitates non-linear transformations in contrast to existing linear matrix factorization based approaches. [Link to our AAAI 2018 paper](https://arxiv.org/pdf/1711.08792.pdf) <center><img src="images/autoencoder.png"</center> <center>A k-sparse autoencoder. For an input X, an autoencoder attempts to construct an output X' at its output layer that is close to X. In a k-sparse autoencoder, only a few hidden units are active for any given input (denoted by the colored units in the figure).</center> ### Requirements python 3 </br> numpy <br> pytorch 0.3 (along with torchvision) <br> tqdm
2,265
harshit17chaudhary/SML_assignment_1
['data augmentation']
['DENSER: Deep Evolutionary Network Structured Representation']
utils/helper.py configs.py benchmark/convnet.py app.py benchmark/runner.py utils/argparser.py utils/mnist_reader.py visualization/project_zalando.py start_s3_sync get_json_logger touch touch_dir _get_logger main cnn_model_fn PredictJob JobWorker JobManager get_args_request parse_arg get_args_cli now_int upload_result_s3 get_sprite_image invert_grayscale create_sprite_image vector_to_matrix_mnist UploadS3Thread load_mnist UploadS3Thread start Event dirname makedirs makedirs setFormatter touch_dir DEBUG getLogger addHandler StreamHandler Formatter touch setLevel INFO FileHandler setFormatter getLogger addHandler Formatter touch setLevel INFO FileHandler dense max_pooling2d dropout one_hot minimize reshape GradientDescentOptimizer conv2d softmax_cross_entropy asarray evaluate print Estimator shuffle labels images numpy_input_fn train range read_data_sets int append items list defaultdict utcfromtimestamp info int isinstance ones sqrt ceil array range vector_to_matrix_mnist invert_grayscale join
# Fashion-MNIST [![GitHub stars](https://img.shields.io/github/stars/zalandoresearch/fashion-mnist.svg?style=flat&label=Star)](https://github.com/zalandoresearch/fashion-mnist/) [![Gitter](https://badges.gitter.im/zalandoresearch/fashion-mnist.svg)](https://gitter.im/fashion-mnist/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link) [![Readme-CN](https://img.shields.io/badge/README-中文-green.svg)](README.zh-CN.md) [![Readme-JA](https://img.shields.io/badge/README-日本語-green.svg)](README.ja.md) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Year-In-Review](https://img.shields.io/badge/%F0%9F%8E%82-Year%20in%20Review-orange.svg)](https://hanxiao.github.io/2018/09/28/Fashion-MNIST-Year-In-Review/) <details><summary>Table of Contents</summary><p> * [Why we made Fashion-MNIST](#why-we-made-fashion-mnist) * [Get the Data](#get-the-data)
2,266
harvardnlp/botnet-detection
['graph learning']
['Automating Botnet Detection with Graph Neural Networks']
botdet/data/url_utils.py botdet/data/dataset_botnet.py botdet/data/data_utils.py botdet/optim/train_utils.py test_botnet_dataloader.py botgen/botnetGenerator.py botdet/optim/earlystop.py botdet/models_pyg/graph_attention.py botdet/models_pyg/common.py test_botnet_dataset.py botdet/eval/evaluation.py botgen/synthesize_botnet.py botdet/eval/metrics.py botdet/models_pyg/gcn_base_models.py botdet/data/dataloader.py botgen/background.py botgen/download_pcap.py train_botnet.py setup.py botdet/models_pyg/gcn_model.py UploadCommand parse_args train GraphDataLoader files_exist BotnetDataset sub_dict_ft sub_dict build_graph_from_dict_nx h5group_to_dict build_graph_from_dict_pyg build_graph_from_dict_dgl decide_download makedirs download_url extract_tar maybe_log dict_value_add PygRandomPredictor PygModelPredictor eval_predictor eval_metrics dict_value_div true_positive false_negative_rate false_positive_rate false_negative accuracy false_positive precision f1_score recall true_negative scatter_ softmax activation Identity NodeModelBase NodeModelMLP EdgeGateFree EdgeGateProj NodeModelAdditive GCNModel GCNLayer NodeModelAttention EarlyStopping time_since logging_config prepare_background write_single_graph search_dict ip2int parse_args download_and_decompress kadem write_botnet binarySearch chord debru leet add_argument ArgumentParser model logging edge_index zero_grad eval_predictor save device save_dir epochs early_stopper save_name to early_stop range PygModelPredictor improved info long enumerate load join time criterion backward EarlyStopping step x Data add_nodes DGLGraph add_edges list add_edges_from Graph add_nodes_from zip range float urlopen int expanduser normpath join print urlopen exists makedirs print maybe_log f1_score false_negative_rate false_positive_rate isinstance astype accuracy precision Tensor recall numpy roc_auc_score predictor y dict_value_add eval_metrics dict_value_div len true_positive item recall precision ModuleDict format getattr op isinstance exp item join setFormatter format getLogger handlers getcwd print min addHandler StreamHandler removeHandler Formatter setLevel FileHandler makedirs time floor create_dataset int ip_address len join strptime len File close apply write_single_graph drop_duplicates read_csv drop rename system len sample append range enumerate int list product sample ceil range log append len sample int range log int len list sort binarySearch sample range join list T File tolist hstack close set write_single_graph sample range len
# botnet-detection [![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE) [![Paper](http://img.shields.io/badge/paper-arxiv.2003.06344-B31B1B.svg)](https://arxiv.org/abs/2003.06344) Topological botnet detection datasets and automatic detection with graph neural networks. <!--The graphs are of relatively large scale and featureless. Each dataset contains a specific botnet topology, with 960 graphs in total, randomly split to train/val/test sets. There are labels on both nodes and edges indicating whether they were in the botnet (evil) community. Learning tasks could target at predicting on nodes to detect whether they are botnet nodes, or recovering the whole botnet community by also predicting on edges as whether they belong to the original botnet.--> <p align="left"> <img width="30%" src=./pictures/p2p.png /> </p> A collection of different botnet topologyies overlaid onto normal background network traffic, containing featureless graphs of relatively large scale for inductive learning. ## Installation
2,267
harvardnlp/im2markup
['optical character recognition']
['Image-to-Markup Generation with Coarse-to-Fine Attention']
scripts/evaluation/evaluate_text_edit_distance.py scripts/evaluation/render_latex.py scripts/utils/image_utils.py scripts/utils/utils.py scripts/evaluation/render_html.py scripts/evaluation/LevSeq.py scripts/preprocessing/preprocess_filter.py scripts/preprocessing/preprocess_formulas.py scripts/evaluation/evaluate_bleu.py scripts/preprocessing/preprocess_images.py scripts/preprocessing/generate_latex_vocab.py scripts/evaluation/evaluate_image.py main process_args main process_args img_edit_distance img_edit_distance_file main process_args StringMatcher main process_args main_parallel main process_args output_err main_parallel main process_args main process_args main is_ascii process_args main process_args main_parallel downsample_image pad_group_image crop_image run parse_args add_argument ArgumentParser check_output process_args setLevel open basicConfig addHandler label_path dirname setFormatter close StreamHandler realpath info INFO join result_path setdefault write data_path Formatter basename glob img_edit_distance_file float images_dir int uint8 asarray join transpose StringMatcher astype levenshtein get_opcodes append make_strs enumerate convert exists set_defaults map ThreadPool num_threads output_dir makedirs remove system readlines info output_err replace exists end strip finditer crop_image run sorted list append keys image_dir filter output_path decode remove move error call output_file input_file pad_group_image downsample_image info len buckets postfix loads input_dir downsample_ratio crop_blank_default_size pad_size max asarray convert min where save crop new paste save open range len LANCZOS size save resize open communicate start Popen Timer
# im2markup A general-purpose, deep learning-based system to decompile an image into presentational markup. For example, we can infer the LaTeX or HTML source from a rendered image. <p align="center"><img src="https://im2markup.yuntiandeng.com/network.png" width="400"></p> An example input is a rendered LaTeX formula: <p align="center"><img src="https://im2markup.yuntiandeng.com/results/website/images/119b93a445-orig.png"></p> The goal is to infer the LaTeX formula that can render such an image: ``` d s _ { 1 1 } ^ { 2 } = d x ^ { + } d x ^ { - } + l _ { p } ^ { 9 } \frac { p _ { - } } { r ^ { 7 } } \delta ( x ^ { - } ) d x ^ { - } d x ^ { - } + d x _ { 1 } ^ { 2 } + \; \cdots \; + d x _ { 9 } ^ { 2 } ``` Our model employs a convolutional network for text and layout recognition in tandem with an attention-based neural machine translation system. The use of attention additionally provides an alignment from the generated markup to the original source image:
2,268
harvardnlp/neural-template-gen
['text generation']
['Learning Neural Templates for Text Generation']
chsmm.py infc.py data/make_e2e_labedata.py template_extraction.py data/make_wikibio_labedata.py utils.py data/utils.py labeled_data.py gen_from_src align_stuff gen_from_srctbl HSMM test make_masks get_uniq_fields train make_combo_targs label_train just_bwd bwd_from_fwd_obs_logprobs viterbi recover_bps just_fwd SentenceCorpus Dictionary remap_eos_states just_state2phrases extract_from_tagged_data align_cntr group_by_template topk_phrases logsumexp0 make_bwd_constr_idxs logsumexp1 beam_search2 logsumexp2 backtrace vlogsumexp calc_pur make_fwd_constr_idxs backtrace3 stupid_search get_first_sent_tokes print_data print_data stupid_search splitphrs get_wikibio_poswrds get_e2e_poswrds get_e2e_fields get_wikibio_fields copy_ size range fill_ fill_ size copy_ max enumerate float size expand div_ data just_bwd add_ zero_grad cuda clip L randperm ngen_types encode sum range trans_logprobs len_logprobs obs_logprobs size get_uniq_fields clip_grad_norm make_combo_targs backward Variable print min max_mbs_per_epoch pad_idx parameters make_masks step len just_bwd valid cuda L ngen_types encode sum range trans_logprobs len_logprobs obs_logprobs size eval get_uniq_fields make_combo_targs Variable print pad_idx make_masks len data cuda L ngen_types encode range trans_logprobs bwd_from_fwd_obs_logprobs len_logprobs obs_logprobs size get_uniq_fields make_combo_targs viterbi print ar Variable pad_idx make_masks train len data unsqueeze verbose cuda Counter encode sum range trans_logprobs len_logprobs h0_lin LongTensor size gen_one get_uniq_fields items Variable ar print ar_after_decay pad_idx gen_one_ar len data valid floor extract_from_tagged_data gen_from_srctbl tagged_fi get_e2e_poswrds range bsz size eval gen_on_valid float enumerate int print get_wikibio_poswrds thresh ntemplates split len data extract_from_tagged_data cuda defaultdict tagged_fi L get_e2e_poswrds ngen_types encode append range bsz update trans_logprobs bwd_from_fwd_obs_logprobs len_logprobs obs_logprobs size set eval get_uniq_fields make_combo_targs items idx2word viterbi Variable get_wikibio_poswrds pad_idx thresh ntemplates make_masks train len append size max range max sub_ fill_ size new min add_ squeeze expand copy_ transpose stack index_fill_ zero_ append long range len logsumexp0 arange fill_ view size new min transpose expand copy_ stack index_fill_ zero_ range logsumexp0 Variable size min new expand logsumexp2 stack index_fill_ zero_ range copy_ size range fill_ defaultdict tuple add set append max enumerate len items list defaultdict div_ Tensor sum enumerate SentenceCorpus print just_state2phrases train group_by_template range len list sorted zip items float sum values exp view size unsqueeze expand_as sum max log exp view size unsqueeze expand_as sum max log exp expand_as sum max log max update min extend range len update min extend max range len append append add_ copy_ mlpinp K cuda is_cuda topk view fill_ L expand_as append range cat one_rnn LongTensor word2idx size genset zero_ idx2word log_ Variable backtrace collapse_word_probs inpmlp out_features cpu zeros narrow list std print mean append float sum max values index items all append range len append min sort extend set splitphrs join get_wikibio_fields print stupid_search len append listdir range split append defaultdict append join defaultdict split int join split
# neural-template-gen Code for [Learning Neural Templates for Text Generation](https://arxiv.org/abs/1808.10122) (Wiseman, Shieber, Rush; EMNLP 2018) For questions/concerns/bugs please feel free to email swiseman[at]ttic.edu. **N.B.** This code was tested with python 2.7 and pytorch 0.3.1. ## Data and Data Preparation The E2E NLG Challenge data is available [here](http://www.macs.hw.ac.uk/InteractionLab/E2E/), and the preprocessed version of the data used for training is at [data/e2e_aligned.tar.gz](https://github.com/harvardnlp/neural-template-gen/blob/master/data/e2e_aligned.tar.gz). This preprocessed data uses the same database record preprocessing scheme applied by Sebastian Gehrmann in his [system](https://github.com/sebastianGehrmann/OpenNMT-py/tree/diverse_ensemble), and also annotates text spans that occur in the corresponding database. Code for annotating the data in this way is at [data/make_e2e_labedata.py](https://github.com/harvardnlp/neural-template-gen/blob/master/data/make_e2e_labedata.py). The WikiBio data is available [here](https://github.com/DavidGrangier/wikipedia-biography-dataset), and the preprocessed version of the target-side data used for training is at [data/wb_aligned.tar.gz](https://github.com/harvardnlp/neural-template-gen/blob/master/data/wb_aligned.tar.gz). This target-side data is again preprocessed to annotate spans appearing in the corresponding database. Code for this annotation is at [data/make_wikibio_labedata.py](https://github.com/harvardnlp/neural-template-gen/blob/master/data/make_wikibio_labedata.py). The source-side data can be downloaded directly from the [WikiBio repo](https://github.com/DavidGrangier/wikipedia-biography-dataset), and we used it unchanged; in particular the `*.box` files become our `src_*.txt` files mentioned below. The code assumes that each dataset lives in a directory containing `src_train.txt`, `train.txt`, `src_valid.txt`, and `valid.txt` files, and that if the files are from the WikiBio dataset the directory name will contain the string `wiki`. ## Training The four trained models mentioned in the paper can be downloaded [here](https://drive.google.com/drive/folders/1iv71Oq7cmXRY6h2jn0QzlYbbr0GwHCfA?usp=sharing). The commands for retraining the models are given below.
2,269
hasanferit/DeepSmartFuzzer
['data augmentation']
['DeepSmartFuzzer: Reward Guided Test Generation For Deep Learning']
params/kmn.py misc/show_found_batchs.py coverages/coverage.py params/neuron.py parse_experiment_results.py src/DeepSmartFuzzer.py coverages/test_coverage.py params/LeNet4.py src/reward.py params/mnist.py runners/deephunter.py src/tensorfuzz.py src/experiment_builder.py src/clustered_input_chooser.py src/deephunter.py params/nbc.py params/LeNet5.py params/mcts.py misc/pyflann_issue_solver.py coverages/tfc.py coverages/utils.py stat_significance_from_experiment_results.py coverages/neuron_cov.py params/snac.py params/tensorfuzz.py run_experiment.py src/utility.py params/CIFAR_CNN.py params/LeNet1.py coverages/tkn.py params/tfc.py params/cifar10.py src/adversarial.py runners/tensorfuzz.py src/LeNet/lenet_models.py runners/mcts.py runners/mcts_clustered.py coverages/kmn.py src/mcts.py params/deephunter.py src/image_transforms.py params/parameters.py src/input_chooser.py load_params signal_handler run_experiment load_runner AbstractCoverage DeepGaugePercentCoverage measure_k_multisection_cov measure_neuron_cov default_scale NeuronCoverage calc_implicit_reward_neuron calc_implicit_reward TFCoverage measure_tkn DeepGaugeLayerLevelCoverage measure_tkn_old measure_tkn_with_pattern load_layer_outs get_layer_inputs generate_adversarial save_perturbed_test_groups load_quantization construct_spectrum_matrices get_layer_outs save_perturbed_test filter_correct_classifications load_max_comb load_model load_MNIST get_dummy_dominants cone_of_influence_analysis load_layerwise_relevances filter_val_set load_CIFAR load_perturbed_test_groups save_quantization load_classifications normalize percent create_experiment_dir get_layer_outs_new calculate_prediction_metrics load_perturbed_test get_trainable_layers save_data get_python_version percent_str weight_analysis calc_major_func_regions show_image save_max_comb save_original_inputs get_layer_outputs_by_layer_name save_classifications get_layer_outs_old save_layer_outs save_layerwise_relevances load_data tc1 tc3 tc2 calc_implicit_reward calc_implicit_reward_neuron Parameters deephunter mcts mcts_clustered tensorfuzz seed_corpus_from_numpy_arrays check_adversarial ClusteredInputChooser DeepHunter INFO DeepSmartFuzzer_State DeepSmartFuzzer _get_dataset Experiment generate_termination_condition get_experiment _get_model _get_input_chooser _get_coverage image_blur image_translation image_contrast image_brightness image_scale image_shear image_rotation InputChooser MCTS_Node run_mcts Reward_Status CorpusElement Tensorfuzz merge_object find_the_distance update_image_plots get_image_size init_image_plots str2bool activate_ctrl_c_exit LeNet5 LeNet4 LeNet1 print exit verbose save seed check_adversarial get_experiment get_current_coverage load_params imsave range astype load_runner random_seed initial_nb_inputs save_generated_samples start_time time uint8 print reshape makedirs input_chooser rmtree iteration runner step len params_set import_module getattr merge_object runner import_module getattr list print len set calc_major_func_regions mean add get_layer_outs keys range enumerate min max get_layer_outs_new defaultdict list len range keys scaler enumerate abs list get_layer_outs keys enumerate len list values mean zeros get_layer_outs sum keys range enumerate len list print tuple set mean add append zeros sum keys range values len to_categorical load_data reshape to_categorical astype load_data read model_from_json print close load_weights compile open input input Model mean get_layer_outs_new append enumerate input add dot get_layer_outs append get_weights range len show imshow sum print classification_report confusion_matrix absolute ceil append argmax range len print print print print print str makedirs print print print print append expand_dims predict zip append str print zip append layers index enumerate list index set append zeros range print append zeros max range append range len zeros asarray KerasModelWrapper get_session original_input mutated_input DeepHunter run reset_stat run_mcts tc1 print MCTS_Node input_chooser verbose DeepSmartFuzzer_State DeepSmartFuzzer tc2 get_stat append iteration step reset_stat run_mcts print tc1 MCTS_Node input_chooser verbose DeepSmartFuzzer_State DeepSmartFuzzer tc2 get_stat append iteration step seed_corpus_from_numpy_arrays Tensorfuzz fuzz append CorpusElement model print initial_nb_inputs sum predict len _get_dataset time Experiment generate_termination_condition _get_input_chooser _get_model _get_coverage start_time nb_new_inputs coverage input_chooser time_period nb_iterations int16 astype load_data reshape LeNet1 load_model LeNet5 LeNet4 Input compile tfc_threshold TFCoverage model tfc_subject_layer DeepGaugePercentCoverage getattr NeuronCoverage input_scaler step InputChooser ClusteredInputChooser shape warpAffine float32 resize shape warpAffine float32 getRotationMatrix2D shape warpAffine multiply array add dtype uint8 blur medianBlur astype float32 issubdtype bilateralFilter integer GaussianBlur bestChild simulation nb_actions print level printPath selection print_status backprop randint showPathVisual expansion size sum parent mutated_input show add_subplot get_image_size imshow figure append randint ion range suptitle reshape draw set_data flush_events range len SIGINT signal isinstance setattr getattr __dict__ evaluate print reshape to_categorical astype shape Model load_weights save_weights load_data Input compile fit evaluate print reshape to_categorical astype Model load_weights save_weights load_data Input compile fit evaluate print reshape to_categorical astype Model load_weights save_weights load_data Input compile fit
Paper (preprint): https://arxiv.org/abs/1911.10621 # DeepSmartFuzzer: Reward Guided Test Generation For Deep Learning Testing Deep Neural Network (DNN) models has become more important than ever with the increasing usage of DNN models in safety-critical domains such as autonomous cars. The traditional approach of testing DNNs is to create a test set, which is a random subset of the dataset about the problem of interest. This kind of approach is not enough for testing most of the real-world scenarios since these traditional test sets do not include corner cases, while a corner case input is generally considered to introduce erroneous behaviors. Recent works on adversarial input generation, data augmentation, and coverage-guided fuzzing (CGF) have provided new ways to extend traditional test sets. Among those, CGF aims to produce new test inputs by fuzzing existing ones to achieve high coverage on a test adequacy criterion (i.e. coverage criterion). Given that the subject test adequacy criterion is a well-established one, CGF can potentially find error inducing inputs for different underlying reasons. In this paper, we propose a novel CGF solution for structural testing of DNNs. The proposed fuzzer employs Monte Carlo Tree Search to drive the coverage-guided search in the pursuit of achieving high coverage. Our evaluation shows that the inputs generated by our method result in higher coverage than the inputs produced by the previously introduced coverage-guided fuzzing techniques. ### 1) Install Dependencies ``` pip install -r requirements.txt ``` ### 2) Usage ``` usage: run_experiment.py [-h] [--params_set [PARAMS_SET [PARAMS_SET ...]]]
2,270
hassan-mahmood/TIES_DataGeneration
['table recognition']
['Rethinking Table Recognition using Graph Neural Networks']
TableGeneration/Distribution.py TableGeneration/tools.py TableGeneration/Transformation.py TFGeneration/GenerateTFRecord.py TableGeneration/Table.py generate_data.py Distribution Table html_to_img warn find_new_points Transform resize_image pad_original_image GenerateTFRecord Logger warn get int get_window_size get_screenshot_as_png BytesIO location size strip until open presence_of_element_located append crop range len dot T array new paste find_new_points abs int resize_image fromarray concatenate ANTIALIAS size thumbnail pad_original_image AffineTransform params img_as_ubyte tile resize_image getbbox array warp
# Rethinking Table Parsing using Graph Neural Networks This is a repository containing data generation source code for the arxiv paper 1905.13391 ([link](https://arxiv.org/pdf/1905.13391.pdf)). This paper has been accepted into ICDAR 2019. To cite the paper, use: ``` @article{rethinkingGraphs, author = {Qasim, Shah Rukh and Mahmood, Hassan and Shafait, Faisal}, title = {Rethinking Table Parsing using Graph Neural Networks}, journal = {Accepted into ICDAR 2019}, volume = {abs/1905.13391}, year = {2019},
2,271
hatsunexym/YAMAHA-Corp
['speech enhancement']
['SEGAN: Speech Enhancement Generative Adversarial Network']
denoise_gan/data_loader.py denoise_gan/make_tfrecords.py denoise_gan/main.py denoise_gan/discriminator.py denoise_gan/generator.py denoise_gan/ops.py denoise_gan/bnorm.py denoise_gan/model.py VBN pre_emph de_emph read_and_decode discriminator AEGenerator Generator pre_emph_test main _int64_feature encoder_proc read_and_slice _bytes_feature slice_signal main Model SEAE SEGAN leakyrelu minmax_normalize minmax_denormalize tensor_summary prelu repeat_elements average_gradients batch_to_time atrous_conv1d nn_deconv conv1d conv2d gaussian_noise_layer highway time_to_batch deconv downconv histogram_summary sample_random_walk audio_summary residual_block variables_on_gpu0 scalar_summary reshape concat zeros range read TFRecordReader decode_raw float32 pre_emph set_shape int32 cast parse_single_example as_list int expand_dims pre_emph float32 placeholder seed print save_path name set_trace append synthesis_path ConfigProto makedirs int list zip append range load int16 astype slice_signal join write SerializeToString tostring Example read_and_slice zip split join unlink out_file splitext random_normal zeros range reshape randn scalar histogram audio xavier_initializer expand_dims format _linear f sigmoid range as_list get_shape xavier_initializer as_list print as_list split conv1d repeat_elements xavier_initializer get_shape expand_dims get_variable concat reduce_mean zip append expand_dims
# YAMAHA-Corp Please read the readme.txt and I will do modification soon. Thank you for you understanding. Designer: Youmin XUE Date: July.2019 to Aug.2019 Title: Denoise-GAN based on YAMAHA Music Intruments' noise dataset Reference: SEGAN <paper resource>https://arxiv.org/pdf/1703.09452.pdf <github>https://github.com/santi-pdp/segan *Please train the model by using three different dataset. Make sure each sample is .wav format and the name of noise&clean one are same.
2,272
hawkeoni/Semeval2020_task11
['text classification', 'relation extraction']
['NoPropaganda at SemEval-2020 Task 11: A Borrowed Approach to Sequence Tagging and Text Classification']
src/__init__.py convert_predict_to_submission_si.py process_data_ti.py split_into_folds_si.py src/reader.py src/lr_schedulers.py src/custom_tokenizers.py split_into_folds_ti.py src/model.py src/modules.py src/utils.py src/laserdecoder.py process_data_si.py src/metric.py convert_predict_to_submission_ti.py read_pred_file read_pred_file_json merge_spans balance_sentence insert_spans generate_dataset get_spans_si parse_ti_file generate_dataset get_full_span main main BertTokenizer SpacyTokenizer NltkTokenizer PositionwiseFeedforward LaserDecoderLayer MultiHeadAttention gen_wavelength_embedding LaserDecoder WarmupLinearScheduler get_linear_warmup_linear_decrease LRPolicy Accuracy MultilabelMicroF1 LaserTagger UniversalTagger TaskTIModel KitaevEncoder RBertEncoder CLSEncoder SpanClassifier RBertEncoderAttention TaskSIReader split_sentence TaskTIReader generate_one_span evaluate_si generate_spans evaluate_ti get_token_length defaultdict strip split append open defaultdict loads split append open append sorted pop merge_spans range len join list str balance_sentence zip append enumerate split join read write insert_spans close get_spans_si open append defaultdict open split len sorted parse_ti_file str list get_full_span items sub append list defaultdict print strip len shuffle write close startswith append keys range open exp cos sin zeros float append text append idx get_token_length len text len idx enumerate get_metrics close eval forward_on_instance open eval close open
# Semeval 11 propaganda detection All work done at ABBYY ARD NLP. Team NoPropaganda place 7 on task SI, place 6 on task TI. [Final leaderboard](https://propaganda.qcri.org/semeval2020-task11/leaderboard.php) *here will be a link to the paper* *NB* it is written on [allennlp-1.0 pre-release](https://github.com/allenai/allennlp/releases/tag/v1.0-prerelease) because it supports multi-GPU and gradient accumulation. ## Task SI Task of binary classification of propaganda components. [Task description](https://propaganda.qcri.org/semeval2020-task11/data/propaganda_tasks_evaluation.pdf)
2,273
hbzhang/cvpr2020
['video retrieval']
['Use What You Have: Video Retrieval Using Representations From Collaborative Experts', 'Learning a Text-Video Embedding from Incomplete and Heterogeneous Data']
data_loader/ActivityNet_dataset.py misc/gen_readme.py data_loader/YouCook2_dataset.py utils/ranger.py utils/datastructures.py model/text.py utils/util.py misc/gen_tar_lists.py base/base_trainer.py train.py logger/visualization.py trainer/__init__.py data_loader/DiDeMo_dataset.py data_loader/LSMDC_dataset.py sent_feat_demo.py logger/logger.py data_loader/data_loaders.py model/net_vlad.py model/loss.py misc/generate_exps.py logger/log_parser.py utils/__init__.py trainer/trainer.py misc/generate_slurm_scripts.py misc/sync_experts.py misc/aggregate_logs_and_stats.py test.py misc/cvpr2020_challenge/prepare_submission.py utils/gen_ablations_for_dataset.py misc/cvpr2020_challenge/train_baselines.py logger/__init__.py misc/find_latest_checkpoints.py utils/html.py parse_config.py model/metric.py data_loader/MSVD_dataset.py base/__init__.py model/model.py base/base_dataset.py utils/radam.py base/base_model.py utils/cos_restart.py utils/visualizer.py misc/cvpr2020_challenge/test_baselines.py data_loader/MSRVTT_dataset.py _set_by_path ConfigParser _get_opt_name _update_config _get_by_path sent_feat compress_predictions evaluation get_model_and_data_loaders main run_exp BaseDataset BaseModel BaseTrainer ActivityNet dataset_loader ExpertDataLoader DiDeMo LSMDC MSRVTT MSVD YouCook2 setup_logging log_summary TensorboardWriter main summarise main formatted_summary generate_configs main parse_grid fill_template parse_group_ids parse_grid aggregation_script_path2job_name generate_aggregation_script get_short_uuid generate_script main jobn_name2agg_log_path generate_slurm_dependency_script generate_tar_lists parse_results sync_files generate_url parse_log generate_readme model_specs2path generate_results_string main dataset_paths small_font_str generate_tar_lists main generate_tar_lists_for_challenge upload_to_server fetch_from_server get_archive_name main validate_predictions main generate_predictions get_dataset_num_queries json_key2dataset_name main evaluate_from_ckpts launch_and_monitor_cmd train_baseline_for_dataset train_baselines train_baselines_with_yaspi main dataset_name2json_key parse_paths_from_logs BCEWithLogitsLoss CrossEntropyLoss MaxMarginRankingLoss retrieval_as_classification APMeter ClassErrorMeter v2t_metrics AverageMeter Meter cols2metrics mean_average_precision t2v_metrics APMeterChallenge RelationModuleMultiScale_Cat ContextGating TemporalAttention MimicCEGatedEmbeddingUnit drop_nans sharded_cross_view_inner_product Mish SpatialMLP ContextGatingReasoning GatedEmbeddingUnit kronecker_prod GatedEmbeddingUnitReasoning G_reason CEModule ReduceDim sharded_single_view_inner_product RelationModuleMultiScale CENet NetVLAD OpenAI_GPT TextEmbedding load_w2v_model_from_cache W2VEmbedding fetch_model verbose ctxt_mgr Trainer CosineAnnealingWithRestartsLR main ExpertStore gen_dict_store main handle_moee_config remove_audio_streams HTML AdamW RAdam PlainRAdam Ranger memory_summary compute_dims read_json set_seeds Timer save_image ensure_tensor mkdirs tensor2im compute_trn_config filter_cmd_args inf_loop mkdir write_json flatten_dict expert_tensor_storage path2str print_numpy update_src_web_video_dir HashableDict HashableOrderedDict Visualizer _set_by_path target _get_opt_name getattr flags startswith from_pretrained basicConfig asarray print convert_tokens_to_ids get_vector eval load_word2vec_format tensor to tokenize append split argsort shape load compute_dims compute_trn_config DataParallel resume load_state_dict init info _config seed list str getattr to get_logger get format eval init get_model_and_data_loaders manual_seed info merge deepcopy items visualize_ranking update_src_web_video_dir _args endswith compute_dims Trainer set_seeds save_dir _config str strftime apply home get_logger get filterwarnings log_summary compute_trn_config gmtime mkdir init info optim merge enumerate lr_scheduler time deepcopy group_seed print system parameters filter update_src_web_video_dir evaluation train leaderboard ConfigParser print add_argument add_mutually_exclusive_group refresh_lru_cache ArgumentParser dbg run_exp YouCook2 MSVD print DiDeMo dict ActivityNet LSMDC MSRVTT str basicConfig list items print getcwd read_json dictConfig Path is_file argmax items list defaultdict search index array info append float gmean keys split items list sorted basicConfig parent getLogger print glob addHandler read_json log_summary extend StreamHandler OrderedDict Path parse_args summarise items list sorted glob strptime relative_to print formatted_summary join list product print strftime mkdir append keys print append OrderedDict split generate_configs grid parse_grid items list deepcopy join product zip get_short_uuid enumerate append zip_longest finditer groups OrderedDict enumerate append split append join list items jobn_name2agg_log_path mkdir aggregation_script_path2job_name parse_group_ids parse_grid Path touch values list stem append range update fill_template replace generate_aggregation_script mkdir zip generate_slurm_dependency_script items print extend aggregation_script_path2job_name jobn_name2agg_log_path len generate_script Path items list replace print call Path startswith expanduser items list Path append split import_module getattr Path get_dataset_paths update items list set add model_specs2path tqdm Path mkdir append dataset_paths int replace OrderedDict item zip split items list parse_log Path startswith exists join list items print insert append parse_results replace millify print generate_url extend groups upper zip_longest zip append finditer generate_results_string split sync_files generate_readme update deepcopy list isinstance print glob set add model_specs2path any Path mkdir append dataset_paths load_config values generate_tar_lists generate_tar_lists_for_challenge startswith items list get_archive_name time zip print insert system strftime call gmtime Path startswith mkdir append get_archive_name print call unlink Path mkdir upload_to_server fetch_from_server dataset print shape get_dataset_num_queries join sorted st_size print strftime mkdir naturalsize generate_predictions get items launch_and_monitor_cmd list json_key2dataset_name print strftime lower append generate_predictions parse_paths_from_logs evaluate_from_ckpts get sum index print lower launch_and_monitor_cmd parse_paths_from_logs items train_baseline_for_dataset print dataset_name2json_key generate_predictions submit join argv Yaspi extend filter_cmd_args train_baselines yaspify strftime dict timestamp train_baselines train_baselines_with_yaspi zs_dispFig zeros_like where reduceat str use matshow set_trace shape append home sum insert unique print sort argwhere array diag diff zs_dispFig where str use matshow ones shape append home sum range inf insert mean unique T sort array diag zs_dispFig str T use insert sort grid set_trace extend mean shape hist append home array range mean gmean median float sum APMeter add bmm size view flatten set_trace numel view print ones size reshape set_trace device div mean unsqueeze item zip zeros to enumerate len list reshape shape unsqueeze item device zeros keys enumerate mkdir print to items list print dict astype float16 get_data_paths ExpertStore astype dumps float16 gen_dict_store remove replace remove_audio_streams replace handle_moee_config src_dataset update_ablation_list any Path dest_dataset append split append pop reversed index seed manual_seed Path print virtual_memory update items list isinstance get items list add set intersection str list items isinstance path2str repeat list keys get items sorted list OrderedDict split info append get_logger len from_numpy data isinstance transpose tile Tensor numpy fromarray save print float64 flatten astype mkdir makedirs
This repo provides code for learning and evaluating joint video-text embeddings for the task of video retrieval. Our approach is described in the paper "Use What You Have: Video retrieval using representations from collaborative experts" ([paper](https://arxiv.org/abs/1907.13487), [project page](https://www.robots.ox.ac.uk/~vgg/research/collaborative-experts/)) ![CE diagram](figs/CE.png) **High-level Overview**: The *Collaborative Experts* framework aims to achieve robustness through two mechanisms: 1. The use of information from a wide range of modalities, including those that are typically always available in video (such as RGB) as well as more "specific" clues which may only occasionally be present (such as overlaid text). 2. A module that aims to combine these modalities into a fixed size representation that in a manner that is robust to noise. **Requirements:** The code assumes PyTorch 1.4 and Python 3.7 (other versions may work, but have not been tested). See the section on dependencies towards the end of this file for specific package requirements. **Important: A note on the updated results**: A previous version of the codebase (and paper) reported results on the retrieval benchmarks that included a signficant software bug leading to an overestimate of performance. We are extremely grateful to Valentin Gabeur who discovered this bug (it has been corrected in the current codebase). ### CVPR 2020: Pentathlon challenge <p align="center"> <img width="300" alt="logo" src="figs/logo-centre.png">
2,274
hci-unihd/pytorch-LearnedRandomWalker
['instance segmentation']
['End-to-End Learned Random Walker for Seeded Image Segmentation']
randomwalker/build_laplacian.py evaluation/evaluation_test_cremi.py randomwalker/RandomWalkerModule.py randomwalker/randomwalker_loss_utils.py randomwalker/randomwalker_tools.py example2D.py randomwalker/randomwalker2D.py exampleCREMI.py make_summary_plot create_simple_image make_summary_plot cremi_score _parser compute_scores build_laplacian2D RandomWalker2D RandomWalker NHomogeneousBatchLoss sparse_laplacian standard_RW lap2lapu_bt p2pu grad_fill pu2p sparse_pm long subplots set_title suptitle axis repr where tight_layout close imshow scatter savefig numpy argmax voi sqrt NeuronIds adapted_rand Volume print cremi_score append array range add_argument ArgumentParser zeros max range where zeros ravel max range zeros ravel build_laplacian2D csc_matrix ones_like sparse_laplacian lap2lapu_bt dot shape spsolve sparse_pm
# pytorch-LearnedRandomWalker Implementation of the LearnedRandomWalker module as described in: * Paper: [End-To-End Learned Random Walker for Seeded Image Segmentation](https://openaccess.thecvf.com/content_CVPR_2019/papers/Cerrone_End-To-End_Learned_Random_Walker_for_Seeded_Image_Segmentation_CVPR_2019_paper.pdf) * [Supplementary Material](https://openaccess.thecvf.com/content_CVPR_2019/supplemental/Cerrone_End-To-End_Learned_Random_CVPR_2019_supplemental.pdf) * [CVPR2019 Poster](./data/cvpr19_LRW_poster.pdf) ## Data processing: The results reported in the paper are based on a modified version of the [CREMI](https://cremi.org/) challenge dataset. The following processing have been performed: * The `raw` and `labels` have been cropped to by 2 pixels in the `x/y` plane to to avoid potential misalignments during the upsampling and downsampling.
2,275
hcllaw/VBAgg
['gaussian processes']
['Variational Learning on Aggregate Outputs with Gaussian Processes']
vb_agg_learn/networks/mse_net.py vb_agg_learn/RandomFourierFeatureMapper.py vb_agg_learn/train.py vb_agg_learn/networks/vb_utility.py experiments/train_test.py vb_agg_learn/networks/base.py vb_agg_learn/utils.py vb_agg_learn/networks/__init__.py experiments/gp_map_vary_bag.py vb_agg_learn/networks/vb_net.py vb_agg_learn/kernel_computations.py vb_agg_learn/networks/vb_net_square.py vb_agg_learn/networks/vb_norm_net.py vb_agg_learn/networks/baseline_net.py vb_agg_learn/mal_features.py vb_agg_learn/networks/nn_net.py vb_agg_learn/networks/gp_map_net.py vb_agg_learn/data/toy.py experiments/nn_swiss_vary_bag.py vb_agg_learn/networks/indiv_net.py setup.py experiments/baselines.py vb_agg_learn/networks/kernel.py vb_agg_learn/toy_low_dim.py experiments/vb_swiss_vary_bag.py get_adder generate_data eval_net make_parser make_network train_net _split_feats main pick_landmarks check_output_dir parse_args _add_args Kernel_computations is_integer as_features is_categorical_type is_integer_type is_categorical as_integer_type Mal_features RandomFourierFeatureMapper rotate_orth sphere eval_network train_network baselines extract safe_log loop_batches increase_dim load_malaria scaler_transform partition_maker tf_session load_miss_malaria load_split_elevators PSD true_dimension swiss_norm standardise check_positive elevators_norm Toy normal_likelihood sparse_matrix_placeholders Network mean_matrix build_net build_net normal_likelihood build_net matern32_kernel ard_kernel ard_matern_kernel build_net build_net build_net build_net build_net mode_find triangular_vec term_1_func_additive term_1_func fill_triangular log_normal_modes make_stable log_norm_quantile triangular_fill_vec get_adder g1 add_argument_group r add_argument add_mutually_exclusive_group k t i n d add_sim_args add_split_args ArgumentParser add_subparsers add_subparser join discard format error set listdir exists makedirs check_output_dir out_dir make_parser estop_size split_seed permutation get_median_sqdist l test_size scaler_transform no_early_stop partial partition_maker st sqrt Mal_features int check_random_state val_size MinMaxScaler StandardScaler array len Toy _split_feats n_test dataset_name n_estop toy_swiss_bag_gen no_early_stop toy_real_gen partial load_malaria data_seed n_val n_train make check_random_state dict load_split_elevators toy_s_gen randint toy_swiss_gen make_stacked check_random_state KMeans cluster_centers_ n_landmark_bag _init_centroids zeros opt_seed range structure len make_stacked y hasattr split_seed indiv total_points n_landmark_bag dict sqrt true_dimension get_median_sqdist bag_pop sum train_seed len join train_network out_dir join time format savez print generate_data out_dir set_printoptions make_network true_dimension pick_landmarks parse_args gpu asanyarray is_integer_type rint asanyarray any make_stacked isinstance normal norm check_random_state hstack zeros expand_dims T check_random_state dot uniform qr clip_by_global_norm Saver save run list indiv restore apply_gradients range format partial inf feed_network zip optimizer check_random_state minimize print global_variables_initializer loss y total_points log_poisson_loss log true_y multiply bag_pop reduce_sum c sum partial true_indiv eval pop make_stacked constant mean_squared_error array len make_stacked y loop_batches feed_dict zeros_like format print total_points square divide mean sqrt eval log_norm_quantile append zeros log len int concatenate shuffle divide argsort append dim T eig min dot real pop indiv min max shape hstack zeros float searchsorted min make_stacked len load join int check_random_state len shuffle isfile open log load join open isfile load join format print squareform pdist save raiseValueError enumerate open hstack vstack vsplit transform fit_transform ConfigProto exp ones square reduce_sum shape div log zeros range len trainable_variables initializer params add_n zeros_initializer multiply squeeze matmul square_err cast expand_dims Network partial relu cst inputs nll_term z_initializer linkage bag_pool Variable he_normal log exp indiv_l2 make_stable bag_l3 kernel sqrt add_check_numerics_ops constant random_normal reduce_sum normal_likelihood square T check_numerics square divide matmul maximum sqrt reduce_sum expand_dims sum matern32_kernel ard_kernel T square divide matmul reduce_sum expand_dims sum transpose map RandomFourierFeatureMapper rff_tf diag o_initializer concat MultivariateNormalTriL kl_divergence triangular_vec ones ones_initializer matrix_inverse distributions map_fn fill_triangular print divide cholesky Print norm multiply transpose squeeze square matmul reduce_sum kernel sqrt add trace expand_dims log norm multiply transpose squeeze square matmul reduce_sum kernel sqrt add trace expand_dims log int arange reshape astype float32 zeros range diag int arange reshape astype float32 zeros diag normal mode_find exp multiply tolist zeros expand_dims sum range len gaussian_kde min linspace max kde_density svd constant check_numerics transpose divide matmul sqrt diag interval
# VBAgg Python code (tested on 2.7) for aggregate output learning with Gaussian processes, the details are described in the following paper: H. Law, D. Sejdinovic, E. Cameron, T. CD Lucas, S. Flaxman, K. Battle, K. Fukumizu, Variational Learning on Aggregate Outputs with Gaussian Processes, NeurIPS 2018 (https://arxiv.org/abs/1805.08463) Due to data confidentiality reasons, we do not provide the malaria data we used in the paper. ## Setup To setup as a package, clone the repository and run ``` python setup.py develop ``` This package also requires TensorFlow (tested on v1.7.0) to be installed.
2,276
hectorgie/DeepFaceLab
['face swapping']
['DeepFaceLab: Integrated, flexible and extensible face-swapping framework']
models/Model_XSeg/Model.py mainscripts/VideoEd.py XSegEditor/QImageDB.py merger/MergerScreen/MergerScreen.py mainscripts/dev_misc.py merger/InteractiveMergerSubprocessor.py samplelib/SampleGeneratorImageTemporal.py core/leras/models/__init__.py samplelib/Sample.py core/joblib/__init__.py core/imagelib/estimate_sharpness.py core/joblib/MPFunc.py core/leras/layers/DenseNorm.py core/leras/nn.py samplelib/SampleProcessor.py core/leras/archis/__init__.py core/leras/layers/Conv2D.py core/stdex.py core/imagelib/text.py core/leras/models/PatchDiscriminator.py core/leras/__init__.py models/Model_XSeg/__init__.py core/leras/layers/DepthwiseConv2D.py core/imagelib/equalize_and_stack_square.py samplelib/__init__.py core/imagelib/sd/draw.py core/randomex.py core/joblib/MPClassFuncOnDemand.py core/leras/optimizers/__init__.py core/leras/initializers/__init__.py mainscripts/Extractor.py mainscripts/Sorter.py core/mathlib/__init__.py core/leras/optimizers/OptimizerBase.py core/imagelib/draw.py samplelib/SampleGeneratorBase.py core/leras/layers/BatchNorm2D.py core/leras/layers/ScaleAdd.py XSegEditor/QCursorDB.py models/__init__.py core/joblib/SubprocessGenerator.py DFLIMG/DFLIMG.py core/leras/layers/__init__.py models/ModelBase.py facelib/FaceEnhancer.py core/joblib/ThisThreadGenerator.py XSegEditor/QIconDB.py core/imagelib/blursharpen.py merger/MergeMasked.py core/cv2ex.py models/Model_Quick96/__init__.py main.py core/leras/archis/ArchiBase.py localization/localization.py facelib/LandmarksProcessor.py core/leras/layers/Dense.py models/Model_SAEHD/__init__.py mainscripts/Merger.py mainscripts/XSegUtil.py core/imagelib/filters.py XSegEditor/QStringDB.py core/leras/initializers/CA.py core/imagelib/__init__.py core/leras/models/ModelBase.py samplelib/SampleGeneratorFaceTemporal.py core/leras/layers/InstanceNorm2D.py facelib/S3FDExtractor.py samplelib/SampleLoader.py samplelib/SampleGeneratorFaceXSeg.py core/qtex/qtex.py DFLIMG/__init__.py core/leras/optimizers/RMSprop.py core/structex.py core/leras/layers/BlurPool.py facelib/__init__.py core/leras/archis/DeepFakeArchi.py core/imagelib/SegIEPolys.py mainscripts/FacesetEnhancer.py merger/FrameInfo.py models/Model_SAEHD/Model.py core/mplib/__init__.py samplelib/SampleGeneratorFacePerson.py merger/MergerScreen/__init__.py core/imagelib/common.py core/imagelib/sd/__init__.py core/leras/layers/AdaIN.py core/leras/layers/LayerBase.py facelib/FANExtractor.py core/leras/models/XSeg.py samplelib/SampleGeneratorFace.py merger/MergeAvatar.py core/pathex.py core/leras/layers/Conv2DTranspose.py core/qtex/QXMainWindow.py merger/__init__.py core/imagelib/morph.py core/joblib/SubprocessorBase.py mainscripts/Trainer.py samplelib/PackedFaceset.py core/mathlib/umeyama.py mainscripts/Util.py core/interact/__init__.py core/leras/layers/FRNorm2D.py core/leras/layers/Saveable.py core/leras/layers/TLU.py facelib/XSegNet.py core/mplib/MPSharedList.py core/leras/models/CodeDiscriminator.py facelib/FaceType.py XSegEditor/XSegEditor.py merger/MergerConfig.py core/leras/ops/__init__.py core/interact/interact.py core/leras/device.py core/imagelib/sd/calc.py core/imagelib/reduce_colors.py samplelib/SampleGeneratorImage.py localization/__init__.py DFLIMG/DFLJPG.py core/qtex/__init__.py core/qtex/QSubprocessor.py core/qtex/QXIconButton.py samplelib/SampleGeneratorFaceCelebAMaskHQ.py core/imagelib/warp.py core/osex.py core/imagelib/color_transfer.py models/Model_Quick96/Model.py process_dev_test process_merge process_videoed_cut_video process_train process_faceset_enhancer process_xsegeditor process_xsegapply process_xsegremove process_xsegremovelabels process_videoed_video_from_sequence process_xsegfetch process_util process_extract fixPathAction process_videoed_extract_video process_sort bad_args process_videoed_denoise_image_sequence cv2_imwrite cv2_resize cv2_imread set_process_dpi_aware get_screen_size set_process_lowest_prio get_image_paths move_all_files write_bytes_safe get_first_file_by_stem get_image_unique_filestem_paths get_all_dir_names get_file_paths delete_all_files scantree get_paths get_all_dir_names_startswith random_normal suppress_stdout_stderr struct_unpack LinearMotionBlur blursharpen _scale_array color_transfer color_transfer_idt color_transfer_mkl reinhard_color_transfer lab_image_stats linear_color_transfer channel_hist_match color_transfer_mix color_transfer_sot color_hist_match overlay_alpha_image cut_odd_image normalize_channels draw_polygon draw_rect equalize_and_stack_square compute _calculate_sharpness_metric marziliano_method get_block_contrast _simple_thinning estimate_sharpness is_edge_block sobel apply_random_motion_blur apply_random_rgb_levels apply_random_hsv_shift apply_random_bilinear_resize apply_random_gaussian_blur morphTriangle morph_by_points applyAffineTransform reduce_colors SegIEPolys SegIEPolyType SegIEPoly get_text_image draw_text_lines draw_text _get_pil_font get_draw_text_lines warp_by_params gen_warp_params dist_to_edges random_circle_faded circle_faded InteractBase InteractColab InteractDesktop MPClassFuncOnDemand MPFunc SubprocessGenerator Subprocessor ThisThreadGenerator Devices Device nn ArchiBase DeepFakeArchi CAInitializerSubprocessor initializers AdaIN BatchNorm2D BlurPool Conv2D Conv2DTranspose Dense DenseNorm DepthwiseConv2D FRNorm2D InstanceNorm2D LayerBase Saveable ScaleAdd TLU CodeDiscriminator ModelBase UNetPatchDiscriminator PatchDiscriminator XSeg dssim concat average_gv_list resize2d_bilinear flatten rgb_to_lab resize2d_nearest space_to_depth tf_gradients random_binomial style_loss gelu init_weights tf_get_value upsample2d reshape_4D batch_set_value max_pool average_tensor_list gaussian_blur depth_to_space OptimizerBase RMSprop umeyama get_power_of_two rotationMatrixToEulerAngles polygon_area ArrayFillerSubprocessor MPSharedList IndexHost Index2DHost ListHost DictHostCli DictHost QSubprocessor QDarkPalette QActionEx QSize_to_np QImage_from_np QImage_to_np QPixmap_from_np QPoint_to_np QPoint_from_np QXIconButton QXMainWindow DFLIMG DFLJPG FaceEnhancer FaceType FANExtractor blur_image_hull_mask mirror_landmarks get_face_struct_mask estimate_pitch_yaw_roll convert_98_to_68 expand_eyebrows get_rect_from_landmarks get_transform_mat draw_rect_landmarks get_cmask transform_points estimate_averaged_yaw calc_face_pitch alpha_to_color get_image_eye_mask draw_landmarks get_image_hull_mask S3FDExtractor XSegNet dev_test_68 dev_test1 dev_resave_pngs extract_vggface2_dataset extract_umd_csv dev_segmented_trash process_folder FacesetEnhancerSubprocessor extract_video video_from_sequence denoise_image_sequence cut_video remove_xseg remove_xseg_labels apply_xseg fetch_xseg FrameInfo InteractiveMergerSubprocessor MergeFaceAvatar process_frame_info MergeMasked MergeMaskedFace MergerConfigMasked MergerConfigFaceAvatar MergerConfig ScreenManager ScreenAssets Screen ModelBase PreviewHistoryWriter import_model QModel SAEHDModel XSegModel PackedFaceset Sample SampleType SampleGeneratorBase SampleGeneratorFace SampleGeneratorFaceCelebAMaskHQ MaskType SampleGeneratorFacePerson Index2DHost SampleGeneratorFaceTemporal SampleGeneratorFaceXSeg SegmentedSampleFilterSubprocessor SampleGeneratorImage SampleGeneratorImageTemporal FaceSamplesLoaderSubprocessor SampleLoader SampleProcessor QCursorDB QIconDB QImageDB QStringDB ImagePreviewSequenceBar QUIConfig QCanvasOperator LoaderQSubprocessor CanvasConfig OpMode QCanvas DragType ViewLock ColorScheme QCanvasControlsLeftBar start QCanvasControlsRightBar MainWindow PTEditMode main set_process_lowest_prio main set_process_lowest_prio unpack_faceset pack save_faceset_metadata log_info restore_faceset_metadata_folder pack_faceset save_faceset_metadata_folder restore_faceset_metadata Path input_dir unpack recover_original_aligned_filename set_process_lowest_prio add_landmarks_debug_images main set_process_lowest_prio main set_process_lowest_prio output_ext fps extract_video output_dir input_file set_process_lowest_prio audio_track_id from_time bitrate to_time cut_video input_file set_process_lowest_prio factor denoise_image_sequence set_process_lowest_prio input_dir video_from_sequence set_process_lowest_prio Path set_process_lowest_prio input_dir process_folder dev_test set_process_lowest_prio input_dir start Path set_process_lowest_prio input_dir model_dir apply_xseg Path input_dir set_process_lowest_prio Path remove_xseg set_process_lowest_prio input_dir remove_xseg_labels Path set_process_lowest_prio input_dir Path fetch_xseg set_process_lowest_prio input_dir print_help exit loader_func asarray bytearray imencode suffix shape normalize_channels resize nice SetPriorityClass HANDLE GetCurrentProcess SetProcessDPIAware user32 write_bytes parent name unlink rename exists is_dir scandir str list scandir any Path scantree exists append remove get_image_paths name stem set add verbose_print_func Path exists Path exists Path exists str list lower scandir Path startswith append exists str sorted list path lower scandir Path exists name Path rename get_file_paths unlink Path get_file_paths normal empty prod range calcsize warpAffine ones getRotationMatrix2D zeros sum medianBlur addWeighted ones zeros GaussianBlur max dtype reshape astype copy argsort shape bilateralFilter fill empty range eps T clip reshape eig dot shape sqrt cov mean diag T reshape min astype float32 empty_like solve dot shape histogram interp max range _scale_array uint8 astype float32 merge lab_image_stats COLOR_LAB2BGR cvtColor split T reshape transpose mean dot eigh eye cholesky split min max float64 astype shape unique interp ravel dtype astype shape channel_hist_match range uint8 astype float32 COLOR_BGR2LAB color_transfer_sot COLOR_LAB2BGR cvtColor uint8 color_transfer_idt color_transfer_mkl astype float32 reinhard_color_transfer linear_color_transfer color_transfer_sot clip shape repeat len shape shape range tuple line range len draw_polygon concatenate shape resize expand_dims max enumerate T convolve square mean sqrt array shape zeros float64 marziliano_method astype canny sobel gradient atan2 shape any zeros round range int exp slice get_block_contrast shape flipud round zeros is_edge_block rot90 range cvtColor COLOR_BGR2GRAY rand random clip array COLOR_HSV2BGR random merge COLOR_BGR2HSV randint clip cvtColor split LinearMotionBlur randint random randint GaussianBlur random int rand random shape resize float32 getAffineTransform float32 fillConvexPoly shape boundingRect int32 applyAffineTransform zeros expand_dims array shape morphTriangle zeros simplices fromarray uint8 convert astype COLOR_RGB2BGR array cvtColor truetype asarray Draw get_default_ttf_font_name concatenate text new _get_pil_font shape clip draw_text range len draw_text_lines zeros shape T random astype copy float32 getRotationMatrix2D dict uniform linspace random_normal warpAffine remap resize norm clip einsum concatenate norm reshape empty abs clip max random randint initializer inputs append batch_set_value run gradients expand_dims __enter__ __exit__ enumerate reduce_mean __enter__ __exit__ concat pow tanh sqrt pi as_list reshape tile transpose value resize transpose value resize transpose reshape transpose randint float32 pad make_kernel tile depthwise_conv2d gaussian_blur dtype constant arange reshape float32 square reduce_mean reducer cast softmax tile max as_list reshape transpose as_list reshape transpose constant reshape multiply matmul cast svd T ones matrix_rank mean dot eye sum diag sqrt atan2 shape Format_Grayscale8 Format_BGR888 Format_ARGB32 height reshape convertToFormat width constBits setsize range squeeze invertAffineTransform shape transform expand_dims get norm getAffineTransform polygon_area astype float32 transform_points sqrt estimate_averaged_yaw array transform_points FULL_NO_ALIGN get_transform_mat float32 array copy concatenate expand_eyebrows fillConvexPoly convexHull zeros int getStructuringElement astype fillConvexPoly MORPH_ELLIPSE convexHull dilate zeros GaussianBlur shape zeros concatenate process copy blend alpha_to_color zeros get_image_hull_mask gdf max clip int blur getStructuringElement min erode argwhere MORPH_ELLIPSE expand_dims copy draw_landmarks zeros expand_eyebrows concatenate polylines tuple shape get_image_hull_mask array circle get_transform_mat draw_rect transform_points draw_polygon draw_landmarks array array rotationMatrixToEulerAngles concatenate astype float32 pi solvePnP zeros array clip get pop get_image_paths parent log_info name stem progress_bar_generator get_all_dir_names Path mkdir run fromString split cv2_imread Path normalize_channels exists input_bool str log_info name stem append get_image_paths get_rect_from_landmarks unlink mkdir parent cv2_imwrite progress_bar_generator read_text split get str get_image_paths parent log_info name len unlink Path mkdir split log_err run range exists fromString input_bool get_image_paths progress_bar_generator get_all_dir_names Path x get_image_paths cv2_imwrite progress_bar_generator cv2_imread Path get_image_paths parent name stem rename Path mkdir append input_bool join get_image_paths log_info parent name copy unlink rmtree mkdir run update str get_image_paths parent input_str stem output get_first_file_by_stem unlink input_int mkdir Path log_err input run str suffix parent input_str stem overwrite_output input_int log_err Path input max run update str suffix parent progress_bar_generator output input_int rename log_err Path run clip enumerate suffix input_str wait input_int Path max input_bool str stem input update run_async get_image_paths close mkdir parent overwrite_output get_first_file_by_stem log_err probe load extract initialize get_image_paths log_info set_xseg_mask progress_bar_generator astype float32 get_resolution ask_choose_device shape XSegNet resize save load str get_image_paths log_info parent name has_polys progress_bar_generator copy get_seg_ie_polys mkdir load get_image_paths log_info set_xseg_mask input_str progress_bar_generator has_xseg_mask save load get_image_paths log_info input_str has_seg_ie_polys progress_bar_generator save set_seg_ie_polys warpAffine get_transform_mat astype float32 cv2_imread normalize_channels filename clip sharpen_func sharpen_mode concatenate predictor_func add_source_image process_frame_info temporal_face_count append range sharpen_amount predictor_func color_transfer_mkl motion_power bicubic_degrade_power motion_blur_power linear_color_transfer color_transfer_mix boundingRect resize reduce_colors max clip face_enhancer_func hist_match_threshold medianBlur super_resolution_power WARP_INVERSE_MAP ones LinearMotionBlur shape pad blur_mask_modifier image_denoise_power masked_hist_match blursharpen range color_hist_match BORDER_TRANSPARENT warpAffine sharpen_mode xseg_256_extract_func seamlessClone color_transfer_idt astype copy reinhard_color_transfer empty_like motion_deg INTER_CUBIC MORPH_ELLIPSE color_transfer_sot dilate GaussianBlur get_image_hull_mask NORMAL_CLONE uint8 int erode_mask_modifier getStructuringElement get_transform_mat float32 erode argwhere blursharpen_amount color_degrade_power landmarks_list concatenate astype float32 cv2_imread shape normalize_channels MergeMaskedFace filepath clip enumerate str parent cv2_imread locals __import__ globals dict setApplicationName setPalette QDarkPalette Path show str initialize log_info setWindowIcon addApplicationFont AA_EnableHighDpiScaling setStyle setFont gettempdir setAttribute QApplication path_contains app_icon MainWindow exec_ parent QFont raise_ AA_UseHighDpiPixmaps
<table align="center" border="0"> <tr><td colspan=2 align="center"> # DeepFaceLab <a href="https://arxiv.org/abs/2005.05535"> <img src="https://static.arxiv.org/static/browse/0.3.0/images/icons/favicon.ico" width=14></img> https://arxiv.org/abs/2005.05535</a> ### the leading software for creating deepfakes <img src="doc/DFL_welcome.png" align="center"> </td></tr> <tr><td colspan=2 align="center">
2,277
hegdepashupati/gprn-svi
['gaussian processes']
['Gaussian Process Regression Networks']
onofftf/utils.py onofftf/sgprn.py onofftf/utils_pptr.py onofftf/main.py onofftf/gprn.py variational_expectations plot_gprn_fit build_predict build_prior_kl generate_train_op DataSet Variable GaussKL KernSE GPConditional Param plot_sgprn_augmentation variational_expectations ell_gamma_pior build_predict probit_expectations build_prior_kl plot_sgprn_fit generate_train_op printtime modelmanager preprocessing add_n reduce_sum len get_tfv multiply concat transpose reduce_sum expand_dims GPConditional range len subtract transpose multiply square reduce_sum divide stack cast expand_dims trainable_variables list gradients name group set AdamOptimizer apply_gradients histogram zip append arange set_clim add_subplot GridSpec set_ticks linspace show str set_title update_ticks colorbar shape scatter contourf savefig update MaxNLocator set_xlim tight_layout BoundaryNorm reshape figtext figure set_ylim matrix_triangular_solve transpose size square matrix_band_part reduce_sum reduce_prod matrix_diag_part cast cholesky eye tile expand_dims log matrix_triangular_solve Kdiag transpose square reduce_sum matmul matrix_band_part stack eye cholesky K tile expand_dims probit_expectations add normcdf owent square sqrt abs arange set_clim add_subplot GridSpec set_ticks linspace max show str set_title update_ticks colorbar shape scatter contourf savefig update MaxNLocator set_xlim tight_layout BoundaryNorm Normalize contour reshape figtext figure set_ylim arange add_subplot GridSpec set_ticks show str set_title update_ticks colorbar shape scatter contourf savefig update MaxNLocator set_xlim tight_layout Normalize reshape figtext figure set_ylim divmod time
# gprn-svi Implementation for Stochastic Variational Inference for the following models : 1. Gaussian Process Regression Netwroks (Wilson, 2011) 2. Sparse Gaussian Process Regression Netwroks The main model is implemented in TensorFlow. However the supporting functions under onoffgp module have been cloned/inspired from GPflow(https://github.com/GPflow/) **1. Gaussian Process Regression Netwroks (Wilson, 2011)** GPRN framework by Wilson, 2012 (https://arxiv.org/abs/1110.4411) is an efficient model for multi-target regression problems, where each individual output is a linear but non-stationary combination of shared latent functions. The scalable SVI bound for this model has been derived in ... Notebook 'gprn-jura.ipynb' illustrates variational inference on the Jura dataset. <img src="plots/gprn_fit.png" width="600" height="400" /> **2. Sparse Gaussian Process Regression Netwroks** Sparse GPRN framework is an extention to GPRN where each of the latent mixing functions is modeled to be sparse. This makes the model more powerful and interpretable since each response can effectively use any subset of the latent dimensions by having exact zeros for the rest in the mixing functions. Notebook 'sgprn-jura.ipynb' illustrates variational inference for SGPRN model on the Jura dataset.
2,278
helboukkouri/acl_srw_2019
['word embeddings']
['Embedding Strategies for Specialized Domains: Application to Clinical Entity Recognition']
experiment.py data.py evaluation.py custom/custom_elmo.py custom/custom_embedder.py custom/custom_crf.py config.py main.py model.py helpers.py str2bool default_config apply_new_tokenization ConceptDatasetReader load_concept_data to_most_significant_digit space_tokenizer convert_i2b2_format i2b2_evaluation Experiment run_experiment set_seed FastTextEmbeddings set_logger GloveEmbeddings load_pretrained_embeddings SequenceLabelingModelWithCRF SequenceLabelingModel CrfTagger _ElmoCharacterEncoder _ElmoBiLm CustomElmo batch_to_ids ElmoTokenEmbedder CustomTextFieldEmbedder update debug add_argument ArgumentParser parse_args extend zip append tokenize len str group reduce floor log10 float len join read print sort extend lower sub listdir range split search escape span append split pop read list print sort makedirs zip append listdir split decode print rmtree info convert_i2b2_format run SequenceLabelingModelWithCRF embedding_dim i2b2_evaluation SequenceLabelingModel Trainer ModuleList BucketIterator PytorchSeq2SeqWrapper all Embedding Adam forward_on_instances SingleIdTokenIndexer load_state_dict append range use_crf CustomTextFieldEmbedder replace from_instances BasicTextFieldEmbedder info load_pretrained_embeddings CustomElmoTokenEmbedder read get_vocab_size requires_grad extend parameters ELMoTokenCharactersIndexer LSTM train index_with ElmoTokenEmbedder embeddings_are_trainable split seed manual_seed setFormatter list join getLogger addHandler map StreamHandler removeHandler Formatter removeFilter setLevel INFO FileHandler join get_vocab_size format normal FastTextEmbeddings GloveEmbeddings info load_word2vec_format get_vector get_token_from_index range Batch Vocabulary Instance index_instances TextField ELMoTokenCharactersIndexer append
# Embedding Strategies for Specialized Domains: Application to Clinical Entity Recognition Paper Link: [https://www.aclweb.org/anthology/papers/P/P19/P19-2041/](https://www.aclweb.org/anthology/papers/P/P19/P19-2041/) ## Python environment The code was tested on Linux (Ubuntu 16.04.4 LTS) and Python (3.6). Using Anaconda, install a new environment from the `.yml` file: `conda env create --name ACL_PAPER_env -f=environment.yml` Then activate it: `source activate ACL_PAPER_env` ## Steps for reproducing the experiments ### Step 0: Download the 2010 i2b2/VA Challenge dataset Follow the instructions on https://www.i2b2.org/NLP/DataSets/ to get your own copy of the 2010 i2b2/VA 2010 Challenge dataset. Then put this data inside the `i2b2_data` folder so that it looks like:
2,279
hellochick/PSPNet-tensorflow
['scene parsing', 'semantic segmentation']
['Semantic Understanding of Scenes through the ADE20K Dataset']
train.py network.py tools.py inference.py evaluate.py image_reader.py model.py load main get_arguments read_images_from_disk ImageReader image_scaling read_labeled_image_list random_crop_and_pad_image_and_labels image_mirroring load main get_arguments save PSPNet50 PSPNet101 layer Network load_img decode_labels preprocess prepare_label read_labelcolours load main get_arguments save add_argument ArgumentParser print restore format crop_to_bounding_box where set_shape add_n Saver flipped_eval gather argmax decode_image Session run open checkpoints global_variables PSPNet squeeze resize_bilinear placeholder add shape streaming_mean_iou cast expand_dims get_arguments format get_checkpoint_state preprocess flip_left_right ConfigProto trange local_variables_initializer load int join constant not_equal print reshape model_checkpoint_path read_file int32 global_variables_initializer split less stack boolean_mask reverse to_float resize_images to_int32 squeeze multiply stack random_uniform resize_nearest_neighbor expand_dims pad_to_bounding_box random_crop concat maximum shape cast set_shape append join split open image_scaling concat image_mirroring read_file cast random_crop_and_pad_image_and_labels decode_png decode_jpeg split print join makedirs decode_labels save_dir imsave img_path load_img makedirs shape loadmat constant one_hot reshape matmul read_labelcolours format print exit read_file isfile decode_png decode_jpeg pad_to_bounding_box concat cast expand_dims split set_random_seed save list num_classes less_equal get_collection map scalar_mul range num_steps start_queue_runners sparse_softmax_cross_entropy_with_logits stack random_seed power time learning_rate PSPNet101 snapshot_dir request_stop Coordinator reduce_mean pow UPDATE_OPS prepare_label
# PSPNet_tensorflow ## Important Code is fine for inference. However, the training code is just for reference and might be only used for fine-tuning. If you want to train from scratch, you need to implement the Synchronize BN layer first to do large batch-size training (as described in the paper). It seems that this [repo](https://github.com/holyseven/PSPNet-TF-Reproduce) has reproduced it, you can take a look on it. ## Introduction This is an implementation of PSPNet in TensorFlow for semantic segmentation on the [cityscapes](https://www.cityscapes-dataset.com/) dataset. We first convert weight from [Original Code](https://github.com/hszhao/PSPNet) by using [caffe-tensorflow](https://github.com/ethereon/caffe-tensorflow) framework. ## Update: ## News (2018.11.08 updated): Now you can try PSPNet on your own image online using [ModelDepot live demo](https://modeldepot.io/hellochick/pspnet)! #### 2018/01/24:
2,280
hellohaptik/HINT3
['intent detection']
['HINT3: Raising the bar for Intent Detection in the Wild']
platforms/rasa/actions.py platforms/bert/bert-bot-only-data-es.py platforms/haptik/convert_data.py read_data run_experiment make_st_args get_labels_map main random_seed str2bool log f1_at_threshold setup_logging isinstance seed manual_seed_all manual_seed stdout handlers addHandler StreamHandler WatchedFileHandler removeHandler DEBUG setLevel join info append use_early_stopping rename read_csv sorted list tolist OrderedDict zip range len argmax get_labels_map rename output_dir train_file argmax log seed list read_data labels_list tolist shape model_type train_test_split range predict make_st_args softmax random_seed vars keys f1_at_threshold setup_logging train_model ClassificationModel to_csv test_file empty_cache to_json random_seed seed run_experiment add_argument output_dir ArgumentParser parse_args makedirs
## HINT3: Raising the bar for Intent Detection in the Wild This repository contains datasets and code for the paper "HINT3: Raising the bar for Intent Detection in the Wild" accepted at EMNLP-2020's [Insights workshop](https://insights-workshop.github.io/) Published paper is available [here](https://www.aclweb.org/anthology/2020.insights-1.16/) **Update Feb 2021: We noticed in our analysis of the results that there are few ground truth labels which are incorrect. Hence, we're releasing a new version, v2 of the dataset, present inside dataset/v2 folder. All the
2,281
hellrich/JeSemE
['information retrieval', 'word embeddings']
['Exploring Diachronic Lexical Semantics with JeSemE']
pipeline/preprocessing/google/parse_normalized.py pipeline/transform_models/representations/embedding.py pipeline/transform_models/representations/representation_factory.py pipeline/preprocessing/transformrsc.py pipeline/preprocessing/coha_converter.py pipeline/transform_models/scale_emotion_data.py pipeline/tools/compare.py pipeline/transform_models/vectors2similarity.py pipeline/preprocessing/google/divide_by_year.py pipeline/transform_models/representations/matrix_serializer.py pipeline/transform_models/emotion_lexicons.py pipeline/transform_models/representations/explicit.py pipeline/transform_models/representations/__init__.py pipeline/preprocessing/google/gather_tokens.py main extract_text_information main finish_text iterate flush _read_lemmata_mapping_file scaleInRange load_german load_english __combine__ __parse__ scale EnsembleEmbedding Embedding SVDEmbedding DualEmbeddingWrapper Explicit PositiveExplicit save_vocabulary load_matrix load_vocabulary load_count_vocabulary save_matrix save_count_vocabulary create_representation main extract_text_information finish_text iterate flush _read_lemmata_mapping_file scaleInRange load_german load_english __combine__ __parse__ scale EnsembleEmbedding Embedding SVDEmbedding DualEmbeddingWrapper Explicit PositiveExplicit save_vocabulary load_matrix load_vocabulary load_count_vocabulary save_matrix save_count_vocabulary create_representation items list close write iterate docopt makedirs pop extract_text_information open startswith append split clear write set_index read_csv set_index _read_lemmata_mapping_file replace read_excel range len year sorted list set_index divide to_csv set __combine__ DataFrame std read_csv savez_compressed load int float
# JeSemE JeSemE (Jena Semantic Explorer) allows you to explore the semantic development of words over time based on distributional semantics. JeSemE is described in detail in our ACL 2017 paper ["Exploring Diachronic Lexical Semantics with JESEME"]( https://aclanthology.info/pdf/P/P17/P17-4006.pdf) and our COLING 2018 paper ["JeSemE: A Website for Exploring Diachronic Changes in Word Meaning and Emotion"](https://arxiv.org/abs/1807.04148) # Dependencies Modified version of Omar Levy's [hyperwords](https://github.com/hellrich/hyperwords) # Starting JeSemE * Use maven to build an executable JAR (with dependencies) by executing mvn package in the folder "website" * Configuration is done via config.yaml, you must set correct paths for your system! * Requires a Postgres Server, enter details in config * Mapping between words and lemmata (German only, fit for historic texts) via normalized.csv (mappingPath in config) * Files with trained models and derived emotions can be found online on JeSemE's [help page](http://jeseme.org/help.html)
2,282
hellrich/coling2016
['word embeddings']
['Bad Company---Neighborhoods in Neural Embedding Spaces Considered Harmful']
python/compare_top1_over_models_by_frequency.py python/word_percentile_rank.py python/train_store_intermediate_resumable.py python/example-neighborhoods.py python/evaluate_models.py python/compare_word_over_models.py python/word_percentile_rank_and_neighbor.py python/compare_frequent_top1_over_models_by_synsets.py python/compare_top1_over_models_by_synsets.py python/compare_word_over_models_min.py python/accuracy.py python/compare_top1_over_models_by_synsets_german.py python/compare_top1_over_models_by_synsets_german_v2.py python/similarity_correlation.py python/compare_all_over_models2.py python/compare_all_over_models.py main get_accuracy compare main intersection compare main intersection compare main intersection compare main intersection compare main intersection compare main intersection compare main intersection compare main common_with_limit intersection compare main common_with_limit intersection main get_reliability get_accuracy intersection main main correlation main update_vocab Corpus main main print accuracy sqrt load_word2vec_format sum range append len get_accuracy vocab print set load_word2vec_format union range len set compare print range int index synsets str lemmatise capitalize max load_germanet sum most_similar int min floor append max range enumerate len common_with_limit lower intersection join rsplit append int vocab union range set get_reliability join load_word2vec_format endswith spearmanr format mean correlation append pstdev vocab scan_vocab Vocab finalize_vocab append min_count scale_vocab vocab build_vocab save_word2vec_format train len update_vocab copy Word2Vec info save syn0 float sum Corpus makedirs index load_word2vec_format
Scripts used for Johannes Hellrich & Udo Hahn: Bad Company - Neighborhoods in Neural Embedding Spaces Considered Harmful. In: COLING 2016. Osaka, Japan, December 13-16, 2016, pp. 2785-2796. http://aclweb.org/anthology/C16-1262 Please note the follow up paper: https://github.com/JULIELab/dh2016
2,283
hellrich/latech2016
['semantic textual similarity']
['An Assessment of Experimental Protocols for Tracing Changes in Word Semantics Relative to Accuracy and Reliability']
python/compare_top1_over_models_by_frequency.py python/word_percentile_rank.py python/train.py python/evaluate_models.py python/compare_word_over_models.py python/compare_word_over_models_min.py python/compare_top1_over_models_by_synsets.py python/accuracy.py sampling/draw_sample.py sampling/partition.py python/compare_all_over_models2.py python/compare_all_over_models.py main get_accuracy compare main intersection compare main intersection compare main intersection compare main intersection compare main common_with_limit intersection compare main common_with_limit intersection main get_reliability get_accuracy intersection main update_vocab Corpus main Corpus flush flush print accuracy sqrt load_word2vec_format sum range append len get_accuracy vocab print set load_word2vec_format union range len set compare print range int index str synsets most_similar int min floor append max range enumerate len common_with_limit lower intersection join rsplit append int vocab union range set get_reliability join vocab scan_vocab Vocab finalize_vocab append min_count scale_vocab vocab build_vocab save_word2vec_format train len update_vocab copy Word2Vec info syn0 float sum Corpus makedirs index load_word2vec_format clear write
Scripts for Johannes Hellrich & Udo Hahn (2016): An Assessment of Experimental Protocols for Tracing Changes in Word Semantics Relative to Accuracy and Reliability. LaTeCH @ ACL 2016. http://aclweb.org/anthology/W/W16/W16-2114.pdf Please also note the experiments conducted for follow up papers: https://github.com/JULIELab/coling2016 and https://github.com/JULIELab/dh2016 Experiments were conducted with Python 3 and the following packages: boto 2.38.0 <pip> bz2file 0.98 <pip> cython 0.23.4 py34_0 gensim 0.10.3 np19py34_0 gensim 0.12.2 <pip>
2,284
hendrycks/init
['data augmentation']
['Adjusting for Dropout Variance in Batch Normalization and Weight Initialization']
densenets/BatchNormDNNLayer_custom.py densenets/densenet_fast.py densenets/cifar10.py densenets/progress.py densenets/densenet_fast_custom.py densenets/train_test.py cifar10.py densenets/cifar100.py densenets/update_var.py vgg.py cifar100.py progress.py iterate_minibatches download_dataset augment_minibatches load_dataset iterate_minibatches download_dataset augment_minibatches load_dataset progress generate_in_background Initializer train_test opts_parser Ours our_init GlobalAvgLayer build_vgg main BatchNormDNNLayer iterate_minibatches download_dataset augment_minibatches load_dataset iterate_minibatches download_dataset augment_minibatches load_dataset affine_relu_conv transition build_densenet dense_block affine_relu_conv transition build_densenet dense_block progress main train_test generate_in_background opts_parser main train_test generate_in_background opts_parser print urlopen close makedirs load join asarray reshape hstack int8 vstack download_dataset open arange slice shuffle range len dtype asarray shape zip randint empty time print divmod flush enumerate add_argument ArgumentParser get Thread object start Queue FlattenLayer DropoutLayer HeNormal MaxPool2DLayer DenseLayer GlorotUniform InputLayer Conv2DDNNLayer l2_fn iterate_minibatches function augment_minibatches get_value clip str ivector list set_value set_all_param_values elu adam load_dataset shared tensor4 range regularize_network_params generate_in_background floatX mean rectify get_output savez test_fn print l2 get_all_params reshape extend build_vgg progress len parse_args train_test opts_parser GlobalPoolLayer ScaleLayer Conv2DLayer BatchNormLayer BiasLayer DenseLayer transition elu NonlinearityLayer dense_block InputLayer range affine_relu_conv BatchNormLayer range ConcatLayer affine_relu_conv Pool2DLayer BatchNormLayer DropoutLayer ScaleLayer Conv2DLayer BiasLayer NonlinearityLayer nesterov_momentum build_densenet categorical_crossentropy
# Adjusting for Dropout Variance in Batch Normalization and Weight Initialization This software allows users to reproduce the results in Adjusting for Dropout Variance in Batch Normalization and Weight Initialization, Dan Hendrycks and Kevin Gimpel 2016. https://arxiv.org/abs/1607.02488 # Execution Please install Tensorflow, Lasagne, and Python 3+.
2,285
hendrycks/natural-adv-examples
['domain generalization', 'data augmentation', 'adversarial attack', 'out of distribution detection']
['Natural Adversarial Examples']
eval.py eval_many_models.py calibration_tools.py calib_err get_and_print_results aurra print_measures_with_std show_calibration_results tune_temp fpr_and_fdr_at_recall print_measures soft_f1 print_measures_old get_measures get_net_results get_predictions get_imagenet_a_results create_symlinks_to_imagenet get_imagenet_o_results maximum argsort nanmean sqrt abs range len cumsum arange len Problem value LongTensor FloatTensor Variable min solve requires_grad_ sum array print format print calib_err format aurra slice argmin searchsorted unique abs reshape squeeze average_precision_score fpr_and_fdr_at_recall vstack zeros roc_auc_score len print int format int format print mean std append mean get_measures symlink listdir makedirs show_calibration_results print get_predictions dataset len get_predictions print_measures_old get_measures
# Natural Adversarial Examples We introduce [natural adversarial examples](https://arxiv.org/abs/1907.07174) -- real-world, unmodified, and naturally occurring examples that cause machine learning model performance to significantly degrade. __[Download the natural adversarial example dataset ImageNet-A for image classifiers here](https://people.eecs.berkeley.edu/~hendrycks/imagenet-a.tar).__ __[Download the natural adversarial example dataset ImageNet-O for out-of-distribution detectors here](https://people.eecs.berkeley.edu/~hendrycks/imagenet-o.tar).__ <img align="center" src="examples.png" width="400"> Natural adversarial examples from ImageNet-A and ImageNet-O. The black text is the actual class, and the red text is a ResNet-50 prediction and its confidence. ImageNet-A contains images that classifiers should be able to classify, while ImageNet-O contains anomalies of unforeseen classes which should result in low-confidence predictions. ImageNet-1K models do not train on examples from “Photosphere” nor “Verdigris” classes, so these images are anomalous. Many natural adversarial examples lead to wrong predictions, despite having no adversarial modifications as they are examples which occur naturally.
2,286
hendrycks/robustness
['adversarial defense', 'domain generalization']
['Benchmarking Neural Network Robustness to Common Corruptions and Perturbations']
ImageNet-P/create_p/make_tinyimagenet_p.py ImageNet-P/densenet_cosine_264_k48.py old/Icons-50/models/densenet.py ImageNet-C/test.py ImageNet-P/create_p/make_imagenet_p.py ImageNet-C/densenet_cosine_264_k48.py old/Icons-50/models/wrn.py old/Icons-50/models/msdnet.py old/auxiliary/ImageNet22K/test.py ImageNet-P/resnext_101_32x4d.py old/Icons-50/models/shake_shake.py old/Icons-50/models/resnet.py old/auxiliary/ImageNet22K/train.py old/Icons-50/models/augment.py ImageNet-P/utils/video_loader.py ImageNet-C/create_c/make_imagenet_64_c.py ImageNet-C/condensenet_converted.py old/Icons-50/train.py ImageNet-C/imagenet_c/imagenet_c/corruptions.py ImageNet-C/create_c/make_imagenet_c.py ImageNet-C/create_c/make_tinyimagenet_c.py ImageNet-P/create_p/make_imagenet_p_inception.py ImageNet-P/resnext_50_32x4d.py old/auxiliary/CIFAR100/train.py ImageNet-P/create_p/make_imagenet_64_p.py old/Icons-50/models/resnext.py ImageNet-C/create_c/make_imagenet_c_inception.py ImageNet-P/test.py ImageNet-P/cifar-p-eval.py ImageNet-C/imagenet_c/setup.py ImageNet-P/resnext_101_64x4d.py ImageNet-C/layers.py ImageNet-P/create_p/make_cifar_p.py ImageNet-C/imagenet_c/imagenet_c/__init__.py ImageNet-C/create_c/make_cifar_c.py _DenseLayer _Transition CondenseNet _DenseBlock Lambda LambdaBase LambdaReduce LambdaMap CondenseConv CondensingLinear CondenseLinear ShuffleLayer Conv LearnedGroupConv CondensingConv show_performance auc glass_blur plasma_fractal jpeg_compression frost zoom_blur speckle_noise contrast disk brightness spatter pixelate defocus_blur clipped_zoom gaussian_noise impulse_noise motion_blur fog snow elastic_transform shot_noise saturate MotionImage gaussian_blur is_image_file DistortImageFolder make_dataset glass_blur plasma_fractal jpeg_compression find_classes frost zoom_blur speckle_noise contrast disk brightness save_distorted accimage_loader default_loader spatter pixelate defocus_blur clipped_zoom pil_loader auc gaussian_noise impulse_noise motion_blur fog snow elastic_transform shot_noise saturate MotionImage gaussian_blur is_image_file DistortImageFolder make_dataset glass_blur plasma_fractal jpeg_compression find_classes frost zoom_blur speckle_noise contrast disk brightness save_distorted accimage_loader default_loader spatter pixelate clipped_zoom defocus_blur pil_loader auc gaussian_noise impulse_noise motion_blur fog snow elastic_transform shot_noise fgsm saturate MotionImage gaussian_blur is_image_file DistortImageFolder make_dataset glass_blur resize plasma_fractal jpeg_compression find_classes frost zoom_blur center_crop speckle_noise resized_center_crop contrast disk brightness save_distorted accimage_loader default_loader spatter pixelate clipped_zoom defocus_blur pil_loader auc gaussian_noise impulse_noise motion_blur fog snow elastic_transform shot_noise saturate MotionImage gaussian_blur is_image_file DistortImageFolder make_dataset glass_blur plasma_fractal jpeg_compression find_classes frost zoom_blur speckle_noise contrast disk brightness save_distorted accimage_loader default_loader spatter pixelate defocus_blur clipped_zoom pil_loader auc gaussian_noise impulse_noise motion_blur fog snow elastic_transform shot_noise saturate MotionImage gaussian_blur glass_blur plasma_fractal jpeg_compression frost zoom_blur speckle_noise contrast disk brightness spatter pixelate defocus_blur clipped_zoom gaussian_noise impulse_noise motion_blur fog snow elastic_transform shot_noise fgsm saturate MotionImage gaussian_blur corrupt flip_prob ranking_dist dist evaluate Lambda LambdaBase LambdaReduce LambdaMap Lambda LambdaBase LambdaReduce LambdaMap Lambda LambdaBase LambdaReduce LambdaMap Lambda LambdaBase LambdaReduce LambdaMap ranking_dist dist flip_prob to_numpy MotionImage brightness clipped_zoom MotionImage brightness clipped_zoom MotionImage brightness clipped_zoom center_crop brightness resize MotionImage clipped_zoom resized_center_crop MotionImage brightness clipped_zoom VideoFolder test_out train test test_out test_in FineTuneModel my_collate MyImageFolder test_in train FineTuneModel cosine_annealing train test RandomErasing initialize_weights DenseNet TransitionBlock BottleneckBlock BasicBlock _DynamicInputDenseBlock get_conv_params Transition CifarClassifier MSDLayer MSDNet GCN MSDFirstLayer initialize_weights ResNet BasicBlock BottleneckBlock initialize_weights ResNeXt BottleneckBlock initialize_weights ResNeXt ResidualPath ShakeFunction get_alpha_beta DownsamplingShortcut BasicBlock BasicBlock NetworkBlock WideResNet size view contiguous range len print len ImageFolder DataLoader append V range cuda net enumerate meshgrid arange array filldiamonds empty fillsquares ceil int scizoom array array random_noise array array gaussian array uint8 gaussian randint array range transpose disk filter2D append array range uint8 BytesIO make_blob fromstring imdecode save IMREAD_UNCHANGED MotionImage astype float32 zeros_like len max array randint imread resize fromarray normal uint8 BytesIO motion_blur make_blob reshape fromstring astype maximum imdecode array save IMREAD_UNCHANGED MotionImage clipped_zoom DIST_L2 threshold where gaussian COLOR_GRAY2BGRA CV_8U COLOR_BGR2BGRA normal Canny concatenate astype distanceTransform THRESH_TRUNC uint8 equalizeHist float32 filter2D array cvtColor mean array hsv2rgb rgb2hsv array clip hsv2rgb rgb2hsv array clip BytesIO save open BOX resize warpAffine arange getAffineTransform min astype float32 shape meshgrid array lower sort is_image_file join sorted append expanduser listdir walk print DistortImageFolder range DataLoader squeeze_ backward zero_grad source_net V cross_entropy int size isinstance int Number isinstance size round center_crop resize float fromarray argsort dist range append append int range V learning_rate view backward param_groups float zero_grad pi epochs mean cuda sin step long net enumerate enumerate eval dataset net cross_entropy len enumerate eval dataset net cross_entropy len list __init__ enumerate eval dataset net cross_entropy len print cross_entropy data data isinstance fill_ Conv2d zero_ BatchNorm2d kaiming_normal_ Linear int msd_kernel msd_share_weights msd_gcn_kernel Conv2d floor tensor rand view kaiming_normal
# Benchmarking Neural Network Robustness to Common Corruptions and Perturbations This repository contains the datasets and some code for the paper [Benchmarking Neural Network Robustness to Common Corruptions and Perturbations](https://arxiv.org/abs/1903.12261) (ICLR 2019) by Dan Hendrycks and Thomas Dietterich. Requires Python 3+ and PyTorch 0.3+. For evaluation, please download the data from the links below. ## ImageNet-C <img align="center" src="assets/imagenet-c.png" width="750"> [Download ImageNet-C here.](https://zenodo.org/record/2235448) [(Mirror.)](https://drive.google.com/drive/folders/1HDVw6CmX3HiG0ODFtI75iIfBDxSiSz2K?usp=sharing) [Download Tiny ImageNet-C here.](https://zenodo.org/record/2536630) [(Mirror.)](https://berkeley.box.com/s/6zt1qzwm34hgdzcvi45svsb10zspop8a) Tiny ImageNet-C has 200 classes with images of size 64x64, while ImageNet-C has all 1000 classes where each image is the standard size. For even quicker experimentation, there is [CIFAR-10-C](https://zenodo.org/record/2535967) and [CIFAR-100-C](https://zenodo.org/record/3555552). Evaluation using the JPEGs above is strongly prefered to computing the corruptions in memory, so that evaluation is deterministic and consistent. ## ImageNet-C Leaderboard ImageNet-C Robustness with a ResNet-50 Backbone trained on ImageNet-1K and evaluated on 224x224x3 images.
2,287
herilalaina/mosaic
['automl']
['Automated Machine Learning with Monte-Carlo Tree Search']
mosaic/simulation/scenario.py mosaic/strategy/early_stopping.py tests/test_example.py mosaic/__init__.py mosaic/simulation/test/test_scenario.py examples/configuration_space.py mosaic/env.py mosaic/simulation/parameter.py mosaic/test/test_node.py mosaic/strategy/policy.py docs/conf.py mosaic/external/ConfigSpace/util.py mosaic/simulation/rules.py mosaic/knowledge.py mosaic/node.py mosaic/strategy/rave.py mosaic/space.py mosaic/strategy/__init__.py mosaic/test/test_mcts.py mosaic/test/test_space.py examples/env.py mosaic/external/ConfigSpace/configuration_space.py mosaic/test/test_rules.py mosaic/utils.py mosaic/external/ConfigSpace/pcs_new.py setup.py mosaic/mcts.py mosaic/mosaic.py mosaic/test/test_env.py examples/machine_learning.py BuildExt read get_version Environment svm_from_cfg AbstractEnvironment MosaicEnvironment Knowledge MCTS Search Node Space probability_improvement random_uniform_on_log_space Timeout get_index_percentile expected_improvement ConfigurationSpace Configuration build_continuous read build_ordinal build_forbidden write build_condition build_constant build_categorical build_conjunction condition_specification get_random_neighbor impute_inactive_values fix_types get_one_exchange_neighbourhood_with_history deactivate_inactive_hyperparameters Parameter BaseRule ValueRule DependanceRule ChildRule ImportanceScenarioStatic WorkflowListTask WorkflowChoiceScenario BaseScenario AbstractWorkflowScenario WorkflowComplexScenario AbstractImportanceScenario TestScenario Hyperband Besa UCT PUCT RAVE BaseStrategy BaseEarlyStopping TestEnv TestMCTS TestNode TestRules TestSpace TestExample dirname abspath splitlines startswith pop SVC cross_val_score ceil len int isinstance default_value to_uniform log isinstance components list isinstance name strip build_condition append write StringIO seek get_descendant_literal_clauses int EqualsCondition isinstance InCondition LessThanCondition get_hyperparameter NotEqualsCondition GreaterThanCondition float range len add_condition strip ForbiddenAndConjunction add_hyperparameter add_forbidden_clause list OrderedDict find append replace OrConjunction ConfigurationSpace AndConjunction float condition_specification join parseString get_hyperparameter ForbiddenEqualsClause split ForbiddenAndConjunction get_forbiddens build_continuous list seek name append StringIO product build_ordinal build_forbidden get_descendant_literal_clauses build_constant build_categorical get_hyperparameters build_conjunction enumerate get_conditions isinstance parseString sort build_condition get isinstance name default_value dict configuration_space get_hyperparameters Configuration randint list change_hp_value _check_forbidden append sum get RandomState get_num_neighbors is_valid_configuration isfinite shuffle copy get_array configuration_space Configuration isinf keys pop int isinstance get_hyperparameter get_neighbors len get_hyperparameter_by_idx deepcopy RandomState get_dictionary isfinite get_hyperparameter configuration_space _num_hyperparameters Configuration randint pop appendleft list extendleft name get_all_unconditional_hyperparameters get_dictionary set add get_hyperparameters Configuration deque append int str isinstance name get_hyperparameters float
[![Build Status](https://travis-ci.org/herilalaina/mosaic.svg?branch=master)](https://travis-ci.org/herilalaina/mosaic) # Mosaic Mosaic is a Python library for pipeline optimization. This library implements Monte-Carlo Tree Search algorithm in order to find optimal pipeline. [Documentation](https://herilalaina.github.io/mosaic/) ### Installation Requirements * Python >= 3.5.6 * pygraphviz: necessary to generate dot image files (optional) ```commandline conda install graphviz
2,288
herilalaina/mosaic_ml
['automl']
['Automated Machine Learning with Monte-Carlo Tree Search']
mosaic_ml/model_config/pipeline/components/regression/decision_tree.py mosaic_ml/model_config/pipeline/components/feature_preprocessing/no_preprocessing.py mosaic_ml/model_config/pipeline/components/classification/xgradient_boosting.py mosaic_ml/model_config/classification/sgd.py mosaic_ml/model_config/classification/liblinear_svc.py mosaic_ml/model_config/classification/adaboost.py examples/update_metadata_util.py tests/test_metalearning.py mosaic_ml/model_config/pipeline/components/data_preprocessing/rescaling/none.py mosaic_ml/model_config/pipeline/components/regression/ridge_regression.py mosaic_ml/model_config/pipeline/components/data_preprocessing/balancing/balancing.py mosaic_ml/model_config/data_preprocessing/feature_agglomeration.py mosaic_ml/model_config/pipeline/components/feature_preprocessing/truncatedSVD.py mosaic_ml/model_config/pipeline/implementations/xgb.py mosaic_ml/model_config/pipeline/constants.py mosaic_ml/model_config/pipeline/components/regression/random_forest.py mosaic_ml/model_config/pipeline/components/regression/k_nearest_neighbors.py mosaic_ml/sklearn_env.py mosaic_ml/model_config/classification/multinomial_nb.py mosaic_ml/model_config/data_preprocessing/fast_ica.py mosaic_ml/automl.py mosaic_ml/model_config/pipeline/components/classification/__init__.py mosaic_ml/model_config/classification/extra_trees.py mosaic_ml/model_config/classification/lda.py mosaic_ml/model_config/pipeline/components/classification/random_forest.py mosaic_ml/model_config/pipeline/components/classification/liblinear_svc.py setup.py mosaic_ml/model_config/pipeline/implementations/OneHotEncoder.py mosaic_ml/model_config/data_preprocessing/kitchen_sinks.py mosaic_ml/model_config/classification/passive_aggressive.py mosaic_ml/model_config/data_preprocessing/polynomial.py mosaic_ml/model_config/pipeline/implementations/util.py mosaic_ml/model_config/classification/xgradient_boosting.py mosaic_ml/model_config/pipeline/components/regression/xgradient_boosting.py mosaic_ml/model_config/data_preprocessing/nystroem_sampler.py mosaic_ml/model_config/pipeline/base.py mosaic_ml/model_config/pipeline/components/base.py mosaic_ml/model_config/pipeline/components/feature_preprocessing/random_trees_embedding.py mosaic_ml/model_config/pipeline/components/data_preprocessing/rescaling/normalize.py mosaic_ml/model_config/classification/gradient_boosting.py mosaic_ml/model_config/data_preprocessing/truncatedSVD.py mosaic_ml/model_config/pipeline/components/classification/multinomial_nb.py mosaic_ml/model_score.py mosaic_ml/model_config/classification/get_classifier.py mosaic_ml/mosaic_wrapper/mcts.py mosaic_ml/model_config/data_preprocessing/random_trees_embedding.py mosaic_ml/data_manager.py mosaic_ml/model_config/pipeline/components/regression/extra_trees.py mosaic_ml/model_config/pipeline/components/feature_preprocessing/densifier.py mosaic_ml/model_config/pipeline/components/regression/ard_regression.py mosaic_ml/model_config/pipeline/components/regression/__init__.py mosaic_ml/model_config/pipeline/components/feature_preprocessing/nystroem_sampler.py mosaic_ml/model_config/pipeline/components/feature_preprocessing/extra_trees_preproc_for_classification.py mosaic_ml/model_config/data_preprocessing/densifier.py mosaic_ml/model_config/pipeline/components/classification/decision_tree.py mosaic_ml/model_config/pipeline/components/feature_preprocessing/select_percentile.py mosaic_ml/ensemble.py mosaic_ml/model_config/classification/k_nearest_neighbors.py mosaic_ml/model_config/pipeline/components/classification/bernoulli_nb.py mosaic_ml/model_config/pipeline/components/regression/adaboost.py mosaic_ml/model_config/pipeline/components/data_preprocessing/rescaling/robust_scaler.py mosaic_ml/model_config/pipeline/components/classification/gaussian_nb.py mosaic_ml/model_config/classification/decision_tree.py mosaic_ml/model_config/pipeline/components/feature_preprocessing/pca.py mosaic_ml/model_config/pipeline/components/classification/sgd.py mosaic_ml/model_config/pipeline/components/feature_preprocessing/kernel_pca.py mosaic_ml/model_config/pipeline/components/data_preprocessing/one_hot_encoding/no_encoding.py mosaic_ml/__init__.py mosaic_ml/model_config/pipeline/classification.py mosaic_ml/model_config/data_preprocessing/kernel_pca.py mosaic_ml/model_config/pipeline/components/data_preprocessing/imputation/imputation.py mosaic_ml/model_config/classification/qda.py mosaic_ml/model_config/classification/random_forest.py mosaic_ml/model_config/pipeline/components/data_preprocessing/rescaling/__init__.py mosaic_ml/model_config/pipeline/components/feature_preprocessing/polynomial.py examples/run_mosaic_ml.py mosaic_ml/model_config/classification/logistc_regression.py mosaic_ml/model_config/pipeline/components/classification/gradient_boosting.py mosaic_ml/model_config/classification/dummy.py mosaic_ml/model_config/pipeline/components/classification/lda.py mosaic_ml/model_config/pipeline/components/feature_preprocessing/extra_trees_preproc_for_regression.py mosaic_ml/evaluator.py mosaic_ml/model_config/pipeline/components/classification/extra_trees.py mosaic_ml/model_config/pipeline/components/regression/libsvm_svr.py tests/test_vanilla.py tests/test_ensemble.py mosaic_ml/metafeatures.py mosaic_ml/model_config/classification/gaussian_nb.py mosaic_ml/model_config/data_preprocessing/liblinear_svc_preprocessor.py mosaic_ml/model_config/pipeline/components/data_preprocessing/rescaling/quantile_transformer.py mosaic_ml/model_config/pipeline/components/regression/sgd.py mosaic_ml/autosklearn_wrapper/metalearner.py mosaic_ml/model_config/data_preprocessing/get_data_preprocessing.py mosaic_ml/model_config/data_preprocessing/select_rates.py mosaic_ml/model_config/pipeline/components/data_preprocessing/variance_threshold/variance_threshold.py mosaic_ml/model_config/pipeline/implementations/__init__.py mosaic_ml/model_config/pipeline/components/regression/gaussian_process.py mosaic_ml/model_config/pipeline/components/data_preprocessing/one_hot_encoding/__init__.py mosaic_ml/model_config/pipeline/components/feature_preprocessing/feature_agglomeration.py mosaic_ml/model_config/pipeline/components/data_preprocessing/rescaling/abstract_rescaling.py mosaic_ml/model_config/pipeline/components/classification/k_nearest_neighbors.py mosaic_ml/model_config/classification/libsvm_svc.py mosaic_ml/autosklearn_wrapper/mismbo.py mosaic_ml/model_config/encoding/OneHotEncoding.py mosaic_ml/model_config/data_preprocessing/extra_trees_preproc_for_classification.py mosaic_ml/model_config/pipeline/components/classification/adaboost.py mosaic_ml/model_config/pipeline/components/data_preprocessing/one_hot_encoding/one_hot_encoding.py mosaic_ml/autosklearn_wrapper/autosklearn.py mosaic_ml/model_config/pipeline/components/feature_preprocessing/fast_ica.py mosaic_ml/model_config/classification/bernouilli_nb.py mosaic_ml/model_config/pipeline/components/data_preprocessing/rescaling/minmax.py mosaic_ml/model_config/pipeline/components/regression/liblinear_svr.py mosaic_ml/model_config/data_preprocessing/pca.py mosaic_ml/model_config/pipeline/components/feature_preprocessing/select_percentile_regression.py mosaic_ml/model_config/pipeline/util.py mosaic_ml/model_config/pipeline/components/classification/passive_aggressive.py mosaic_ml/model_config/pipeline/components/feature_preprocessing/__init__.py mosaic_ml/model_config/pipeline/components/feature_preprocessing/liblinear_svc_preprocessor.py mosaic_ml/model_config/pipeline/components/data_preprocessing/rescaling/standardize.py mosaic_ml/model_config/pipeline/create_searchspace_util.py mosaic_ml/model_config/data_preprocessing/select_percentile_classification.py mosaic_ml/model_config/pipeline/components/feature_preprocessing/select_percentile_classification.py mosaic_ml/model_config/pipeline/regression.py mosaic_ml/model_config/pipeline/components/regression/gradient_boosting.py mosaic_ml/mosaic_wrapper/mosaic.py mosaic_ml/model_config/util.py mosaic_ml/model_config/pipeline/components/classification/qda.py mosaic_ml/model_config/pipeline/components/feature_preprocessing/kitchen_sinks.py mosaic_ml/model_config/pipeline/components/classification/libsvm_svc.py mosaic_ml/model_config/pipeline/components/feature_preprocessing/select_rates.py BuildExt read get_version load_task AutoML DataManager Ensemble evaluate get_sample_weight evaluation_rescaling evaluate_imputation run_pipeline config_to_pipeline test_function evaluate_generate_metadata evaluate_encoding get_dataset_metafeature_from_openml ScoreModel SklearnEnv get_autosklearn_metalearning _calculate_metafeatures__ _calculate_metafeatures_encoded__ MetaLearningOptimizer test_function suggest_via_metalearning suggest_via_metalearning_ check_for_bool convert_multioutput_multiclass_to_multilabel check_true check_false check_none softmax get_model AdaboostClassifier get_model BernoulliNB get_model get_configuration_DummyClassifier get_model ExtraTreesClassifier get_model GaussianNB evaluate_classifier get_model get_model get_model LDA LibLinear_SVC get_model get_model LibSVM_SVC get_model get_model MultinomialNB get_model PassiveAggressive get_model QDA get_model get_model SGD get_model Densifier get_model FastICA get_model get_model FeatureAgglomeration evaluate get_model KernelPCA get_model RandomKitchenSinks get_model get_model Nystroem get_model PCA get_model PolynomialFeatures get_model RandomTreesEmbedding SelectPercentileBase get_model SelectPercentileClassification SelectRates get_model get_model TruncatedSVD _transform_selected OneHotEncoder BasePipeline get_match_array find_active_choices add_forbidden SimpleRegressionPipeline _test_preprocessing _test_classifier_iterative_fit PreprocessingTestCase get_dataset _test_classifier_predict_proba _test_regressor_iterative_fit _test_classifier _test_regressor find_sklearn_classes ThirdPartyComponents AutoSklearnPreprocessingAlgorithm AutoSklearnClassificationAlgorithm AutoSklearnComponent find_components AutoSklearnRegressionAlgorithm AutoSklearnChoice IterativeComponent IterativeComponentWithSampleWeight AdaboostClassifier BernoulliNB DecisionTree ExtraTreesClassifier GaussianNB GradientBoostingClassifier KNearestNeighborsClassifier LDA LibLinear_SVC LibSVM_SVC MultinomialNB PassiveAggressive QDA RandomForest SGD XGradientBoostingClassifier ClassifierChoice add_classifier Balancing Imputation NoEncoding OneHotEncoder add_ohe OHEChoice Rescaling MinMaxScalerComponent NoRescalingComponent NormalizerComponent QuantileTransformerComponent RobustScalerComponent StandardScalerComponent RescalingChoice add_rescaler VarianceThreshold Densifier ExtraTreesPreprocessorClassification ExtraTreesPreprocessorRegression FastICA FeatureAgglomeration KernelPCA RandomKitchenSinks LibLinear_Preprocessor NoPreprocessing Nystroem PCA PolynomialFeatures RandomTreesEmbedding SelectPercentileBase SelectPercentileClassification SelectPercentileRegression SelectRates TruncatedSVD FeaturePreprocessorChoice add_preprocessor AdaboostRegressor ARDRegression DecisionTree ExtraTreesRegressor GaussianProcess GradientBoosting KNearestNeighborsRegressor LibLinear_SVR LibSVM_SVR RandomForest RidgeRegression SGD XGradientBoostingRegressor RegressorChoice add_regressor _transform_selected OneHotEncoder convert_multioutput_multiclass_to_multilabel softmax train CustomXGBClassifier CustomXGBRegressor _train_internal CustomXGBModel MctsML SearchML test_ensemble test_metalearning test_get_metalearning_AS test_vanilla dirname abspath splitlines startswith get_task get_train_test_split_indices get_X_and_y get_dataset get_data unique dataset_id array SimpleImputer FunctionTransformer OneHotEncoder Normalizer FunctionTransformer RobustScaler MinMaxScaler StandardScaler QuantileTransformer ones mean shape unique sum enumerate set_params list evaluate ColumnTransformer evaluate_classifier evaluation_rescaling Pipeline append keys evaluate_encoding time filterwarnings filterwarnings filterwarnings hasattr add_data clone roc_auc_score predict fit dataset_id get_task append get_dataset list calculate_all_metafeatures_with_labels keys calculate_all_metafeatures_encoded_labels list keys join issparse format _calculate_metafeatures_encoded__ get_configuration_space __file__ add_dataset suggest_via_metalearning_ MetaBase dirname perform_one_hot_encoding metalearning_suggest_all time MetaLearningOptimizer metalearning_suggest_all_ time MetaLearningOptimizer check_true check_false reshape exp ndarray isinstance enumerate AdaboostClassifier startswith BernoulliNB DecisionTree WorkflowListTask ExtraTreesClassifier GradientBoostingClassifier KNeighborsClassifier LDA LibLinear_SVC LibSVM_SVC MultinomialNB PassiveAggressive QDA RandomForest SGD XGBClassifier ExtraTreesPreprocessorClassification FastICA FeatureAgglomeration KernelPCA RandomKitchenSinks LibLinear_Preprocessor Nystroem PCA PolynomialFeatures RandomTreesEmbedding SelectPercentileClassification SelectRates TruncatedSVD arange check_array logical_not transform zeros sum get list hasattr product ones append keys values append tuple get_available_components enumerate add_forbidden_clause list hasattr product tuple ForbiddenAndConjunction ForbiddenEqualsClause set add enumerate get_hyperparameter get_available_components append zeros keys range values len getmembers sorted replace print iter_modules set add import_module append walk int RandomState arange eliminate_zeros min astype float32 shuffle target choice NaN unique zeros range csc_matrix len hasattr iterative_fit get_hyperparameter_search_space get_dataset counter classifier n_calls get_default_configuration predict fit iterative_fit get_hyperparameter_search_space get_dataset classifier get_default_configuration predict get_hyperparameter_search_space get_dataset predict_proba classifier get_default_configuration fit copy get_hyperparameter_search_space get_dataset Preprocessor get_default_configuration fit str hasattr iterative_fit get_hyperparameter_search_space get_dataset Regressor counter hash n_calls get_default_configuration predict fit iterative_fit get_hyperparameter_search_space get_dataset Regressor get_default_configuration predict OrderedDict import_module getmembers iter_modules add_component add_component add_component add_component add_component join join decode Booster load_rabit_checkpoint eval_set list cb CallbackEnv save_rabit_checkpoint get_rank range update get_dump best_iteration save_raw float attr pop items int isinstance dict len isinstance reset_learning_rate warn append record_evaluation print_evaluation early_stop load_task fit AutoML load_task get_autosklearn_metalearning load_task get_autosklearn_metalearning fit AutoML load_task fit AutoML
herilalaina/mosaic_ml
2,289
hexiangnan/neural_factorization_machine
['link prediction']
['Neural Factorization Machines for Sparse Predictive Analytics']
NeuralFM.py LoadData.py FM.py parse_args FM LoadData parse_args NeuralFM add_argument ArgumentParser
# Neural Factorization Machines This is our implementation for the paper: Xiangnan He and Tat-Seng Chua (2017). [Neural Factorization Machines for Sparse Predictive Analytics.](http://www.comp.nus.edu.sg/~xiangnan/papers/sigir17-nfm.pdf) In Proceedings of SIGIR '17, Shinjuku, Tokyo, Japan, August 07-11, 2017. We have additionally released our TensorFlow implementation of Factorization Machines under our proposed neural network framework. **Please cite our SIGIR'17 paper if you use our codes. Thanks!** Author: Dr. Xiangnan He (http://www.comp.nus.edu.sg/~xiangnan/) ## Example to run the codes. ``` python NeuralFM.py --dataset frappe --hidden_factor 64 --layers [64] --keep_prob [0.8,0.5] --loss_type square_loss --activation relu --pretrain 0 --optimizer AdagradOptimizer --lr 0.05 --batch_norm 1 --verbose 1 --early_stop 1 --epoch 200
2,290
heyinUCB/IQCbased_ImitationLearning
['imitation learning']
['Imitation Learning with Stability and Safety Guarantees']
GTM2state LQR/logz.py pendulum_explicit_MPC/NN_policy.py vehicle_explicit_MPC/NN_policy.py pendulum_explicit_MPC/logz.py vehicle_explicit_MPC/logz.py GTM2state LQR/NN_policy.py save_params configure_output_dir G colorize pickle_tf_vars log_tabular dump_tabular build_mlp Agent setup_logger block_diagonal solve_NNfit main normalize unnormalize save_params configure_output_dir G colorize pickle_tf_vars log_tabular dump_tabular build_mlp Agent setup_logger block_diagonal solve_NNfit main normalize unnormalize save_params configure_output_dir G colorize pickle_tf_vars log_tabular dump_tabular build_mlp Agent setup_logger block_diagonal solve_NNfit main normalize unnormalize append str join print name makedirs close output_dir register open append first_row get join clear hasattr print write first_row map append log_headers max flush configure_output_dir with_rank_at_least concatenate TensorShape Dimension concat merge_with shape pad add_n set_shape append Agent locals close setup_logger reset_default_graph ConfigProto Session str tolist strftime matmul solve_NNfit int64 dirname append double range start_matlab colorize block realpath join tanh solve_sdp print eye array makedirs values read_csv
# IQCbased_ImitationLearning This code is to accompany the paper [Imitation Learning with Stability and Safety Guarantees](https://arxiv.org/pdf/2012.09293.pdf). It learns a Neural Network controller with stability and safety guarantees through imitation learning process. ### Authors: * He Yin (he_yin at berkeley.edu) * Peter Seiler (pseiler at umich.edu) * Ming Jin (jinming at vt.edu) * Murat Arcak (arcak at berkeley.edu) ## Getting Started The code is written in Python3 and MATLAB. ### Prerequisites
2,291
hezhangsprinter/DID-MDN
['single image deraining', 'density estimation']
['Density-aware Single Image De-raining using a Multi-stream Dense Network']
datasets/pix2pix_val.py datasets/pix2pix.py myutils/utils.py transforms/pix2pix_val.py datasets/pix2pix2.py myutils/vgg16.py train_rain_class.py models/derain_dense.py misc.py transforms/pix2pix_val3.py datasets/pix2pix_class.py test.py datasets/util.py datasets/classification.py myutils/StyleLoader.py transforms/pix2pix3.py derain_train_2018.py models/derain_residual.py transforms/pix2pix.py gradient AverageMeter ImagePool create_exp_dir adjust_learning_rate weights_init getLoader norm_ip norm_range is_image_file default_loader make_dataset classification is_image_file pix2pix default_loader make_dataset is_image_file pix2pix default_loader make_dataset is_image_file pix2pix default_loader make_dataset is_image_file pix2pix_val default_loader make_dataset u array2ntpl ntpl2array transpose_ntpl_list solve_status_str spnoise tiledict surf Timer ContextTimer convdicts imageblocks imview plot ExampleImages idle_cpu_count tikhonov_filter complex_randn grid_search rgb2gray netgetdata conv_block BottleneckBlock1 Dense_rain4 TransitionBlock Dense_rain Dense_base_down1 BottleneckBlock D1 blockUNet1 D deconv_block TransitionBlock1 BottleneckBlock2 TransitionBlock3 vgg19ca Dense_base_down0 blockUNet Dense_base_down2 conv_block BottleneckBlock1 Dense_rain_residual TransitionBlock Dense_base_down1 BottleneckBlock D1 blockUNet1 D deconv_block TransitionBlock1 BottleneckBlock2 TransitionBlock3 Dense_base_down0 blockUNet Dense_base_down2 StyleLoader add_imagenet_mean_batch subtract_imagenet_mean_batch init_vgg16 preprocess_batch gram_matrix tensor_load_rgbimage tensor_save_rgbimage imagenet_clamp_batch tensor_save_bgrimage Vgg16 Pad ToPILImage CenterCrop Lambda ToTensor Compose Scale RandomCrop Normalize RandomHorizontalFlip Pad ToPILImage CenterCrop Lambda ToTensor Compose Scale RandomCrop Normalize RandomHorizontalFlip Pad ToPILImage CenterCrop Lambda ToTensor Compose Scale RandomCrop Normalize RandomHorizontalFlip Pad ToPILImage CenterCrop Lambda ToTensor Compose Scale RandomCrop Normalize RandomHorizontalFlip abs print makedirs normal_ __name__ fill_ commonDataset DataLoader param_groups clamp_ div_ norm_ip max min is_image_file join sorted append walk warn warn warn namedtuple _fields __name__ namedtuple tuple len int T ones reshape min shape sqrt floor tile ceil float max range amax itemsize as_strided rollaxis reshape ascontiguousarray dstack shape array atleast_nd array ndim shape uniform copy reshape ndim pad ifftn real fftn conj int cpu_count floor join list product isinstance slct reshape tuple argmin cpu_count map close shape array unravel_index argmax Pool len load join list dirname keys urlopen range read ValueError Dropout2d Sequential add_module Conv2d ReLU BatchNorm2d LeakyReLU ConvTranspose2d Dropout2d Sequential add_module Conv2d ReLU BatchNorm2d LeakyReLU ConvTranspose2d int ANTIALIAS transpose convert resize float fromarray numpy astype save chunk tensor_save_rgbimage cat bmm size transpose view data size type tensortype data size type tensortype clamp_ transpose chunk cat join Vgg16 load_lua system parameters save zip state_dict
# DID-MDN ## Density-aware Single Image De-raining using a Multi-stream Dense Network [He Zhang](https://sites.google.com/site/hezhangsprinter), [Vishal M. Patel](http://www.rci.rutgers.edu/~vmp93/) [[Paper Link](https://arxiv.org/abs/1802.07412)] (CVPR'18) We present a novel density-aware multi-stream densely connected convolutional neural network-based algorithm, called DID-MDN, for joint rain density estimation and de-raining. The proposed method enables the network itself to automatically determine the rain-density information and then efficiently remove the corresponding rain-streaks guided by the estimated rain-density label. To better characterize rain-streaks with dif- ferent scales and shapes, a multi-stream densely connected de-raining network is proposed which efficiently leverages features from different scales. Furthermore, a new dataset containing images with rain-density labels is created and
2,292
hfawaz/aime19
['time series', 'dynamic time warping']
['Automatic alignment of surgical videos using kinematic data']
src/videowarping.py src/main.py src/distances/dtw/setup.py src/nlts.py src/dba.py medoid _dba_iteration calculate_dist_matrix dba align_2_videos get_user_name_and_trial_num find_pattern get_osats_score_between_two_surgeries generateMaps dtw_synch get_multi_dtw_vectors getExpertiseLevelOfSurgery align_videos convertStringClassesToBinaryClasses get_all_dtw_vectors fit_encoder get_list_of_surgeries getMetaDataForSurgeries readFile get_dtw_vectors get_dtw_score_between_two_surgeries generateGesturesForSurgery un_fold_set compute_associations_by_sequence compute_associations_by_sequence_with_index videowarping multiplevideowarping zeros range len argmin sum calculate_dist_matrix len zeros dist_fun range len inf print ones _dba_iteration copy randint range len __contains__ strip split open fit transform to_categorical len loadtxt getExpertiseLevelOfSurgery OrderedDict getMetaDataForSurgeries readFile walk generateGesturesForSurgery OrderedDict int readFile append zeros dtw concatenate list generateMaps concatenate OrderedDict dtw zeros keys generateMaps compute_associations_by_sequence_with_index concatenate len OrderedDict append zeros max range dba dtw_synch generateMaps generateMaps range len get_multi_dtw_vectors multiplevideowarping videowarping get_dtw_vectors compute_associations_by_sequence avg_method array append zeros round max range len append dist_fun range len append dist_fun range len get VideoCapture int read concatenate resize zeros write shape unique VideoWriter CAP_PROP_FPS VideoWriter_fourcc range release len VideoCapture FONT_HERSHEY_SIMPLEX VideoWriter resize CAP_PROP_FPS CAP_PROP_FRAME_COUNT VideoWriter_fourcc release shape append range get COLOR_BGR2GRAY concatenate unique int read print putText write repeat zeros cvtColor len
# Automatic alignment of surgical videos using kinematic data This is the companion repository for [our paper](https://link.springer.com/chapter/10.1007/978-3-030-21642-9_14) also available on [ArXiv](https://arxiv.org/abs/1904.07302), titled "Automatic alignment of surgical videos using kinematic data". This paper has been accepted at the [Conference on Artificial Intelligence in Medicine (AIME) 2019](http://aime19.aimedicine.info/). ## Approach The following is an example on how a time series alignment is used to synchronize the videos by duplicating the gray-scale frames. Video without alignment | Video with alignment :-------------------------:|:-------------------------: ![unsynched](https://github.com/hfawaz/aime19/blob/master/img/ts-videos.png) | ![synched](https://github.com/hfawaz/aime19/blob/master/img/ts-videos-synched.png) The following is an example of aligning coordinate X’s time series for subject F, when performing three trials of the suturing surgical task. Time series without alignment | Time series with alignment
2,293
hfslyc/GCPNet
['scene parsing']
['Scene Parsing with Global Context Embedding']
eval.py python_layers/mit_scene_layers_ar.py get_arguments MITSceneDataLayer add_argument ArgumentParser
# Scene Parsing with Global Context Embedding This repo is the caffe implementation of the following paper: [Scene Parsing with Global Context Embedding](https://arxiv.org/abs/1710.06507) <br/> [Wei-Chih Hung](http://hfslyc.github.io), [Yi-Hsuan Tsai](https://sites.google.com/site/yihsuantsai/), [Xiaohui Shen](https://research.adobe.com/person/xiaohui-shen/), [Zhe Lin](https://research.adobe.com/person/zhe-lin/), [Kalyan Sunkavalli](https://research.adobe.com/person/kalyan-sunkavalli/), Xin Lu, and [Ming-Hsuan Yang](http://faculty.ucmerced.edu/mhyang/). In ICCV, 2017.
2,294
hhexiy/interpretese
['machine translation']
['Interpretese vs. Translationese: The Uniqueness of Human Strategies in Simultaneous Interpretation']
lib/vocabulary.py src/count_statistics.py lib/corpus.py lib/util.py lib/vw.py lib/bleu.py bleu smooth_bleu bleu_stats Word JaSentence SentencePair EnSentence Sentence ParallelCorpus remove_punct is_stopword word2num remove_non_ascii plot_stacked_histogram get_bigrams is_punct bin_val ttest stem clean_tags plot_histogram get_unigrams get_trigrams StopWords dump is_sent_end print_table remove_keys remove_tags mean tokenize load ftest which_bin Vocabulary Feat VW get_tag_masks count_passive compare_omission compare_length ttest count_num_sents human_consistency bleu_score count_inversion compare_segments get_omission_weights intersect_alignments count_omission plot_inversion filter_by_alignments compare_passive compare_inversions count_mtu compare_word_rank range Counter sum print search UNICODE print format enumerate len savefig bar subplots histogram enumerate subplots bar savefig histogram zip append range len std ttest_rel print mean array cdf std len split append category join sub split findall len UNICODE sub compile sent_pairs print range len format sent_pairs remove_keys set zip keys alignments sent_pairs get_inversion print append len set_title plot set_xlabel add_subplot set_ylabel savefig figure append zip sent_pairs zip items list print mean append float sum len defaultdict ttest print text human_consistency zip append enumerate sent_pairs print words write close en_sent ja_sent zip get_labeled_sent enumerate open sent_pairs get_mtus good_alignment print sent_pairs items list defaultdict tok add tag set get_omission zip log sent_pairs items sorted defaultdict list get_omission zip append float sent_pairs ttest print zip append get_word_rank sent_pairs encode ttest ttest_rel get_omission_weights print count_omission zip append sum join get_sents size split append float max range enumerate len add_subplot list sorted defaultdict ttest set_xlabel count_num_sents human_consistency savefig append sum range plot set zip enumerate items print text set_ylabel figure print count_inversion encode ttest
# Interpretese vs. Translationese Code and data for the paper "Interpretese vs. Translationese: The Uniqueness of Human Strategies in Simultaneous Interpretation" published in NAACL 2016. ## Dataset Please see README in `dat`. ## Dependencies You need to install [Vowpal Wabbit](https://github.com/JohnLangford/vowpal_wabbit) for classification. ## Run analysis scripts The main script is `src/count_statistics.py`. The following arguments are required to load the data: ```
2,295
hhhhnwl/PointRend-simple-pytorch
['instance segmentation', 'semantic segmentation']
['PointRend: Image Segmentation as Rendering']
point_rend.py PointRend MLP
# PointRend-pytorch This is an unofficial implementation of PointRend function. The paper can be find at <https://arxiv.org/pdf/1912.08193.pdf> We only define a simple structure of PointRend function with out any segmentation structure. # Instructions Build a PointRend block: ```python from point_rend import PointRend #use random value coarse_prediction = torch.rand([32, 3, 128, 128]).cuda() fine_grained = torch.rand([32, 128, 128, 128]).cuda()
2,296
hichamjanati/spatio-temporal-alignements
['time series', 'dynamic time warping']
['Spatio-Temporal Alignments: Optimal transport through space and time', 'Averaging Spatio-temporal Signals using Optimal Transport and Soft Alignments']
sta/sta/sta.py theoretical-bound/plot_bound.py theoretical-bound/plot_example.py brain-imaging/plot_tsne_brain.py chars/plot_chars.py sta/sta/__init__.py sta/sta/sinkhorn.py sta/sta/utils.py brain-imaging/plot_brains.py sta/setup.py chars/plot_tsne_chars.py sta/sta/distance.py chars/process_chars.py sta/sta/_version.py brain-imaging/run_tsne_brain.py chars/run_tsne_chars.py generate_samples imshow process_data SinkhornDistance negentropy_log wkllog negentropy wkl_parallel negentropy_log_ wbarycenter monster_img monster_img_log wimgkl_parallel convol_huge_imgs amarikl convol_huge negentropy_img_log wimgkl convol_old wkl convol_imgs_log wbarycenterkl wimg monster monster_log negentropy_img divergencekl convol_huge_imgs_log wimg_parallel convol_huge_log convol_imgs sdtw_matrix sta_distances sta_distances_parallel sta_matrix compute_sdtw dtw wklobjective groundmetric_img compute_gamma prox_simplex_all tonumpy get_module fancy_imshow generate_time_series show_ts cost_matrix kl groundmetric2d wklobjective_plan groundmetric gauss phi get_quadratic_bound psi compute_sdtw gauss plot1D_mat gaussian_mixture make_full_path generate_path T exp RandomState arange rand astype choice dot enumerate len T subplots set_title set_yticks shape set_xticks set_ylabel ravel enumerate int cumsum ones size loadmat astype gaussian_filter nan append zeros empty max range enumerate len ones_like format clone warn t sum range ones_like format clone warn t shape sum prod range convol_imgs ones_like format clone warn t shape mean sum range convol_imgs einsum t zeros_like enumerate ones_like format clone warn t sum range convol_imgs ones_like format mm warn t sum range ones_like format exp zeros_like logsumexp range t warn item sum log ones_like format clone warn sum range convol_imgs sum ones_like format clone warn t mm range ones_like format exp zeros_like clone logsumexp range warn item sum log zeros_like shape zeros negentropy_log_ enumerate ones_like format clone warn t sum range convol_imgs shape reshape convol_imgs shape mm reshape shape reshape logsumexp shape logsumexp shape reshape logsumexp format ones clone warn t convol_huge_imgs sum range len format exp ones clone range warn t convol_huge_imgs_log zeros sum log len convol_huge format ones clone warn t shape sum range len format exp zeros_like ones clone warn t shape convol_huge_log sum range len wxy wxx format exp zeros_like clone range warn sum convol_imgs_log log ones_like format len clone warn t zeros sum range convol_imgs ones_like format mm clone warn t sum range zeros wxy wsym len _return_results accumulated_cost_matrix compute asarray ndarray isinstance range tonumpy jac shape dtw tensor SinkhornDistance sum zeros enumerate SoftDTW sta_distances print set_device copy tensor len Parallel append zeros range pll enumerate len compute print reshape SquaredEuclidean dtw len T reshape Parallel zeros range array pll len meshgrid abs astype median groundmetric2d groundmetric reshape groundmetric get_module subplots set_title set_yticks min imshow shape set_xticks set_ylabel zip max enumerate cumsum reshape clamp shape nelement device to argmax len get_module log zeros_like kl sum kl get_module ndarray isinstance subplots text imshow shape round range RandomState arange rand randint zeros tensor tensor median groundmetric2d groundmetric sum exp arange arange abs append sum log arange abs append sum log append sum zip gauss RandomState rand stack append array list arange hstack stack zip append generate_path arange grid GridSpec MultipleLocator set_minor_locator subplot set_title shape imshow plot set_xlim tight_layout zip T invert_yaxis set_yticks set_xticks figure set_ylim
hichamjanati/spatio-temporal-alignements
2,297
hijune6/DGTL-for-VT-ReID
['person re identification']
['Strong but Simple Baseline with Dual-Granularity Triplet Loss for Visible-Thermal Person Re-Identification']
train.py model_main.py test.py data_manager.py attention.py utils.py resnet.py eval_metrics.py data_loader.py loss.py AVG GEM IWPA Normalize MAX TestData SYSUData TestDataOld load_data RegDBData process_gallery_sysu process_test_regdb process_query_sysu eval_regdb eval_sysu HcTripletLoss CrossEntropyLabelSmooth OriTripletLoss FeatureBlock ClassBlock visible_module thermal_module embed_net base_resnet weights_init_classifier Normalize weights_init_kaiming ResNet resnet50 Bottleneck resnet152 conv3x3 remove_fc resnet34 resnet18 BasicBlock resnet101 extract_query_feat extract_gall_feat train adjust_learning_rate test set_seed set_requires_grad GenIdx IdentitySampler AverageMeter GenCamIdx ExtractCam load_data Logger mkdir_if_missing join sorted isdir extend append seed join sorted isdir choice append format invert format asarray print cumsum astype float32 where argsort shape mean int32 append sum max range invert format asarray print cumsum astype float32 where argsort shape mean int32 append sum max range data zeros_ normal_ kaiming_normal_ __name__ data bias zeros_ normal_ __name__ items list startswith load_url ResNet remove_fc load_state_dict load_url ResNet remove_fc load_state_dict load_url ResNet remove_fc load_state_dict load_url ResNet remove_fc load_state_dict load_url ResNet remove_fc load_state_dict time format print eval zeros time format print eval zeros param_groups lr range len criterion2 zero_grad adjust_learning_rate max cuda cat criterion1 update format size avg item net enumerate time backward Variable print add_scalar AverageMeter criterion_hc step len eval_regdb time format eval_sysu print transpose matmul eval zeros add_scalar append range unique len int unique append range len append int range len makedirs seed str manual_seed_all manual_seed parameters
# Strong but simple baseline with dual-granularity triplet loss for VT-ReID Pytorch code for "Strong but Simple Baseline with Dual-Granularity Triplet Loss for Visible-Thermal Person Re-Identification"[(arxiv)](https://arxiv.org/abs/2012.05010). ### Highlights - Our proposed dual-granularity triplet loss well organizes the sample-based triplet loss and center-based triplet loss in a hierarchical fine to coarse granularity manner, just with some simple configurations of typical operations, such as pooling and batch normalization. - Experiments on RegDB and SYSU-MM01 datasets show that our DGTL can improve the VT-ReID performance with only the global features by large margins, which can be a strong VT-ReID baseline to boost the future research with high quality. ### Results |Dataset| Rank1 | mAP | | Rank1 | mAP | | :-----: | -----: | :------ |-|-----: | :------ | | | visible to|thermal | | thermal to|visible |
2,298
hijune6/Hetero-center-triplet-loss-for-VT-Re-ID
['person re identification']
['Parameter Sharing Exploration and Hetero-Center based Triplet Loss for Visible-Thermal Person Re-Identification']
pre_process_sysu.py data_manager.py model_mine.py re_rank.py test_mine_pcb.py train_mine.py utils.py resnet.py eval_metrics.py data_loader.py loss.py TestData SYSUData TestDataOld load_data RegDBData process_gallery_sysu process_test_regdb process_query_sysu eval_regdb eval_sysu normalize softmax_weights pdist_torch CrossEntropyLabelSmooth CenterTripletLoss TripletLoss_WRT pdist_np OriTripletLoss visible_module thermal_module Non_local embed_net base_resnet weights_init_classifier Normalize weights_init_kaiming read_imgs ResNet resnet50 Bottleneck resnet152 conv3x3 remove_fc resnet34 resnet18 BasicBlock resnet101 k_reciprocal random_walk extract_query_feat extract_gall_feat train adjust_learning_rate test set_seed set_requires_grad GenIdx IdentitySampler AverageMeter GenCamIdx ExtractCam load_data Logger mkdir_if_missing join sorted isdir extend append seed join sorted isdir choice append format invert format asarray print cumsum astype float32 where argsort shape mean int32 append sum max range invert format asarray print cumsum astype float32 where argsort shape mean int32 append sum max range exp sum expand_as t sqrt addmm_ expand T matmul data zeros_ normal_ kaiming_normal_ __name__ data bias zeros_ normal_ __name__ int ANTIALIAS resize append array open items list startswith load_url ResNet remove_fc load_state_dict load_url ResNet remove_fc load_state_dict load_url ResNet remove_fc load_state_dict load_url ResNet remove_fc load_state_dict load_url ResNet remove_fc load_state_dict minimum exp zeros_like transpose astype float16 mean int32 unique append zeros sum max range len size transpose matmul from_numpy t softmax inverse eye diag time format print eval zeros time format print eval zeros param_groups lr range len zero_grad adjust_learning_rate max cuda range cat update format size criterion_id w_center avg item net enumerate time backward Variable print criterion_tri AverageMeter add_scalar step len eval_regdb time format eval_sysu random_walk local_feat_dim print k_reciprocal num_strips eval zeros add_scalar append range unique len int unique append range len append int range len makedirs seed manual_seed parameters
# Parameter Sharing Exploration and Hetero center triplet loss for VT Re-ID Pytorch code for "Parameter Sharing Exploration and Hetero-Center Triplet Loss for Visible-Thermal Person Re-Identification". ### Highlights - We achieve the state-of-the-art performance on two datasets by large margins, which can be a strong VT Re-ID baseline to boost the future research with high quality. - We explore the parameter sharing problem in the two stream network. To the best of our knowledge, it is the first attempt to analyze the impact of the number of parameters sharing for cross-modality feature learning. - We propose the hetero-center triplet loss to constrain the distance of different class centers from both the same modality and cross modality. ### Results Dataset | Rank1 | mAP | mINP ---- | ----- | ------ | ----- RegDB | ~91.05% | ~83.28% | ~68.84%
2,299