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
|
---|---|---|---|---|---|
ogencoglu/causal_twitter_modeling_covid19 | ['causal inference'] | ['Causal Modeling of Twitter Activity During COVID-19'] | source/eval_utils.py source/sentiment.py source/train.py source/train_utils.py source/configs.py source/inference.py source/feature_extraction.py source/data_utils.py Config read_covid add_missing_countries read_tweets reformat_date reformat_dataframe save_logs load_logs days_since_first_case get_feature_matrix calculate_percentage_change is_first_occurance gov_announcement calculate_change is_infected marginal_probs add_lang add_sentiment detect_lang train_bn calculate_splits_chunks calculate_splits_perc discretize_df join array_split arange strptime dirname abspath array days len format split astype sum rename drop read_csv list format INFECTED_PATH print astype map dict shape rename zip round drop_duplicates read_csv cat drop list format itertuples print search map apply dict country_abbr zip sum drop_duplicates drop format write dumps close LOGS_DIR open deepcopy clip warn sum range diff deepcopy clip replace range warn sum array fillna deepcopy list iterrows argmax range len deepcopy iterrows argmax deepcopy replace reset_index sort_values merge tqdm rename append DataFrame fillna drop query InferenceEngine format print deepcopy initialize parallel_apply from_pretrained deepcopy list tqdm sentiment_analyzer nan pipeline range BayesianNetwork fit_node_states fit_cpds sort array_split array deepcopy calculate_splits_perc label_dict_three_cat map label_dict_two_cat numerical_columns label_dict_four_cat transform stat_numerical_columns values | ogencoglu/causal_twitter_modeling_covid19 | 3,200 |
ohamelijnck/multi_res_gps | ['gaussian processes'] | ['Multi-resolution Multi-task Gaussian Processes'] | src/_gprn/composite_corrections/curvature_correction.py src/_gprn/kernels/modulated_se.py src/biased_observations/setup_data.py src/_gprn/models/base.py src/composite_likelihood/setup_data.py src/_gprn/kernels/polynomial.py src/_gprn/likelihoods/likelihood.py src/aq/analyse/models/m_gp_baseline.py src/_mr_dgp/mr_kernel_product.py src/aq/analyse/process/road_aggr/generate_road_on_buffer_sql.py src/aq/analyse/process/process_data.py src/aq/analyse/plot_features.py src/_gprn/models/latent_aggr.py src/aq/analyse/add_features.py src/_gprn/util/util.py src/_gprn/wrappers/modal_wrapper.py src/_gprn/scores/likelihood_hessian.py src/_gprn/tests/test_inference_entropy.py src/_gprn/kernels/matern32.py src/composite_likelihood/plot_posteriors.py src/_gprn/predictions/prediction_mr_single_gp.py src/_gprn/elbos/ell/gprn_aggr_positive_w_ell.py src/composite_likelihood/plot_observations.py src/_gprn/kernels/__init__.py src/_gprn/kernels/constant.py src/multi_task_aq/models/m_center_point_gprn.py src/_gprn/util/__init__.py src/_gprn/tests/test_util_util.py src/aq/analyse/get_srcs_from_features.py src/_mr_dgp/mr_svgp.py src/_gprn/models/__init__.py src/_gprn/wrappers/__init__.py src/_gprn/cl_corrections/__init__.py src/_gprn/scores/__init__.py src/multi_task_aq/setup_data.py src/_gprn/gprn.py src/_gprn/tests/test_kernels_se.py src/_gprn/kernels/se.py src/_gprn/likelihoods/standard_gprn_likelihood.py src/_gprn/likelihoods/__init__.py src/_gprn/optimisers/optimiser_2.py src/_mr_dgp/mr_se.py src/_gprn/optimisers/natural_opt.py src/aq/analyse/process/cov_on_buffer.py src/_gprn/composite_corrections/composite_magnitude_correction.py src/_gprn/predictions/prediction_standard_mc.py src/_gprn/predictions/prediction_single_gp_log_transform.py src/_gprn/sparsity/mr_sparsity.py src/aq/paper_config.py src/_mr_dgp/mr_mixing_weights.py src/_gprn/scores/fisher_information.py src/_gprn/composite_corrections/__init__.py src/biased_observations/models/m_cmgp.py src/_gprn/composite_corrections/magnitude_correction.py src/_mr_dgp/mr_mixture.py src/_gprn/cl_corrections/cl_corrections.py src/_gprn/elbos/ell/gprn_aggr_ell.py src/_gprn/models/gprn_aggr.py src/_gprn/kernels/matern52.py src/_gprn/tests/test_sparsity.py src/_mr_dgp/mr_linear.py src/_gprn/elbos/standard_elbo.py src/_mr_dgp/mr_dgp.py src/aq/analyse/models/m_dgp_expert.py src/_mr_dgp/utils.py src/_gprn/kernels/sm_1.py src/_gprn/precomputers/precomputed.py src/_gprn/dataset.py src/_gprn/elbos/ell/gp_aggr_ell.py src/_gprn/predictions/prediction_standard_gp_log_transform.py src/_gprn/predictions/prediction_positive_w_log_transform.py src/_gprn/precomputers/__init__.py src/biased_observations/plot_observations.py src/_gprn/scores/score.py src/_gprn/tests/test_single_gp_elbo.py src/_gprn/debugger/debugger.py src/_gprn/sparsity/dgp_sparsity.py src/aq/analyse/process/street_canyon_aggr/generate_street_canyon_on_buffer.py src/_gprn/wrappers/wrapper.py src/aq/analyse/experiment_config.py src/aq/analyse/visualise_st.py src/_gprn/models/dgp.py src/_gprn/optimisers/optimiser_1.py src/_gprn/kernels/mr_se.py src/_gprn/context/context_factory.py src/_gprn/likelihoods/gprn_aggr_likelihood.py src/_gprn/models/gp_aggr.py src/_gprn/composite_corrections/no_correction.py src/_gprn/debugger/__init__.py src/_gprn/likelihoods/gp_aggr_likelihood.py src/_gprn/kernels/product.py src/_gprn/kernels/arc_cosine.py src/_gprn/models/mr_aggr.py src/_gprn/kernels/nn.py src/_gprn/tests/test_parameters.py src/_gprn/kernels/subspace_interpolation.py src/_gprn/predictions/prediction_mr_standard.py src/biased_observations/models/m_mr_dgp.py src/_gprn/optimisers/optimiser.py src/aq/analyse/process/locations/create_site_locations.py src/_gprn/elbos/single_gp_elbo.py src/_gprn/predictions/prediction.py src/_gprn/models/single_gp.py src/_gprn/elbos/elbo.py src/aq/analyse/models/m_model.py src/_gprn/elbos/ell/gprn_ell.py src/_gprn/kernels/periodic.py src/_gprn/predictions/tmp_prediction.py src/_gprn/models/standard.py src/aq/analyse/models/m_gprn_aggr.py src/_gprn/tests/test_kernels_se_.py src/_gprn/models/multi_res_t1.py src/_gprn/models/model.py src/_gprn/models/positive_w.py src/_gprn/tests/test_single_gp_ell.py src/_gprn/sparsity/standard_sparsity.py src/_gprn/elbos/ell/ell.py src/_gprn/predictions/__init__.py src/aq/analyse/visualise.py src/_gprn/tests/test_kernels_kernel.py src/composite_likelihood/models/m_single_gp.py src/_gprn/kernels/sm.py src/_gprn/__init__.py src/_gprn/context/__init__.py src/_gprn/predictions/prediction_single_gp.py src/_gprn/elbos/__init__.py src/_gprn/models/composite.py src/_gprn/parameters/__init__.py src/multi_task_aq/experiment_config.py src/_mr_dgp/mr_gaussian.py src/_gprn/kernels/subspace_interpolation_use_f.py src/_gprn/optimisers/ml_optimiser.py src/_gprn/sparsity/sparsity.py src/aq/analyse/texfig.py src/composite_likelihood/models/m_cmgp_test.py src/_mr_dgp/conditional.py src/_mr_dgp/mr_matern32.py src/_gprn/optimisers/__init__.py src/_gprn/predictions/prediction_positive_w.py src/multi_task_aq/models/m_dgp_expert.py src/_gprn/context/context.py src/_mr_dgp/__init__.py src/_gprn/kernels/mr_matern_32.py src/_gprn/likelihoods/composite_likelihood.py src/_gprn/sparsity/__init__.py src/biased_observations/models/m_gprn_aggr.py src/aq/analyse/process/buffers/create_buffers.py src/_gprn/elbos/ell/__init__.py src/_gprn/elbos/ell/composite_ell.py src/multi_task_aq/models/m_gprn_aggr.py src/_gprn/parameters/parameters.py src/_gprn/elbos/positive_w_elbo.py src/_gprn/minibatch.py src/_gprn/composite_corrections/composite_corrections.py src/aq/analyse/process/landuse_aggr/ukmap_on_buffer.py src/_gprn/predictions/prediction_standard.py src/biased_observations/experiment_config.py src/_gprn/kernels/kernel.py src/_gprn/precomputers/multi_res_precomputed.py src/multi_task_aq/plot_posteriors.py src/biased_observations/plot_posteriors.py src/_gprn/likelihoods/single_gp_likelihood.py src/_gprn/models/gprn_positive_w_aggr.py src/_gprn/likelihoods/multi_res_t1_likelihoods.py src/aq/analyse/process/util/sql_util.py src/aq/analyse/setup_data.py src/_gprn/elbos/ell/gprn_positive_w_ell.py src/_gprn/elbos/ell/gp_ell.py get_config fix_types get_config normalise_wrt fix_types normalise get_targets get_features denormalise_wrt collect_sources plot get_unique_pairs laqn_get_data_df point_in_region Counter fn int_to_padded_str to_epoch get_grid_in_region discretise_sat laqn_get_data_matrix get_datetime_from_epoch savefig subplots figure main get_config prediction batch_predict get_config get_context denormalise prediction get_dataset denormalise_wrt batch_predict main get_config get_context denormalise prediction get_dataset denormalise_wrt main get_config get_context denormalise prediction get_dataset denormalise_wrt batch_predict main CovOnBuffer create_buffers get_cov_buffer create_site_locations get_cov_buffer get_cov_buffer arr_suffix arr_to_sql_select_list arr_str_zip arr_prefix arr_str_zip_with get_config get_aggr_data plot_mr_dgp get_aggr_data plot_vbagg plot_mr_gprn plot_observations plot_mr_dgp_cascade get_aggr_x ensure_dir get_aggr_y get_f get_config get_context prediction get_dataset main get_config get_context prediction get_dataset main get_aggr_data get_config get_sample_mean_var batch_predict main get_aggr_data get_aggr_data plot_dgp plot_gp_aggr plot_single_gp plot_gp_aggr_corrected plot_observations get_aggr_x ensure_dir get_aggr_y get_f get_config get_context prediction get_dataset main get_config get_context prediction get_dataset main get_config _plot_observations plot_mr_dgp get_aggr_data plot_mr_gprn plot_observations plot_center_point get_Y normalise_wrt get_site_1 normalise get_hourly setup_df denormalise_wrt get_X to_epoch main scale_col get_aggr get_config get_context get_dataset main run get_config prediction batch_predict main run get_config get_context get_dataset main run Dataset GPRN MiniBatch CL_Corrections CompositeCorrections CompositeMagnitudeCorrection CurvatureCorrection MagnitudeCorrection NoCorrection Context ContextFactory debug_inference matrix_conditions ELBO PositiveWELBO SingleGP_ELBO StandardELBO Composite_ELL ELL GPRN_Aggr_ELL GPRN_Aggr_Positive_W_ELL GPRN_ELL GPRN_Positive_W_ELL GP_Aggr_ELL GP_ELL ArcCosine Constant Kernel Matern32 Matern52 ModulatedSE MR_MATERN_32 MR_SE NN Periodic Polynomial Product SE SM SM SubspaceInterpolation SubspaceInterpolationUseF CompositeLikelihood GPRN_Aggr_Likelihood GP_Aggr_Likelihood Likelihood MultiResT1Likelihood SingleGPLikelihood StandardGPRNLikelihood Base Composite DGP GPRN_Aggr GPRN_PositiveW_Aggr GPAggr LatentAggr Model MRAggr MultiResT1 PositiveW SingleGP Standard MaximumLikelihoodOptimiser NaturalGradientOptimizer Optimiser Optimiser1 Optimiser1 Parameters MultiResPrecomputed Precomputed Prediction PredictionMRSingleGP PredictionMRStandard PredictionPositiveW PredictionPositiveWLogTransform PredictionSingleGP PredictionSingleGPLogTransform PredictionStandard PredictionStandardGPLogTransform PredictionStandardMC Prediction FisherInformation LikelihoodHessian Score DGPSparsity MRSparsity Sparsity StandardSparsity Test Test Test Test Test Test Test Test Test covar_to_mat safe_log add_jitter mat_solve tri_mat_solve chol_solve sample_index_with_prob_weights log_sum_exp log_chol_matrix_det vec_cholesky_to_mat vec_to_lower_triangle_matrix svd_solve safe_exp log_normal_chol inv_var_postive var_postive ModalWrapper Wrapper MR_Conditional MR_DGP MR_Gaussian MR_KERNEL_PRODUCT MR_Linear MR_MATERN_32 MR_Variance_Mixing MR_Variance_Mixing_1 MR_Mixing_Weights MR_Base_Only MR_DGP_Only MR_Average_Mixture MR_Mixture MR_SE MR_SVGP reparameterize astype range len nanstd nanstd nanstd apply_fn set_title reshape astype float32 imshow linspace get_grid_in_region round array range len round array set_tight_layout set_tight_layout int concatenate print ones ceil range predict_y_experts format concatenate print get_sample_mean_var shape save batch_predict Saver save max log restore enquire_session disable_base_elbo format enable_base_elbo glob copy prediction compile local_variables_initializer load minimize print make_mixture AdamOptimizer set_objective global_variables_initializer create format inv array read_csv append predict rs print add_inducing_points shape add_source_dict array Dataset range restore_flag MagnitudeCorrection concatenate GPRN get_context optimise GPRN_Aggr get_dataset shape train_flag nan array predict center_mean GPAggr reshape print thread_safe_execute format CovOnBuffer print thread_safe_execute format append range len append range len append flatten repeat scatter plot get_aggr_data load int plot print flatten sqrt shape fill_between load int plot print flatten sqrt shape fill_between load int plot print flatten sqrt shape fill_between load int plot print flatten sqrt shape fill_between append int range int append sum array range randn sin makedirs linspace expand_dims show plot mean set_dgp_gp_noise masked_array show disable_dgp_hyperparameters all get_aggr_data set_base_gp_noise exit append range disable_base_hyperparameters plot enable_dgp_elbo get_sample_mean_var min batch_predict load plot print flatten sqrt shape fill_between load plot print flatten sqrt shape fill_between load plot flatten sqrt fill_between load errorbar plot print flatten sqrt shape fill_between Standard append timedelta strptime scatter plot get_aggr_data format format load format plot print sqrt shape fill_between print to_datetime to_epoch get_Y print month concat min day mean get_X array unique append Timedelta max year expand_dims get_X get_Y setup_df read_csv f normalise_wrt get_site_1 to_csv get_hourly scale_col get_aggr run GPRN_Aggr save reset_default_graph get_dataset expand_dims predict format center_mean restore_flag concatenate get_site_1 get_context denormalise_wrt train_flag nan load optimise print reshape GPRN rs nanstd array Saver max restore disable_dgp_hyperparameters enquire_session disable_base_elbo disable_base_hyperparameters enable_base_elbo glob copy prediction compile local_variables_initializer enable_dgp_elbo minimize get_sample_mean_var make_mixture AdamOptimizer set_objective batch_predict global_variables_initializer Print num_latent print inducing_locations kernel eval num_outputs range cond scatter_nd list constant zip vec_to_lower_triangle_matrix matmul exp clip_by_value clip_by_value log reduce_max svd adjoint float64 diag reduce_max where matmul shape cast less zeros safe_log tri_mat_solve subtract transpose matmul pi log_chol_matrix_det constant squeeze cond random_uniform range eye transpose jitter cholesky | ohamelijnck/multi_res_gps | 3,201 |
ok1zjf/VASNet | ['video summarization'] | ['Summarizing Videos with Attention'] | vasnet_model.py sys_utils.py cpd_nonlin.py layer_norm.py knapsack.py cpd_auto.py config.py vsum_tools.py main.py create_split.py HParameters estimate_vmax cpd_auto eval_score eval_cost centering calc_scatters cpd_nonlin create split_random write_json mkdir_if_missing test_knapsack_dp test_knapsack knapsack check_inputs knapsack_ortools knapsack_dp LayerNorm eval_split AONet parse_splits_filename weights_init lookup_weights_splits_file train print_table list_files get_image_list run_command torch_summarize del_file ge_pkg_versions get_video_list print_pkg_versions SelfAttention VASNet evaluate_summary evaluate_user_summaries generate_summary arange argmin zeros float log cpd_nonlin centering trace list range len float log len list T cumsum reshape astype zeros diag int inf calc_scatters print ones reshape min argmin copy shape zeros max range makedirs dirname mkdir_if_missing list choice append range enumerate save_dir dataset list train_percent append save_name ceil range format num_splits close write_json keys int join print File split_random len zeros max range print knapsack sort check_inputs append zeros range print knapsack_dp int tolist astype Init Solve array bias xavier_uniform_ weight __name__ constant_ splitext split glob format print lookup_weights_file initialize splits AONet load_datasets select_split print load_model print_table test_keys mean eval verbose load_split_file append range len parse_splits_filename output_dir load_split_file open str initialize splits AONet len range format close datasets splitext flush join get_dataset_by_name load_datasets select_split print system write split makedirs print sort isdir remove Popen split run_command __version__ version platform isfile print items ge_pkg_versions items tuple _addindent __repr__ sum __name__ pop format print sum enumerate len int concatenate ones tolist astype delete mean floor int32 knapsack_ortools append zeros float range len argmax concatenate astype float32 mean shape append zeros sum max range len argmax astype float32 mean shape append sum max range | # Video Summarization with Attention A PyTorch implementation of our paper [Video Summarization with Attention](https://arxiv.org/abs/1812.01969) by Jiri Fajtl, Hajar Sadeghi Sokeh, Vasileios Argyriou, Dorothy Monekosso and Paolo Remagnino. This paper was presented at [ACCV 2018](http://accv2018.net/program/) [AIU2018 workshop](http://www.sys.info.hiroshima-cu.ac.jp/aiu2018/). ## Installation The development and evaluation was done on the following configuration: ### System configuration - Platform : Linux-4.15.0-43-generic-x86_64-with-Ubuntu-16.04-xenial - Display driver : NVRM version: NVIDIA UNIX x86_64 Kernel Module 384.130 Wed Mar 21 03:37:26 PDT 2018 GCC version: gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10) | 3,202 |
olegl/distort | ['medical image registration'] | ['Registration of serial sections: An evaluation method based on distortions of the ground truths'] | quality/jaccard.py distort/remap-blur.py quality/show_flow.py quality/imshowpair.py distort/gen_damage.py displacements_scale convert_map base_map load mapFromFlowD mapFromFlowC write_map mapFromFlow mapFromFlowCBAD list T reshape float32 array range list T reshape float32 array range int zeros_like print GaussianBlur normalvariate resize zeros float range threshold imwrite print THRESH_OTSU THRESH_BINARY GaussianBlur imread list T reshape float32 array range imwrite zeros_like print dstack max reshape array imwrite shape mapFromFlow mapFromFlow dstack write_map | # Image distorter This generates randomly some distortions and applies them to input file. Then the file is also rigidly transformed. Ground truth data are kept back for analysis. The main use case are medical data. ## Example ### Original (padded) image  ### Locally distorted image  ### Add global transformation  | 3,203 |
oliverkn/alad-for-lhc | ['anomaly detection'] | ['Adversarially Learned Anomaly Detection on CMS Open Data: re-discovering the top quark'] | data/hlf_dataset_utils.py alad_mod/alad.py core/basic_nn_anomaly_detector.py alad_mod/run_training.py data/record6021_dataset_utils.py benchmark/model/config.py core/skeleton.py data/smmix_builder.py top_rediscovery/model/config.py alad_mod/config_sim.py alad_mod/config.py data/hlf_preprocessing.py top_rediscovery/build_pre_datasets.py alad_mod/run_training_sim.py core/histogram_builder.py alad_mod/evaluator.py get_getter display_progression_epoch ALAD discriminator_zz decoder leakyReLu encoder discriminator_xz discriminator_xx discriminator_zz decoder leakyReLu encoder discriminator_xz discriminator_xx Evaluator discriminator_zz decoder leakyReLu encoder discriminator_xz discriminator_xx BasicNNAnomalyDetector HistogramBuilder scale_hists sum_hists Histogram AbstractAnomalyDetector AbstractTrainer AbstractEvaluator compile_mix load_training_set load_data build_mask create_dataset compile_mix_with_labels load HLFDataPreprocessorV2 HLFDataPreprocessor build_mask pre_select discriminator_zz decoder leakyReLu encoder discriminator_xz discriminator_xx int write chr flush list Histogram bin_edges keys enumerate list keys load int join shuffle save join str int concatenate print shuffle shape load_data int concatenate shuffle amin range len int concatenate amin range len ones enumerate len | # Adversarially Learned Anomaly Detection on CMS Open Data The code for the paper ["Adversarially Learned Anomaly Detection on CMS Open Data: re-discovering the top quark" (authors: Oliver Knapp and Guenther Dissertori and Olmo Cerri and Thong Q. Nguyen and Jean-Roch Vlimant and Maurizio Pierini)](https://doi.org/10.1140/epjp/s13360-021-01109-4). Please cite our work if you find it useful for your research and work. ``` @article{Knapp2021, doi = {10.1140/epjp/s13360-021-01109-4}, url = {https://doi.org/10.1140/epjp/s13360-021-01109-4}, year = {2021}, month = feb, publisher = {Springer Science and Business Media {LLC}}, | 3,204 |
olivesgatech/Elastic-Impedance-Inversion-Using-Recurrent-Neural-Networks | ['time series'] | ['Semi-supervised Sequence Modeling for Elastic Impedance Inversion'] | main.py core/models.py core/functions.py get_data get_models train test display_results Normalization metrics forward_model inverse_model arange Normalization Subset DataLoader TensorDataset item is_available normalize float cuda load ormsby f dt test_checkpoint inverse_model cuda wavelet_duration is_available float forward_model zero_grad get_data forward_net save session_name list step max_epoch MSELoss inverse_net append normalize range detach format inf get_models mkdir alpha optimizer metrics criterion backward print clone tqdm beta unnormalize format print MSELoss get_data get_models eval mkdir session_name sum mean numpy cpu is_tensor std is_cuda join format print squeeze mean tensor | # Semi-Supervised Sequence Modeling for Elastic Impedance Inversion [Motaz Alfarraj](http://www.motaz.me), and [Ghassan AlRegib](http://www.ghassanalregib.info) Codes and data for a manuscript published in Interpretation Journal, Aug 2019. This repository contains the codes for the paper: M. Alfarraj, and G. AlRegib, "**Semi-Supervised Sequence Modeling for Elastic Impedance Inversion**," in *Interpretation*, Aug. 2019. [[ArXiv]](https://arxiv.org/pdf/1908.07849.pdf) [[SEG Digital Library]](https://library.seg.org/doi/abs/10.1190/int-2018-0250.1) ## Abstract Recent applications of machine learning algorithms in the seismic domain have shown great potential in different areas such as seismic inversion and interpretation. However, such algorithms rarely enforce geophysical constraints — the lack of which might lead to undesirable results. To overcome this issue, we have developed a semisupervised sequence modeling framework based on recurrent neural networks for elastic impedance inversion from multiangle seismic data. Specifically, seismic traces and elastic impedance (EI) traces are modeled as a time series. Then, a neural-network-based inversion model comprising convolutional and recurrent neural layers is used to invert seismic data for EI. The proposed workflow uses well-log data to guide the inversion. In addition, it uses seismic forward modeling to regularize the training and to serve as a geophysical constraint for the inversion. The proposed workflow achieves an average correlation of 98% between the estimated and target EI using 10 well logs for training on a synthetic data set. ## Sample Results #### Estimated EI Section | 3,205 |
olivesgatech/gradcon-anomaly | ['anomaly detection'] | ['Backpropagated Gradient Representations for Anomaly Detection'] | train.py eval.py models.py ae_grad_reg.py prep_datasets.py datasets.py utils.py train gradcon_score test AnomalyDataset main normal_init GradConVAE GradConCAE weights_init main main AverageMeter save_checkpoint update format model backward print AverageMeter zero_grad size grad step item to weight mse_loss range enumerate len update format view model print size AverageMeter zero_grad eval item to weight mse_loss range enumerate len format model print backward zero_grad grad eval zeros to numpy mse_loss range enumerate len grad_loss_weight DataLoader output_dir device dataset gradcon_score savetxt load_state_dict parse_args to range format concatenate mean eval dataset_dir GradConCAE AnomalyDataset load join auc print roc_curve ckpt_dir ckpt_name isfile zeros makedirs normal_ zero_ normal_ __name__ fill_ outlier_ratio resize save_dir open list FashionMNIST append dump asarray close shuffle CIFAR10 MNIST items int ANTIALIAS len save_checkpoint Adam save_name SummaryWriter print_freq test start_epoch resume time add_image make_grid add_scalar AverageMeter min parameters train epochs copyfile join save | # Backpropagated Gradient Representations for Anomaly Detection This work was conducted in the [OLIVES @ Georgia Institute of Technology](http://www.ghassanalregib.info) This is an official code repository for the paper: [Gukyeong Kwon](https://https://gukyeongkwon.github.io/), [Mohit Prabhushankar](https://www.linkedin.com/in/mohitps/), [Dogancan Temel](http://cantemel.com/), and [Ghassan AlRegib](http://www.ghassanalregib.info), "Backpropagated Gradient Representations for Anomaly Detection," In Proceedings of the European Conference on Computer Vision (ECCV), 2020. If you find our codes useful, we kindly ask you to cite our work. ```tex @inproceedings{kwon2020backpropagated, title={Backpropagated Gradient Representations for Anomaly Detection}, author={Kwon, Gukyeong and Prabhushankar, Mohit and Temel, Dogancan and AlRegib, Ghassan}, booktitle={Proceedings of the European Conference on Computer Vision (ECCV)}, | 3,206 |
olspert/BGLST | ['time series analysis', 'time series'] | ['Estimating activity cycles with probabilistic methods I. Bayesian Generalised Lomb-Scargle Periodogram with Trend'] | example.py BGLST.py test.py BGLST TestBGLST | # BGLST This is a simple script for calculating Bayesian Generalized Lomb-Scargle periodogram with linear Trend. The regression model includes a harmonic component, offset and linear trend with Gaussian independent noise. The detailed model specification can be found from the <a href="http://adsabs.harvard.edu/abs/2017arXiv171208235O">paper</a>. The main part of the code is in <a href = "https://github.com/olspert/BGLST/blob/master/BGLST.py">BGLST.py</a> and the sample usage can be found from <a href = "https://github.com/olspert/BGLST/blob/master/example.py">example.py</a>. For related studies please refer to <a href="http://adsabs.harvard.edu/abs/2015A%26A...573A.101M">Mortier et al. 2015</a> and <a href = "http://adsabs.harvard.edu/abs/2017MNRAS.470.4794F">Feng el al. 2017</a>, where in the latter paper a more general model with correlated noise was introduced. This library can be found from https://github.com/phillippro/Agatha. | 3,207 |
omarperacha/GANkyoku | ['data augmentation'] | ['GANkyoku: a Generative Adversarial Network for Shakuhachi Music'] | utils.py train.py sample.py build_generator save_samples RandomWeightedAverage WGAN toCategorical synthData vetCWGANoutputs getSingleSample getData fromCategorical pruneNonCandidates Model Input load_weights summary normal reshape savetxt zeros range fromCategorical predict pruneNonCandidates genfromtxt toCategorical glob print full len print reshape range ones rint full range tanh int copy uniform randint range len randint range copy len glob remove genfromtxt glob sorted print append | omarperacha/GANkyoku | 3,208 |
omarsayed7/Deep-Emotion | ['facial expression recognition'] | ['Deep-Emotion: Facial Expression Recognition Using Attentional Convolutional Network'] | data_loaders.py main2.py visualize.py main.py deep_emotion.py generate_data.py eval_data_dataloader Plain_Dataset Deep_Emotion Generate_data Train Train load_img show Plain_Dataset print squeeze Compose imshow numpy format state_dict criterion backward print zero_grad range eval double save train step max net len add_scalar Variable float unsqueeze open | # Deep-Emotion: Facial Expression Recognition Using Attentional Convolutional Network This is a PyTorch implementation of research paper, [Deep-Emotion](https://arxiv.org/abs/1902.01019) [Note] This is not the official implementation of the paper ## Architecture * An end-to-end deep learning framework, based on attentional convolutional network * Attention mechanism is added through spatial transformer network <p align="center"> <img src="imgs/net_arch.PNG" width="960" title="Deep-Emotion Architecture"> </p> ## Datasets | 3,209 |
omerbp/Predicting-NLPGT | ['sentiment analysis'] | ['Predicting Strategic Behavior from Free Text'] | replicate_paper.py TAC.py commons.py utils.py main.py baselines.py transductive_svm_multiclass knn_classifier transductive_svm _get_label baselines _baselines_evaluation Commons Run Figure5 Table2 Table3 transductive_clustering get_cluster_label_random_tie get_trait_df get_game_data verify_folders get_features evaluation preprocess_traits get_logger update list set_index multiply reshape len nansum sum diag values drop sum T tolist copy apply rename zeros sort_values fillna values len list isnull choice range len join T reset_index RESULTS_PATH to_csv evaluation KNeighborsClassifier append train_test_split DataFrame range predict fit dump_svmlight_file evaluation DataFrame values tolist apply call sleep append train_test_split range copy mean join T remove sort_index RESULTS_PATH to_csv TRANS_SVM_PATH isfile read_csv to_frame concat evaluation DataFrame values list tolist apply call sleep append train_test_split range copy set mean unique zip enumerate join remove combinations T RESULTS_PATH to_csv index TRANS_SVM_PATH dict isfile read_csv to_frame mode realpath join dirname transductive_svm drop preprocess_traits str list transductive_clustering get_logger range transductive_svm_multiclass knn_classifier codes get_trait_df zip info merge join categories baselines RESULTS_PATH get_game_data to_csv verify_folders dict len show join plot RESULTS_PATH Run concat add_subplot set_xlabel DEFAULT_TRAIN_SIZE DEFAULT_NUM_LOOPS axhline figure legend set_ylabel append savefig get_legend_handles_labels enumerate join reset_index RESULTS_PATH Run concat to_csv DEFAULT_TRAIN_SIZE DEFAULT_NUM_LOOPS append drop str T join reset_index RESULTS_PATH Run concat to_csv DEFAULT_TRAIN_SIZE DEFAULT_NUM_LOOPS append pivot enumerate to_numeric list T reset_index values apply dict assign evaluation zip append cluster train_test_split DataFrame range fit_predict AgglomerativeClustering list set NaN f1_score accuracy_score keys enumerate reset_index values choice FILES_PATH join toarray fromkeys tolist to_csv apply drop TfidfVectorizer maketrans DataFrame fit_transform read_csv DATA_FOLDER_NAME merge extend append get_features merge DataFrame MinMaxScaler tolist fit_transform RESULTS_PATH TRANS_SVM_PATH makedirs setFormatter getLogger addHandler LOGGER_NAME LOG_FILENAME Formatter setLevel INFO FileHandler | # Predicting Strategic Behavior from Free Text Omer Ben-Porat, Sharon Hirsch, Lital Kuchy, Guy Elad, Roi Reichart and Moshe Tennenholtz. ## Overview This repository contains data and code for [our paper](https://www.jair.org/index.php/jair/article/view/11849). All data files appear under the `data` folder. In particular, 1. `human_text_games.csv` - the texts, games and demographics. 2. `traits_features.csv` - the collected attributes. 3. `LIWC_features.csv` - the LIWC features 4. `bluemix-tone-analyzer_features.csv` - Bluemix representation for the (uncensored) texts. 5. `tfidf_features.csv` - tfidf feature for the (uncensored) texts. Beyond the data files, you will find our implementation of TAC and the baselines we used in the paper, as well as the `replicate_paper.py` file that can be used to replicate our results. | 3,210 |
omerbsezer/NeuralStyleTransfer | ['style transfer'] | ['A Neural Algorithm of Artistic Style'] | nst_utils.py main.py compute_style_cost model_nn compute_content_cost gram_matrix compute_layer_style_cost total_cost generate_noise_image reshape_and_normalize_image save_image CONFIG load_vgg_model as_list pow transpose reduce_sum transpose matmul as_list reshape transpose reduce_sum gram_matrix pow compute_layer_style_cost run str print assign global_variables_initializer save_image range run reshape _conv2d_relu Variable zeros _avgpool loadmat astype reshape MEANS shape MEANS imsave astype | # Neural Style Transfer Neural Style Transfer is a method of creating artistic style images using Deep Neural Networks (Convolutional Neural Networks). This algorithm was created by Gatys et al. (2015) (https://arxiv.org/abs/1508.06576). Code is adapted from Andrew Ng's Course 'Convolutional Neural Networks". ## Results  ## To run codes * Pre-trained model should be downloaded from http://www.vlfeat.org/matconvnet/models/imagenet-vgg-verydeep-19.mat (file size = ~500MB) * Run main.py (content and style images should be in the images folder) ## Transfer Learning "Following the original NST paper (https://arxiv.org/abs/1508.06576), we will use the VGG network. Specifically, we'll use VGG-19, a 19-layer version of the VGG network. This model has already been trained on the very large ImageNet database, and thus has learned to recognize a variety of low level features (at the earlier layers) and high level features (at the deeper layers)" ## Neural Style Transfer Algorithm | 3,211 |
omidmn/Engagement-Recognition | ['facial expression recognition'] | ['Automatic Recognition of Student Engagement using Deep Learning and Facial Expression'] | code/ER_dataset_loader.py code/ER_const.py code/CNN_model.py code/CNN_const.py code/CNN_dataset_loader.py code/VGG_model.py code/VGG_const.py code/ER_model.py code/VGG_dataset_loader.py code/preprocess.py DatasetLoader show_usage EmotionRecognition DatasetLoader show_usage EmotionRecognition convert_csv_to_img format_image save_data DatasetLoader show_usage EmotionRecognition print imdecode CV_LOAD_IMAGE_GRAYSCALE resize detector top fromarray rect right left sum COLOR_BGR2GRAY square mean sqrt uint8 ANTIALIAS reshape bottom cnn_face_detection_model_v1 cvtColor save str imwrite replace reshape size array range split | # <h3 align="center"> <p>Engagement Recognition Model </h3> 🤗 TensorFlow & TFLearn implementation of [Automatic Recognition of Student Engagement using Deep Learning and Facial Expression](https://arxiv.org/abs/1808.02324): Engagement is a key indicator of the quality of learning experience, and one that plays a major role in developing intelligent educational interfaces. Any such interface requires the ability to recognise the level of engagement in order to respond appropriately; however, there is very little existing data to learn from, and new data is expensive and difficult to acquire. This work presents a deep learning model to improve engagement recognition from images that overcomes the data sparsity challenge by pre-training on readily available basic facial expression data, before training on specialised engagement data. In the first of two steps, a facial expression recognition model is trained to provide a rich face representation using deep learning. In the second step, we use the model's weights to initialize our deep learning based model to recognize engagement; we term this the engagement model. We train the model on our new engagement recognition dataset with 4627 engaged and disengaged samples. We find that the engagement model outperforms effective deep learning architectures that we apply for the first time to engagement recognition, as well as approaches using histogram of oriented gradients and support vector machines. <p align="center"> <img src="images/VGG_eng_model.jpg" width=500 high=700> </p> ### Reference | 3,212 |
omidmnezami/Engagement-Recognition | ['facial expression recognition'] | ['Automatic Recognition of Student Engagement using Deep Learning and Facial Expression'] | code/ER_dataset_loader.py code/ER_const.py code/CNN_model.py code/CNN_const.py code/CNN_dataset_loader.py code/VGG_model.py code/VGG_const.py code/ER_model.py code/VGG_dataset_loader.py code/preprocess.py DatasetLoader show_usage EmotionRecognition DatasetLoader show_usage EmotionRecognition convert_csv_to_img format_image save_data DatasetLoader show_usage EmotionRecognition print imdecode CV_LOAD_IMAGE_GRAYSCALE resize detector top fromarray rect right left sum COLOR_BGR2GRAY square mean sqrt uint8 ANTIALIAS reshape bottom cnn_face_detection_model_v1 cvtColor save str imwrite replace reshape size array range split | # <h3 align="center"> <p>Engagement Recognition Model </h3> 🤗 TensorFlow & TFLearn implementation of [Automatic Recognition of Student Engagement using Deep Learning and Facial Expression](https://arxiv.org/abs/1808.02324): Engagement is a key indicator of the quality of learning experience, and one that plays a major role in developing intelligent educational interfaces. Any such interface requires the ability to recognise the level of engagement in order to respond appropriately; however, there is very little existing data to learn from, and new data is expensive and difficult to acquire. This work presents a deep learning model to improve engagement recognition from images that overcomes the data sparsity challenge by pre-training on readily available basic facial expression data, before training on specialised engagement data. In the first of two steps, a facial expression recognition model is trained to provide a rich face representation using deep learning. In the second step, we use the model's weights to initialize our deep learning based model to recognize engagement; we term this the engagement model. We train the model on our new engagement recognition dataset with 4627 engaged and disengaged samples. We find that the engagement model outperforms effective deep learning architectures that we apply for the first time to engagement recognition, as well as approaches using histogram of oriented gradients and support vector machines. <p align="center"> <img src="images/VGG_eng_model.jpg" width=500 high=700> </p> ### Reference | 3,213 |
omidnezami/Engagement-Recognition | ['facial expression recognition'] | ['Automatic Recognition of Student Engagement using Deep Learning and Facial Expression'] | code/ER_dataset_loader.py code/ER_const.py code/CNN_model.py code/CNN_const.py code/CNN_dataset_loader.py code/VGG_model.py code/VGG_const.py code/ER_model.py code/VGG_dataset_loader.py code/preprocess.py DatasetLoader show_usage EmotionRecognition DatasetLoader show_usage EmotionRecognition convert_csv_to_img format_image save_data DatasetLoader show_usage EmotionRecognition print imdecode CV_LOAD_IMAGE_GRAYSCALE resize detector top fromarray rect right left sum COLOR_BGR2GRAY square mean sqrt uint8 ANTIALIAS reshape bottom cnn_face_detection_model_v1 cvtColor save str imwrite replace reshape size array range split | # <h3 align="center"> <p>Engagement Recognition Model </h3> 🤗 TensorFlow & TFLearn implementation of [Automatic Recognition of Student Engagement using Deep Learning and Facial Expression](https://arxiv.org/abs/1808.02324): Engagement is a key indicator of the quality of learning experience, and one that plays a major role in developing intelligent educational interfaces. Any such interface requires the ability to recognise the level of engagement in order to respond appropriately; however, there is very little existing data to learn from, and new data is expensive and difficult to acquire. This work presents a deep learning model to improve engagement recognition from images that overcomes the data sparsity challenge by pre-training on readily available basic facial expression data, before training on specialised engagement data. In the first of two steps, a facial expression recognition model is trained to provide a rich face representation using deep learning. In the second step, we use the model's weights to initialize our deep learning based model to recognize engagement; we term this the engagement model. We train the model on our new engagement recognition dataset with 4627 engaged and disengaged samples. We find that the engagement model outperforms effective deep learning architectures that we apply for the first time to engagement recognition, as well as approaches using histogram of oriented gradients and support vector machines. <p align="center"> <img src="images/VGG_eng_model.jpg" width=500 high=700> </p> ### Reference | 3,214 |
omkar2810/Inclusion_Exclusion_Phrase_Mining | ['sentiment analysis'] | ['Should I visit this place? Inclusion and Exclusion Phrase Mining from Reviews'] | code/Training/Task1/parameter_tuning.py code/Extraction/get_review_info.py code/Extraction/get_homepage.py code/Extraction/download_review_pages.py download_page return_report lstm_model parameter_tuning get_sampleWeights rnn_model get findAll BeautifulSoup sleep page_source rand range Bidirectional SimpleRNN Sequential add Dense compile Bidirectional Sequential add Dense LSTM compile list transpose classification_report flatten argmax predict fit str list return_report shuffle tqdm randint range rnn_model | # Inclusion-Exclusion_Phrase_Mining This is the Git Repository containing all the code and data for "Should I visit this place? Inclusion and Exclusion Phrase Mining from Reviews" paper which was accepted at ECIR 2021 - Link to Paper : [Springer](https://link.springer.com/chapter/10.1007/978-3-030-72240-1_27), [arXiv](https://arxiv.org/abs/2012.10226) - Link to Presentation Video : [Link](https://drive.google.com/file/d/1v9Z0THqk4eJG2c0-zWMWHKa2_A045Rt8/view?usp=sharing) *** - The `data/` folder contains all the annotated data required to run the experiments for both the tasks. - The `code/` folder contains the scripts for collecting the reviews and the notebooks containing all the model which have been reported in the paper. *** ## Citation If you use our code, dataset or paper in your work, please cite as | 3,215 |
onlyzdd/ecg-diagnosis | ['multi label classification'] | ['Interpretable Deep Learning for Automatic Diagnosis of 12-lead Electrocardiogram'] | shap_values.py QRSDetectorOffline.py dataset.py visualize.py preprocess.py predict.py expert_features.py statistic.py utils.py main.py baselines.py resnet.py parse_args generate_features_csv transform ECGDataset shift scaling extract_heart_rates extract_lead_features cal_statistics cal_entropy extract_features extract_lead_heart_rate parse_args train evaluate parse_args plot_cm apply_thresholds get_thresholds gen_label_csv gen_reference_csv QRSDetectorOffline resnet18 BasicBlock1d resnet34 ResNet1d parse_args plot_shap plot_shap2 summary_plot find_optimal_threshold cal_f1 cal_scores prepare_input cal_aucs split_data cal_f1s plot_ecg2 plot_ecg add_argument ArgumentParser rdsamp join print DataFrame to_csv tqdm append extract_features ones normal matmul list range choice shift scaling entropy value_counts percentile var mean std hamilton_segmenter correct_rpeaks get_heart_rate T extract_lead_heart_rate append wavedec cal_entropy cal_statistics T criterion backward print zero_grad tqdm numpy append step net enumerate state_dict criterion model_path print cal_aucs cal_f1s tqdm sigmoid mean eval vstack save append numpy net enumerate find_optimal_threshold exists print range tqdm sigmoid vstack append numpy net enumerate cal_scores print transpose len astype plot_cm range tqdm sigmoid mean vstack append numpy array net enumerate format subplots text get_xticklabels astype confusion_matrix colorbar set set_printoptions imshow tight_layout close savefig setp max range enumerate join glob DataFrame to_csv append rdsamp int iterrows permutation columns sum len to_csv range append zeros DataFrame read_csv enumerate ResNet1d ResNet1d list subplots suptitle plot set_yticks close enumerate set_xticks set_ylabel savefig array range masked_where len argmax list plot tqdm mean clf vstack savefig append sum array range subplots arange set_yticklabels clf argmax max list colorbar set_printoptions shape imshow savefig append sum range format plot set_xticklabels tight_layout mean enumerate print text set_yticks tqdm set_xticks array len list permutation range endswith shape rdsamp zeros recall_score precision_score f1_score accuracy_score roc_auc_score linspace linspace append cal_f1 range subplots plot set_yticks close set_visible set_xticks set_ylabel get_ylim savefig abs max range set_ylim len subplots plot set_yticks close set_visible set_xticks set_ylabel get_ylim savefig abs max range set_ylim len | # Interpretable Deep Learning for Automatic Diagnosis of 12-lead Electrocardiogram This repository contains code for *Interpretable Deep Learning for Automatic Diagnosis of 12-lead Electrocardiogram*. Electrocardiogram (ECG) is a widely used reliable, non-invasive approach for cardiovascular disease diagnosis. With the rapid growth of ECG examinations and the insufficiency of cardiologists, accurately automatic diagnosis of ECG signals has become a hot research topic. Deep learning methods have demonstrated promising results in predictive healthcare tasks. In this work, we developed a deep neural network for multi-label classification of cardiac arrhythmias in 12-lead ECG records. Experiments on a public 12-lead ECG dataset showed the effectiveness of our method. The proposed model achieved an average area under the receiver operating characteristic curve (AUC) of 0.970 and an average F1 score of 0.813. Using single-lead ECG as model input produced lower performance than using all 12 leads. The best-performing leads are lead I, aVR, and V5 among 12 leads. Finally, we employed the SHapley Additive exPlanations (SHAP) method to interpret the model's behavior at both patient-level and population-level. ## Model Architecture <img src="https://imgur.com/BIvuVUc.png" width="300"> > Deep neural network architecture for cardiac arrhythimas diagnosis. ## Requirement ### Dataset The 12-lead ECG dataset used in this study is the CPSC2018 training dataset which is released by the 1st China Physiological Signal Challenge (CPSC) 2018 during the 7th International Conference on Biomedical Engineering and Biotechnology. Details of the CPSC2018 dataset can be found [here](https://bit.ly/3gus3D0). To access the processed data, click [here](https://www.dropbox.com/s/unicm8ulxt24vh8/CPSC.zip?dl=0). ### Software - Python 3.7.4 | 3,216 |
onnx/onnx-mlir | ['speech recognition'] | ['Compiling ONNX Neural Network Models Using MLIR'] | docs/mnist_example/mnist.py .buildbot/jenkins-stop-previous-build.py test/backend/test.py .buildbot/jenkins-build-llvm-project.py docs/doc_check/directive_impl/same_as_file.py docs/doc_example/gen_add_onnx.py docs/doc_check/doc_parser.py utils/mlir2FileCheck.py .buildbot/jenkins-cleanup-build-states.py utils/gen_onnx_mlir.py test/mlir/lit.cfg.py test/backend/conftest.py .buildbot/jenkins-publish-docker-images.py docs/doc_check/check.py utils/RunONNXModel.py docker/onnx-mlir.py docs/doc_check/utils.py docs/doc_check/test/test_same-as-file.py utils/pre-onnx-mlir.py docs/doc_check/directive_impl/file_same_as_stdout.py utils/mlirAffine2cpp.py docs/mnist_example/gen_mnist_onnx.py docs/doc_check/test/test_file-same-as-stdout.py docs/doc_check/directive.py .buildbot/jenkins-build-project.py remove_dependent_containers compute_file_sha1 valid_sha1_date get_remote_image_labels setup_private_llvm get_image_manifest_public extract_llvm_info extract_pattern_from_file get_image_manifest_private main get_repo_sha1_date get_access_token build_private_project remove_dependent_containers compute_file_sha1 valid_sha1_date get_remote_image_labels get_image_manifest_public get_image_manifest_private main get_proj_repo_info get_access_token main cleanup_docker_images remove_dependent_containers put_image_manifest_private get_pr_mergeable_state publish_arch_image get_local_image_labels image_publishable get_remote_image_labels publish_multiarch_manifest post_pr_comment get_image_manifest_public get_image_manifest_private main get_access_token publish_image put_image_manifest_public main stop_previous_build main main generic_config_parser Directive try_parse_and_handle_directive parse_code_section_delimiter succeeded WrappedFile setup_logger failure DocCheckerCtx success handle handle parse TestStringMethods TestStringMethods main Net train test pytest_report_teststatus pytest_addoption execute_commands EndiannessAwareExecutionSession DummyBackend JniExecutionSession determine_dynamic_parameters get_type_inference_func tblgen_operand_type_to_cpp_type get_data_structure_element parse_type_constraints get_unique_output_name gen_op_importer get_attrs get_operands_or_results get_promotable_const_operands_func gen_op_versions build_operator_schemas tblgen_attr_type_to_cpp_type get_numberof_inout get_onnx_mlir_types get_output_type_mapping display_attr_type get_numberof_list dec_indent parse_a_type_constraint Args main join_args gen_op_def should_render_domain parse_type_str onnx_attr_type_to_mlir_attr_type inc_indent get_allowed_elem_types get_tblgen_type_index np_type_to_tblgen_attr_type process_def_use_chains record_name_def process_name translate_use_name use_name main print_usage prepare_name_def process_line def_string process_stripped_name mlir_to_c_type process_unary_op process_for mlir_to_c_unary_op process_compare mlir_to_c_binary_op init_array process_binary_op process_map_dim_sym process_conversion process_main process_names main print_usage compute_memref_type execute_commands extend_model_output read_output_from_refs read_input_from_refs generate_random_input warning ordinal main strptime search compile open get raise_for_status sha1 get raise_for_status get raise_for_status get raise_for_status get_access_token loads info compute_file_sha1 get_repo_sha1_date extract_pattern_from_file info containers str inspect_container remove_container info acquire_read_lock pull remove_image print get_remote_image_labels group tag build images lower match info remove_dependent_containers setup_private_llvm extract_llvm_info hexsha compute_file_sha1 Repo info isoformat acquire_read_lock pull remove_image print get_remote_image_labels group tag build images lower match info remove_dependent_containers get_proj_repo_info build_private_project str remove_image images lower inspect_image info append remove_dependent_containers cleanup_docker_images info inspect_image info raise_for_status put raise_for_status get_access_token put post raise_for_status info get raise_for_status get_local_image_labels get_pr_mergeable_state get_remote_image_labels info print tag acquire_write_lock info push text loads info append get_access_token len publish_arch_image publish_multiarch_manifest publish_image str time get_build_info get_running_builds Jenkins info sleep stop_build stop_previous_build decode wait returncode abspath Popen str basename argv exit dirname append geteuid enumerate stdout remove getegid print strerror extend match sub len rglob join format DocCheckerCtx any normpath chain append literal_eval succeeded pop handle next_non_empty_line doc_file_ext try_parse_directive getLogger addHandler StreamHandler DEBUG setLevel decode list format print debug splitlines writelines unified_diff len append parse_code_section_delimiter doc_file format backward model print nll_loss dataset zero_grad item step enumerate len format print eval dataset len save_model randn DataLoader ArgumentParser device save export seed StepLR step load_state_dict export_onnx parse_args to range state_dict test manual_seed MNIST load Adadelta add_argument parameters train epochs addoption outcome hasattr skipped failed passed get join list items print copy verbose run list print strip dumps loads Popen Text lower inputs Text lower startswith range len replace startswith get_data_structure_element allowed_type_strs type_constraints append np_type_to_tblgen_attr_type typeStr get_onnx_mlir_types any_type_of name write OrderedDict isHomogeneous append get_unique_output_name enumerate required items sorted format replace isinstance format_value name get_attribute_value default_value OrderedDict onnx_attr_type_to_mlir_attr_type get_attr_type_optional get_attr_type_with_default type len str get_tblgen_type_index inputs outputs get_allowed_elem_types append typeStr enumerate get_output_type_mapping inputs get_numberof_list dec_indent outputs inc_indent dec_indent join inc_indent dec_indent inc_indent replace items list sort append parse_type_str allowed_type_strs dict type_constraints parse_a_type_constraint print name typeStr get_type_inference_func since_version parse_type_constraints required str sorted list doc name OrderedDict get_attrs get_operands_or_results append get_numberof_inout update format replace dec_indent splitlines keys enumerate items inc_indent len items list inc_indent write get str format name inputs write since_version outputs inc_indent len items list defaultdict sorted format name print exit get_all_schemas_with_history reversed set add since_version append gen_op_importer op_def name gen_op_def write strftime dict pprint op_importer gen_op_versions build_operator_schemas join StringIO open print exit findall group match append compile print exit str findall record_name_def replace use_name clear replace print record_name_def process_name translate_use_name search use_name group copy sub findall compile items list rstrip getopt process_def_use_chains stdin stderr upper loads print_usage prepare_name_def process_line open findall print replace compile sub replace pop join replace mlir_to_c_type split process_stripped_name print findall compute_memref_type compile print process_names print mlir_to_c_type mlir_to_c_binary_op print mlir_to_c_unary_op mlir_to_c_type print mlir_to_c_type process_stripped_name replace mlir_to_c_type process_unary_op group process_binary_op process_compare process_map_dim_sym process_main process_conversion process_names process_for compute_memref_type compile call pop FLOAT make_tensor_value_info output extend len join list format dtype input print name TensorProto to_array ordinal append join dtype format print output ordinal TensorProto to_array enumerate seed list format input print name exit astype float32 shape dim_value ordinal append dim enumerate print extend_model_output shape_info fromkeys model_path sum split | <!--- SPDX-License-Identifier: Apache-2.0 --> <p align="center"><img width="50%" src="docs/logo/onnx-mlir-1280x640.png" /></p> # ONNX-MLIR This project (https://onnx.ai/onnx-mlir/) provides compiler technology to transform a valid Open Neural Network Exchange (ONNX) graph into code that implements the graph with minimum runtime support. It implements the [ONNX standard](https://github.com/onnx/onnx#readme) and is based on the underlying [LLVM/MLIR](https://mlir.llvm.org) compiler technology. | System | Build Status | Model Zoo Status | |---------------|--------------|------------------| | s390x-Linux | [](https://www.onnxmlir.xyz/jenkins/job/ONNX-MLIR-Pipeline-Docker-Build/) | [](https://www.onnxmlir.xyz/jenkins/job/ONNX-MLIR-Pipeline-Docker-Build/Model_20Zoo_20Report/) | | ppc64le-Linux | [](https://www.onnxmlir.xyz/jenkinp/job/ONNX-MLIR-Pipeline-Docker-Build/) | [](https://www.onnxmlir.xyz/jenkinp/job/ONNX-MLIR-Pipeline-Docker-Build/Model_20Zoo_20Report/) | | amd64-Linux | [](https://www.onnxmlir.xyz/jenkinx/job/ONNX-MLIR-Pipeline-Docker-Build/) | [](https://www.onnxmlir.xyz/jenkinx/job/ONNX-MLIR-Pipeline-Docker-Build/Model_20Zoo_20Report/) | | 3,217 |
ooblahman/koopman-robust-control | ['time series'] | ['Metric on Nonlinear Dynamical Systems with Perron-Frobenius Operators'] | sampler/utils.py experiments/duffing_control.py scripts/test_profile.py systems/lti2x2.py experiments/duffing_uncertainty_set.py systems/burgers.py experiments/vdp_norm.py sampler/features.py experiments/duffing_plot.py sampler/reflections.py sampler/hmc_parallel.py experiments/2x2_perturb.py experiments/duffing_controlled_nominal.py experiments/2x2_plot.py sampler/ugen.py sampler/kernel.py experiments/vdp_beta_modulation.py systems/duffing.py experiments/duffing_mpc.py experiments/pf_gd.py experiments/mpc_plot.py systems/vdp.py sampler/operators.py experiments/vdp_plot.py scripts/tdplot.py experiments/duffing_robust_mpc.py experiments/vdp_perturb.py experiments/duffing_perturb.py sampler/hmc.py systems/lorenz.py sampler/hmc_nuts.py mpc_solve cost solve_mpc mpc_loop reference plot_one plot_perturbed plot_posterior get_color extrapolate Kernel GaussianKernel GaussianObservable PolynomialObservable DelayObservable ComposedObservable LaplacianKernel PolyKernel Observable leapfrog accept hamiltonian sample gibbs adapt_step sample sample worker potential PFKernel worker dmd dmdc sample_2d_dynamics dmd_test kdmd rect_boundary lp_boundary fn_boundary nil_boundary perturb zip_with set_seed is_semistable spectral_radius diff_to_transferop deduped_legend plot_flow_field zero_if_nan _sp_radius_niter euclidean_matrix_kernel plot_trace_determinant transferop_to_diff _sp_radius_conv solve_mpc dataset step dataset system system_ode dataset system dataset system Problem Minimize Variable print solve k zeros range full diag Parameter backward clamp zero_grad SGD stack unsqueeze Tensor step max set_integrator list y integrate tqdm t set_f_params item append range ylim xlim figure plot subplots plot set_xlim axis tight_layout set_ylim plot pdf title hist figure linspace Tensor sum potential boundary zip_with params_grad range min update leapfrog list tuple clamp hamiltonian close tqdm append gibbs len exp min log adapt_step print min float sample set_seed t pinverse tuple sys pinverse t unsqueeze append range cat len pinverse t eye gramian mm Tensor extrapolate plot dmd print preimage title figure mm extrapolate zip_with int nil_boundary print Beta min sample device fn_boundary item PFKernel to len seed randint manual_seed ones norm t clone ones norm t range list OrderedDict legend zip get_legend_handles_labels keys values max streamplot f empty_like sqrt linspace meshgrid array range int plot set_xlim scatter linspace zeros set_ylim print cost range item extrapolate copy ones nan step full range u normal u odeint linspace solve_ivp system | # Generating uncertainty sets of transfer operators for robust prediction & control This project contains the experimental framework for generating perturbations of nonlinear dynamical systems via a nominal Koopman operator, per "An MCMC Method for Uncertainty Set Generation via Operator-Theoretic Metrics," by A. Srinivasan and N. Takeishi, submitted to IEEE CDC. Below is the library organization. To run any module, simply use `python -m FOLDER.MODULE`. ```bash ├── sampler │ ├── ugen.py # High-level MCMC procedure for uncertainty set generation │ ├── hmc.py # PyTorch autograd-based Hamiltonian Monte Carlo for tensor-valued arguments with support for constraint-based reflection │ ├── hmc_nuts.py # No U-Turn Sampler integrator for HMC (not used in experiments) │ ├── hmc_parallel.py # Parallel HMC sampler from a specified prior over initial conditions │ ├── kernel.py # Positive-definite kernel over dynamical systems (autograd-compliant implementation of Ishikawa et al., https://arxiv.org/abs/1805.12324) | 3,218 |
opconty/pixellink_keras | ['scene text detection', 'text classification', 'instance segmentation', 'semantic segmentation'] | ['PixelLink: Detecting Scene Text via Instance Segmentation'] | pixellink_eval.py pixellink_model.py pixellink_utils.py _fuse_feats upsample pixellink_vgg16 _score_feats _generate_layer_name create_pixellink_model decode_batch mask_to_bboxes is_valid_cord rect_to_xys min_area_rect softmax get_neighbours_8 resize_image decode_image_by_join _obtain_input_shape partial get_source_inputs Model Input format _score_feats _fuse_feats pixellink_vgg16 output Model input shape float int resize sum atleast_2d exp float flatten expand_dims next max join list fromkeys is_valid_cord shape get_neighbours_8 zip get_all enumerate append decode_image_by_join range get_valid_y reshape boxPoints get_valid_x int0 enumerate minAreaRect RETR_TREE uint8 CHAIN_APPROX_SIMPLE rect_to_xys findContours astype min_area_rect resize append max range | opconty/pixellink_keras | 3,219 |
opconty/pytorch_ctpn | ['scene text detection'] | ['Detecting Text in Natural Image with Connectionist Text Proposal Network'] | data/__init__.py ctpn_train.py ctpn_predict.py ctpn_utils.py ctpn_model.py config.py data/dataset.py BasicConv RPN_REGR_Loss CTPN_Model RPN_CLS_Loss dis save_checkpoint get_arguments nms cal_overlaps TextProposalConnectorOriented bbox_transfor_inv cal_rpn Graph bbox_transfrom filter_bbox TextLineCfg clip_box resize TextProposalGraphBuilder cal_iou gen_anchor VOCDataset readxml imshow waitKey destroyAllWindows add_argument ArgumentParser join format checkpoints_dir print save float arange reshape hstack append array len minimum maximum zeros cal_iou range zeros log transpose exp minimum maximum sum cal_overlaps bbox_transfrom empty fill argmax gen_anchor append maximum minimum int list parse text iter append float round | opconty/pytorch_ctpn | 3,220 |
open-cv/deeplab-v2 | ['semantic segmentation'] | ['DeepLab: Semantic Image Segmentation with Deep Convolutional Nets, Atrous Convolution, and Fully Connected CRFs'] | python/caffe/io.py python/caffe/test/test_python_layer.py scripts/download_model_binary.py python/caffe/net_spec.py python/caffe/test/test_net.py tools/extra/resize_and_crop_images.py python/draw_net.py python/caffe/test/test_net_spec.py src/caffe/test/test_data/generate_sample_data.py python/caffe/draw.py python/caffe/pycaffe.py tools/extra/extract_seconds.py scripts/cpp_lint.py python/classify.py examples/web_demo/exifutil.py examples/pycaffe/layers/pyloss.py python/caffe/test/test_solver.py python/caffe/classifier.py examples/finetune_flickr_style/assemble_data.py python/caffe/test/test_io.py python/caffe/test/test_python_layer_with_param_str.py tools/extra/parse_log.py python/caffe/__init__.py python/caffe/test/test_layer_type_list.py examples/web_demo/app.py scripts/copy_notebook.py python/caffe/detector.py python/detect.py examples/pycaffe/caffenet.py tools/extra/summarize.py download_image make_net max_pool caffenet conv_relu fc_relu EuclideanLossLayer start_tornado start_from_terminal embed_image_html classify_upload index allowed_file ImagenetClassifier classify_url open_oriented_im apply_orientation main main main parse_args Classifier Detector get_edge_label draw_net get_layer_label get_pydot_graph choose_color_by_layertype get_pooling_types_dict draw_net_to_file Transformer blobproto_to_array datum_to_array array_to_blobproto arraylist_to_blobprotovecor_str array_to_datum resize_image blobprotovector_str_to_arraylist load_image oversample Layers Function Parameters Top NetSpec assign_proto param_name_dict to_proto _Net_blobs _Net_forward_all _Net_set_input_arrays _Net_backward _Net_params _Net_forward _Net_IdNameWrapper _Net_outputs _Net_forward_backward_all _Net_blob_loss_weights _Net_batch _Net_inputs TestBlobProtoToArray TestLayerTypeList simple_net_file TestNet lenet TestNetSpec silent_net anon_lenet exception_net_file parameter_net_file SimpleLayer TestPythonLayer ParameterLayer python_net_file ExceptionLayer SimpleParamLayer TestLayerWithParam python_param_net_file TestSolver ParseNolintSuppressions CheckVlogArguments CheckSectionSpacing FindNextMultiLineCommentEnd ReplaceAll CheckForFunctionLengths _SetOutputFormat _IsTestFilename _VerboseLevel CheckBraces RemoveMultiLineComments ResetNolintSuppressions CheckForNonStandardConstructs _SetVerboseLevel PrintUsage _NestingState CheckIncludeLine CheckAccess _CppLintState Search CheckInvalidIncrement RemoveMultiLineCommentsFromRange CleansedLines CheckForBadCharacters UpdateIncludeState FindPreviousMatchingAngleBracket CheckEmptyBlockBody FindNextMultiLineCommentStart Match _NamespaceInfo CheckMakePairUsesDeduction CheckCheck IsBlankLine _SetFilters ProcessLine _FunctionState CheckPosixThreading GetLineWidth GetHeaderGuardCPPVariable IsCppString _IncludeState CheckSpacing _ClassInfo CheckForCopyright IsErrorSuppressedByNolint ProcessFileData CheckForMultilineCommentsAndStrings CloseExpression _PreprocessorInfo _OutputFormat CheckForIncludeWhatYouUse CheckSpacingForFunctionCall FindEndOfExpressionInLine FindNextMatchingAngleBracket _SetCountingStyle ProcessFile _IncludeError CleanseRawStrings CheckAltTokens CheckForNewlineAtEOF ParseArguments CheckForNonConstReference PrintCategories _Filters main FilesBelongToSameModule CheckCStyleCast FileInfo _BlockInfo CheckForHeaderGuard CheckCaffeDataLayerSetUp ReverseCloseExpression CleanseComments _DropCommonSuffixes _ClassifyInclude CheckStyle CheckCaffeAlternatives FindStartOfExpressionInLine _ShouldPrintError CheckComment Error _GetTextInside CheckLanguage CheckCaffeRandom GetPreviousNonBlankLine reporthook parse_readme_frontmatter model_checks_out valid_dirname get_start_time extract_seconds extract_datetime_from_line get_log_created_year write_csv parse_log fix_initial_nan_learning_rate save_csv_files main parse_args parse_line_for_net_output ResizeCropImagesMapper PILResizeCrop OpenCVResizeCrop print_table printed_len summarize_net main read_net format_param imread urlretrieve Convolution InnerProduct Data SoftmaxWithLoss LRN Accuracy max_pool InnerProduct conv_relu fc_relu Dropout get read info load_image classify_image StringIO join replace info secure_filename save filename open_oriented_im classify_image fromarray replace astype save resize StringIO items listen HTTPServer format print start WSGIContainer update start_tornado add_option OptionParser debug port parse_args ImagenetClassifier forward run hasattr _getexif astype float32 tile apply_orientation open transpose model_def endswith ArgumentParser save mean_file channel_swap output_file dirname expanduser parse_args input_file predict Classifier set_mode_cpu load time isdir print add_argument set_mode_gpu pretrained_model gpu len DataFrame Detector format to_hdf detect_selective_search mean set_index to_csv detect_windows read_csv add_argument ArgumentParser read NetParameter output_image_file rankdir Merge draw_net_to_file items list DESCRIPTOR batch_size str num_output get_pooling_types_dict add_edge get_edge_label list Dot get_layer_label values name choose_color_by_layertype Edge Node bottom append type layer add_node top data array diff shape BlobProto extend flat extend BlobProtoVector ParseFromString BlobProtoVector extend tostring shape Datum flat data len astype float32 tile zoom tuple resize fill empty array concatenate shape tile empty array LayerParameter list NetParameter _to_proto extend Counter OrderedDict values iteritems hasattr isinstance extend add getattr setattr items layers index set outputs _forward len items _backward layers inputs index set len items asarray extend copy next _batch iter forward values len items asarray backward extend copy next _batch zip_longest zip iter forward values len ascontiguousarray concatenate iter zeros next range values len NamedTemporaryFile str close write data Pooling pool1 conv2 pool2 ip1 relu1 SoftmaxWithLoss Convolution NetSpec DummyData ip2 ReLU InnerProduct label conv1 Pooling SoftmaxWithLoss Convolution DummyData ReLU InnerProduct data NetSpec DummyData Silence data2 error search add group clear compile compile compile SetOutputFormat SetCountingStyle SetFilters _Filters startswith IsErrorSuppressedByNolint _ShouldPrintError write IncrementErrorCount replace append Match group find startswith endswith range error FindNextMultiLineCommentEnd RemoveMultiLineCommentsFromRange FindNextMultiLineCommentStart rstrip find range len FindEndOfExpressionInLine range len FindStartOfExpressionInLine error min search I range len FileInfo RepositoryName sep sub ParseNolintSuppressions error startswith split GetHeaderGuardCPPVariable enumerate error enumerate error len error replace count error find error find error find error find error Search error match InnermostClass replace error escape Match Search error group Search Check error lines Count End group Begin NumLines Match raw_lines range Search error match group error Match group pop group append Search pop group append Search elided replace CheckSpacingForFunctionCall rfind error len group min CloseExpression NumLines sub find CheckComment Match range Search lines_without_raw_strings error group starting_linenum Match range Search error rfind len group ReverseCloseExpression Search Match CloseExpression find error Match CloseExpression find elided error strip group FindEndOfExpressionInLine find Match range CloseExpression len error Match finditer normalize isinstance GetLineWidth int InnermostClass CheckCheck error CheckAltTokens CheckBraces CheckSpacing CheckSectionSpacing CheckEmptyBlockBody CheckAccess GetHeaderGuardCPPVariable lines_without_raw_strings _DropCommonSuffixes RepositoryName match split CheckNextIncludeOrder CanonicalizeAlphabeticalOrder FileInfo error search group SetLastHeader match _ClassifyInclude Match pop end search set append values M rstrip replace CheckCStyleCast error _GetTextInside CheckIncludeLine search group lstrip startswith Match ResetSection Search split rfind error group ReverseCloseExpression lstrip findall Match range Search ReplaceAll error Match Search endswith replace setdefault group search CleanseComments open list FilesBelongToSameModule error search copy sub NumLines FullName keys range error search CheckPosixThreading ParseNolintSuppressions CheckVlogArguments CheckMakePairUsesDeduction CheckCaffeDataLayerSetUp CheckLanguage CheckInvalidIncrement CheckCaffeRandom CheckForNonConstReference check_fn Update CheckForNonStandardConstructs CheckStyle raw_lines CheckForMultilineCommentsAndStrings CheckCaffeAlternatives CheckForFunctionLengths CleansedLines _NestingState CheckForBadCharacters CheckForNewlineAtEOF _IncludeState RemoveMultiLineComments CheckForCopyright ResetNolintSuppressions CheckForHeaderGuard NumLines CheckCompletedBlocks CheckForIncludeWhatYouUse range ProcessLine _FunctionState Error rstrip endswith len write ProcessFileData _SetVerboseLevel range split write exit join write exit _VerboseLevel int getopt _SetOutputFormat set _SetVerboseLevel PrintCategories _SetFilters _OutputFormat PrintUsage _SetCountingStyle split getreader ParseArguments ResetErrorCounts stderr exit verbose_level PrintErrorCounts StreamReaderWriter ProcessFile getwriter int time write flush load join index int rfind datetime split getctime year strip extract_datetime_from_line get_start_time total_seconds strip write get_log_created_year close extract_datetime_from_line open float get_log_created_year compile fix_initial_nan_learning_rate search group OrderedDict append float join basename write_csv print excel parse_log save_csv_files output_dir logfile_path NetParameter decay_mult format name lr_mult append print zip len get join str format convolution_param list setdefault param kernel_size map set top bottom append type module layer enumerate print_table filename summarize_net read_net | ## DeepLab v2 ### Introduction DeepLab is a state-of-art deep learning system for semantic image segmentation built on top of [Caffe](http://caffe.berkeleyvision.org). It combines (1) *atrous convolution* to explicitly control the resolution at which feature responses are computed within Deep Convolutional Neural Networks, (2) *atrous spatial pyramid pooling* to robustly segment objects at multiple scales with filters at multiple sampling rates and effective fields-of-views, and (3) densely connected conditional random fields (CRF) as post processing. This distribution provides a publicly available implementation for the key model ingredients reported in our latest [arXiv paper](http://arxiv.org/abs/1606.00915). This version also supports the experiments (DeepLab v1) in our ICLR'15. You only need to modify the old prototxt files. For example, our proposed atrous convolution is called dilated convolution in CAFFE framework, and you need to change the convolution parameter "hole" to "dilation" (the usage is exactly the same). For the experiments in ICCV'15, there are some differences between our argmax and softmax_loss layers and Caffe's. Please refer to [DeepLabv1](https://bitbucket.org/deeplab/deeplab-public/) for details. Please consult and consider citing the following papers: @article{CP2016Deeplab, title={DeepLab: Semantic Image Segmentation with Deep Convolutional Nets, Atrous Convolution, and Fully Connected CRFs}, author={Liang-Chieh Chen and George Papandreou and Iasonas Kokkinos and Kevin Murphy and Alan L Yuille}, | 3,221 |
openai/blocksparse | ['sentiment analysis'] | ['GPU Kernels for Block-Sparse Weights'] | blocksparse/__init__.py test/quantize_test.py examples/transformer/mnist_mpi.py test/adam_test.py test/nccl_test.py blocksparse/grads.py test/lstm_gates_test.py test/reduce_max_test.py test/pruning_test.py test/blocksparse_conv_test.py test/blocksparse_transformer_test.py test/emb_test.py test/matmul_test.py test/cwise_linear_test.py test/blocksparse_reduced_dw_test.py test/layer_norm_test.py blocksparse/lstm.py examples/transformer/enwik8.py examples/lstm/masks.py blocksparse/conv.py test/top_k_test.py blocksparse/embed.py generate_kernels.py test/blocksparse_matmul_test.py examples/lstm/utils.py test/transpose_test.py blocksparse/utils.py examples/lstm/layers.py test/bias_relu_test.py test/ewops_test.py test/fancy_gather_test.py examples/simple.py test/blocksparse_matmul_bench.py blocksparse/norms.py blocksparse/optimize.py test/edge_bias_test.py blocksparse/ewops.py blocksparse/matmul.py blocksparse/transformer.py src/dev/spatial_conv.py setup.py blocksparse/quantize.py examples/lstm/memory_util.py test/adafactor_test.py examples/lstm/train.py vendor/tensorflow_bfloat16_patch/tensorflow/python/ops/gradients_impl.py blocksparse/nccl.py test/dropout_test.py get_ptx_file run_command extract_includes get_kernel _get_cache_dir main in_dim out_dim fprop_lut tf_out_dim_pad deconv_edge_bias_init cwise_linear_test ConvEdgeBias BlocksparseDeconv blocksparse_deconv_grad bprop_lut cwise_linear_axpb_grad blocksparse_conv_grad expand_dims conv_edge_bias_init fprop_slice edge_bias_grad bprop_slice BlocksparseConv cwise_linear get_padding blocksparse_l2_normalize_grad_cktrs blocksparse_l2_normalize_gain_grad_cktrs blocksparse_l2_normalize_grad_kctrs cwise_linear_grad_test dilation_size embedding_lookup embedding_lookup_grad convert_gradient_to_tensor dropout_grad ew_z_xy_grad restore_add_n float_cast reduce_max ew_z_xa_grad add_n filter_tensor log reciprocal exp fancy_gather multiply scale_tensor add ew_z_xb_grad add_n8 filter_tensor_grad elu bias_relu_grad assign_add fancy_gather_grad dropout relu bias_relu subtract float_cast_grad gelu concrete_gate_grad square sqrt fast_gelu reduce_max_grad negative minimum tanh concrete_gate replace_add_n swish divide maximum broadcast_check sigmoid concrete_gate_infer _PendingCount gradients recomputable recompute_grad _AsList _GetGrad _MatMulGradNN _SetGrad _AggregatedGrads fused_lstm_gates_grad fused_lstm_gates4_grad FusedBasicLSTMCell grouped_lstm sparse_relu_test split4_grad sparse_relu_grad split4 fused_lstm_gates concat4_grad sparse_relu group_lstm_grads concat4 group_param_grads get_bsmm_dx_ops get_constant IdentityInit group_dg_grads BlocksparseMatMul get_parents SparseProj blocksparse_l2_normalize_grad_ck largest_block blocksparse_matmul_grad gather_scatter_grad scatter_add_mul_grad block_reduced_full_dw reduce_scatter allreduce check_group_params identity_sync allreduce_grad _skip_op _get_parents_set serialize_allreduce_ops sync_globals_zero_init_op sync_variables_op mpi_size identity_sync_grad group_allreduce all_gather _get_parents_list _get_children_list _magic64u batch_norm_grad batch_norm batch_norm_test layer_norm_test layer_norm_grad_test layer_norm_grad batch_norm_inf_grad layer_norm _magic32u batch_norm_inference batch_norm_grad_test batch_norm_inf_test blocksparse_l2_decay clip_by_global_norm Ema _check_param_shape AdamOptimizer ClipGlobalNorm blocksparse_norm blocksparse_prune global_norm AdafactorOptimizer log_stats quantize QuantizeSpec log_stats_grad get_timestamp quantize_grad transpose_2d_grad top_k rectified_top_k_grad top_k_grad BlocksparseTransformer transpose_0213_grad masked_top_k_softmax_grad softmax_cross_entropy_grad rectified_top_k transpose_0213 softmax_cross_entropy masked_softmax_grad_test blocksparse_softmax_op_grad blocksparse_transformer_nt_grad masked_softmax_test softmax transpose_2d clear_bst_constants blocksparse_masked_softmax_op_grad masked_softmax masked_top_k_softmax_test masked_top_k_softmax get_constant blocksparse_transformer_nn_grad rectified_top_k_test masked_softmax_grad out_dim backward_pad magic64u magic32u reset_scalar_constants reduce_mul bst_deconv_layout conv_slice scalar_constant is_param_casted set_entropy deconv_slice same_pad z_order_2d bst_conv_layout ceil_div get_entropy z_order_3d dilation_size print_act_stats RNN FullyConnected LSTM_scott Embedding nodesort print_graph LSTM_vanilla HParams adamax_updates LSTM_Model adam_updates balanced_random barabasi_albert make_mask old_barabasi_albert watts_strogatz_2d watts_strogatz_1d extra mix_factor smart_initialize capture_stderr peak_memory vlog _parse_logline plot_memory_timeline TemporaryFileHelper memory_timeline print_memory_timeline score model text8_stream wiki3_stream cos zeros_initializer text8 assign_to_gpu normal_initializer Scheduler cube ones_initializer ortho_initializer num_trainable_params wiki3 text_to_npy square sqrt ceil_div fourth print_trainable_params JsonLogger constant linear make_path sigmoid average_grads cubert fourrt iter_data causal_subblock_mask model print_rank0 transformer_block get_blocksparse_transformer layernorm enwik8 conv1d out_dim bprop_slice updat_kernel conv_spatial_updat fprop_slice Conv conv_spatial_xprop xprop_kernel ceil_div AdafactorTest AdafactorTest BiasReluTest BlocksparseConvTest BlocksparseMatMulTest BlocksparseReducedDWTest mask_callback BlocksparseTransformerTest CWiseLinearTest DropoutTest ceil_div EdgeBiasTest EmbeddingLookupTest fast_gelu gelu swish EwOpsTest FancyGatherTest LayerNormTest LSTMGatesTest MatMulTest PruneTest QuantizeTest BiasReluTest TopKTest TransposeTest gradients _SymGrad _AsList _VerifyGeneratedGradients _MaybeCompile _PendingCount hessians _AccumulatorShape _SetGrad _hessian_vector_product _HasAnyNotNoneGrads _DefaultGradYs _GetGrads _IndexedSlicesToTensor _LogOpGradients AggregationMethod _GetGrad _UpdatePendingAndEnqueueReady _AggregatedGrads _HandleNestedIndexedSlices _maybe_colocate_with _IsTrainable _MarkReachedOps _StopOps _GatherInputs _MultiDeviceAddN expanduser join makedirs join read format close write _get_cache_dir eval open append exists split join list search group append open join communicate print returncode Popen str get_ptx_file join time getmtime insert extract_includes run_command _get_cache_dir append join dict edge_bias_grad_op get_attr blocksparse_conv_op get_attr l2_normalize_gain_grad_kctrs get_attr blocksparse_deconv_op get_attr l2_normalize_grad_cktrs l2_normalize_gain_grad_cktrs get_attr lower get_attr cwise_linear_grad_op list reshape maximum shape range len list tuple reshape shape append sum range len max ceil_div dilation_size expand_dims append list range append list range dilation_size range append range dilation_size embedding_lookup_op value convert_gradient_to_tensor lower scalar_constant get_attr embedding_lookup_grad_op float_cast_op as_list get_attr get_attr get_attr as_dtype lower base_dtype get_attr as_list get_entropy scalar_constant zip gen_dropout_mask_op get_attr apply_dropout_mask_op get_entropy scalar_constant concrete_gate_op concrete_gate_grad_op get_attr append pop add_n8_op len add_n sigmoid lower bias_add relu bias_grad_op get_attr bias_relu_grad_op reshape concat maximum shape lower reduce_prod expand_dims range len fancy_gather_grad_op as_list lower reduce_max_op get_attr value _remove_all_control_inputs _control_outputs _add_control_inputs len get op append get op get len add_n8_op range enumerate get list remove popleft consumers inputs extend op add set outputs dict deque append len matmul len _AsList outputs _update_input enumerate tanh constant multiply add sigmoid lower bias_add split bias_grad_op lstm_gates_grad_op mean shape std len value list insert sort set add zip append enumerate append list get_default_graph get_attr blocksparse_matmul_dx blocksparse_matmul_dg blocksparse_matmul_dw get_attr l2_normalize_gain_grad_ck join sort get_parents scalar_constant split get join list sort get_parents dict split _update_input max values len list blocksparse_matmul_dg print consumers inputs append _update_input enumerate list sort consumers get_parents append append add list set gather_scatter_op scatter_mul_grad_op gather_scatter_op list print allreduce_nccl mpi_size range reduce_scatter_nccl join replace isinstance print allreduce_op concat float_cast len reshape shape num_elements zip append enumerate list list update set append control_inputs _control_outputs list consumers extend outputs _get_children_list dtype list sorted name _get_parents_set add shape popleft append get _add_control_input close op set _get_parents_list deque type pop remove print extend dict len identity_synchronize get_attr print transpose2d check_group_params reduce_scatter_nccl transpose2d check_group_params all_gather_nccl layer_norm_op value list rsqrt relu slice lower append moments range layer_norm_grad_op get_attr shape num_elements int shape num_elements _magic64u int get_attr reciprocal var slice reshape maximum empty_like mean shape sqrt range reciprocal var slice reshape empty_like copy mean shape sqrt float sum range reciprocal shape sqrt reshape reciprocal var reshape mean shape sqrt reciprocal reduce_mul reshape shape sqrt sum range bin len _magic32u append list clip_by_global_norm _check_param_shape _check_param_shape value _check_param_shape top_k scalar_constant blocksparse_norm strftime logfile reuse add quantize_op int log2 add log_stats_op dict blocksparse_transformer_tn get_attr inputs blocksparse_transformer_tn get_attr inputs get_attr blocksparse_softmax_grad get_attr blocksparse_softmax_grad reshape size shape stack gather expand_dims range zeros range maximum shape as_list range len as_list range len get_attr masked_softmax_grad_op get_attr masked_softmax_grad_op sum exp reshape size shape nonzero fill empty max sum exp reshape size shape nonzero fill zeros empty range softmax_cross_entropy_op float32 view int list isinstance get_default_graph append Tensor float dict consumers max range bin len max range bin len range bin len magic32u append list range append list range print add set conv_slice ndindex zeros range backward_pad print deconv_slice set add ndindex zeros range name reshape print float_cast moments set toposort children print name nodesort get_operations inputs dict get_default_graph append _control_inputs get_shape gradients Variable name square sqrt pow assign_add assign zip append zeros get_shape gradients Variable name maximum assign zip append zeros abs int balanced_random barabasi_albert ones old_barabasi_albert watts_strogatz_1d extra startswith split barabasi_albert_graph astype int32 eye watts_strogatz_graph list sort shuffle zip randint sum range list sort barabasi_albert_graph astype shuffle int32 eye zip randint sum range int arange reshape square randint sqrt binomial nonzero ceil zeros range append len pop list sort shuffle eye range list min astype shuffle float32 append zeros range len str print groupdict search get hasattr print _parse_logline get_alloc_names getvalue get_alloc_bytes get_alloc_type append enumerate split int memory_timeline max print int memory_timeline append int memory_timeline plot get_default_session name get_operation_by_name get_collection group GLOBAL_VARIABLES make_safe_initializer add_control_inputs get_default_graph remove_control_inputs run list concat axis group split all_sum ngpu range enumerate len nsteps float tqdm mean state_shape zeros nbatch text_stream log append run print read zeros min range len fromfile print join text_to_npy concatenate reshape min zeros range len average_sparse isinstance average_dense IndexedSlices zip append print get_collection TRAINABLE_VARIABLES dirname makedirs value ones ndindex ones ndindex BlocksparseTransformer value read fromstring split permutation arange format print_rank0 size reshape len randint range zeros enumerate print reshape copy dot ndindex empty ndindex zeros reshape join prepare dict empty ceil_div SourceModule get_function join prepare dict empty ceil_div SourceModule get_function ones ndindex constant_value dense_shape prod warn popleft consumers extend outputs deque popleft inputs op extend deque append MaybeCreateControlFlowState _MarkReachedOps _last_id len range is_complex convert_n_to_tensor_or_indexed_slices as_dtype dtype update inputs add set _id CopyFrom NameAttrList _symbolic_gradient attr type decode get_attr replace b in_eager_mode PostProcessing any _GetGrads isinstance unused_exits _HasAnyNotNoneGrads ZerosLikeForExit inputs op deferred_exits _IsTrainable _SetGrad append GetGradState IsLoopExit isinstance Tensor isinstance values get_shape isinstance merge_with unknown_shape Tensor name join vlog append sorted defaultdict iterkeys pop _as_indexed_slices_list all _GetGrads isinstance concat dense_shape accumulate_n vlog DEFAULT _AccumulatorShape add_n8 IndexedSlices ew_z_xy append _MultiDeviceAddN gradients len list assert_rank gradients _AsList zip range len | **Status:** Active (under active development, breaking changes may occur) # Blocksparse The `blocksparse` package contains TensorFlow Ops and corresponding GPU kernels for block-sparse matrix multiplication. Also included are related ops like edge bias, sparse weight norm and layer norm. To learn more, see [the launch post on the OpenAI blog](https://blog.openai.com/block-sparse-gpu-kernels/). ## Prerequisites First, you need at least one Nvidia GPU. For best performance, we recommend using a Pascal or Maxwell generation GPU -- this is the full list of features by GPU type: | GPU Family | BSMatMul-ASM | BSMatMul-CudaC | BSConv | |------------|------------------------|----------------|--------| | Kepler | - | X | - | | Maxwell | X (fastest) | X | X | | 3,222 |
opencobra/cobratoolbox | ['experimental design'] | ['Creation and analysis of biochemical constraint-based models: the COBRA Toolbox v3.0'] | src/analysis/thermo/groupContribution/new/inchi2gv.py src/analysis/thermo/groupContribution/old/inchi2gv.py src/analysis/thermo/groupContribution/new/compound_groups.py docs/source/conf.py src/analysis/thermo/groupContribution/new/inchi2gv_new_groups.py docs/generateJSONList.py src/base/io/python/condalab/test.py docs/source/sphinxext/github_linkcode.py src/base/io/python/tmp/mymod.py src/analysis/thermo/groupContribution/wang/autofragment.py path_to_list path_to_list_easycomplete mkdir_p linkcode_resolve _run_git _git_get_nearest_tracking_branch github_linkcode_resolve _get_git_doc_ref init_groups_data GroupsDataError get_group_matrix MalformedGroupDefinitionError GroupDecomposer MakeOpts InChIDecomposer GroupVector GroupDecomposition _AllAtomsSet Group FocalSet GroupDecompositionError GroupsData GroupsDataError MalformedGroupDefinitionError GroupDecomposer InChI2GroupVector OpenBabelError MakeOpts GroupVector GroupDecomposition _AllAtomsSet Group Molecule FocalSet GroupDecompositionError GroupsData GroupsDataError MalformedGroupDefinitionError GroupDecomposer InChI2GroupVector OpenBabelError MakeOpts GroupVector GroupDecomposition _AllAtomsSet Group Molecule FocalSet GroupDecompositionError GroupsData GroupsDataError MalformedGroupDefinitionError GroupDecomposer InChI2GroupVector OpenBabelError MakeOpts GroupVector GroupDecomposition _AllAtomsSet Group Molecule FocalSet GroupDecompositionError GroupsData decompse_ac count_substructures search theend makedirs join print append walk len update join sorted print append walk enumerate len communicate Popen poll strip group match splitlines _run_git len strip _git_get_nearest_tracking_branch get getattr replace split append Group property property add_option OptionParser init_groups_data hstack delete InChIDecomposer GetGroupNames zeros range smiles_to_groupvec enumerate len OBSmartsPattern OBElementTable GetBeginAtomIdx len add dict set MolFragmentToSmiles FindAtomEnvironmentOfRadiusN range GetEndAtomIdx dict MolFromSmiles RemoveHs count_substructures append | opencobra/cobratoolbox | 3,223 |
opengm/opengm | ['semantic segmentation'] | ['Fusion Moves for Correlation Clustering'] | src/interfaces/python/opengm/_to_native_converter.py src/interfaces/python/examples/add_multiple_unaries.py src/interfaces/python/opengm/_visu.py src/interfaces/python/examples/add_factors_and_functions.py src/interfaces/python/examples/potts_model.py src/interfaces/python/opengm/opengmcore/function_injector.py src/interfaces/python/examples/python_function.py src/interfaces/python/examples/inference_fusion_based.py src/interfaces/python/test.py src/interfaces/python/examples/python_visitor_gui.py src/interfaces/python/opengm/functionhelper.py src/interfaces/python/opengm/_inference_injector.py src/interfaces/python/opengm/opengmcore/dtypes.py src/interfaces/python/examples/python_visitor.py src/interfaces/python/examples/potts_gui.py src/interfaces/python/examples/denoise.py src/tutorials/python/demo/demo1.py src/interfaces/python/examples/test_reserve.py src/interfaces/python/examples/inference_bp.py src/interfaces/python/opengm/inference/__init__.py src/interfaces/python/opengm/benchmark/__init__.py src/tutorials/python/demo/demo5.py src/interfaces/python/examples/visu/triangle.py src/tutorials/python/demo/demo3.py src/interfaces/python/examples/new_visitor.py src/interfaces/python/opengm/__version__.py src/interfaces/python/examples/shape_walker.py src/interfaces/python/opengm/opengmcore/printing.py src/interfaces/python/examples/inspect_model.py src/interfaces/python/opengm/hdf5/__init__.py src/interfaces/python/opengm/inference_parameter_injector.py src/interfaces/python/opengm/opengmcore/factor_injector.py src/interfaces/python/opengm/_inference_interface_generator.py src/interfaces/python/examples/gm_fix_variables.py src/interfaces/python/opengm/__init__.py src/interfaces/python/examples/test_fancy_stuff.py src/interfaces/python/examples/fusion_moves.py src/interfaces/python/examples/mrf/denoise.py src/interfaces/python/opengm/opengmcore/factorSubset.py src/interfaces/python/opengm/opengmcore/__init__.py src/interfaces/python/opengm/_inference.py src/interfaces/python/examples/ad3_posteriors.py src/interfaces/python/examples/visu/chain.py src/interfaces/python/opengm/_misc.py src/interfaces/python/examples/visu/full.py src/interfaces/python/opengm/opengmcore/shapewalker.py src/interfaces/python/examples/add_functions.py src/interfaces/python/opengm/_inf_param.py src/tutorials/python/demo/demo2.py src/interfaces/python/examples/visu/grid.py src/interfaces/python/opengm/_inference_parameter_injector.py src/interfaces/python/examples/inference_graphcut.py src/interfaces/python/examples/inference_self_fusion.py src/interfaces/python/examples/newinf.py src/interfaces/python/opengm/opengmcore/gm_injector.py src/interfaces/python/examples/interpixel_boundary_segmentation.py src/interfaces/python/examples/markov_chain.py src/tutorials/python/demo/demo4.py src/interfaces/python/examples/pure_python_icm.py src/interfaces/python/examples/inference_icm.py TestFunctions lenOfGen makeGrid TestSparseFunction generate_grid checkInference Test_Inference TestAllExampes checkSolution TestGm generate_mc_grid TestUtilities TestFactor genericSolverCheck regularizer printSolution TopologicalCoordinateToIndex IcmPurePython myFunc PyCallback PyCallback PyCallback denoiseModel relabeledPottsFunctions pottsFunction labelSumFunction sparseFunctions relabeledDifferenceFunction randomFunction differenceFunction relabeledDifferenceFunctions relabeledPottsFunction differenceFunctions sparseFunction pottsFunctions randomFunctions _injectGenericInferenceParameterInterface Inference _injectGenericInferenceInterface InferenceBase classGenerator ImplementationPack _inject_interface dictDictElement dictElement _injectGenericInferenceParameterInterface _MetaInfParam InfParam defaultAccumulator to_native_class_converter is_kwarg_arg_style_string is_string ContainerConvertPolicy is_sub_inf_param is_meta_inf_param is_build_in_simple_parameter is_boost_python_enum is_tribool same_class to_native_boost_python_enum_converter to_native_build_in_simple_class_converter is_1d_seq_like to_native_tribool_converter to_native_inf_param_converter is_inf_param visualizeGm __RandomFusion__ TestModels saveGm GenericTimingVisitor loadGm Timer __CheapInitialization__ weightRandomizer filenamesFromDir runBenchmark ModelResult plotInfRes makePathEnding storeSingleResult makePath Minimizer Maximizer FactorSubset _extend_factor_classes isNativeFunctionVectorType _extend_function_type_classes isNativeFunctionType _extend_function_vector_classes FunctionType _extend_gm_classes prettyValueTable shapeWalker getStartingPointMasked pottsModel3d gridVis movemaker pottsModel3dMasked Multiplier Adder shapeWalker graphicalModel grid2d2Order grid3d2Order makeMaskedState TestFunctions lenOfGen makeGrid TestSparseFunction generate_grid checkInference Test_Inference TestAllExampes checkSolution TestGm generate_mc_grid TestUtilities TestFactor genericSolverCheck regularizer printSolution TopologicalCoordinateToIndex IcmPurePython myFunc PyCallback PyCallback denoiseModel relabeledPottsFunctions pottsFunction labelSumFunction sparseFunctions relabeledDifferenceFunction randomFunction differenceFunction relabeledDifferenceFunctions relabeledPottsFunction differenceFunctions sparseFunction pottsFunctions randomFunctions _injectGenericInferenceParameterInterface Inference _injectGenericInferenceInterface InferenceBase classGenerator ImplementationPack _inject_interface dictDictElement dictElement _injectGenericInferenceParameterInterface _MetaInfParam InfParam defaultAccumulator to_native_class_converter is_kwarg_arg_style_string is_string ContainerConvertPolicy is_sub_inf_param is_meta_inf_param is_build_in_simple_parameter is_boost_python_enum is_tribool same_class to_native_boost_python_enum_converter to_native_build_in_simple_class_converter is_1d_seq_like to_native_tribool_converter to_native_inf_param_converter is_inf_param visualizeGm __RandomFusion__ TestModels saveGm GenericTimingVisitor loadGm Timer __CheapInitialization__ weightRandomizer filenamesFromDir runBenchmark ModelResult plotInfRes makePathEnding storeSingleResult makePath Minimizer Maximizer FactorSubset _extend_factor_classes isNativeFunctionVectorType _extend_function_type_classes isNativeFunctionType _extend_function_vector_classes FunctionType _extend_gm_classes prettyValueTable shapeWalker getStartingPointMasked pottsModel3d gridVis movemaker pottsModel3dMasked Multiplier Adder graphicalModel grid2d2Order grid3d2Order makeMaskedState ones float64 sort gm astype range addFactor addFunction pottsFunction ones sort random gm range addFactor addFunction ones float64 reshape astype GraphicalModel range addFactor addFunction evaluate checkSolution arg infer numberOfFactors arange partialOptimality pythonVisitor solverClass addConstraints factorMarginals numberOfLabels factorIndices shape numberOfVariables marginals range arg value size addConstraint PyCallback bound infer shapeWalker float abs write range arange where differenceFunction abs max reserveFunctions shape addFunctions secondOrderGridVis addFactors range addFunction setdiff1d size value_type astype copy reserveFactors index_type float int uint64 min gm repeat len array len int len int ones require abs max len int len int len int len tuple len empty range abs empty arange range abs empty array range arange where append zeros meshgrid __class__ setattr hasattr getmembers stdout print getvalue _generateFunction_ type StringIO list __dict__ _isDefault tuple ImplementationPack classGenerator keys dict __class__ _injectGenericInferenceParameterInterface append isclass _algName _parameter _injectGenericInferenceInterface operator __class__ __dict__ __class__ isinstance st isinstance __class__ __class__ int isinstance same_class lower names is_build_in_simple_parameter same_class lower isinstance is_meta_inf_param set same_class dict nativeClass parameterNamesAndTypes setattr kwargs isinstance is_boost_python_enum is_build_in_simple_parameter is_tribool same_class numberOfFactors axis show str list add numberOfVariables append draw_networkx_edges range add_edge Graph set keys add_node spring_layout print subplots_adjust dict variableIndices draw_networkx graphviz_layout int bool none uniformAdd normalMult _WeightRandomization_NoiseType_ normalAdd _WeightRandomizerParameter_ float saveGraphicalModel GraphicalModel loadGraphicalModel plot getValues cumsum print copy getTimes makedirs endswith makePath makePathEnding plotInfRes show timingVisitor getTimes legend append arg getValues sClass storeSingleResult enumerate getBounds isinstance print infer dict loadGm getIterations len size shape shapeWalker append PrettyTable add_row len range len require ndarray isinstance ones _gridVis2d FidVector reserveFunctions arange addFactors ones reshape reserveFactors shape addFunctions finalize secondOrderGridVis append graphicalModel bool addFunction FidVector arange addFactors ones reshape shape addFunctions secondOrderGridVis3D finalize append graphicalModel bool addFunction print squeeze f shape _pottsModel3d squeeze size f _pottsModel3dMasked zeros zeros _makeMaskedState shape zeros _getStartingPointMasked shape | [UNMAINTAINED] OpenGM 2 ================================ [](https://travis-ci.org/opengm/opengm) ----------------------------------------------------------------------------------------------- **Forum / Newsgroup** -> https://groups.google.com/forum/#!forum/opengm **Manual for OpenGM 2.0.2** -> http://hciweb2.iwr.uni-heidelberg.de/opengm/download/opengm-2.0.2-beta-manual.pdf **Code-Documentation for OpenGM 2.1.1** -> http://hciweb2.iwr.uni-heidelberg.de/opengm/doxygen/opengm-2.1.1/index.html OpenGM is a C++ template library for discrete factor graph models and distributive operations on these models. It includes state-of-the-art optimization and inference algorithms beyond message passing. OpenGM handles large models efficiently, since (i) functions that occur repeatedly need to be stored only once and (ii) when functions require different parametric or non-parametric encodings, multiple encodings can be used alongside each other, in the same model, using included and custom C++ code. No restrictions are imposed on the factor graph or the operations of the model. OpenGM is modular and extendible. Elementary data types can be chosen to maximize efficiency. The graphical model data structure, inference algorithms and different encodings of functions interoperate through well-defined interfaces. The binary OpenGM file format is based on the HDF5 standard and incorporates user extensions automatically. Features Factor Graph Models (Kschischang et al. 2001) | 3,224 |
openml/continual-automl | ['automl'] | ['Adaptation Strategies for Automated Machine Learning on Evolving Data'] | Scripts/Autosklearn/Autosklearn_DRT.py Scripts/Autosklearn/Autosklearn_DRS.py Scripts/Autosklearn/Autosklearn_PRS.py Scripts/H2O/H2O_T1.py Scripts/H2O/H2O_DI.py Scripts/Autosklearn/Autosklearn_T1.py Scripts/H2O/H2O_WS.py Scripts/GAMA/GAMA_PRS.py Scripts/Autosklearn/Autosklearn_WS.py Scripts/H2O/H2O_DRS.py Scripts/Autosklearn/Autosklearn_DI.py Scripts/GAMA/GAMA_WS.py Scripts/H2O/H2O_Option2.py Scripts/GAMA/GAMA_DI.py Scripts/GAMA/GAMA_T1.py Scripts/GAMA/GAMA_RS.py Scripts/GAMA/GAMA_DRT.py Scripts/H2O/H2O_PRS.py Scripts/H2O/H2O_DRT.py get_spawn_classifier | Scripts and original results files for the paper "Adaptation Strategies for Automated Machine Learning on Evolving Data". The graphs in the paper are also provided. Data is available on OpenML. For each library, there are 6 different options representing the following adaptation strategies: - D&I Detect & Increment - D&RT Detect & Retrain - D&WS Detect & Warm-start - D&RS Detect & Restart - PRS Periodic Restart - T1 Train once Details of the strategies can be found in the original paper. | 3,225 |
opennmt/im2text | ['optical character recognition'] | ['Image-to-Markup Generation with Coarse-to-Fine Attention'] | tools/generate_vocab.py main process_args parse_args add_argument ArgumentParser setFormatter basicConfig sorted list addHandler readlines StreamHandler data_path label_path Formatter process_args info append setLevel keys INFO | # Im2Text A deep learning-based approach to learning the image-to-text conversion, built on top of the <a href="https://opennmt.github.io/">OpenNMT</a> system. It is completely data-driven, hence can be used for a variety of image-to-text problems, such as image captioning, optical character recognition and LaTeX decompilation. Take LaTeX decompilation as an example, given a formula image: <p align="center"><img src="http://lstm.seas.harvard.edu/latex/results/website/images/119b93a445-orig.png"></p> The goal is to infer the LaTeX source that can be compiled to 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 } ``` The paper (http://arxiv.org/pdf/1609.04938v1.pdf) provides more technical details of this model. ## Installation | 3,226 |
openseg-group/OCNet.pytorch | ['scene parsing', 'semantic segmentation'] | ['Interlaced Sparse Self-Attention for Semantic Segmentation', 'OCNet: Object Context Network for Scene Parsing'] | utils/utils.py inplace_abn_03/modules/build.py network/resnet101_baseline.py oc_module/pyramid_oc_block.py utils/criterion.py network/resnet101_asp_oc.py network/resnet101_pyramid_oc.py inplace_abn_03/modules/misc.py utils/parallel.py oc_module/base_oc_block.py utils/files.py train.py inplace_abn/__init__.py utils/resnet_block.py generate_submit.py inplace_abn_03/modules/dense.py dataset/cityscapes.py network/__init__.py inplace_abn_03/modules/__init__.py inplace_abn/bn.py inplace_abn_03/modules/residual.py config/__init__.py inplace_abn_03/modules/functions.py oc_module/asp_oc_block.py utils/operator.py utils/metric.py eval.py inplace_abn/functions.py inplace_abn_03/modules/bn.py network/resnet101_base_oc.py utils/loss.py dataset/__init__.py inplace_abn_03/modules/_ext/__init__.py predict_whole_img predict_sliding predict_whole_img_w_label id2trainId predict_multi_scale get_palette get_confusion_matrix main pad_image predict_whole_img predict_sliding id2trainId predict_multi_scale get_palette main pad_image main adjust_learning_rate lr_poly Parameters str2bool CitySegmentationTrainWpath CitySegmentationTrain CitySegmentationTest get_segmentation_dataset InPlaceABN InPlaceABNSync ABN _act_forward _count_samples _broadcast_shape InPlaceABNSync InPlaceABN _reduce _check _act_backward InPlaceABNSyncWrapper ABN InPlaceABNSync InPlaceABNWrapper InPlaceABN _pair DenseModule _act_forward _count_samples _broadcast_shape InPlaceABNSync _check_contiguous InPlaceABN _reduce _check _act_backward GlobalAvgPool2d IdentityResidualBlock _import_symbols ResNet get_resnet101_asp_oc_dsn ResNet get_resnet101_baseline ResNet get_resnet101_base_oc_dsn ResNet get_resnet101_pyramid_oc_dsn get_segmentation_model ASP_OC_Module _SelfAttentionBlock SelfAttentionBlock2D BaseOC_Module BaseOC_Context_Module PyramidSelfAttentionBlock2D _PyramidSelfAttentionBlock Pyramid_OC_Module CriterionDSN CriterionOhemDSN CriterionCrossEntropy CriterionOhemDSN_single download save_checkpoint mkdir check_sha1 CrossEntropy2d OhemCrossEntropy2d _pickle_method ConfusionMatrix Separable_transpose_convolution Separable_convolution CallbackContext allreduce AllReduce DataParallelModel _criterion_parallel_apply execute_replication_callbacks Reduce patch_replication_callback DataParallelCriterion conv3x3 Bottleneck outS decode_predictions reshape_predict_target inv_preprocess decode_labels _quick_countless down_sample_target_count _zero_corrected_countless down_sample_target pad int zoom print upsample transpose min shape cuda ceil zeros range max pad_image net zoom upsample transpose shape Upsample cuda net zoom upsample transpose shape Upsample cuda net predict_whole_img print predict_sliding copy shape zeros float flush bincount zeros astype range items list copy predict_whole_img set_fill_value diag masked_array DataParallel DataLoader get_segmentation_model save dataset argmax cuda fromarray get_segmentation_dataset list num_classes map load_state_dict restore_from predict_multi_scale putpalette sum range format parse asarray size output_path predict_whole_img_w_label mean eval use_flip flush enumerate load items join print Variable method maximum get_palette split zeros numpy gpu makedirs range Upsample ignore_label id2trainId num_steps power learning_rate lr_poly CriterionOhemDSN_single model DataParallelModel zero_grad fix_lr SGD adjust_learning_rate DataParallelCriterion ohem_single CriterionDSN seed CriterionCrossEntropy str default_timer state_dict num_steps SummaryWriter copy manual_seed float learning_rate criterion backward snapshot_dir CriterionOhemDSN add_scalar ohem train step fn append size enumerate size enumerate elu_forward slope leaky_relu_forward elu_backward slope leaky_relu_backward isinstance elu_cuda _check leaky_relu_cuda elu_inv_cuda leaky_relu_backward_cuda elu_backward_cuda _check leaky_relu_cuda dir _wrap_function getattr append callable ResNet ResNet ResNet ResNet copyfile save makedirs get join isdir print dirname abspath expanduser makedirs sha1 makedirs join isinstance _worker len start is_grad_enabled append range Lock list hasattr __data_parallel_replicate__ modules enumerate len replicate ceil int load new shape zeros numpy array range enumerate load isinstance concatenate new shape numpy append zeros argmax array range enumerate uint8 astype shape zeros numpy range size numpy view unique append ndindex append ndindex numpy _zero_corrected_countless | # OCNet: Object Context Network for Scene Parsing (pytorch) [](https://paperswithcode.com/sota/semantic-segmentation-on-coco-stuff-test?p=object-contextual-representations-for) [](https://paperswithcode.com/sota/semantic-segmentation-on-pascal-context?p=object-contextual-representations-for) [](https://paperswithcode.com/sota/semantic-segmentation-on-ade20k-val?p=object-contextual-representations-for) [](https://paperswithcode.com/sota/semantic-segmentation-on-lip-val?p=object-contextual-representations-for) [](https://paperswithcode.com/sota/semantic-segmentation-on-cityscapes?p=object-contextual-representations-for) <h2> ```diff | 3,227 |
openseg-group/openseg.pytorch | ['scene parsing', 'semantic segmentation'] | ['Interlaced Sparse Self-Attention for Semantic Segmentation', 'OCNet: Object Context Network for Scene Parsing', 'Segmentation Transformer: Object-Contextual Representations for Semantic Segmentation'] | lib/datasets/preprocess/lip/lip.py lib/vis/attention_visualizer.py lib/extensions/inplace_abn/bn.py scripts/cityscapes/segfix_instance.py lib/extensions/parallel/distributed.py lib/models/backbones/resnet/resnest_models.py lib/models/modules/offset_block.py segmentor/tools/evaluator/__init__.py lib/datasets/tools/cv2_aug_transforms.py lib/metrics/cityscapes/setup.py lib/metrics/running_score.py lib/metrics/cityscapes/helpers/csHelpers.py segmentor/trainer.py segmentor/tools/module_runner.py lib/extensions/inplace_abn/functions.py lib/models/modules/isa_block.py lib/models/nets/fcnet.py lib/extensions/syncbn/module.py lib/datasets/tools/transforms.py lib/metrics/cityscapes/helpers/labels.py lib/metrics/ade20k_evaluator.py lib/datasets/loader/default_loader.py lib/datasets/loader/offset_loader.py segmentor/tools/data_helper.py lib/extensions/cc_attention/_ext/__init__.py lib/extensions/cc_attention/build.py lib/datasets/preprocess/cityscapes/instance_edge_generator.py lib/extensions/inplace_abn_1/bn.py lib/extensions/parallel/__init__.py lib/extensions/inplace_abn_1/functions.py lib/datasets/preprocess/face/celebmask_label_generator.py lib/datasets/loader/lip_loader.py lib/datasets/preprocess/cityscapes/cityscapes_generator.py lib/models/modules/spatial_ocr_block.py lib/extensions/pacnet/test_pac.py segmentor/tester.py lib/models/backbones/resnet/resnext_models.py lib/datasets/tools/pil_aug_transforms.py segmentor/tools/optim_scheduler.py lib/datasets/preprocess/cityscapes/cityscapes_instance_generator.py lib/metrics/cityscapes/evaluation/csHelpers.py lib/extensions/dcn/build_modulated.py lib/extensions/dcn/functions/deform_conv.py lib/models/modules/decoder_block.py lib/extensions/syncbn/allreduce.py lib/utils/distributed.py lib/utils/tools/timer.py lib/vis/palette.py lib/models/modules/asp_oc_block.py lib/extensions/dcn/modules/__init__.py lib/utils/helpers/offset_helper.py lib/extensions/cc_attention/__init__.py lib/metrics/cityscapes/helpers/labels_cityPersons.py lib/datasets/preprocess/ade20k/dt_offset_generator.py lib/extensions/dcn/modules/modulated_dcn.py lib/metrics/cityscapes_evaluator.py lib/models/tools/module_helper.py lib/utils/helpers/dc_helper.py lib/metrics/cityscapes/helpers/annotation.py lib/models/backbones/resnet/wide_resnet_models.py lib/loss/loss_helper.py lib/metrics/cocostuff_evaluator.py lib/extensions/syncbn/comm.py lib/models/backbones/resnet/wsl_resnext_models.py lib/models/backbones/resnet/dcn_resnet_models.py main.py lib/vis/tensor_visualizer.py lib/extensions/inplace_abn_1/misc.py lib/models/backbones/resnet/resnet_backbone.py lib/models/nets/ocnet.py lib/extensions/dcn/_ext/deform_conv/__init__.py lib/metrics/running_score_mp.py lib/models/model_manager.py lib/models/nets/ce2pnet.py lib/utils/tools/average_meter.py lib/datasets/preprocess/cityscapes/dt_offset_generator.py lib/vis/seg_visualizer.py lib/datasets/preprocess/ade20k/ade20k_generator.py lib/models/nets/segfix.py lib/models/nets/ideal_ocrnet.py lib/extensions/dcn/__init__.py lib/datasets/loader/ade20k_loader.py lib/extensions/dcn/_ext/modulated_dcn/__init__.py lib/extensions/cc_attention/functions.py lib/datasets/preprocess/pascal_context/pascal_context_generator.py lib/extensions/dcn/functions/modulated_dcn_func.py lib/utils/helpers/json_helper.py lib/extensions/pacnet/pac.py lib/models/modules/edge_block.py lib/extensions/dcn/functions/__init__.py lib/loss/loss_manager.py lib/utils/helpers/image_helper.py lib/datasets/preprocess/cityscapes/edge_generator.py lib/extensions/frn/frn.py lib/extensions/parallel/data_container.py lib/models/backbones/resnet/resnet_models.py lib/models/nets/hrnet.py lib/extensions/dcn/test.py lib/extensions/dcn/build.py lib/metrics/cityscapes/evaluation/instances2dict.py segmentor/tester_offset.py segmentor/tools/evaluator/base.py lib/datasets/tools/collate.py lib/models/backbones/hrnet/hrnet_backbone.py lib/utils/tools/logger.py scripts/cityscapes/segfix.py lib/datasets/preprocess/face/celebmask_color.py lib/datasets/preprocess/pascal_voc/pascal_voc_generator.py lib/models/nets/isanet.py lib/metrics/cityscapes/evaluation/evalPixelLevelSemanticLabeling.py lib/extensions/pacnet/paccrf.py lib/datasets/preprocess/face/celebmask_partition.py lib/datasets/data_loader.py lib/utils/tools/configer.py segmentor/tools/evaluator/tasks.py segmentor/tools/blob_helper.py lib/utils/helpers/file_helper.py lib/models/backbones/hrnet/hrnet_config.py lib/models/backbones/backbone_selector.py lib/extensions/parallel/scatter_gather.py lib/extensions/parallel/data_parallel.py segmentor/tools/cost_helper.py lib/metrics/cityscapes/evaluation/evalInstanceLevelSemanticLabeling.py lib/datasets/preprocess/mapillary/mapillary_generator.py lib/datasets/preprocess/coco_stuff/coco_stuff_generator.py lib/utils/helpers/video_helper.py lib/extensions/switchablenorms/switchable_norm.py lib/utils/helpers/mask_helper.py lib/models/modules/base_oc_block.py lib/metrics/F1_running_score.py lib/datasets/loader/multi_dataset_loader.py lib/extensions/dcn/modules/deform_conv.py lib/datasets/preprocess/cityscapes/instance_dt_offset_generator.py lib/vis/log_visualizer.py segmentor/tools/evaluator/standard.py lib/extensions/dcn/test_modulated.py scripts/cityscapes/segfix_ade20k.py lib/extensions/crf/dense_crf.py lib/extensions/inplace_abn_1/__init__.py lib/metrics/cityscapes/evaluation/instance.py lib/models/nets/ocrnet.py lib/vis/seg_parser.py lib/metrics/pascal_context_evaluator.py lib/extensions/parallel/_functions.py str2bool DataLoader ADE20KLoader DefaultLoader CSDataTestLoader LipLoader MultiDatasetLoader get_multi_randperm MultiDatasetTrainingSampler replace_ext load_mat SWOffsetLoader DTOffsetLoader SWOffsetTestLoader ADE20KGenerator _encode_label process sobel_kernel CityscapesGenerator str2bool CityscapesInstanceGenerator str2bool _encode_label process sobel_kernel label_nedge2void generate_train_val_edge generate_edge calculate_edge label_edge2void _vis_offset safe_savemat process sobel_kernel _encode_label _get_bbox get_cityscapes_colors label_nedge2void label_edge2void _generate_edge generate_edge calculate_edge generate_train_val_edge process COCOProcessor input_args make_folder make_folder make_folder LIPDataValSet LIPParsingEdgeDataSet LIPDataTestSet MapillaryGenerator PContextGenerator PascalVOCGenerator stack collate RandomHue RandomBrightness RandomSaturation RandomRotate RandomHFlip RandomContrast Resize RandomPerm RandomResize RandomCrop _BaseTransform CV2AugCompose Padding RandomHue RandomBrightness RandomGaussBlur RandomSaturation RandomRotate RandomHFlip RandomContrast RandomHSV Resize PILAugCompose RandomResize RandomCrop RandomPerm Padding DeNormalize ToLabel ReLabel ToTensor Compose Normalize PAM_Module CA_Weight CrossAttention CA_Map _check_contiguous CrissCrossAttention _import_symbols dense_crf example_dpooling example_dconv example_mdpooling DeformConvFunction deform_conv_function DeformRoIPoolingFunction ModulatedDeformConvFunction DeformConv ModulatedDeformConv ModulatedDeformRoIPoolingPack ModulatedDeformConvPack DeformRoIPooling _import_symbols _import_symbols FilterResponseNormalization InPlaceABN InPlaceABNSync ABN _act_forward _count_samples _broadcast_shape InPlaceABNSync InPlaceABN _reduce _check _act_backward InPlaceABN InPlaceABNSync ABN _act_forward _count_samples _broadcast_shape InPlaceABNSync InPlaceABN _reduce _check _act_backward SingleGPU GlobalAvgPool2d PacPool2d GaussKernel2dFn PacPool2dFn _PacConvNd PacConv2dFn PacConvTranspose2dFn packernel2d PacConv2d PacConvTranspose2d np_gaussian_2d pacconv_transpose2d _neg_idx pacpool2d nd2col pacconv2d create_YXRGB PacCRFLoose create_position_feats _ceil_pad_factor PacCRF use_only_custom_impl use_only_native_impl repeat_impl_types PacConvTest _allclose _gradcheck DataContainer assert_tensor_type CallbackContext DataParallelModel _criterion_parallel_apply execute_replication_callbacks Reduce patch_replication_callback DataParallelCriterion MMDistributedDataParallel scatter_kwargs scatter scatter Scatter get_input_device synchronize_stream SwitchNorm3d SwitchNorm2d SwitchNorm1d allreduce AllReduce SyncMaster FutureResult SlavePipe batchnormtrain BatchNorm3d _batchnormtrain SharedTensor _SyncBatchNorm _sum_square BatchNorm1d BatchNorm2d sum_square FSOhemCELoss SegFixLoss FSAuxCELoss WeightedFSOhemCELoss FSCELoss FSAuxOhemCELoss LossManager ADE20KEvaluator COCOStuffEvaluator PascalContextEvaluator MultiLabelRunningScore RunningScore SimpleCounterRunningScore RunningScore getCoreImageFileName printError getCsFileInfo getColorEntry getDirectory ensurePath writeDict2JSON colors evaluateMatches readPredInfo CArgs computeAverages prepareJSONDataForResults assignGt2Preds getGtInstances setInstanceLabels filterGtInstances readGTImage getPrediction evaluateImgLists matchGtWithPreds main printResults Instance main instances2dict CsPoly CsObjectType CsBbox CsObject Annotation getCoreImageFileName printError getCsFileInfo getColorEntry getDirectory ensurePath writeDict2JSON colors assureSingleInstanceName ModelManager BackboneSelector HighResolutionNext HRNetBackbone Bottleneck HighResolutionModule HighResolutionNet conv3x3 BasicBlock DCNResNetModels DCNResNet make_res_layer Bottleneck conv3x3 BasicBlock DropBlock2D ResNeStModels Bottleneck SplAtConv2d ResNeSt GlobalAvgPool2d rSoftMax DilatedResnetBackbone NormalResnetBackbone ResNetBackbone ResNet ResNetModels Bottleneck conv3x3 BasicBlock conv1x1 ResNet ResNextModels Bottleneck ResNext conv3x3 BasicBlock WiderResNetA2 GlobalAvgPool2d IdentityResidualBlock _resnext resnext101_32x32d_wsl resnext101_32x16d_wsl resnext101_32x48d_wsl resnext101_32x8d_wsl count_parameters ASP_OC_Module count_parameters BaseOC_Context_Module _SelfAttentionBlock SelfAttentionBlock2D BaseOC_Module CE2P_Decoder_Module Decoder_Module Edge_Module count_parameters SelfAttentionBlock2D ISA_Block ISA_Module OffsetModule OffsetBlock SpatialGather_Module label_to_onehot _ObjectAttentionBlock count_parameters SpatialOCR_Context ObjectAttentionBlock2D PyramidSpatialGather_Module SpatialOCR_ASP_Module SpatialOCR_Module CE2P_IdealOCRNet CE2P_OCRNet CE2P_ASPOCR FcnNet FcnNet_wo_dsn HRNet_W48_ASPOCR HRNet_W48_OCR HRNet_W48_OCR_B HRNet_W48 IdealSpatialOCRNet IdealGatherOCRNet IdealDistributeOCRNet IdealSpatialOCRNetB IdealSpatialOCRNetC ISANet BaseOCNet AspOCNet ASPOCRNet SpatialOCRNet SegFix_HRNet ModuleHelper handle_distributed get_world_size is_distributed _setup_process_group get_rank DCHelper FileHelper ImageHelper JsonHelper MaskHelper DTOffsetHelper Sobel DTOffsetConfig VideoHelper Cache VideoReader AverageMeter _ConditionHelper Configer Logger Timer visualize_map Vis_A2_Atten id2trainId get_palette down_sample_target Vis_FastOC_Atten LogVisualizer get_pascal_context_colors get_cityscapes_colors get_pascal_voc_colors get_lip_colors get_cocostuff_colors get_ade_colors SegParser SegVisualizer TensorVisualizer gen_coord_map shift process LabelTransformer get_offset gen_coord_map shift process LabelTransformer get_offset gen_coord_map shift copy_gt ensure_cityscapes_scripts evaluation process get_offset Tester Tester BlobHelper _get_list_from_env DataHelper ModuleRunner OptimScheduler _BaseEvaluator _parse_output_spec StandardEvaluator _sigmoid MLDirectionTask SegTask DirectionTask MaskTask get_evaluator str2bool DataLoader ADE20KLoader DefaultLoader CSDataTestLoader LipLoader MultiDatasetLoader get_multi_randperm MultiDatasetTrainingSampler replace_ext load_mat SWOffsetLoader DTOffsetLoader SWOffsetTestLoader ADE20KGenerator _encode_label process sobel_kernel CityscapesGenerator str2bool CityscapesInstanceGenerator str2bool _encode_label process sobel_kernel label_nedge2void generate_train_val_edge generate_edge calculate_edge label_edge2void _vis_offset safe_savemat _encode_label _get_bbox get_cityscapes_colors label_nedge2void label_edge2void _generate_edge generate_edge calculate_edge generate_train_val_edge process COCOProcessor input_args make_folder make_folder make_folder LIPDataValSet LIPParsingEdgeDataSet LIPDataTestSet MapillaryGenerator PContextGenerator PascalVOCGenerator stack collate RandomHue RandomBrightness RandomSaturation RandomRotate RandomHFlip RandomContrast Resize RandomPerm RandomResize RandomCrop _BaseTransform CV2AugCompose Padding RandomHue RandomBrightness RandomGaussBlur RandomSaturation RandomRotate RandomHFlip RandomContrast RandomHSV Resize PILAugCompose RandomResize RandomCrop RandomPerm Padding DeNormalize ToLabel ReLabel ToTensor Compose Normalize PAM_Module CA_Weight CrossAttention CA_Map _check_contiguous CrissCrossAttention _import_symbols dense_crf example_dpooling example_dconv example_mdpooling DeformConvFunction deform_conv_function DeformRoIPoolingFunction ModulatedDeformConvFunction DeformConv ModulatedDeformConv ModulatedDeformRoIPoolingPack ModulatedDeformConvPack DeformRoIPooling _import_symbols _import_symbols FilterResponseNormalization InPlaceABN InPlaceABNSync ABN _act_forward _count_samples _broadcast_shape InPlaceABNSync InPlaceABN _reduce _check _act_backward InPlaceABN InPlaceABNSync ABN _act_forward _count_samples _broadcast_shape InPlaceABNSync InPlaceABN _reduce _check _act_backward SingleGPU GlobalAvgPool2d PacPool2d GaussKernel2dFn PacPool2dFn _PacConvNd PacConv2dFn PacConvTranspose2dFn packernel2d PacConv2d PacConvTranspose2d np_gaussian_2d pacconv_transpose2d _neg_idx pacpool2d nd2col pacconv2d create_YXRGB PacCRFLoose create_position_feats _ceil_pad_factor PacCRF use_only_custom_impl use_only_native_impl repeat_impl_types PacConvTest _allclose _gradcheck DataContainer assert_tensor_type CallbackContext DataParallelModel _criterion_parallel_apply execute_replication_callbacks Reduce patch_replication_callback DataParallelCriterion MMDistributedDataParallel scatter_kwargs scatter scatter Scatter get_input_device synchronize_stream SwitchNorm3d SwitchNorm2d SwitchNorm1d allreduce AllReduce SyncMaster FutureResult SlavePipe batchnormtrain BatchNorm3d _batchnormtrain SharedTensor _SyncBatchNorm _sum_square BatchNorm1d BatchNorm2d sum_square FSOhemCELoss SegFixLoss FSAuxCELoss WeightedFSOhemCELoss FSCELoss FSAuxOhemCELoss LossManager ADE20KEvaluator COCOStuffEvaluator PascalContextEvaluator MultiLabelRunningScore RunningScore SimpleCounterRunningScore RunningScore getCoreImageFileName printError getCsFileInfo getColorEntry getDirectory ensurePath writeDict2JSON colors evaluateMatches readPredInfo CArgs computeAverages prepareJSONDataForResults assignGt2Preds getGtInstances setInstanceLabels filterGtInstances readGTImage getPrediction evaluateImgLists matchGtWithPreds main printResults Instance main instances2dict CsPoly CsObjectType CsBbox CsObject Annotation assureSingleInstanceName ModelManager BackboneSelector HighResolutionNext HRNetBackbone Bottleneck HighResolutionModule HighResolutionNet conv3x3 BasicBlock DCNResNetModels DCNResNet make_res_layer Bottleneck conv3x3 BasicBlock DropBlock2D ResNeStModels Bottleneck SplAtConv2d ResNeSt GlobalAvgPool2d rSoftMax DilatedResnetBackbone NormalResnetBackbone ResNetBackbone ResNet ResNetModels conv1x1 ResNet ResNextModels Bottleneck ResNext conv3x3 BasicBlock WiderResNetA2 GlobalAvgPool2d IdentityResidualBlock _resnext resnext101_32x32d_wsl resnext101_32x16d_wsl resnext101_32x48d_wsl resnext101_32x8d_wsl count_parameters ASP_OC_Module count_parameters BaseOC_Context_Module _SelfAttentionBlock SelfAttentionBlock2D BaseOC_Module CE2P_Decoder_Module Decoder_Module Edge_Module count_parameters SelfAttentionBlock2D ISA_Block ISA_Module OffsetModule OffsetBlock SpatialGather_Module label_to_onehot _ObjectAttentionBlock SpatialOCR_Context ObjectAttentionBlock2D PyramidSpatialGather_Module SpatialOCR_ASP_Module SpatialOCR_Module CE2P_IdealOCRNet CE2P_OCRNet CE2P_ASPOCR FcnNet FcnNet_wo_dsn HRNet_W48_ASPOCR HRNet_W48_OCR HRNet_W48_OCR_B HRNet_W48 IdealSpatialOCRNet IdealGatherOCRNet IdealDistributeOCRNet IdealSpatialOCRNetB IdealSpatialOCRNetC ISANet BaseOCNet AspOCNet ASPOCRNet SpatialOCRNet SegFix_HRNet ModuleHelper handle_distributed get_world_size is_distributed _setup_process_group get_rank DCHelper FileHelper ImageHelper JsonHelper MaskHelper DTOffsetHelper Sobel DTOffsetConfig VideoHelper Cache VideoReader AverageMeter _ConditionHelper Configer Logger Timer visualize_map Vis_A2_Atten id2trainId get_palette down_sample_target Vis_FastOC_Atten LogVisualizer get_pascal_context_colors get_cityscapes_colors get_pascal_voc_colors get_lip_colors get_cocostuff_colors get_ade_colors SegParser SegVisualizer TensorVisualizer gen_coord_map shift process LabelTransformer get_offset gen_coord_map shift process LabelTransformer get_offset gen_coord_map shift copy_gt ensure_cityscapes_scripts evaluation process get_offset Tester Tester BlobHelper _get_list_from_env DataHelper ModuleRunner OptimScheduler _BaseEvaluator _parse_output_spec StandardEvaluator _sigmoid MLDirectionTask SegTask DirectionTask MaskTask get_evaluator str2bool DataLoader ADE20KLoader DefaultLoader CSDataTestLoader LipLoader MultiDatasetLoader get_multi_randperm MultiDatasetTrainingSampler replace_ext load_mat SWOffsetLoader DTOffsetLoader SWOffsetTestLoader ADE20KGenerator _encode_label process sobel_kernel CityscapesGenerator str2bool CityscapesInstanceGenerator _encode_label process sobel_kernel label_nedge2void generate_train_val_edge generate_edge calculate_edge label_edge2void _vis_offset safe_savemat _encode_label _get_bbox get_cityscapes_colors label_nedge2void label_edge2void _generate_edge generate_edge calculate_edge generate_train_val_edge process COCOProcessor input_args make_folder make_folder make_folder LIPDataValSet LIPParsingEdgeDataSet LIPDataTestSet MapillaryGenerator PContextGenerator PascalVOCGenerator stack collate RandomHue RandomBrightness RandomSaturation RandomRotate RandomHFlip RandomContrast Resize RandomPerm RandomResize RandomCrop _BaseTransform CV2AugCompose Padding RandomHue RandomBrightness RandomGaussBlur RandomSaturation RandomRotate RandomHFlip RandomContrast RandomHSV Resize PILAugCompose RandomResize RandomCrop RandomPerm Padding DeNormalize ToLabel ReLabel ToTensor Compose Normalize PAM_Module CA_Weight CrossAttention CA_Map _check_contiguous CrissCrossAttention _import_symbols dense_crf example_dpooling example_dconv example_mdpooling DeformConvFunction deform_conv_function DeformRoIPoolingFunction ModulatedDeformConvFunction DeformConv ModulatedDeformConv ModulatedDeformRoIPoolingPack ModulatedDeformConvPack DeformRoIPooling _import_symbols _import_symbols FilterResponseNormalization InPlaceABN InPlaceABNSync ABN _act_forward _count_samples _broadcast_shape InPlaceABNSync InPlaceABN _reduce _check _act_backward InPlaceABN InPlaceABNSync ABN _act_forward _count_samples _broadcast_shape InPlaceABNSync InPlaceABN _reduce _check _act_backward SingleGPU GlobalAvgPool2d PacPool2d GaussKernel2dFn PacPool2dFn _PacConvNd PacConv2dFn PacConvTranspose2dFn packernel2d PacConv2d PacConvTranspose2d np_gaussian_2d pacconv_transpose2d _neg_idx pacpool2d nd2col pacconv2d create_YXRGB PacCRFLoose create_position_feats _ceil_pad_factor PacCRF use_only_custom_impl use_only_native_impl repeat_impl_types PacConvTest _allclose _gradcheck DataContainer assert_tensor_type CallbackContext DataParallelModel _criterion_parallel_apply execute_replication_callbacks Reduce patch_replication_callback DataParallelCriterion MMDistributedDataParallel scatter_kwargs scatter scatter Scatter get_input_device synchronize_stream SwitchNorm3d SwitchNorm2d SwitchNorm1d allreduce AllReduce SyncMaster FutureResult SlavePipe batchnormtrain BatchNorm3d _batchnormtrain SharedTensor _SyncBatchNorm _sum_square BatchNorm1d BatchNorm2d sum_square FSOhemCELoss SegFixLoss FSAuxCELoss WeightedFSOhemCELoss FSCELoss FSAuxOhemCELoss LossManager ADE20KEvaluator COCOStuffEvaluator PascalContextEvaluator MultiLabelRunningScore RunningScore SimpleCounterRunningScore RunningScore getCoreImageFileName printError getCsFileInfo getColorEntry getDirectory ensurePath writeDict2JSON colors evaluateMatches readPredInfo CArgs computeAverages prepareJSONDataForResults assignGt2Preds getGtInstances setInstanceLabels filterGtInstances readGTImage getPrediction evaluateImgLists matchGtWithPreds main printResults Instance main instances2dict CsPoly CsObjectType CsBbox CsObject Annotation assureSingleInstanceName ModelManager BackboneSelector HighResolutionNext HRNetBackbone Bottleneck HighResolutionModule HighResolutionNet conv3x3 BasicBlock DCNResNetModels DCNResNet make_res_layer Bottleneck conv3x3 BasicBlock DropBlock2D ResNeStModels Bottleneck SplAtConv2d ResNeSt GlobalAvgPool2d rSoftMax DilatedResnetBackbone NormalResnetBackbone ResNetBackbone ResNet ResNetModels conv1x1 ResNet ResNextModels Bottleneck ResNext conv3x3 BasicBlock WiderResNetA2 GlobalAvgPool2d IdentityResidualBlock _resnext resnext101_32x32d_wsl resnext101_32x16d_wsl resnext101_32x48d_wsl resnext101_32x8d_wsl count_parameters ASP_OC_Module count_parameters BaseOC_Context_Module _SelfAttentionBlock SelfAttentionBlock2D BaseOC_Module CE2P_Decoder_Module Decoder_Module Edge_Module count_parameters SelfAttentionBlock2D ISA_Block ISA_Module OffsetModule OffsetBlock SpatialGather_Module label_to_onehot _ObjectAttentionBlock SpatialOCR_Context ObjectAttentionBlock2D PyramidSpatialGather_Module SpatialOCR_ASP_Module SpatialOCR_Module CE2P_IdealOCRNet CE2P_OCRNet CE2P_ASPOCR FcnNet FcnNet_wo_dsn HRNet_W48_ASPOCR HRNet_W48_OCR HRNet_W48_OCR_B HRNet_W48 IdealSpatialOCRNet IdealGatherOCRNet IdealDistributeOCRNet IdealSpatialOCRNetB IdealSpatialOCRNetC ISANet BaseOCNet AspOCNet ASPOCRNet SpatialOCRNet SegFix_HRNet ModuleHelper handle_distributed get_world_size is_distributed _setup_process_group get_rank DCHelper FileHelper ImageHelper JsonHelper MaskHelper DTOffsetHelper Sobel DTOffsetConfig VideoHelper Cache VideoReader AverageMeter _ConditionHelper Configer Logger Timer visualize_map Vis_A2_Atten id2trainId get_palette down_sample_target Vis_FastOC_Atten LogVisualizer get_pascal_context_colors get_cityscapes_colors get_pascal_voc_colors get_lip_colors get_cocostuff_colors get_ade_colors SegParser SegVisualizer TensorVisualizer gen_coord_map shift process LabelTransformer get_offset gen_coord_map shift process LabelTransformer get_offset gen_coord_map shift copy_gt ensure_cityscapes_scripts evaluation process get_offset Tester Tester BlobHelper _get_list_from_env DataHelper ModuleRunner OptimScheduler _BaseEvaluator _parse_output_spec StandardEvaluator _sigmoid MLDirectionTask SegTask DirectionTask MaskTask get_evaluator str2bool DataLoader ADE20KLoader DefaultLoader CSDataTestLoader LipLoader MultiDatasetLoader get_multi_randperm MultiDatasetTrainingSampler replace_ext load_mat SWOffsetLoader DTOffsetLoader SWOffsetTestLoader ADE20KGenerator _encode_label process sobel_kernel CityscapesGenerator str2bool CityscapesInstanceGenerator _encode_label process sobel_kernel label_nedge2void generate_train_val_edge generate_edge calculate_edge label_edge2void _vis_offset safe_savemat _encode_label _get_bbox get_cityscapes_colors label_nedge2void label_edge2void _generate_edge generate_edge calculate_edge generate_train_val_edge process COCOProcessor input_args make_folder make_folder make_folder LIPDataValSet LIPParsingEdgeDataSet LIPDataTestSet MapillaryGenerator PContextGenerator PascalVOCGenerator stack collate RandomHue RandomBrightness RandomSaturation RandomRotate RandomHFlip RandomContrast Resize RandomPerm RandomResize RandomCrop _BaseTransform CV2AugCompose Padding RandomHue RandomBrightness RandomGaussBlur RandomSaturation RandomRotate RandomHFlip RandomContrast RandomHSV Resize PILAugCompose RandomResize RandomCrop RandomPerm Padding DeNormalize ToLabel ReLabel ToTensor Compose Normalize PAM_Module CA_Weight CrossAttention CA_Map _check_contiguous CrissCrossAttention _import_symbols dense_crf example_dpooling example_dconv example_mdpooling DeformConvFunction deform_conv_function DeformRoIPoolingFunction ModulatedDeformConvFunction DeformConv ModulatedDeformConv ModulatedDeformRoIPoolingPack ModulatedDeformConvPack DeformRoIPooling _import_symbols _import_symbols FilterResponseNormalization InPlaceABN InPlaceABNSync ABN _act_forward _count_samples _broadcast_shape InPlaceABNSync InPlaceABN _reduce _check _act_backward InPlaceABN InPlaceABNSync ABN _act_forward _count_samples _broadcast_shape InPlaceABNSync InPlaceABN _reduce _check _act_backward SingleGPU GlobalAvgPool2d PacPool2d GaussKernel2dFn PacPool2dFn _PacConvNd PacConv2dFn PacConvTranspose2dFn packernel2d PacConv2d PacConvTranspose2d np_gaussian_2d pacconv_transpose2d _neg_idx pacpool2d nd2col pacconv2d create_YXRGB PacCRFLoose create_position_feats _ceil_pad_factor PacCRF use_only_custom_impl use_only_native_impl repeat_impl_types PacConvTest _allclose _gradcheck DataContainer assert_tensor_type CallbackContext DataParallelModel _criterion_parallel_apply execute_replication_callbacks Reduce patch_replication_callback DataParallelCriterion MMDistributedDataParallel scatter_kwargs scatter scatter Scatter get_input_device synchronize_stream SwitchNorm3d SwitchNorm2d SwitchNorm1d allreduce AllReduce SyncMaster FutureResult SlavePipe batchnormtrain BatchNorm3d _batchnormtrain SharedTensor _SyncBatchNorm _sum_square BatchNorm1d BatchNorm2d sum_square FSOhemCELoss SegFixLoss FSAuxCELoss WeightedFSOhemCELoss FSCELoss FSAuxOhemCELoss LossManager ADE20KEvaluator COCOStuffEvaluator PascalContextEvaluator MultiLabelRunningScore RunningScore SimpleCounterRunningScore RunningScore getCoreImageFileName printError getCsFileInfo getColorEntry getDirectory ensurePath writeDict2JSON colors evaluateMatches readPredInfo CArgs computeAverages prepareJSONDataForResults assignGt2Preds getGtInstances setInstanceLabels filterGtInstances readGTImage getPrediction evaluateImgLists matchGtWithPreds main printResults Instance main instances2dict CsPoly CsObjectType CsBbox CsObject Annotation assureSingleInstanceName ModelManager BackboneSelector HighResolutionNext HRNetBackbone Bottleneck HighResolutionModule HighResolutionNet conv3x3 BasicBlock DCNResNetModels DCNResNet make_res_layer Bottleneck conv3x3 BasicBlock DropBlock2D ResNeStModels Bottleneck SplAtConv2d ResNeSt GlobalAvgPool2d rSoftMax DilatedResnetBackbone NormalResnetBackbone ResNetBackbone ResNet ResNetModels conv1x1 ResNet ResNextModels Bottleneck ResNext conv3x3 BasicBlock WiderResNetA2 GlobalAvgPool2d IdentityResidualBlock _resnext resnext101_32x32d_wsl resnext101_32x16d_wsl resnext101_32x48d_wsl resnext101_32x8d_wsl count_parameters ASP_OC_Module count_parameters BaseOC_Context_Module _SelfAttentionBlock SelfAttentionBlock2D BaseOC_Module CE2P_Decoder_Module Decoder_Module Edge_Module count_parameters SelfAttentionBlock2D ISA_Block ISA_Module OffsetModule OffsetBlock SpatialGather_Module label_to_onehot _ObjectAttentionBlock SpatialOCR_Context ObjectAttentionBlock2D PyramidSpatialGather_Module SpatialOCR_ASP_Module SpatialOCR_Module CE2P_IdealOCRNet CE2P_OCRNet CE2P_ASPOCR FcnNet FcnNet_wo_dsn HRNet_W48_ASPOCR HRNet_W48_OCR HRNet_W48_OCR_B HRNet_W48 IdealSpatialOCRNet IdealGatherOCRNet IdealDistributeOCRNet IdealSpatialOCRNetB IdealSpatialOCRNetC ISANet BaseOCNet AspOCNet ASPOCRNet SpatialOCRNet SegFix_HRNet ModuleHelper handle_distributed get_world_size is_distributed _setup_process_group get_rank DCHelper FileHelper ImageHelper JsonHelper MaskHelper DTOffsetHelper Sobel DTOffsetConfig VideoHelper Cache VideoReader AverageMeter _ConditionHelper Configer Logger Timer visualize_map Vis_A2_Atten id2trainId get_palette down_sample_target Vis_FastOC_Atten LogVisualizer get_pascal_context_colors get_cityscapes_colors get_pascal_voc_colors get_lip_colors get_cocostuff_colors get_ade_colors SegParser SegVisualizer TensorVisualizer gen_coord_map shift process LabelTransformer get_offset gen_coord_map shift process LabelTransformer get_offset gen_coord_map shift copy_gt ensure_cityscapes_scripts evaluation process get_offset Tester Tester BlobHelper _get_list_from_env DataHelper ModuleRunner OptimScheduler _BaseEvaluator _parse_output_spec StandardEvaluator _sigmoid MLDirectionTask SegTask DirectionTask MaskTask get_evaluator zip enumerate zeros float int ones_like enumerate _encode_label int16 uint8 join replace zeros_like arctan2 print distance_transform_edt astype degrees range loadmat shape savemat zeros numpy distance_transform_cdt copy len getStructuringElement MORPH_RECT shape dilate zeros fromarray replace print convert generate_edge save listdir array fromarray replace print convert save listdir array fromarray replace print convert save listdir array format replace print convert listdir array int join format all arrowedLine zeros_like imwrite astype range open ones set unique safe_savemat array loadmat savemat shape zeros any _get_bbox uint8 zeros_like _generate_edge astype unique open get_cityscapes_colors putpalette str format validate_dir size build mkdir save sum ori_root_dir join makedirs isinstance data list format error size min squeeze exit pad DataContainer randint float keys range len dir _wrap_function getattr append callable setUnaryEnergy addPairwiseGaussian reshape addPairwiseBilateral ascontiguousarray append inference expand_dims DenseCRF2D dcn backward print new mean shape uniform_ cuda backward print new mean shape dpooling pooling uniform_ float cuda cat backward print new mean shape dpooling uniform_ float cuda range cat DeformConvFunction _pair fn append size enumerate size enumerate elu_forward slope leaky_relu_forward elu_backward slope leaky_relu_backward reshape float exp arange conv_transpose2d im2col tuple contiguous unfold pad new_ones _pair len minimum sum view relu exp_ tuple contiguous apply shape conv2d new_ones pow startswith mul_ tensor nd2col _pair tuple apply nd2col einsum _pair conv_transpose2d tuple pacconv2d apply pad new_ones permute _pair nd2col apply shape sum _pair view from_numpy meshgrid tensor to array view device tensor create_position_feats cat tuple join isinstance _worker len start is_grad_enabled append range Lock list hasattr __data_parallel_replicate__ modules enumerate len replicate tuple extend Tensor contiguous isinstance len isinstance Tensor range len Tensor isinstance print str exit format basename printError CsFile split len getCsFileInfo dirname makedirs join predictionWalk format printError getCsFileInfo predictionPath realpath filter city sequenceNb dirname abspath append frameNb walk append name format printError gtInstancesFile print instances2dict isfile writeDict2JSON readPredInfo format print assignGt2Preds filterGtInstances readGTImage abspath zip flush len count_nonzero deepcopy int instLabels name reshape convert logical_and id copy shape ignoreInEval append array enumerate open instLabels cumsum max printError ones append minRegionSizes copy unique zip float empty enumerate distanceConfs convolve distanceThs min overlaps argsort dot zeros len instLabels distanceAvailable distanceThs overlaps where nanmean average argmax isclose enumerate format instLabels distanceAvailable print enumerate tolist instLabels evaluateMatches computeAverages prepareJSONDataForResults exportFile getGtInstances JSONOutput setInstanceLabels matchGtWithPreds dirname ensurePath writeDict2JSON printResults format groundTruthSearch printError gtInstancesFile glob print getPrediction evaluateImgLists append format toDict print Instance len unique abspath append array flush open instances2dict block Sequential Conv2d append range expansion ResNet load_state_dict load_state_dict_from_url ResNet load_state_dict load_state_dict_from_url size unsqueeze cuda scatter_ join str argv print wait exit map copy executable index returncode _setup_process_group split gpu Popen len set_device local_rank init_process_group get int format info items list copy shape str reshape axis tight_layout set_trace imshow savefig numpy range axis resize down_sample_target fromarray subplot show str set_title transpose IMREAD_COLOR imshow savefig putpalette imread range format astype tight_layout IMREAD_GRAYSCALE uint8 print reshape id2trainId figure numpy axis resize down_sample_target fromarray subplot show str set_title transpose IMREAD_COLOR imshow savefig putpalette imread range format astype tight_layout IMREAD_GRAYSCALE uint8 print reshape id2trainId figure numpy insert sum tolist sum tolist range range meshgrid gen_coord_map FloatTensor shape stack unsqueeze round numpy decode convert shift encode get_offset list range do_shift clone scale float stack zip join groundTruthSearch glob getPrediction ensure_cityscapes_scripts dataset_dir append args join list items endswith sub dataset_dir get list values Counter set task_mapping enumerate validate_output_spec len get format __name__ info | # openseg.pytorch [](https://paperswithcode.com/sota/semantic-segmentation-on-coco-stuff-test?p=object-contextual-representations-for) [](https://paperswithcode.com/sota/semantic-segmentation-on-pascal-context?p=object-contextual-representations-for) [](https://paperswithcode.com/sota/semantic-segmentation-on-ade20k-val?p=object-contextual-representations-for) [](https://paperswithcode.com/sota/semantic-segmentation-on-lip-val?p=object-contextual-representations-for) [](https://paperswithcode.com/sota/semantic-segmentation-on-cityscapes?p=object-contextual-representations-for) ## News - 2022/08/07 [HDETR](https://github.com/HDETR) is a general and effective scheme to improve DETRs for various fundamental vision tasks. [H-Deformable-DETR](https://github.com/HDETR/H-Deformable-DETR) (**strong results on COCO object detection**) [H-PETR-3D](https://github.com/HDETR/H-PETR-3D) (**strong results on nuScenes**) [H-PETR-Pose](https://github.com/HDETR/H-PETR-Pose) (**strong results on COCO pose estimation**) - 2022/03/09 [RankSeg](https://github.com/openseg-group/RankSeg) is a more effective formulation of general segmentation problem and improves various SOTA segmentation methods across multiple benchmarks. | 3,228 |
oranshayer/BRRF | ['instance segmentation', 'edge detection', 'semantic segmentation'] | ['Enhancing Generic Segmentation with Learned Region Representations'] | BRRF/auxilaryFunc.py BRRF/RemoveSmallSegs.py RepNet/resnet50.py BRRF/SegmentImage.py RepNet/resnet50_input.py BRRF/generateExamples.py BRRF/SegData.py BRRF/main.py RepNet/resnet50_multi_gpu_train.py RepNet/resnet50_eval.py BRRF/trainModel.py BRRF/VectorData.py getFeaturesFromVectors_pair getSegEval myX GetVectorXY_pair getFeaturesFromMyX generateExamples testSingleImage removeSmallSegs SegData segmentImage_pair segmentImage_pair_rerank predict mySil train_clf VectorDataOrig test_inputs distorted_inputs inputs _add_loss_summaries _activation_summary res_block inference conv_relu _variable_with_weight_decay _variable_on_cpu loss eval_once main get_representations evaluate read_data test_inputs inputs _generate_image_and_label_batch distorted_inputs compute_bigger_dim average_gradients save_training_params tower_loss main train list ImageFeatures extend copy sqrt array log enumerate remove start_matlab print testSegRes dict testSegResFb savemat max segBoundSize cdist logical_and EdgeMapList myX append sum segDilated range segVectors size segSizes mean sqrt segClustersL2 enumerate min ratios median len count_nonzero getFeaturesFromVectors_pair neighbors astype logical_and Counter SegData array resize append max range binary_dilation sep open seed str list multiply squeeze append imread fit_transform range dump GetVectorXY_pair label VectorDataOrig listdir enumerate join print reshape removeSmallSegs loadmat len segmentImage_pair_rerank sep open seed str list getSegEval squeeze append imread fit_transform label VectorDataOrig listdir enumerate load join segmentImage_pair print sort reshape dict savemat removeSmallSegs loadmat count_nonzero convolve inf size logical_and copy mean logical_or array maximum_filter unique append label range max heappush binary_dilation getFeaturesFromVectors_pair ratios getFeaturesFromMyX array heappush seed list addSegComb neighbors logical_and tqdm shape SegData heappop addSeg segDilated label range max zeros predict cdist maximum pdist vstack sum segVectors squareform tuple SegData heappop argmax max heappush round seed list addSegComb logical_and shape addSeg append segDilated range predict neighbors copy mySil difference_update label enumerate tqdm dict savgol_filter zeros array len load join time list dump str print fit astype extend seterr listdir array open batch_norm relu atrous_conv2d conv2d _variable_with_weight_decay add relu name zero_fraction sub histogram scalar multiply add_to_collection xavier_initializer _variable_on_cpu l2_loss batch_size data_dir data_dir batch_size data_dir float32 max_pool shape image cast scalar_mul multiply float32 sparse_softmax_cross_entropy_with_logits int64 reduce_mean cast add_to_collection name get_collection apply average ExponentialMovingAverage scalar get_representations evaluate eval_dir Exists DeleteRecursively MakeDirs evaluation uint8 decode_raw reshape transpose shape read_file int32 DATARecord uint8image decode_jpeg image shuffle_batch batch concat crop_to_bounding_box random_brightness set_shape random_uniform resize_images read_data poss_lbls squeeze slice_input_producer shape cast expand_dims rot90 label random_contrast listdir equal cond int not_equal print sort edge float32 convert_image_dtype uint8image array concat set_shape resize_images read_data poss_lbls resize_image_with_crop_or_pad squeeze slice_input_producer cast expand_dims label listdir equal int not_equal sort edge float32 convert_image_dtype uint8image array sort float32 slice_input_producer convert_image_dtype shape read_file expand_dims listdir array decode_jpeg str num_gpus learning_rate batch_size write close lr_decay_epochs wd open epochs train_dir name get_collection sub add_n inference TOWER_NAME loss scalar concat reduce_mean zip append expand_dims save_training_params new_run train train_dir | # Enhancing Generic Segmentation with Learned Region Representations This repository is the implementation of RepNet Learning and Boundaries and Region Representation Fusion, as reported in the paper "Enhancing Generic Segmentatoin with Learned Region Representations". Authors: Or Isaacs*, Oran Shayer*, Michael Lindenbaum (* - equal contribution) ## RepNet The first part of the work is the representation learning algorithm. ### Getting Started Guide to using RepNet: Creating training and eval set: 1. Set a folder for your dataset. Have a folder called 'trainval_images' that holds your trainval images and a folder called 'trainval_GT' that holds a segmentation in the same manner as in BSDS500. For the images you want to have a representation generated for them, create a folder called 'all_images' and put them in it. | 3,229 |
orilinial/GOKU | ['time series'] | ['Generative ODE Modeling with Known Unknowns'] | utils/utils.py di_baseline_double_pendulum.py utils/create_cvs_data.py models/GOKU.py goku_train.py lstm_train.py di_baseline_pendulum.py models/GOKU_double_pendulum.py create_data.py models/__init__.py models/GOKU_pendulum.py models/GOKU_cvs.py utils/ODE_dataset.py models/LSTM.py di_baseline_cvs.py utils/create_pendulum_data.py utils/create_double_pendulum_data.py config.py models/GOKU_pendulum_friction.py models/Latent_ODE.py latent_ode_train.py load_data_config load_latent_ode_train_config load_goku_train_config load_lstm_train_config find_norm_params create_mask make_dataset add_noise fetch_data set_seed train_params ParamsModel create_z0 ODE fetch_data set_seed train_generative train_params ParamsModel ODE GenerativeModel fetch_data set_seed train_generative train_params ParamsModel ODE GenerativeModel train validate_goku train validate_latent_ode train create_goku_pendulum create_goku_double_pendulum create_goku_pendulum_friction create_goku_cvs GOKU Encoder Decoder ODE Encoder Decoder ODE Encoder Decoder ODE Encoder Decoder ODE create_latent_ode_lv create_latent_ode_pendulum_friction DecoderLV EncoderLV create_latent_ode_pendulum create_latent_ode_cvs DecoderPendulum EncoderCVS ODE DecoderCVS EncoderPendulum create_latent_ode_double_pendulum LatentODE LSTM_LV create_lstm_pendulum_friction create_lstm_cvs LSTM_CVS LSTMPendulum create_lstm_pendulum create_lstm_double_pendulum get_random_params states_trajectory_to_sample create_example init_random_state create_cvs_data dx_dt step_env rk4 reset_env get_params create_double_pendulum_data dsdt preproc step_env create_pendulum_data get_theta get_unlearned_params reset_env get_params preproc NormalizeZScore NormalizeToUnitSegment ODEDataSet reverse_sequences_torch create_transforms set_seed StatesToSamples normal_kl annealing_factor_sched max min mean zeros std range normal noise_std int list seq_len choice zeros mask_rate round range load int add_noise create_raw_data find_norm_params shape create_mask output_dir save round seed is_available manual_seed_all manual_seed load all squeeze min transpose data_path array nonzero append max range arange model backward print ParamsModel step zero_grad Adam choice mean parameters num_epochs numpy zeros tensor sum range arange unsqueeze ODE zeros range cat FloatTensor uint8 model FloatTensor backward print zero_grad Adam astype mimsave mean parameters save append step max range GenerativeModel state_dict checkpoints_dir eval train checkpoints_dir arange create_transforms model kl_annealing_epochs zero_grad DataLoader kl_start_af save seed set_seed Adam validate_goku load_state_dict annealing_factor_sched append to sum range state_dict inf mean item num_epochs enumerate backward print parameters ODEDataSet step kl_end_af len eval train validate_latent_ode MSELoss mse_loss rand array exp list subplots plot grid set savefig range arange get_random_params tuple states_trajectory_to_sample init_random_state data_size append zeros range cos pi sin asarray derivs arange len state rk4 uniform uniform seed step_env unwrapped close reset_env seq_len render data_size trange append zeros get_params range delta_t preproc pi arctan2 friction dt pi max_speed sin array clip abs get_theta reset seed step_env unwrapped close reset_env seq_len render get_theta trange data_size get_unlearned_params append zeros get_params range preproc arange size new_zeros index_select range float exp load data_path NormalizeZScore NormalizeToUnitSegment | # GOKU - Deep Generative ODE Modelling with Known Unknowns This repository is an implementation of the GOKU paper: [Generative ODE Modeling with Known Unknowns](https://arxiv.org/abs/2003.10775). ### Data creation To create the datasets used in the paper run: * Friction-less pendulum: `python3 create_data.py --model pendulum` * Friction pendulum: `python3 create_data.py --model pendulum --friction` * Double-pendulum experiment: `python3 create_data.py --model double_pendulum` * Cardiovascular system: `python3 create_data.py --model cvs` The data would be created using default arguments. To view / modify them check the file `config.py`, and `create_data.py`. ### Training | 3,230 |
orionw/RedditHumorDetection | ['humor detection'] | ['Humor Detection: A Transformer Gets the Last Laugh'] | run_classifier.py pytorch_pretrained_bert/optimization_openai.py pytorch_pretrained_bert/optimization.py full_datasets/short_jokes/ShortJokesGatherData.py pytorch_pretrained_bert/tokenization_gpt2.py pytorch_pretrained_bert/convert_transfo_xl_checkpoint_to_pytorch.py pytorch_pretrained_bert/modeling.py pytorch_pretrained_bert/modeling_openai.py pytorch_pretrained_bert/modeling_transfo_xl_utilities.py pytorch_pretrained_bert/__main__.py pytorch_pretrained_bert/convert_gpt2_checkpoint_to_pytorch.py pytorch_pretrained_bert/file_utils.py pytorch_pretrained_bert/tokenization_openai.py pytorch_pretrained_bert/modeling_transfo_xl.py pytorch_pretrained_bert/tokenization_transfo_xl.py full_datasets/reddit_jokes/reddit_cleaning/GetSplitFiles.py pytorch_pretrained_bert/convert_tf_checkpoint_to_pytorch.py full_datasets/reddit_jokes/reddit_cleaning/GetTSVFileForBERT.py pytorch_pretrained_bert/modeling_gpt2.py full_datasets/reddit_jokes/reddit_cleaning/ConvertForCNN.py pytorch_pretrained_bert/convert_openai_checkpoint_to_pytorch.py pytorch_pretrained_bert/tokenization.py pytorch_pretrained_bert/__init__.py get_metrics InputFeatures MrpcProcessor ColaProcessor accuracy MnliProcessor InputExample _truncate_seq_pair convert_examples_to_features main Sst2Processor DataProcessor split_on_score upsample downsample ready_for_bert replace_links remove_numbers replace_contraction cleanText convert_gpt2_checkpoint_to_pytorch convert_openai_checkpoint_to_pytorch convert_tf_checkpoint_to_pytorch convert_transfo_xl_checkpoint_to_pytorch cached_path s3_etag http_get s3_request s3_get read_set_from_file get_from_cache filename_to_url url_to_filename split_s3_path get_file_extension BertPreTrainingHeads BertForQuestionAnswering BertEncoder BertSelfAttention BertForMaskedLM BertOnlyMLMHead BertOnlyNSPHead BertEmbeddings BertOutput BertPredictionHeadTransform BertAttention BertPooler gelu BertPreTrainedModel BertForMultipleChoice BertConfig BertLayer BertForTokenClassification BertModel BertForNextSentencePrediction BertIntermediate BertForSequenceClassification BertForPreTraining swish BertLMPredictionHead load_tf_weights_in_bert BertSelfOutput GPT2LMHeadModel Block GPT2DoubleHeadsModel load_tf_weights_in_gpt2 MLP gelu GPT2PreTrainedModel GPT2Model GPT2LMHead Conv1D GPT2MultipleChoiceHead Attention GPT2Config Attention Block OpenAIGPTPreTrainedModel OpenAIGPTLMHeadModel OpenAIGPTMultipleChoiceHead OpenAIGPTConfig MLP gelu swish OpenAIGPTLMHead OpenAIGPTDoubleHeadsModel Conv1D load_tf_weights_in_openai_gpt OpenAIGPTModel DecoderLayer TransfoXLModel PositionalEmbedding load_tf_weights_in_transfo_xl RelLearnableDecoderLayer AdaptiveEmbedding RelLearnableMultiHeadAttn TransfoXLPreTrainedModel MultiHeadAttn RelPartialLearnableDecoderLayer TransfoXLLMHeadModel PositionwiseFF TransfoXLConfig RelMultiHeadAttn build_tf_to_pytorch_map RelPartialLearnableMultiHeadAttn ProjectedAdaptiveLogSoftmax LogUniformSampler sample_logits warmup_cosine warmup_constant warmup_linear BertAdam warmup_cosine warmup_constant warmup_linear OpenAIAdam BasicTokenizer WordpieceTokenizer load_vocab whitespace_tokenize _is_whitespace _is_control BertTokenizer _is_punctuation bytes_to_unicode get_pairs GPT2Tokenizer get_pairs text_standardize OpenAIGPTTokenizer LMOrderedIterator TransfoXLCorpus TransfoXLTokenizer LMMultiFileIterator get_lm_corpus _is_whitespace _is_control _is_punctuation LMShuffledIterator main join text_b InputFeatures convert_tokens_to_ids _truncate_seq_pair tokenize guid info append text_a enumerate len pop len argmax f1_score recall_score argmax precision_score BertAdam ArgumentParser save seed device_count convert_examples_to_features load_state_dict parse_args manual_seed_all param_groups get_world_size mean BertConfig info manual_seed enumerate join learning_rate BertForSequenceClassification makedirs step enable_attach get_metrics zero_grad DataParallel DataLoader output_dir do_train eval_batch_size list DDP max_seq_length DistributedSampler get_labels FusedAdam to init_process_group lower eval trange add_argument accuracy tqdm get_dev_examples train bool gradient_accumulation_steps from_pretrained get_train_examples model tuple FP16_Optimizer data_dir set_device half warmup_linear SequentialSampler state_dict fp16 wait_for_attach load named_parameters numpy local_rank train_batch_size device tensor TensorDataset format concatenate num_train_epochs int warmup_proportion bert_model backward RandomSampler len drop resample concat resample concat copy apply subn strip join replace_contraction replace lower replace_links sub remove_numbers format load_tf_weights_in_gpt2 print GPT2Model save GPT2Config state_dict format OpenAIGPTConfig print save load_tf_weights_in_openai_gpt OpenAIGPTModel state_dict str format print BertForPreTraining save load_tf_weights_in_bert from_json_file state_dict pop str join format __dict__ load_tf_weights_in_transfo_xl print TransfoXLLMHeadModel save abspath TransfoXLConfig state_dict encode hexdigest sha256 str join str urlparse exists path netloc urlparse startswith resource split_s3_path Object resource split_s3_path download_fileobj get update write close tqdm iter_content len get str s3_etag join url_to_filename startswith head makedirs set load_variable join int format zip print transpose fullmatch from_numpy any getattr list_variables abspath append split load_variable int format zip print squeeze fullmatch from_numpy getattr list_variables abspath append split load pop int format zip print cumsum fullmatch from_numpy getattr split open update r_r_bias hasattr tie_weight layers out_layers tie_projs emb_layers r_w_bias transformer emb_projs untie_r zip append out_projs enumerate load_variable pop list format items join print transpose from_numpy list_variables keys build_tf_to_pytorch_map enumerate embedding view size einsum masked_fill_ sample cat detach OrderedDict strip split category category startswith startswith category ord append list range ord add set sub replace load join format TransfoXLCorpus print save exists pop print convert_openai_checkpoint_to_pytorch convert_transfo_xl_checkpoint_to_pytorch convert_tf_checkpoint_to_pytorch convert_gpt2_checkpoint_to_pytorch | # Humor Detection ## Code and Datasets for the Paper ["Humor Detection: A Transformer Gets the Last Laugh"](https://arxiv.org/abs/1909.00252) by Orion Weller and Kevin Seppi The repository contains the following: - A way to regenerate the results found in the paper, by running `bash run_bert.sh`. - The full datasets referenced in the paper (short jokes, puns, and the reddit dataset) are located in `full_datasets` whereas the `data` folder contains the split files used for training and testing. The file `create_data.sh` will create the splits (slightly different from the ones used in the paper - see `create_data.sh`). - pytorch_pretrained_bert contains files used by the model - these files are from the [huggingface repo](https://github.com/huggingface/pytorch-transformers#Training-large-models-introduction,-tools-and-examples) and are NOT up to date with the current `pytorch-transformers` repo. **This repository is not maintained and will not be updated.** ## Reference: If you found this repository helpful, please consider citing the following: ``` | 3,231 |
oshapio/Efficient-Cross-Validation-of-Echo-State-Networks | ['time series', 'one shot learning'] | ['Efficient implementations of echo state network cross-validation', 'Efficient Cross-Validation of Echo State Networks'] | utils/error_utils.py precision_experiments/time_series_classification/show_results.py utils/validation_utils.py precision_experiments/time_series_classification/classification_exp.py precision_experiments/time_series_output/output_exp.py precision_experiments/time_series_output/show_results.py precision_experiments/generative_mode/show_results.py constants.py precision_experiments/generative_mode/generative_exp.py utils/data_reader.py precision_experiments/time_series_output/show_data.py read_folder evaluate_split test_model unison_shuffled_copies read_folder read_folder get_japanese_wovels get_mitdb get_rmse get_nrmse get_n_widening_fold_splits get_n_fold_splits get_n_walk_step_walking_splits get_out_of_sample_fold_split load path scandir open shuffle dot T inv get_nrmse count_nonzero deepcopy format print inv get_nrmse dot append argmax int GLOBAL_PATH format dump print astype range isfile append float abs read_csv open GLOBAL_PATH format read_chunks dump get_minmax isfile open range len mean expand_dims square norm append range append range append range | # Efficient Implementations of Echo State Network Cross-Validation Echo State Networks (ESNs) as a prime example of Reservoir Computing (RC) models are known for their fast and precise one-shot learning of time series. But they often need good hyper-parameter tuning for the best performance. For this good validation is key, but usually a single validation split is used. This repository contains the code used for the experiments in [1]. ## 1. Summary of best complexities of the different CV methods <p align="center"><img align="center" src="https://i.imgur.com/M0ZfzBH.png"></p> ## 2. Precision Experiments Some details of implementation and computational savings depend on what type of task we are learning. Let us distinguish three types of temporal machine learning tasks: 1. <b>Generative</b> tasks, where the computed output <i><b>y</b>(n)</i> comes back as (part of) the input <i><b>u</b>(n + k)</i>. This is often pattern generation or multi-step timeseries prediction in a generative mode. 2. <b>Output</b> tasks, where the computed output time series <i><b>y</b>(n)</i> does not comeback as part of input. This is often detection or recognition in time series, or deducing a signal from other contemporary signals. 3. <b>Classification</b> tasks, of separate (pre-cut) finite sequences, where a class <i><b>y</b></i> is assigned to each sequence <i><b>u</b>(n)</i>. | 3,232 |
oulutan/ACAM_Demo | ['action detection'] | ['Actor Conditioned Attention Maps for Video Action Detection'] | action_detection/i3d.py multiprocess_detect_actions.py detect_actions.py tests/test_obj_detection.py action_detection/action_detector.py object_detection/object_detector.py tests/test_act_detector.py simple_detect_actions_on_tube.py visualize_cams main visualize_detection_results visualize_cams visualize_detection_results run_act_detector run_obj_det_and_track_in_batches read_frames main run_visualization main set_up_detector detect_on_tube memory_placeholder temporal_roi_cropping Action_Detector InceptionI3d I3D_model i3d_tail Unit_custom_3D Unit3D generate_edge_and_normalized_roi Object_Detector IoU_box Tracker bbox_interpolate test_on_local_segment test_local_image test_tracking_local_video test_local_video visualize_results_from_tracking test_croping_tubes_local_video visualize_results define_inference_with_placeholders_noinput Action_Detector active_actors detect_objects_in_np ArgumentParser crop_tubes_in_tf_with_memory run waitKey Object_Detector imshow append parse_args expand_dims append_data range video_path get_writer close timesteps restore_model stack Tracker generate_all_rois get_reader visualize_cams join time visualize_detection_results print add_argument update_tracker len int putText copy shape rectangle float max range enumerate len int uint8 addWeighted concatenate applyColorMap putText min astype len matmul copy resize zeros float max range COLORMAP_JET read print get_next_data put sleep range get_length get time print active_actors Object_Detector put detect_objects_in_np stack Tracker update_tracker append float generate_all_rois range define_inference_with_placeholders_noinput join get Action_Detector print timesteps restore_model put stack run append expand_dims range crop_tubes_in_tf_with_memory len get int time visualize_detection_results print putText waitKey mean imshow append append_data float array VideoCapture read Process obj_gpu act_gpu shape start obj_batch_size Queue sleep join restore_model Action_Detector define_inference_with_placeholders array arange run set_up_detector detect_on_tube Variable concat assign placeholder as_list reshape tile crop_and_resize expand_dims range max_pool3d tolist append float array range max float min max join list Action_Detector session print restore_model get_reader define_inference_with_placeholders run zeros array range enumerate len join imwrite print Object_Detector expand_dims detect_objects_in_np dirname abspath imread visualize_results join print get_writer close Object_Detector detect_objects_in_np dirname abspath append_data expand_dims get_reader visualize_results join inactive_actors print get_writer active_actors close Object_Detector detect_objects_in_np dirname abspath Tracker update_tracker append_data expand_dims visualize_results_from_tracking get_reader join uint8 append_data zip print get_writer close Object_Detector crop_person_tube detect_objects_in_np dirname abspath Tracker append update_tracker expand_dims range get_reader int putText waitKey copy shape rectangle imshow float max range len int putText waitKey copy shape rectangle imshow float max range len | # Actor Conditioned Attention Maps - Demo Repository This repo contains the demo code for our action recognition model explained in https://arxiv.org/abs/1812.11631 **TRAINING CODE AVAILABLE AT**: https://github.com/oulutan/ActorConditionedAttentionMaps If you use this work, please cite our paper: ``` @inproceedings{ulutan2020actor, title={Actor conditioned attention maps for video action detection}, author={Ulutan, Oytun and Rallapalli, Swati and Srivatsa, Mudhakar and Torres, Carlos and Manjunath, BS}, booktitle={The IEEE Winter Conference on Applications of Computer Vision}, pages={527--536}, | 3,233 |
oulutan/ActorConditionedAttentionMaps | ['action detection'] | ['Actor Conditioned Attention Maps for Video Action Detection'] | obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/data/__init__.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/roi_heads/keypoint_head/keypoint_head.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/box_coder.py obj_detection/maskrcnn-benchmark/tools/train_net.py scripts/tfrecord_video_test/decode_record_to_vid.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/data/build.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/utils/model_serialization.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/roi_heads/mask_head/loss.py obj_detection/maskrcnn-benchmark/tests/test_rpn_heads.py scripts/tfrecord_video_test/convert_jhmdb_vids.py scripts/02b_get_segment_annotations.py obj_detection/maskrcnn-benchmark/tests/test_detectors.py scripts/tfrecord_video_test/convert_ava_vids_with_labels.py scripts/visualize_annotation_object_detection.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/structures/segmentation_mask.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/detector/__init__.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/utils/collect_env.py obj_detection/maskrcnn-benchmark/tests/test_metric_logger.py scripts/link_boxes_overtime.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/roi_heads/keypoint_head/inference.py data/GESTURES/data/visualize.py model_training/i3d.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/rpn/loss.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/utils/env.py scripts/01_download_videos.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/data/transforms/transforms.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/structures/boxlist_ops.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/rpn/retinanet/retinanet.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/data/datasets/voc.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/data/samplers/grouped_batch_sampler.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/data/datasets/concat_dataset.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/rpn/rpn.py scripts/tfrecord_video_test/convert_vid_to_record.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/data/datasets/__init__.py obj_detection/maskrcnn-benchmark/datasets/ava/cp_and_rename_midframes.py scripts/analyze_annotations.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/layers/batch_norm.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/roi_heads/box_head/roi_box_predictors.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/utils.py obj_detection/maskrcnn-benchmark/demo/webcam.py obj_detection/maskrcnn-benchmark/AVA_scripts/run_on_single_image.py obj_detection/maskrcnn-benchmark/datasets/ava/generate_coco_style_anns.py obj_detection/maskrcnn-benchmark/tools/cityscapes/instances2dict_with_polygons.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/make_layers.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/backbone/backbone.py model_training/Datasets_AVA.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/data/transforms/__init__.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/utils/timer.py obj_detection/maskrcnn-benchmark/tests/checkpoint.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/layers/_utils.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/__init__.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/engine/inference.py obj_detection/maskrcnn-benchmark/tests/test_nms.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/data/datasets/coco.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/poolers.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/roi_heads/mask_head/roi_mask_predictors.py model_training/old/dataset_jhmdb.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/roi_heads/box_head/inference.py obj_detection/maskrcnn-benchmark/AVA_scripts/03_keyframe_detect_objects.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/data/datasets/list_dataset.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/data/collate_batch.py model_training/train_multi_gpu.py data/GESTURES/data/get_all_samples.py model_training/old/dataset_ava.py scripts/tfrecord_video_test/convert_ava_vids_keep_ratio.py obj_detection/maskrcnn-benchmark/demo/test.py evaluation/get_ava_performance_custom.py scripts/generate_per_class_ap.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/backbone/resnet.py obj_detection/maskrcnn-benchmark/tests/utils.py obj_detection/maskrcnn-benchmark/AVA_scripts/run_on_folder.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/data/samplers/__init__.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/rpn/__init__.py model_training/old/combine_results.py obj_detection/maskrcnn-benchmark/demo/predictor.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/engine/__init__.py model_training/old/process_results.py obj_detection/maskrcnn-benchmark/tests/test_predictors.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/config/paths_catalog.py obj_detection/maskrcnn-benchmark/tests/test_configs.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/solver/lr_scheduler.py obj_detection/maskrcnn-benchmark/tests/env_tests/env.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/roi_heads/mask_head/roi_mask_feature_extractors.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/layers/roi_align.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/utils/checkpoint.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/backbone/__init__.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/utils/logger.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/data/transforms/build.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/utils/model_zoo.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/utils/registry.py obj_detection/maskrcnn-benchmark/tools/test_net.py model_training/jhmdb_box_export.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/roi_heads/box_head/loss.py obj_detection/maskrcnn-benchmark/tests/test_fbnet.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/structures/bounding_box.py obj_detection/maskrcnn-benchmark/tools/cityscapes/convert_cityscapes_to_coco.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/solver/__init__.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/data/datasets/evaluation/coco/__init__.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/utils/metric_logger.py model_training/ava_result_validation_v2.py model_training/Datasets_JHMDB.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/data/datasets/evaluation/__init__.py model_training/model_layers.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/balanced_positive_negative_sampler.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/rpn/retinanet/loss.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/utils/imports.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/roi_heads/roi_heads.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/utils/c2_model_loading.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/matcher.py scripts/02_crop_video_segments.py scripts/jhmdb_detect_objects.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/roi_heads/keypoint_head/roi_keypoint_feature_extractors.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/data/samplers/iteration_based_batch_sampler.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/roi_heads/mask_head/mask_head.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/config/__init__.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/roi_heads/box_head/roi_box_feature_extractors.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/roi_heads/keypoint_head/roi_keypoint_predictors.py obj_detection/maskrcnn-benchmark/demo/run_obj_detector_on_coco.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/backbone/fpn.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/data/datasets/evaluation/voc/__init__.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/roi_heads/box_head/box_head.py obj_detection/maskrcnn-benchmark/tests/test_segmentation_mask.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/layers/nms.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/roi_heads/mask_head/inference.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/rpn/utils.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/backbone/fbnet_builder.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/registry.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/rpn/anchor_generator.py obj_detection/maskrcnn-benchmark/AVA_scripts/predictor.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/data/datasets/evaluation/voc/voc_eval.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/engine/trainer.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/layers/sigmoid_focal_loss.py obj_detection/maskrcnn-benchmark/tests/test_backbones.py obj_detection/maskrcnn-benchmark/tests/test_feature_extractors.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/detector/detectors.py obj_detection/maskrcnn-benchmark/setup.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/backbone/fbnet.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/detector/generalized_rcnn.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/structures/keypoint.py scripts/tfrecord_video_test/convert_ava_vids.py obj_detection/maskrcnn-benchmark/tests/test_data_samplers.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/config/defaults.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/layers/misc.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/layers/__init__.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/backbone/fbnet_modeldef.py scripts/tfrecord_video_test/convert_ava_vids_with_labels_COMBINED_RECORDS.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/utils/miscellaneous.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/utils/cv2_util.py scripts/jhmdb_visualize_objects.py obj_detection/maskrcnn-benchmark/demo/run_obj_detector_on_hico.py model_training/old/result_validation.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/rpn/retinanet/inference.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/rpn/inference.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/layers/roi_pool.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/utils/comm.py model_training/input_augmentation.py scripts/jhmdb_generate_data.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/data/datasets/evaluation/coco/coco_eval.py obj_detection/maskrcnn-benchmark/tests/test_box_coder.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/layers/smooth_l1_loss.py scripts/old_tf_03_keyframe_detect_objects.py model_training/perf_benchmark.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/structures/image_list.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/modeling/roi_heads/keypoint_head/loss.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/data/samplers/distributed.py data/GESTURES/data/run_obj_detector.py obj_detection/maskrcnn-benchmark/maskrcnn_benchmark/solver/build.py get_object_name main visualize_results print_time read_exclusions run_evaluation parse_arguments make_image_key combine_res_with_size read_labelmap main read_csv filter_results_nms_dictionary read_and_convert_results main read_serialized_results convert_results non_max_suppression Data_AVA IoU_box Data_JHMDB IoU_box initialize_weights InceptionI3d i3d_tail Unit_custom_3D initialize_all_i3d_from_ckpt LateralInceptionI3d preprocess initialize_tail inference Unit3D lateralconnection augment_box_coords augment_input_sequences generate_temporal_rois apply_model_inference temp_dilated_i3d_tail_inference multiscale_basic_model i3d_tail_model basic_model i3d_tail_inference non_local_ROI_model basic_model_pooled_inference soft_roi_attention_model basic_model_inference slowfast_i3d_tail_inference non_local_block roi_object_relation_model temporal_roi_cropping single_soft_roi_attention_model basic_pooled_lateral_inference soft_lateral_inference acrn_roi_model soft_attn_inference acrn_inference non_local_inference multi_non_local_block_roi combine_batch_rois only_i3d_tail_model double_tail_soft_attention_model basic_model_pooled main draw_objects Model_Trainer generate_attention_visualization set_logger get_3_decimal_float custom_loader generate_topk_variance_attention_maps no_of_params save_serialized_list main read_serialized_results read_serialized_results save_serialized_list generate_tfrecord_list get_data get_val_list filter_no_detections get_test_list _visualize get_labels filter_list_for_actions update_rois_with_crop _test_dataset_cropping _find_error process_evaluation_results get_video_frames get_obj_detection_results IoU_box update_rois get_tfrecord_np check_split match_annos_with_detections _exception_wrapper get_labels_wrapper process_evaluation_results_old get_tfrecord get_train_list process_evaluation_results match_annos_with_detections get_video_frames get_labels get_class_AP_str IoU_box get_data get_val_list filter_no_detections get_AP_str get_train_list get_per_class_AP get_AP_str get_class_AP_str get_per_class_AP filter_results_nms convert_results_per_box_nms read_and_convert_results read_and_convert_per_roi_nms main read_serialized_results convert_results non_max_suppression get_extensions save_results_json main get_3_decimal_float read_keyframe vis_keypoints COCODemo save_results_json main get_3_decimal_float vis_keypoints COCODemo get_3_decimal_float get_3_decimal_float main DatasetCatalog ModelCatalog make_data_sampler _quantize make_data_loader make_batch_data_sampler build_dataset _compute_aspect_ratios BatchCollator COCODataset _has_only_empty_bbox has_valid_annotation _count_visible_keypoints ConcatDataset ListDataset PascalVOCDataset evaluate COCOResults check_expected_results prepare_for_coco_segmentation evaluate_predictions_on_coco evaluate_box_proposals do_coco_evaluation prepare_for_coco_keypoint prepare_for_coco_detection coco_evaluation calc_detection_voc_ap do_voc_evaluation calc_detection_voc_prec_rec eval_detection_voc voc_evaluation DistributedSampler GroupedBatchSampler IterationBasedBatchSampler build_transforms Compose ToTensor Resize Normalize RandomHorizontalFlip compute_on_dataset inference _accumulate_predictions_from_multiple_gpus do_train reduce_loss_dict FrozenBatchNorm2d _NewEmptyTensorOp Conv2d interpolate BatchNorm2d ConvTranspose2d ROIAlign _ROIAlign _ROIPool ROIPool SigmoidFocalLoss _SigmoidFocalLoss sigmoid_focal_loss_cpu smooth_l1_loss _load_C_extensions BalancedPositiveNegativeSampler BoxCoder conv_with_kaiming_uniform make_conv3x3 get_group_gn make_fc group_norm Matcher make_pooler LevelMapper Pooler cat build_resnet_fpn_p3p7_backbone build_backbone build_resnet_fpn_backbone build_resnet_backbone add_rpn_head add_roi_head_mask FBNetROIHead _get_rpn_stage FBNetRPNHead FBNetTrunk add_roi_head _get_head_stage _get_trunk_cfg create_builder add_conv_body add_roi_head_keypoints _get_divisible_by ConvBNRelu _expand_block_cfg FBNetBuilder CascadeConv3x3 get_blocks SEModule _add_to_arch IRFBlock Shift expand_stages_cfg expand_stage_cfg ShiftBlock5x5 _py2_round get_num_stages unify_arch_def _get_upsample_op Upsample Identity _block_cfgs_to_list ChannelShuffle add_archs LastLevelMaxPool FPN LastLevelP6P7 StemWithGN ResNetHead _make_stage ResNet BottleneckWithGN Bottleneck StemWithFixedBatchNorm BottleneckWithFixedBatchNorm BaseStem build_detection_model GeneralizedRCNN CombinedROIHeads build_roi_heads build_roi_box_head ROIBoxHead PostProcessor make_roi_box_post_processor make_roi_box_loss_evaluator FastRCNNLossComputation make_roi_box_feature_extractor FPNXconv1fcFeatureExtractor FPN2MLPFeatureExtractor ResNet50Conv5ROIFeatureExtractor FPNPredictor make_roi_box_predictor FastRCNNPredictor heatmaps_to_keypoints Keypointer make_roi_keypoint_post_processor KeypointPostProcessor ROIKeypointHead build_roi_keypoint_head make_roi_keypoint_loss_evaluator project_keypoints_to_heatmap KeypointRCNNLossComputation _within_box cat_boxlist_with_keypoints KeypointRCNNFeatureExtractor make_roi_keypoint_feature_extractor KeypointRCNNPredictor make_roi_keypoint_predictor paste_mask_in_image expand_boxes Masker make_roi_mask_post_processor MaskPostProcessorCOCOFormat expand_masks MaskPostProcessor make_roi_mask_loss_evaluator MaskRCNNLossComputation project_masks_on_boxes keep_only_positive_boxes ROIMaskHead build_roi_mask_head MaskRCNNFPNFeatureExtractor make_roi_mask_feature_extractor MaskRCNNC4Predictor MaskRCNNConv1x1Predictor make_roi_mask_predictor AnchorGenerator generate_anchors _scale_enum _whctrs make_anchor_generator _ratio_enum make_anchor_generator_retinanet _generate_anchors BufferList _mkanchors make_rpn_postprocessor RPNPostProcessor RPNLossComputation generate_rpn_labels make_rpn_loss_evaluator build_rpn RPNHeadFeatureSingleConv RPNModule RPNHead RPNHeadConvRegressor concat_box_prediction_layers permute_and_flatten make_retinanet_postprocessor RetinaNetPostProcessor make_retinanet_loss_evaluator generate_retinanet_labels RetinaNetLossComputation build_retinanet RetinaNetHead RetinaNetModule make_optimizer make_lr_scheduler WarmupMultiStepLR BoxList cat_boxlist boxlist_iou boxlist_nms remove_small_boxes _cat ImageList to_image_list PersonKeypoints kp_connections _create_flip_indices Keypoints keypoints_to_heat_map SegmentationMask PolygonList PolygonInstance BinaryMaskList _rename_basic_resnet_weights load_resnet_c2_format load_c2_format _rename_weights_for_resnet _load_c2_pickled_weights _rename_fpn_weights DetectronCheckpointer Checkpointer collect_env_info get_pil_version synchronize get_world_size reduce_dict all_gather get_rank is_main_process findContours setup_environment setup_custom_environment import_file setup_logger SmoothedValue MetricLogger mkdir strip_prefix_if_present load_state_dict align_and_update_state_dicts cache_url _register_generic Registry get_time_str Timer TestCheckpointer TestBackbones TestBoxCoder TestConfigs SubsetSampler TestGroupedBatchSampler TestIterationBasedBatchSampler create_random_input create_model get_config_files _test_build_detectors _test_run_selected_detectors TestDetectors _test_primitive TestFBNetBuilder TestFeatureExtractors _test_feature_extractors TestMetricLogger TestNMS TestPredictors _test_predictors TestRPNHeads TestSegmentationMask load_config_from_file load_config get_config_root_path get_config_root_path main main train run_test convert_coco_stuff_mat xyxy_to_xywh convert_cityscapes_instance_only poly_to_box parse_args getLabelID instances2dict_with_polygons main hou_min_sec main main_test crop_video_segment_test hou_min_sec main_test main crop_video_segment combine_info_with_detections save_results_json get_3_decimal_float read_keyframe get_frame_generator _test_fps_of_segments filter_detection_results main get_frame_generator draw_objects visualize_annotations generate_annotation_file get_frame_generator draw_objects link_boxes IoU_box combine_info_with_detections save_results_json get_3_decimal_float read_keyframe _test_fps_of_segments filter_detection_results main main draw_objects draw_anno generate_tfrecord _int64_feature _bytes_list_feature _bytes_feature generate_tfrecord _int64_feature _bytes_list_feature _bytes_feature _int64_feature _bytes_list_feature match_annos_with_detections get_obj_detection_results get_labels IoU_box get_labels_wrapper _bytes_feature _float_feature generate_tfrecord _int64_feature _bytes_list_feature match_annos_with_detections create_tf_example get_obj_detection_results get_labels open_sharded_output_tfrecords IoU_box get_labels_wrapper _bytes_feature _float_feature generate_tfrecord _int64_feature _bytes_list_feature _bytes_feature generate_tfrecord exception_wrapper _int64_feature _bytes_list_feature _bytes_feature decode get_labels sort imread listdir visualize_results int get_object_name putText waitKey copy shape rectangle imshow float max len time info int time defaultdict reader print_time name make_image_key append float add make_image_key reader set int add set startswith append time print_time PascalDetectionEvaluator read_labelmap read_exclusions evaluate add_single_ground_truth_image_info add_single_detected_image_info pformat info read_csv len list format print sort mean append keys add_argument ArgumentParser items list basicConfig basename name print run_evaluation parse_arguments combine_res_with_size get_obj_detection_results NUM_CLASSES tqdm append range split list print sort non_max_suppression len tqdm append keys split IoU_box append array range len filter_results_nms_dictionary print read_serialized_results convert_results len read_and_convert_results add_argument ArgumentParser parse_args result_name float min max preprocess cond restore replace print get_collection GLOBAL_VARIABLES Saver list restore replace print get_collection GLOBAL_VARIABLES Saver keys restore print get_collection GLOBAL_VARIABLES Saver max_pool3d shape max_pool3d as_list temporal_roi_cropping stack random_uniform tile expand_dims range cond float32 sqrt stack cast random_uniform inference_fcn dense temporal_roi_cropping dropout flatten shape avg_pool3d info inference dense temporal_roi_cropping dropout flatten shape avg_pool3d max_pool3d info inference dense temporal_roi_cropping dropout flatten shape avg_pool3d max_pool3d info inference dense temporal_roi_cropping dropout flatten shape avg_pool3d info inference dense temporal_roi_cropping dropout set_trace flatten shape avg_pool3d info inference dense temporal_roi_cropping dropout flatten shape avg_pool3d info inference dense temporal_roi_cropping dropout flatten shape avg_pool3d info inference dense temporal_roi_cropping dropout flatten shape avg_pool3d info inference dense temporal_roi_cropping dropout flatten shape avg_pool3d info inference dense temporal_roi_cropping dropout flatten shape avg_pool3d info inference flatten shape avg_pool3d flatten shape avg_pool3d add_to_collection i3d_tail basic_model i3d_tail_model as_list dense temporal_roi_cropping dropout basic_model_pooled i3d_tail_model flatten avg_pool3d add_to_collection i3d_tail_model add_n range temporal_roi_cropping concat i3d_tail_model reshape logical_and boolean_mask logical_not tile expand_dims range equal as_list reshape tile crop_and_resize expand_dims range zeros arange range TFRecordDataset initializer prefetch_to_device generate_tfrecord_list get_val_list get_next string set_shape GPUOptions Session run make_initializable_iterator map placeholder apply inference range ConfigProto batch constant make_one_shot_iterator tqdm repeat get_tfrecord global_variables_initializer setFormatter basicConfig WARNING debug addHandler StreamHandler upper Formatter info setLevel INFO g info batch_size dataset set_logger i warning architecture bool seed_npy l ckpt_file get_shape restore replace print get_collection GLOBAL_VARIABLES Saver int putText shape rectangle float max enumerate len int uint8 addWeighted concatenate applyColorMap min float32 copy shape rectangle resize COLORMAP_JET max range int uint8 addWeighted concatenate applyColorMap min float32 copy shape rectangle resize COLORMAP_JET sum max join list print extend set sample append keys sort list keys sort list keys sort list keys get_video_frames get_labels bool cast resize_images map_fn dict int64 string VarLenFeature parse_single_example FixedLenFeature range py_func minimum resize_images reshape float32 map_fn dict int64 string VarLenFeature parse_single_example FixedLenFeature range check_split get_labels append check_split join split join uint8 zeros tolist astype close get_data int64 resize get_meta_data float get_reader split get_obj_detection_results update_rois match_annos_with_detections join split print float32 IoU_box int32 append zeros argmax max range len update_rois_with_crop float min call info call info get_next set_shape Session run seed list _visualize map set_trace cast prefetch range from_tensor_slices temporal_roi_cropping shuffle keys batch uint8 combine_batch_rois sort float32 make_one_shot_iterator global_variables_initializer reshape imwrite print all get_data print append extend split append extend range split int randint range join split average_precision_score isnan append sum range mean range get_class_AP_str get_per_class_AP recall_score precision_score list print get_obj_detection_results sort non_max_suppression NUM_CLASSES tqdm append keys range split list len tqdm split append keys non_max_suppression filter_results_nms print read_serialized_results convert_results_per_box_nms len glob join dirname abspath join imread split read_keyframe tensor tolist shape append get_field current_set merge_from_file save_results_json get_3_decimal_float astype merge_from_list total_no_sets keys enumerate int write COCODemo split compute_prediction gpu bbox len join mkdir minimum line NAMES tuple CONNECTIONS copy index get_cmap range circle len join VideoCapture time read run_on_opencv_image format config_file freeze imshow opts destroyAllWindows get ConcatDataset getattr append factory SequentialSampler RandomSampler list sorted copy get_img_info append float range len BatchSampler IterationBasedBatchSampler GroupedBatchSampler _quantize _compute_aspect_ratios format import_file make_data_sampler getLogger IMS_PER_BATCH PATHS_CATALOG MAX_ITER get_world_size NUM_WORKERS BatchCollator DataLoader warning make_batch_data_sampler SIZE_DIVISIBILITY build_transforms build_dataset DatasetCatalog append _has_only_empty_bbox PascalVOCDataset isinstance COCODataset dict __name__ items list format join COCOResults check_expected_results getLogger prepare_for_coco_segmentation prepare_for_coco_keypoint item info save evaluate_box_proposals prepare_for_coco_detection get_img_info convert tolist extend resize enumerate get_img_info decode Masker tolist extend masker expand tqdm resize get_field enumerate convert tolist extend resize get_field enumerate arange zeros_like resize max boxlist_iou append loadAnns sum range cat getAnnIds mean float enumerate get_img_info reshape sort convert min zeros as_tensor len accumulate summarize evaluate COCOeval error format info getLogger get_img_info format info get_groundtruth eval_detection_voc resize append enumerate calc_detection_voc_ap calc_detection_voc_prec_rec list defaultdict cumsum astype extend copy keys numpy array unique zip append zeros argmax max arange concatenate empty nan sum max range len warning info getLogger TO_BGR255 MIN_SIZE_TEST Compose MIN_SIZE_TRAIN Normalize MAX_SIZE_TRAIN MAX_SIZE_TEST update tqdm eval device to enumerate update list sorted getLogger warning all_gather keys Timer toc join format getLogger synchronize get_time_str total_time get_world_size device _accumulate_predictions_from_multiple_gpus tic dict save info compute_on_dataset dataset len get_world_size getLogger model zero_grad save str MetricLogger to sum update format timedelta info reduce_loss_dict enumerate time backward global_avg train step len _output_size tuple dtype sigmoid unsqueeze device log abs where join glob extend dirname abspath EPSILON DIM_PER_GP NUM_GROUPS group_norm Conv2d bias normal_ kaiming_normal_ ReLU append weight constant_ kaiming_uniform_ bias weight constant_ Linear POOLER_RESOLUTION POOLER_SCALES POOLER_SAMPLING_RATIO Pooler OrderedDict ResNet Sequential BACKBONE_OUT_CHANNELS FPN ResNet Sequential OrderedDict RES2_OUT_CHANNELS BACKBONE_OUT_CHANNELS FPN ResNet Sequential OrderedDict RES2_OUT_CHANNELS BACKBONE_OUT_CHANNELS get format FBNetBuilder SCALE_FACTOR WIDTH_DIVISOR DW_CONV_SKIP_BN unify_arch_def DW_CONV_SKIP_RELU loads ARCH_DEF BN_TYPE info ARCH get_num_stages get list get_blocks range FBNetTrunk Sequential OrderedDict create_builder last_depth get list format warn get_blocks range len create_builder FBNetRPNHead RPNHeadConvRegressor out_channels get get_blocks create_builder create_builder create_builder int Upsample append deepcopy range append expand_stage_cfg append expand_stage_cfg enumerate enumerate update deepcopy _block_cfgs_to_list _add_to_arch max append deepcopy append transformation_module range MASK_ON CombinedROIHeads RETINANET_ON KEYPOINT_ON append CLS_AGNOSTIC_BBOX_REG BoxCoder DETECTIONS_PER_IMG PostProcessor BBOX_REG_WEIGHTS USE_FPN NMS SCORE_THRESH POSITIVE_FRACTION FG_IOU_THRESHOLD CLS_AGNOSTIC_BBOX_REG BATCH_SIZE_PER_IMAGE BoxCoder BalancedPositiveNegativeSampler BBOX_REG_WEIGHTS BG_IOU_THRESHOLD Matcher FastRCNNLossComputation int transpose maximum resize ceil zeros argmax range len Keypointer KeypointPostProcessor convert cat_boxlist add_field get_fields cat POSITIVE_FRACTION FG_IOU_THRESHOLD BATCH_SIZE_PER_IMAGE BalancedPositiveNegativeSampler KeypointRCNNLossComputation BG_IOU_THRESHOLD Matcher RESOLUTION zeros_like float new_zeros int uint8 expand_masks min float32 expand interpolate zeros to max POSTPROCESS_MASKS POSTPROCESS_MASKS_THRESHOLD Masker MaskPostProcessor zip convert device resize append to crop get_mask_tensor FG_IOU_THRESHOLD MaskRCNNLossComputation BG_IOU_THRESHOLD Matcher RESOLUTION get_field squeeze append AnchorGenerator STRADDLE_THRESH ANCHOR_SIZES ANCHOR_STRIDE USE_FPN ASPECT_RATIOS AnchorGenerator STRADDLE_THRESH OCTAVE ANCHOR_SIZES tuple SCALES_PER_OCTAVE append float ASPECT_RATIOS ANCHOR_STRIDES range vstack _ratio_enum array hstack sqrt _whctrs round _mkanchors _whctrs _mkanchors NMS_THRESH FPN_POST_NMS_TOP_N_TRAIN POST_NMS_TOP_N_TRAIN RPNPostProcessor POST_NMS_TOP_N_TEST MIN_SIZE PRE_NMS_TOP_N_TRAIN FPN_POST_NMS_TOP_N_TEST PRE_NMS_TOP_N_TEST get_field POSITIVE_FRACTION FG_IOU_THRESHOLD RPNLossComputation BATCH_SIZE_PER_IMAGE BalancedPositiveNegativeSampler BG_IOU_THRESHOLD Matcher RETINANET_ON reshape permute view permute_and_flatten reshape shape zip append NMS_TH DETECTIONS_PER_IMG INFERENCE_TH PRE_NMS_TOP_N RetinaNetPostProcessor get_field FG_IOU_THRESHOLD RetinaNetLossComputation SigmoidFocalLoss LOSS_GAMMA BG_IOU_THRESHOLD Matcher LOSS_ALPHA WEIGHT_DECAY_BIAS SGD named_parameters BASE_LR BIAS_LR_FACTOR WEIGHT_DECAY convert _box_nms get_field bbox mode squeeze unbind bbox clamp min area max len add_field size set BoxList _cat fields mode int list isinstance tuple copy_ zero_ zip ceil Tensor update copy long enumerate max _rename_basic_resnet_weights sorted format getLogger OrderedDict from_numpy info keys _rename_fpn_weights CONV_BODY _load_c2_pickled_weights replace _rename_weights_for_resnet get_pretty_env_info barrier get_world_size from_buffer dumps get_world_size loads zip append to max cat get_world_size startswith get setup_custom_environment setup_environment import_file spec_from_file_location exec_module module_from_spec setFormatter join getLogger addHandler StreamHandler Formatter DEBUG setLevel FileHandler makedirs max list sorted format view getLogger tuple tolist shape info keys enumerate len items sorted list OrderedDict keys strip_prefix_if_present align_and_update_state_dicts state_dict join basename format replace synchronize write search group getenv path _download_url_to_file expanduser urlparse makedirs str timedelta glob join get_config_root_path deepcopy to freeze build_detection_model int SIZE_DIVISIBILITY rand MIN_SIZE_TRAIN to_image_list append to assertGreater get_config_files len assertGreater len format Size assertEqual op shape to get deepcopy list assertGreater format items print fe assertEqual rand Size BoxList getattr builder assertIsNotNone load_config len get deepcopy list assertGreater format items print fe rand builder load_config len join get_config_root_path merge_from_file deepcopy realpath join dirname abspath make_data_loader OUTPUT_DIR collect_env_info set_device MASK_ON get_rank to KEYPOINT_ON TEST DEVICE build_detection_model init_process_group synchronize setup_logger WEIGHT mkdir zip load DetectronCheckpointer local_rank DEVICE make_optimizer load update build_detection_model CHECKPOINT_PERIOD make_data_loader WEIGHT DistributedDataParallel DetectronCheckpointer do_train device to OUTPUT_DIR make_lr_scheduler join zip TEST synchronize MASK_ON inference mkdir make_data_loader empty_cache OUTPUT_DIR module KEYPOINT_ON enumerate len distributed run_test train add_argument exit ArgumentParser print_help min max print join len load join zip print endswith len xyxy_to_xywh poly_to_box append walk open hasInstances uint8 format toDict print Instance findContours len astype RETR_EXTERNAL copy unique abspath append CHAIN_APPROX_NONE array flush open instances2dict_with_polygons int print append split join print call hou_min_sec float split crop_video_segment join print call hou_min_sec float split join sort crop_video_segment_test mkdir join iter_data get_reader split get_frame_generator generate_graph expand_dims next concatenate filter_detection_results get_detections int get_object_name get_3_decimal_float append range len append range len get join list VideoCapture isOpened CAP_PROP_FRAME_HEIGHT read print sort ceil CAP_PROP_FPS keys CAP_PROP_FRAME_WIDTH append split join arange print min write tqdm append get_meta_data float range max get_reader split draw_objects waitKey copy tqdm get_frame_generator imshow next range split join tqdm split iter draw_objects waitKey copy _exit draw_anno shape rectangle int enumerate sort join listdir mkdir _bytes_list_feature as_bytes get_data resize _float_feature get_meta_data str tolist Example int64 _bytes_feature astype close float get_reader join uint8 _int64_feature get_labels_wrapper zeros split generate_tfrecord map_fn dict int64 string VarLenFeature parse_single_example FixedLenFeature range | # ActorConditionedAttentionMaps **REAL TIME DEMO CODE AVAILABLE AT**: https://github.com/oulutan/ACAM_Demo/ If you use this work, please cite our paper: ``` @inproceedings{ulutan2020actor, title={Actor conditioned attention maps for video action detection}, author={Ulutan, Oytun and Rallapalli, Swati and Srivatsa, Mudhakar and Torres, Carlos and Manjunath, BS}, booktitle={The IEEE Winter Conference on Applications of Computer Vision}, pages={527--536}, year={2020} | 3,234 |
oulutan/OP-Bilinear-Model | ['human detection'] | ['An Order Preserving Bilinear Model for Person Detection in Multi-Modal Data'] | 21_LSTMs_Inception.py 04_Images_Inception.py 19_Bilinear_Without_3d.py 18_ST_bilinear.py inception_v3_model/inception_v3.py 17_ST_Concat.py 01_Seismic.py image_features run_eval_testing run_eval classification run_training inputs read_and_decode training preprocess loss_op seismic_features main inference remove_log image_features run_eval_testing run_eval classification run_training inputs read_and_decode training preprocess loss_op seismic_features main inference remove_log image_features run_eval_testing run_eval classification run_training inputs read_and_decode training preprocess loss_op seismic_features main inference remove_log image_features run_eval_testing run_eval classification run_training inputs read_and_decode training preprocess loss_op seismic_features main inference remove_log image_features run_eval_testing run_eval classification run_training inputs read_and_decode training preprocess loss_op seismic_features main inference remove_log image_features run_eval_testing run_eval classification run_training inputs read_and_decode training preprocess loss_op seismic_features main inference remove_log inception_v3 _reduced_kernel_size_for_small_input inception_v3_arg_scope inception_v3_base remove read TFRecordReader uint8 reshape cast int32 parse_single_example uint8 one_hot less_equal resize_bicubic cast tile expand_dims preprocess expand_dims Variable int list batch_size tqdm ceil zeros argmax range run int list batch_size tqdm ceil zeros argmax range run print run_training UPDATE_OPS get_collection with_dependencies as_list | # OP-Bilinear-Model This repository contains the code for our WACV 2018 paper: https://arxiv.org/abs/1712.07721 Instruction will be added. ``` @inproceedings{ author = {Oytun Ulutan and Benjamin Riggan and Nasser Nasrabadi and B.S. Manjunath}, title = {A Bilinear Model for Person Detection in Multi-Modal Data}, booktitle = {IEEE Winter Conf. on Applications of Computer Vision (WACV 2018), March 12-14, 2018, Lake Tahoe, NV/CA}, location = {Lake Tahoe, CA}, | 3,235 |
ourownstory/AR-Net | ['time series'] | ['AR-Net: A simple Auto-Regressive Neural Network for time-series'] | arnet/plotting.py arnet/ar_net.py tests/test_unit.py arnet/ar_net_legacy.py tests/test_integration.py v0_1/data_loader.py v0_1/example.py v0_1/model.py v0_1/utils.py arnet/create_ar_data.py setup.py v0_1/training.py arnet/__init__.py tests/test_legacy.py arnet/fastai_mods.py arnet/utils.py arnet/utils_data.py ARNet init_ar_learner _get_config _generate_random_arparams generate_armaprocess_data save_to_file main load_from_file get_loss_func SparsifyAR sTPE huber plot_prediction_sample plot_error_scatter plot_weights compute_sTPE coeff_from_model nice_print_list pad_ar_params set_logger_level main estimate_noise split_by_p_valid tabularize_univariate IntegrationTests LegacyTests UnitTests generate_armaprocess_data init_ar_dataset load_data create_dataset sample LocalDataset main load_config DAR main train_batch test run_train_test main train test_batch run list_of_dicts_2_dict_of_lists plot_loss_curve intelligent_regularization plot_weights plot_error_scatter plot_results jsonize compute_stats_ar plot_prediction_sample get_json_filenames_type list_of_dicts_2_dict_of_means list_of_dicts_2_dict_of_means_minmax get_json_filenames estimate_noise TabDataLoader valid SparsifyAR sTPE model print tabular_learner split_by_p_valid DataLoaders TabularPandas append train tabularize_univariate len int sum abs random mean isstationary from_coeffs append sum array range mean generate_sample from_coeffs _generate_random_arparams join format savetxt makedirs join print shape head read_csv _get_config print generate_armaprocess_data save_to_file head load_from_file dict error format show join list format barplot savefig figure zip DataFrame range makedirs show join set_size_inches format plot savefig figure legend makedirs show join set_size_inches format scatter savefig figure legend makedirs all all abs sum modules isinstance Linear format handlers debug error warning setLevel print int concat DataFrame len shape tabularize_univariate arange show int plot print sample zeros LocalDataset range len abs random isstationary append sum array range list print generate_armaprocess_data create_dataset max len pop deepcopy init_ar_dataset print int sum len plot_loss_curve plot_weights run_training plot_results load_data load_config exp backward forward step zero_grad mean div pow weight loss_fn zeros abs list format StepLR train_batch print Adam extend mean parameters intelligent_regularization append step range loss_fn forward list concatenate mean array append numpy test_batch concatenate test MSELoss DataLoader y_data DAR train array time format print compute_stats_ar run_train_test format abs print mean sum show int list set_size_inches arange plot axes set_xlabel makedirs set_ylabel savefig figure hlines range len plot_prediction_sample plot_error_scatter items list format list keys mean list keys list keys get_json_filenames_type join format | [](https://github.com/psf/black) # AR-Net A simple auto-regressive Neural Network for time-series ([link to paper](https://arxiv.org/abs/1911.12436)). ## Install After downloading the code repository (via `git clone`), change to the repository directory (`cd AR-Net`) and install arnet as python package with `pip install .` ## Use View the notebook [`example_notebooks/arnet.ipynb`](example_notebooks/01_fit_arnet.ipynb) for an example of how to use the model. ## Versions ### Current (1.2) | 3,236 |
overlapping-instances/MultiStar | ['instance segmentation', 'semantic segmentation'] | ['MultiStar: Instance Segmentation of Overlapping Objects with Star-Convex Polygons'] | multitaskmodel.py datagen/DSBOV_generation.py datagen/ISBI15_images_to_hdf5.py sampling.py evaluation.py datagen/ISBI14_images_to_hdf5.py dataset.py trainloop.py utils.py main.py loss.py DatasetPlus Dataset scores_prediction_grid save_precisions get_precisions get_isbi_metrics optimal_assignment_dice predict_segmentations precision_prediction_grid save_prediction save_isbi_metrics hungry_assignment_iou hungry_assignment_dice optimal_assignment_iou prediction_grid StardistancesLoss MultiTaskLossWrapper MultitaskModel nms get_polygon_coordinates plot_one_polygon generate_polygon_masks compute_IoU sample_positions Trainer plot_contours random_shift_cells create_masks_png create_original_images create_masks_mat nms list model tqdm unsqueeze append to numpy range count_nonzero linear_sum_assignment logical_and repeat zeros range count_nonzero linear_sum_assignment logical_and repeat zeros range count_nonzero logical_and range append count_nonzero logical_and logical_or append range append tqdm predict_segmentations enumerate dump open optimal_assignment_iou zeros sum array range enumerate len count_nonzero logical_and astype mean logical_xor hungry_assignment_iou append sum std range len trange empty get_isbi_metrics len get_precisions zeros trange len dump open dump open tuple cos map pi stack linspace sin logical_or logical_and zeros_like cumsum less_equal argmin copy flatten masked_array uniform zeros sum enumerate get_polygon_coordinates new polygon empty array range generate_polygon_masks argsort compute_IoU sample_positions flip show T subplots set_title get_polygon_coordinates get_sin_cos_angles imshow plot imshow scatter find_contours range enumerate int gaussian_filter min shift rotate uniform flip append zeros max range binary_dilation join sorted expand_dims empty imread listdir max enumerate len join listdir sorted append imread empty enumerate len append empty range | # MultiStar: Instance Segmentation of Overlapping Objects with Star-Convex Polygons - A MultiStar model can be trained by running *main.py*, where parameters, datasets, etc. are also specified. - The necessary dependencies can be installed as anaconda environment with *conda_environment.yml*. - For the UNet backbone, the confnets implementation (https://github.com/imagirom/ConfNets) is used. - The datasets are generated with the files in *datagen/*. | 3,237 |
owseaman/Text-Detection-in-an-Image | ['optical character recognition', 'scene text detection', 'curved text detection'] | ['EAST: An Efficient and Accurate Scene Text Detector'] | east_text_detector.py mySolutionToOCR_opencv.py east_detector four_point_transform order_points int time format print cos range setInput readNet resize append float forward array sin blobFromImage non_max_suppression zeros sum diff int max order_points sqrt getPerspectiveTransform warpPerspective array | # Text-Detection-in-an-Image Text Detection in an Image using Pytesseract and EAST Text Detection Download the pre-trained model at https://drive.google.com/open?id=1yHEuc6AK0JI0yzR4Qcru0Z_6GVGHkwHV Increae accuracy by changing the padding on line 128 Increase accuracy depending on the type of image and language in the image being scanned by changing the configuration accordingly. For information on EAST text detection, read https://arxiv.org/abs/1704.03155 | 3,238 |
oywtece/dstn | ['click through rate prediction'] | ['Deep Spatio-Temporal Neural Networks for Click-Through Rate Prediction'] | dstn_int_att.py dstn_self_att.py dstn_pooling.py dnn.py ctr_funcs.py config_dstn.py count_lines print_time tf_input_pipeline_test cal_rmse tf_input_pipeline list_flatten cal_rectified_rmse tf_read_data cal_auc partition_input get_masked_one_hot prepare_input_embed get_masked_mul_hot get_masked_one_hot get_masked_mul_hot_aux get_masked_mul_hot partition_input prepare_input_embed prepare_input_embed_aux_interaction get_wgt_sum_embed_aux get_masked_one_hot_aux prepare_input_embed_aux get_masked_one_hot get_masked_mul_hot_aux get_masked_mul_hot partition_input prepare_input_embed get_masked_one_hot_aux get_masked_one_hot get_masked_mul_hot_aux get_masked_mul_hot partition_input prepare_input_embed prepare_input_embed_aux_interaction get_wgt_sum_embed_aux get_masked_one_hot_aux roc_curve auc mean_squared_error sqrt mean_squared_error sqrt enumerate sum pop read TextLineReader decode_csv tf_read_data shuffle_batch string_input_producer tf_read_data string_input_producer batch print now strftime reshape embedding_lookup multiply float32 greater cast tile expand_dims embedding_lookup multiply float32 greater cast tile expand_dims reshape concat get_masked_one_hot reduce_sum get_masked_mul_hot cumsum append array range embedding_lookup multiply float32 greater cast tile expand_dims embedding_lookup multiply float32 greater cast tile expand_dims reshape concat reduce_sum get_masked_mul_hot_aux get_masked_one_hot_aux exp dropout relu reshape concat matmul reduce_sum tile expand_dims reshape concat reduce_sum get_masked_mul_hot_aux get_masked_one_hot_aux softmax | # Deep Spatio-Temporal Neural Network (DSTN) DSTN is a model for click-through rate (CTR) prediction. DSTN investigates various types of auxiliary ads for improving the CTR prediction of the target ad. The auxiliary ads are from two viewpoints: one is from the spatial domain, where DSTN considers the contextual ads shown above the target ad on the same page; the other is from the temporal domain, where DSTN considers historically clicked and unclicked ads of the user. The intuitions are that ads shown together may influence each other, clicked ads reflect a user’s possible preferences, and unclicked ads may indicate what a user dislikes to certain extent. If you use this code, please cite the following paper: * **Deep Spatio-Temporal Neural Networks for Click-Through Rate Prediction. In KDD, ACM, 2019.** arXiv: https://arxiv.org/abs/1906.03776 ACM Digital Library: https://dl.acm.org/citation.cfm?doid=3292500.3330655 #### Bibtex ``` @inproceedings{ouyang2019deep, | 3,239 |
oywtece/minet | ['click through rate prediction'] | ['MiNet: Mixed Interest Network for Cross-Domain Click-Through Rate Prediction'] | data/tfrecord_writer.py config_amazon.py dnn_para_tune.py ctr_funcs.py minet_para_tune.py count_lines tfrecord_input_pipeline tf_input_pipeline_wo_label print_time tfrecord_input_pipeline_test tf_input_pipeline_test cal_rmse tf_input_pipeline list_flatten cal_rectified_rmse tf_read_data tf_read_data_wo_label cal_auc get_dnn_output get_concate_embed get_masked_one_hot get_masked_mul_hot interest_level_att partition_input_1 item_level_att_2 get_user_embed get_masked_mul_hot_clk get_masked_one_hot_clk get_concate_embed_clk get_masked_one_hot reshape_data_user_embed partition_input_2 get_concate_embed item_level_att_1 get_y_hat get_masked_mul_hot _int64_feature roc_curve auc mean_squared_error sqrt mean_squared_error sqrt enumerate sum pop read TextLineReader decode_csv read TextLineReader decode_csv tf_read_data shuffle_batch string_input_producer tf_read_data_wo_label shuffle_batch string_input_producer tf_read_data string_input_producer batch read TFRecordReader string_input_producer parse_single_example shuffle_batch read TFRecordReader string_input_producer parse_single_example batch print now strftime embedding_lookup multiply float32 greater cast tile expand_dims embedding_lookup multiply float32 greater reduce_sum cast tile expand_dims concat get_masked_one_hot get_masked_mul_hot dropout relu reshape matmul range len cumsum reshape concat append array range reshape reshape reshape get_masked_one_hot embedding_lookup multiply float32 greater cast tile expand_dims embedding_lookup multiply float32 greater reduce_sum cast tile expand_dims get_masked_mul_hot_clk concat get_masked_one_hot_clk reshape reshape expand_dims tile relu reshape concat matmul reduce_sum softmax relu reshape concat matmul reduce_sum softmax concat exp matmul relu dropout relu matmul range len | # MiNet Mixed Interest Network (MiNet) is a model for **cross-domain** click-through rate (CTR) prediction. <img src="https://github.com/oywtece/minet/blob/master/minet.png" alt="minet model structure" width="600"/> If you use this code, please cite the following paper: * **MiNet: Mixed Interest Network for Cross-Domain Click-Through Rate Prediction. In CIKM, ACM, 2020.** arXiv: https://arxiv.org/abs/2008.02974 ACM DL: https://dl.acm.org/doi/10.1145/3340531.3412728 #### Bibtex ``` @inproceedings{ouyang2020minet, | 3,240 |
oyxhust/CNN-LSTM-CTC-text-recognition | ['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'] | train_bi_lstm.py train_crnn.py generate_data/generate_data.py train_lstm.py symbol/crnn.py lstm_predictor.py symbol/bi_lstm.py crnn_predictor.py symbol/lstm.py parse_args lstm_ocr_model lstm_ocr_model remove_blank SimpleBatch sym_gen OCRIter Accuracy ctc_label remove_blank SimpleBatch sym_gen OCRIter Accuracy ctc_label remove_blank SimpleBatch sym_gen OCRIter Accuracy ctc_label AddNoiseSingleChannel random_pick Addblur tfactor r GenText random_scale rot text_Gengray rotRandrom GenCh lstm bi_lstm_unroll bi_lstm_inference_symbol lstm crnn lstm lstm_unroll add_argument ArgumentParser append range len append range len remove_blank append ctc_label argmax range len uniform zip int warpPerspective float32 sin float abs getPerspectiveTransform warpPerspective float32 getPerspectiveTransform random r randint random_scale decode Draw text new array normal uint8 r min astype shape max r blur SliceChannel FullyConnected c Activation Dropout SliceChannel FullyConnected Reshape Variable lstm insert h LSTMState LSTMParam Concat append WarpCTC Cast range SliceChannel FullyConnected SoftmaxOutput Variable Embedding lstm insert h LSTMParam Concat c append range LSTMParam WarpCTC Cast Activation Flatten Pooling Reshape lstm transpose h BatchNorm append range SliceChannel FullyConnected Convolution insert LSTMState Concat Variable Dropout SliceChannel FullyConnected Reshape Variable lstm h LSTMState LSTMParam Concat append WarpCTC Cast range | # CNN-LSTM-CTC text recognition I realize three different models for text recognition, and all of them consist of CTC loss layer to realize no segmentation for text images. ### Disclaimer I refer to the official mxnet warpctc example [here](https://github.com/dmlc/mxnet/tree/master/example/warpctc). ### Getting started * Build MXNet with Baidu Warp CTC, and please following this instructions [here](https://github.com/dmlc/mxnet/tree/master/example/warpctc). When I use this official instructions to add Baidu Warp CTC to Mxnet, there are some errors because the latest version of Baidu Warp CTC has complicts with mxnet. Recently, I see someone has already solved this problem and updated the official mxnet warpctc example. However, if you still have problem, please refer to this issue [here](https://github.com/dmlc/mxnet/pull/3853). ### Generating data Run `generate_data.py` in `generate_data`. When generating training and test data, please remember to change output path and number in `generate_data.py` (I will update a more friendly way to generate training and test data when I have free time). ### Train the model | 3,241 |
p0werHu/articulated-objects-motion-prediction | ['motion prediction'] | ['Predicting Long-Term Skeletal Motions by a Spatio-Temporal Hierarchical Recurrent Network'] | src/choose_dataset.py src/load_data.py src/ST_HRN.py src/test.py src/loss.py src/train.py src/HMR.py src/utils.py src/config.py src/plot_animation.py DatasetChooser TrainConfig LSTM_decoder HMR HMR_EncoderCell MouseDataset H36mDataset LieTsfm AnimalPredictionDataset FormatData CSLDataset CSLPredictionDataset FishDataset HumanPredictionDataset HumanDataset FormatDataPre FishPredictionDataset weightlie_loss HMRlie_loss loss l2_loss plot_animation plot_fish plot_mouse plot_h36m ST_LSTM ST_HRN EncoderCell Kinematics_LSTM_decoder LSTM_decoder ST_LSTMCell train choose_net prediction create_directory normalize_data_dir forward_kinematics_h36m get_file_list unNormalizeData mean_euler_error rotmat2euler lietomatrix rotmat2expmap expmap2rotmat normalize_data computelie forward_kinematics prepare_loss normalization_stats revert_coordinate_space Progbar fk weightlie_loss HMRlie_loss dim_to_ignore prepare_loss l2_loss mean sub mean sub zeros max range mean sub zeros max range plot_fish plot_mouse plot_h36m ST_HRN HMR get_file_list clip_grad_norm_ zero_grad Loss DataLoader DataParallel save device choose round str list DatasetChooser training_size Adam max_epoch device_count load_state_dict to sum range state_dict manual_seed_all update format choose_net float keys net enumerate load mean_euler_error backward print parameters step Progbar makedirs data get_file_list DataParallel vstack device choose fk visualize str list unNormalizeData DatasetChooser load_state_dict to sum range format plot dim_to_ignore choose_net keys revert_coordinate_space load data_std mean_euler_error print reshape data_mean plot_animation dict savemat eye zeros makedirs dataset datatype loss model sorted listdir norm cos identity matmul sin array array cos pi arctan2 data_std deepcopy join arange unNormalizeData data_mean rotmat2euler print power mean sqrt dim_to_ignore expmap2rotmat zeros sum array range reshape squeeze computelie zeros range T reshape squeeze matmul lietomatrix zeros range expmap2rotmat concatenate forward_kinematics_h36m output_window_size forward_kinematics append array range arange reshape squeeze dot expmap2rotmat array split append zeros range append range divide len list keys divide mean list std extend reshape multiply repeat append zeros array range arange reshape copy dot shape expmap2rotmat rotmat2expmap range arccos trace sin zeros array | # Predicting Long-Term Skeletal Motions by a Spatio-Temporal Hierarchical Recurrent Network This is the pytorch version, python code of our paper Predicting Long-Term Skeletal Motions by a Spatio-Temporal Hierarchical Recurrent Network. Please follow the introduction below to reproduce our results . ## Publication Our paper is accepted by the 24th European Conference on Artificial Intelligence (ECAI2020) and the submitted version is available at [arXiv](https://arxiv.org/abs/1911.02404). We will release the final version later. See the accepted papers [here](http://ecai2020.eu/accepted-papers/). See the published version [here](http://ebooks.iospress.nl/publication/55206) ## Required packages * Anaconda is highly recommend * Pytorch >= 1.2 | 3,242 |
pablovicente/keras-wattnet | ['time series'] | ['WATTNet: Learning to Trade FX via Hierarchical Spatio-Temporal Representation of Highly Multivariate Time Series'] | layers/temporal_block.py layers/spatial_block.py layers/attention.py ScaledDotAttention AttentionBlock SpatialBlock ResidualBlock | # keras-wattnet Keras WaveATTentionNet (WATTNet) ### References * https://github.com/Zymrael/wattnet-fx-trading (Original PyTorch repository) * https://arxiv.org/abs/1909.10801 (WATTNet: Learning to Trade FX via Hierarchical Spatio-Temporal Representation of Highly Multivariate Time Series) | 3,243 |
pablovin/AffectiveMemoryFramework | ['facial expression recognition'] | ['A Deep Neural Model Of Emotion Appraisal', 'The FaceChannel: A Light-weight Deep Neural Network for Facial Expression Recognition'] | Demos/VisualEmotionRecognition/metrics.py KEF/Controllers/ExperimentManager.py KEF/Controllers/__init__.py OMG_Emotion_Evaluation_Cross.py KEF/Controllers/PlotManager.py OMG_Emotion_Evaluation_Audio.py KEF/Implementations/Audio_CNN_RAVDESS.py KEF/Implementations/__init__.py Demos/VisualEmotionRecognition/GUIController.py KEF/Implementations/Vision_CNN_OMG_Emotion_Face.py KEF/DataLoaders/FER2013PlusLoader.py KEF/Implementations/Cross_CNN_RAVDESS.py KEF/Implementations/Vision_MultiCNN_NCD_SobelXY.py KEF/Metrics/metrics.py Demos/VisualEmotionRecognition/PerceptionGWR.py OMG_Emotion_Crossmodal.py KEF/DataLoaders/DataLoader_OMG_Emotion_Crossmodal.py KEF/Implementations/Cross_CNN_OMG_Emotion.py NCD_VisionNetwork_SobelXY.py KEF/CustomObjects/losses.py OMG_Emotion_Audio_MelSpectrum.py Demos/VisualEmotionRecognition/EmotionsFromVideos.py KEF/DataLoaders/DataLoader_OMG_Emotion_Face.py KEF/DataLoaders/VisionLoader_NCD_SobelXY.py Demos/VisualEmotionRecognition/EmotionsFromVideoFiles.py KEF/__init__.py KEF/DataLoaders/AudioLoader_RAVDESS.py KEF/Implementations/IModelImplementation.py Demos/VisualEmotionRecognition/modelLoader.py Demos/VisualEmotionRecognition/imageProcessingUtil.py KEF/DataLoaders/__init__.py KEF/Implementations/Vision_CNN_FER2013.py FERPlus_Vision_FaceChannel_Frame.py KEF/Controllers/LogManager.py KEF/Models/__init__.py OMG_Emotion_Evaluation_Face.py KEF/Models/Data.py Demos/VisualEmotionRecognition/convertVisionModelToPython3.py OMG_Emotion_Face.py KEF/CustomObjects/metrics.py KEF/Implementations/Audio_CNN_OMG_Emotion.py RAVDESS_CrossNetwork_RAVDESS.py RAVDESS_Audio_MelSpectrum_Channel.py Demos/VisualEmotionRecognition/run.py KEF/Metrics/__init__.py KEF/DataLoaders/CrosschannelLoader_RAVDESS_Frame_WithDirectory.py KEF/Metrics/losses.py Demos/VisualEmotionRecognition/Standard_GWR.py KEF/DataLoaders/IDataLoader.py KEF/Models/Data_OMG.py KEF/DataLoaders/DataLoader_OMG_Emotion_Audio.py Demos/VisualEmotionRecognition/modelDictionary.py KEF/Models/DataCrossmodal.py KEF/Models/Data_CrossChannel.py runModel set_keras_backend runModel set_keras_backend runModel set_keras_backend runModel set_keras_backend preEmphasis preProcess slice_signal preProcessVideo slice_signal preProcessAudio runModel set_keras_backend runModel set_keras_backend runModel set_keras_backend shuntingInhibition get_img_from_fig createPlot createPlot GUIController imageProcessingUtil fbeta_score precision rmse ccc recall fmeasure DimensionalModel2 DimensionalModel CategoricaModel modelLoader preProcess Vision_PerceptionGWR_Dimensional_AffectNet warn AssociativeGWR ExperimentManager LogManager PlotManager hinge_onehot huber_loss fbeta_score mean_q precision r2_score ccc recall fmeasure AudioLoader_RAVDESS DataLoader_OMG_Audio DataLoader_OMG_Face DataLoader_OMG_Face FER2013PlusLoader IDataLoader VisionLoader_NCD Audio_CNN_OMG Audio_CNN_RAVDESS Cross_CNN_OMG Cross_CNN_RAVDESS IModelImplementation CNN_FER2013 Vision_CNN_OMG_Face Vision_MultiCNN_NCD_SobelXY hinge_onehot fbeta_score precision r2_score ccc recall fmeasure Data DataCrossmodal Data Data runModel set_keras_backend preEmphasis preProcess slice_signal preProcessVideo preProcessAudio runModel set_keras_backend shuntingInhibition get_img_from_fig createPlot GUIController imageProcessingUtil fbeta_score precision rmse ccc recall fmeasure DimensionalModel2 DimensionalModel CategoricaModel modelLoader preProcess Vision_PerceptionGWR_Dimensional_AffectNet warn AssociativeGWR ExperimentManager LogManager PlotManager hinge_onehot huber_loss fbeta_score mean_q precision r2_score ccc recall fmeasure AudioLoader_RAVDESS DataLoader_OMG_Audio DataLoader_OMG_Face FER2013PlusLoader IDataLoader VisionLoader_NCD Audio_CNN_OMG Audio_CNN_RAVDESS Cross_CNN_OMG Cross_CNN_RAVDESS IModelImplementation CNN_FER2013 Vision_CNN_OMG_Face Vision_MultiCNN_NCD_SobelXY hinge_onehot fbeta_score precision r2_score ccc recall fmeasure Data DataCrossmodal Data reload ExperimentManager FER2013PlusLoader loadValidationData plotManager dataTrain loadTestData dataValidation labelDictionary modelDirectory logManager save buildModel CNN_FER2013 train loadTrainData len Vision_MultiCNN_NCD_SobelXY VisionLoader_NCD print evaluate DataLoader_OMG_Audio Audio_CNN_OMG dataTest Cross_CNN_OMG DataLoader_OMG_Face append int range len reshape array concatenate load slice_signal resize melspectrogram expand_dims array append COLOR_BGR2GRAY astype expand_dims swapaxes resize imread array cvtColor load slice_signal resize melspectrogram expand_dims array append Vision_CNN_OMG_Face Audio_CNN_RAVDESS AudioLoader_RAVDESS CrosschannelLoader_RAVDESS Cross_CNN_RAVDESS BytesIO seek COLOR_BGR2RGB close getvalue imdecode savefig resize frombuffer cvtColor xlabel ylabel ylim scatter savefig xlim epsilon sum round clip epsilon sum round clip recall precision epsilon subtract multiply square divide reduce_mean moments COLOR_BGR2GRAY astype swapaxes imread cvtColor abs hasattr square isinf | This repository holds some of the models and solutions developed by Pablo Barros based on affective recognition and learning. ##Individual Projects **Pre-requisites** tensorflow, keras, matplotlib, h5py, opencv-python, librosa, pillow, imgaug, python_speech_features, hyperas, dlib If you want to run on a GPU, install tensorflow-gpu instead of tensorflow **Instructions** Each of the examples here run within the KEF framework. Also, each example needs a specific dataset which is not available here. All the demos and examples here run on Python 2.7. **Hand gesture recognition** - NCD_VisionNetwork_SobelXY.py: Multichannel Convolution Neural Network for hand posture recognition using the NCD dataset (Barros et al., 2014) **Auditory emotion recognition** | 3,244 |
pagrawal-ml/Unified-Semantic-Parsing | ['semantic parsing'] | ['Unified Semantic Parsing with Weak Supervision'] | data/modified_scripts/preprocess_all.py data/modified_scripts/preprocess_2.py code/knowledgedistillation/model/parse_s2s_att_logging.py data/scripts/vocabulary.py code/knowledgedistillation/model/seq2seq_model_logging.py data/modified_scripts/postprocess_tsv_1.py code/knowledgedistillation/model/parse_s2s_att_test.py data/modified_scripts/entity_deanonymization.py data/modified_scripts/compare.py code/knowledgedistillation/model/seq2seq_model.py data/scripts/postprocess.py code/knowledgedistillation/model/parse_s2s_att_usingprobbailities.py code/knowledgedistillation/read_combine_pickle.py code/knowledgedistillation/model/accuracy_from_file.py code/knowledgedistillation/model/data_utils.py code/knowledgedistillation/model/bleu_test.py data/scripts/entity_deanonymization.py data/modified_scripts/postprocess_tsv_2.py code/knowledgedistillation/model/accuracy.py code/knowledgedistillation/model/bleu.py data/modified_scripts/preprocess_1.py data/modified_scripts/postprocess_p4.py post_process compute_bleu_score compute_tree_accuracy flatten_filter reverseDict is_all_same tree_to_str init_comm_dict is_filter tree_to_list sort_filter_args acc_test sort_args to_lisp_tree is_all_same post_process _get_ngrams compute_bleu data_to_token_ids splitToFrom initialize_vocabulary prepare_data sentence_to_token_ids create_vocabulary prepare_parse_data basic_tokenizer tokenize_dataset decode self_test read_data create_model create_batches softmax main train test_accuracy Seq2SeqModel Seq2SeqModel compare_reverse print_diff postprocess main post2 main preprocess preprocess1 preprocess_2 process load_vocab create_vocab tokens_to_ids build_vocabulary_simple main create_vocab_geo items list append pop range recurse recurse to_lisp_tree isinstance append isinstance range len join append range len isinstance is_filter sort_filter_args append to_lisp_tree append str sort compute_tree_accuracy reverseDict print init_comm_dict append split tuple range Counter len _get_ngrams exp Counter zip float sum range len append split print dict Exists basic_tokenizer tokenizer print initialize_vocabulary join valid join print write close open split data_to_token_ids join create_vocabulary strip close sentence_to_token_ids append open sum atleast_2d exp float flatten expand_dims next max max_gradient_norm to_vocab_size learning_rate join restore info from_vocab_size batch_size size num_layers learning_rate_decay_factor Seq2SeqModel train_dir int list asarray permutation batch_size ones min astype reversed info ceil array range append len join splitToFrom to_vocab_size train_file from_vocab_size data_dir prepare_data combine info test_file ConfigProto dev_file post_process from_vocab_size warning open compute_tree_accuracy reverseDict display save_probabilities data_dir to_vocab_size create_model initialize_vocabulary get_batch info float enumerate join write init_comm_dict tokenize_dataset step len ConfigProto ConfigProto join splitToFrom data_dir info ConfigProto Session test_accuracy print join rstrip print readlines len zip split join list basename readlines strip write len close any sub split append keys range open OrderedDict postprocess listdir list strip len any sub keys split readline basename strip write close sub open readline basename strip len write close sub startswith split open join print preprocess1 preprocess_2 append preprocess strip sub list read dict eval zip keys values open update list zip print Counter dict split most_common range len extend len print write dumps build_vocabulary_simple open print write dumps build_vocabulary_simple open create_vocab | # Unified Semantic Parsing Code for our ACL 2019 work on *Unified Semantic Parsing with Weak Supervision* | 3,245 |
pambros/CNN-2D-X-Ray-Catheter-Detection | ['data augmentation'] | ['Fully Automatic and Real-Time Catheter Segmentation in X-Ray Fluoroscopy'] | docs/generateImages/GenerateImages.py python/common/UtilImage.py examples/trainCatheterSegmentation/TrainCatheterSegmentation.py python/common/File.py python/common/FluoroExtraction.py tests/debugCppExtractCenterline/DebugCppExtractCenterline.py examples/generateTrainTestDataset/GenerateTrainTestDataset.py python/common/DataAugmentation.py examples/testCatheterSegmentation/TestCatheterSegmentation.py python/common/System.py python/common/Util.py python/common/NnetsX.py python/common/FluoroDataObject.py python/common/DataObject.py CreateFakeFluoroscopy CreateFakeSet ValidationGenerator ImgGenerator ApplyRandomTransformations flip_axis random_channel_shift transform_matrix_offset_center GenerateImageOnTheFly GenerateValidationOnTheFly apply_transform DataObject ZipFileManager VectorToFileF GetFileNameExtension ReadLine FileToMatrix CloseFile PtsListFromFile ListFilesInDir VectorListFromFile MatrixToFile DeleteFile RemoveQuotationMark H5Set GetPathWithoutExtension LoadPickle SaveH5Set MakeDirThreadSafe IsDirectoryExist GetFileNameWithoutExtension IsFileExist VectorToFileI SavePickle LoadH5Set ZipAndDeleteFolder GetFileSize OpenFile PtsListToFile GetFloat32NormalizedFrameWithoutBorders FluoroDataObject GetIdFromSet FluoroExtraction GetCenterline NNets MyReLU DiceCoef DiceCoefLoss CallCommand CallExecutable IdentityMatrix44 CreateEmptyList StringToBooleanValue StrToDoubleList Clamp BooleanValueToString ResizeImageMultiChan StackImagesMultiChan SaveImage ResizeImage GetFloat32DicomFrame SaveDicomSequence ReadDicomFrame GrayToRGB NormalizeFrame GetFloat32NormalizedFrame ConcatImagesAndSave GetMaxValue GrayToRGBSet PtsListToMask DrawCenterline PadImage DrawLine LoadImage SaveSetImagesMultiChan DrawRect ReadOnlyDicomInfo splprep splev DrawCenterline reshape rand stack linspace swapaxes GrayToRGB zeros moveaxis array clip int str format uint16 print SaveDicomSequence rand min astype CreateFakeFluoroscopy empty flip range PtsListToFile GetIdFromNeed GenerateImageOnTheFly m_X m_TrainSetList m_ValidSetList m_NeedSetList m_Y CreateImageX GetIdFromNeed m_X m_ValidSetList GenerateValidationOnTheFly m_NeedSetList m_TestSetList m_Y CreateImageX swapaxes stack uniform rollaxis stack rollaxis dot float array griddata normal clip T transform_matrix_offset_center reshape inv pi dot uniform zeros array range apply_transform seed int ApplyRandomTransformations get_state arange random_channel_shift flip_axis rollaxis getstate randint shuffle range shape set_state setstate zeros empty _createImageXFct rollaxis range shape zeros empty _createImageXFct len CloseZipfFile rmtree CallExecutable exists remove GetZipFile find close rstrip GetZipFile find stat find makedirs find str File close shape create_dataset range len print File close shape append readline rstrip append OpenFile split str write range len format write range len IdentityMatrix44 ReadLine float range split str write range str OpenFile write range len str readline rstrip print len append float range OpenFile split pad GetFloat32NormalizedFrame range len uint8 splprep splev astype ExtractCenterline stack skeletonize swapaxes linspace array clip len flatten sum print communicate returncode call Popen split append float range len append range percentile min max print str astype float32 read_file str read BitsStored seek frombytes print SEEK_CUR reshape fromstring close Columns read_file array Rows open ReadDicomFrame FileDataset uint16 print save_as astype to_bytes tostring Dataset zeros range int uint8 moveaxis astype StackImagesMultiChan SaveImage SaveImage rollaxis LoadImage StackImagesMultiChan zeros moveaxis range len empty empty range len pad dtype rollaxis print shape resize empty range range DrawLine ones logical_and astype where floor swapaxes zeros binary_dilation int hls_to_rgb logical_and Clamp where circle len | # Catheter segmentation in X-Ray fluoroscopy using convolutional neural networks This code is the implementation of the method presented in the following paper: - P. Ambrosini, D. Ruijters, W.J. Niessen, A. Moelker and T. van Walsum: [Fully Automatic and Real-Time Catheter Segmentation in X-Ray Fluoroscopy][2017Ambrosini]. The 20th International Conference on Medical Image Computing and Computer Assisted Intervention (MICCAI), Lecture Notes in Computer Science, vol. 10434, pp. 577-585, 2017. arXiv preprint [][2017AmbrosiniPreprint] [2017Ambrosini]: https://doi.org/10.1007/978-3-319-66185-8_65 [2017AmbrosiniPreprint]: https://arxiv.org/abs/1707.05137 <p align="center"> <img src="docs/images/catheterExtractionExample2.png"> </p> | 3,246 |
panaali/word2ket | ['word embeddings'] | ['word2ket: Space-efficient Word Embeddings inspired by Quantum Entanglement'] | examples/texar/config_model.py word2ket/EmbeddingKet.py examples/texar/seq2seq_attn.py examples/texar/config_iwslt14.py word2ket/__init__.py examples/demo.py setup.py examples/texar/config_giga.py examples/texar/prepare_data.py word2ket/utils.py MyModel main prepare_data Seq2SeqAttn main print_stdout_and_file EmbeddingKetXS EmbeddingKet ketify summary maybe_download prepare_data print _eval_epoch print_stdout_and_file _train_epoch save max open mleonly Seq2SeqAttn _calc_reward to range state_dict format flush PairedTextData items print get_train_op TrainTestDataIterator summary print format __str__ apply EmbeddingKetXS __name__ isinstance named_children Embedding info setattr cuda is_cuda EmbeddingKet | # word2ket **word2ket** is an space-efficient embedding layer that can reduce the space required to store the embeddings by up to 100,000x. This is a PyTorch implementaion of the embedding layer that is proposed in the paper [word2ket: Space-efficient Word Embeddings inspired by Quantum Entanglement](https://arxiv.org/abs/1911.04975). - [word2ket](#word2ket) - [Installation](#installation) - [Dependencies](#dependencies) - [Install word2ket](#install-word2ket) - [Getting Started](#getting-started) - [Running examples](#running-examples) - [Dependencies](#dependencies-1) | 3,247 |
pandigreat/DELF | ['image retrieval'] | ['Large-Scale Image Retrieval with Attentive Deep Local Features'] | src/test_resnet.py src/train_resnet.py test.py attention_train.py src/utils.py BasicAttentionBlock make_model_with_attention get make_model get_args load_test_data logger Crop_data Crop_data_mul load_train_data load_test_img GetBatchData getIgnore shuffle_data load_train_img get_acc init_logger Image2numpy load make_model BasicAttentionBlock parameters load_state_dict Linear range parse_args add_argument ArgumentParser resnet50 Linear parameters append array range len setFormatter remove getLogger addHandler INFO StreamHandler Formatter setLevel exists mknod FileHandler info int close open list load_train_data resize append keys open load_test_data list resize append keys open next write open range len rotate append randint crop range argmax range | ##This is the replication of delf The site of the paper https://arxiv.org/pdf/1612.06321.pdf Large-Scale Image retrieval with Attentive Deep Local Features | 3,248 |
pangeo-data/WeatherBench | ['weather forecasting'] | ['WeatherBench: A benchmark dataset for data-driven weather forecasting'] | src/download.py scripts/download_tigge.py src/train_nn.py src/extract_level.py src/add_lat_lon_2d.py src/score.py src/regrid.py main convert_z_to_orography main add_2d main download_years_separately download_single_file extract main main regrid load_test_data compute_weighted_acc compute_weighted_mae evaluate_iterative_forecast compute_weighted_rmse DataGenerator build_cnn create_predictions create_iterative_predictions PeriodicConv2D create_cnn main limit_mem PeriodicPadding2D ECMWFDataServer join list retrieve zfill range makedirs expand_dims transpose rename z convert_z_to_orography sorted move glob print close to_netcdf add_2d drop update retrieve print Client download_single_file download_years_separately download_single_file sel extract open_dataset split update time attrs concat astype isel Regridder rename append Dataset range len tqdm regrid drop cos deg2rad mean sqrt lat lat time cos deg2rad mean sqrt intersect1d sel sum mean cos deg2rad lat int time lead_time func sel append timedelta64 ConfigProto Session Input elu zip items list predict_generator DataArray append values len items list arange values DataArray lead_time append array range predict len Model Input zip str load_test_data DataGenerator build_cnn fit Adam save_weights summary sel limit_mem open_mfdataset compile merge |  # WeatherBench: A benchmark dataset for data-driven weather forecasting [](https://binder.pangeo.io/v2/gh/pangeo-data/WeatherBench/master?filepath=quickstart.ipynb) If you are using this dataset please cite > Stephan Rasp, Peter D. Dueben, Sebastian Scher, Jonathan A. Weyn, Soukayna Mouatadid, and Nils Thuerey, 2020. > WeatherBench: A benchmark dataset for data-driven weather forecasting. > arXiv: [https://arxiv.org/abs/2002.00469](https://arxiv.org/abs/2002.00469) This repository contains all the code for downloding and processing the data as well as code for the baseline models in the paper. | 3,249 |
paninski-lab/funimag | ['denoising'] | ['Penalized matrix decomposition for denoising, compression, and improved demixing of functional imaging data'] | funimag/overlap_graph.py funimag/overlap_reduction.py funimag/plots/util_plot.py setup.py funimag/plots/mpdf_data.py funimag/plots/mpdf_plot.py funimag/utils.py funimag/superpixel_analysis.py component_idx rx_graph neigh_components rank_tile cx_blocks rx_neigh rx_blocks trim_component_group component_test compression_rdx one_rank_update find_temporal_component rx_graph_adjacent_neighbors difference_operator update_AC_l2_Y spatial_sum_plot threshold_data make_mask vcorrcoef local_correlations_fft extract_pure_and_superpixels resize update_AC_bg_l2_Y match_comp_projection spatial_temporal_ini spatial_match_projection_plot order_superpixels l1_tf ls_solve_acc show_img match_comp_gt match_comp sim_noise spatial_comp_plot ls_solve_ac_Y spatial_compare_nmf_plot vcorrcoef2 pure_superpixel_single_plot spatial_compare_nmf_gt_plot delete_comp demix_whole_data noise_estimator merge_components_Y update_AC_l2 reconstruct vanilla_nmf_lasso fast_sep_nmf temporal_compare_plot superpixel_single_plot mean_psd merge_components ls_solve_ac temporal_compare_nmf_plot prepare_iteration find_superpixel_3d pure_superpixel_corr_compare_plot nnls_L0 corr_plot find_superpixel demix search_superpixel_in_range spatial_sum_plot_single update_AC_bg_l2 vanilla_nmf_multi_lasso temporal_comp_plot ls_solve_acc_Y spatial_compare_single_plot vcorrcoef_Y get_noise_fft mean_psd noise_level extract_frame box_lim plot_datain trace_extract trace_characteristics pdf_write local_correlations_fft spatial_filter_spixel_plot cn_ranks_dx_plot plot_spatial_component corr superpixel_component show_img comparison_plot colorbar comparison_metric cn_ranks_sum_plot plot_comp intialization_plot snr_per_frame digits extract_superpixels plot_temporal_traces nearest_frame_corr correlation_traces correlation_pnr superpixel_plotpixel sum append concatenate int zeros zip T arange shape repeat nan zeros arange reshape shape repeat nan zeros zeros astype range unique int hstack cx_blocks rx_neigh vstack zeros sum T setdiff1d dot shape flatten abs skewtest find_temporal_component skewtest T arange setdiff1d component_test inv astype argsort shape sqrt dot floor enumerate sum max diag flatnonzero len int insert sort append prod range rx_graph T setdiff1d arange dot append trim_component_group print neigh_components isnan rank_tile any rx_graph_adjacent_neighbors difference_operator enumerate len isfortran convolve inf ones tuple transpose hstack astype copy filter2D mean array std enumerate exp divide mean sqrt median log sum rfft arange concatenate reshape logical_and mean_psd append abs fliplr median range shape zeros abs clip add_edges_from list connected_components permutation concatenate Graph reshape transpose multiply where mean shape prod zip zeros std int add_edges_from list connected_components permutation concatenate Graph reshape transpose multiply where mean shape prod zip zeros std T reshape TruncatedSVD mean shape components_ NMF prod zeros fit_transform mean mean reshape sum sqrt asarray sort unique zeros range len T maximum copy matmul sqrt append zeros sum array range rankdata max list time std median print reshape argsort shape sqrt zeros sum prod len T maximum matmul zeros range diag T maximum matmul zeros range diag minimum int ones reshape print maximum shape unique label range zeros vcorrcoef delete where str list ones spatial_comp_plot matmul triu sum fit_transform csc_matrix add_edges_from asarray concatenate Graph hstack copy mean unique zip NMF T connected_components toarray print reshape dot zeros print str spatial_comp_plot delete arange make_mask vcorrcoef max str ones delete_comp sum range sqrt merge_components T time isinstance print reshape maximum argsort zeros arange make_mask vcorrcoef max str ones delete_comp sum range hstack mean sqrt merge_components T time isinstance print reshape maximum argsort zeros shape reshape rankdata list argsort zeros max len norm Minimize Problem print Variable size solve spatial_sum_plot threshold_data local_correlations_fft where delete update_AC_bg_l2 spatial_temporal_ini order_superpixels show str subplot show_img set_fontsize ceil append range noise_estimator asarray update_AC_l2 reconstruct fast_sep_nmf hstack copy set set_fontweight unique int time T prepare_iteration find_superpixel_3d print reshape sort min maximum find_superpixel search_superpixel_in_range figure pure_superpixel_corr_compare_plot threshold_data local_correlations_fft where spatial_temporal_ini order_superpixels ceil range asarray fast_sep_nmf hstack unique int prepare_iteration find_superpixel_3d print reshape sort min find_superpixel search_superpixel_in_range pure_superpixel_corr_compare_plot int T asarray vcorrcoef2 nan zeros range int T asarray vcorrcoef2 nan zeros range int T asarray reshape vcorrcoef2 nan zeros range new_horizontal MaxNLocator make_axes_locatable update_ticks set_yticks add_subplot axis colorbar tight_layout add_axes imshow set_xticks figure tick_params subplot set_fontsize text set_yticks maximum where set imshow set_fontweight set_xticks figure range len subplot set_fontsize reshape text maximum copy where set shape imshow set_fontweight tight_layout figure prod range len show subplot show_img set_fontsize text reshape maximum where set copy imshow set_fontweight shape tight_layout figure prod range len imshow colorbar append_axes make_axes_locatable show subplot arange plot xlabel ylabel tight_layout title figure tick_params range show subplot str show_img arange set_fontsize reshape maximum ylabel set tight_layout imshow title set_fontweight figure range show subplot arange set_fontsize reshape text maximum tight_layout set imshow set_fontweight figure range show subplot arange set_fontsize reshape text maximum tight_layout set imshow set_fontweight figure range subplot xlabel reshape ylabel tight_layout imshow title figure sum max range show subplot append_axes make_axes_locatable reshape axis tight_layout colorbar imshow figure tick_params show subplot reshape axis tight_layout imshow title figure tick_params range show subplot reshape axis maximum tight_layout imshow title figure tick_params range show subplot plot xlabel ylabel tight_layout title figure legend tick_params range show subplot plot xlabel ylabel tight_layout title figure legend tick_params range rand abs max coef_ matmul vcorrcoef2 sum prod range copy mean sqrt Lasso T norm print reshape intercept_ maximum argsort zeros fit nnls ravel print append arange rand abs identity matmul sum range noise_estimator setdiff1d mean sqrt Lasso T norm print nnls_L0 reshape dot zeros seed reshape shape randint prod mean T maximum matmul zeros range diag T maximum matmul zeros range diag delete where str list ones spatial_comp_plot matmul triu sum fit_transform csc_matrix add_edges_from asarray concatenate Graph hstack copy mean unique zip NMF T connected_components toarray print reshape dot zeros vcorrcoef_Y arange make_mask max str ones delete_comp sum range merge_components_Y mean sqrt time T isinstance print reshape maximum argsort zeros vcorrcoef_Y arange make_mask max str ones delete_comp sum range merge_components_Y hstack mean sqrt time T isinstance print reshape maximum argsort zeros vcorrcoef_Y spatial_sum_plot threshold_data local_correlations_fft where update_AC_bg_l2_Y spatial_temporal_ini order_superpixels show str subplot show_img set_fontsize ceil append prod range noise_estimator asarray reconstruct fast_sep_nmf hstack copy set set_fontweight unique int time T prepare_iteration find_superpixel_3d print reshape sort min maximum find_superpixel search_superpixel_in_range figure pure_superpixel_corr_compare_plot update_AC_l2_Y mean shape ndim reshape sum rfft arange concatenate reshape logical_and mean_psd append abs fliplr set_yticks min margins set_xmargin get_ylim legend max min max min max arange cn_ranks_plot linspace max trace_characteristics str show_img set_title set_xlabel superpixel_plotpixel comparison_plot shape scatter box_lim plot minimum extract_superpixels set_yticks min maximum add_patch set_xticks Rectangle trace_extract len GridSpecFromSubplotSpec set_xticklabels set_yticklabels add_subplot close GridSpec Subplot set_xticks savefig figure set_ticks_position plot_datain append PdfPages range append_axes make_axes_locatable axes min set_ticks get_clim set_ticks_position figure linspace set_ticklabels round max subplot set_title close shape savefig figure linspace round max var noise_level print min local_correlations_fft shape correlation_pnr zeros std subplots set_yticklabels max show show_img list set_title map colorbar shape savefig append comparison_metric set_xticklabels astype tight_layout close enumerate set_yticks min set_xticks len int asarray threshold_data reshape fast_sep_nmf min hstack where find_superpixel search_superpixel_in_range unique ceil spatial_temporal_ini range reshape text add_subplot maximum where shape imshow figure prod range len threshold_data find_superpixel noise_level local_correlations_fft divide mean max cn_ranks_sum show_img show str asarray subplots min dict cn_ranks_plot savefig enumerate show show_img list subplots set_title print reshape zip show asarray plot title figure legend enumerate plot_comp range flatten zeros corr range show plot min close nearest_frame_corr title ylim savefig figure legend max append sum comparison_plot show T subplots set_title arange make_axes_locatable append_axes set_yticks tight_layout colorbar imshow set_xticks correlation_pnr show var show_img subplots set_title transpose local_correlations_fft divide tight_layout sqrt median_filter max | Functional Imaging Compression, Denoising and Demixing ====================================================== We introduce a pipeline to compress, denoise, and demix* several types of functional imaging recordings including: * Calcium Imaging (1p, 2p, 3p) * Voltage Imaging (1p) * Widefield Installation ------------ After installing the dependencies, install from the master branch as: | 3,250 |
paniquex/msu_mmp_research | ['speech recognition', 'speaker recognition', 'speaker separation', 'speech enhancement'] | ['VoiceFilter: Targeted Voice Separation by Speaker-Conditioned Spectrogram Masking'] | DCASE_research/challenge2019/task2(Audio_tagging)/config.py DCASE_research/challenge2019/task2(Audio_tagging)/metrics.py DCASE_research/challenge2019/task2(Audio_tagging)/preprocessing.py DCASE_research/challenge2019/task2(Audio_tagging)/logger.py DCASE_research/challenge2019/task2(Audio_tagging)/model.py DCASE_research/challenge2019/task2(Audio_tagging)/dataset.py DCASE_research/challenge2019/task2(Audio_tagging)/run_experiment.py Config TestDataset TrainDataset _one_sample_positive_class_precisions calculate_per_class_lwlrap MainModel ConvBlock SimpleModel Audio_preprocessor train_model main predict_model list cumsum astype zeros float range flatnonzero maximum shape _one_sample_positive_class_precisions zeros float sum range batch_size MainModel zero_grad DataLoader t_max save cuda Adam train_test_split sum test_batch_size range state_dict TrainDataset close eval lr calculate_per_class_lwlrap CosineAnnealingLR num_epochs net zeros time criterion backward print empty_cache train step eta_min add_scalar load TestDataset DataFrame MainModel extend sigmoid mean DataLoader eval load_state_dict append numpy cuda detach Config train_model seed_torch SummaryWriter predict_model num_classes print concat tolist astype to_csv index shape split head read_csv values enumerate | paniquex/msu_mmp_research | 3,251 |
papercup-open-source/phonological-features | ['speech synthesis'] | ['Phonological Features for 0-shot Multilingual Speech Synthesis'] | combilex-english-phonemes-to-IPA-mapping.py maryTTS-german-phonemes-to-IPA-mapping.py IPA-to-phonefeats-mapping.py | # phonological-features Materials accompanying the paper ["Phonological features for 0-shot multilingual speech synthesis"](https://arxiv.org/abs/2008.04107) (Staib et al. 2020, INTERSPEECH): * Mapping table from IPA to phonoligical features (`ipa-to-phonefeats-mapping.py`, python dictionary derived from of [www.ipachart.com](www.ipachart.com)) * Mapping tables from [combilex](http://homepages.inf.ed.ac.uk/korin/sitenew/Research/Combilex/index.html) and the [German MaryTTS lexicon](https://github.com/marytts/marytts-lexicon-de/blob/master/modules/de/lexicon/de.txt) to IPA (`combilex-english-phonemes-to-IPA-mapping.py`, `maryTTS-german-phonemes-to-IPA-mapping.py`) | 3,252 |
papermsucode/advhat | ['adversarial attack'] | ['AdvHat: Real-world adversarial attack on ArcFace Face ID system'] | Demo/align/detect_face.py Attack/attack.py Attack/cos_mx.py Demo/demo.py Demo/dumping.py Attack/stn.py Attack/cos_tf.py Attack/utils.py Demo/alignment.py Attack/face_preparation.py main prep parse_arguments main prep parse_arguments main prep parse_arguments main preprocess parse_arguments affine_grid_generator get_pixel_value spatial_transformer_network bilinear_sampler TVloss projector tf_pre_parabol tf_integral main to_rgb preprocess parse_arguments main preprocess parse_arguments main parse_arguments nms bulk_detect_face ONet Network imresample bbreg detect_face_force detect_face pad create_mtcnn rerec RNet layer generateBoundingBox PNet arange gradients gen_random sign rescale init_logo init_face image clip_by_value abs Session clip run str list ones multiply transpose len placeholder reduce_sum Imgen gen_fixed savefig append imread stn expand_dims range imsave get_tensor_by_name TVloss LR plot hstack mean time prep print now float32 tqdm anchor_face projector zeros import_graph_def fit add_argument ArgumentParser sum set_params uint8 Module bind load_checkpoint model astype DataBatch forward face1 face2 warpAffine SimilarityTransform astype float32 estimate array T min mask detect_face preprocess create_mtcnn reshape affine_grid_generator bilinear_sampler reshape shape stack tile range ones_like reshape matmul stack cast linspace tile meshgrid expand_dims cast clip_by_value floor add_n zeros expand_dims get_pixel_value abs tf_integral arange cumsum concat cos pi clip_by_value round transpose pad gather_nd cast sin expand_dims range stack tile constant float32 tf_pre_parabol int32 constant square reduce_sum sqrt pad shape empty vstack output_dir input_dir argmax sorted to_rgb mkdir power listdir join makedirs VideoCapture FONT_HERSHEY_SIMPLEX max round release destroyAllWindows waitKey imshow centroids set flip load read reshape putText dot rectangle initializer save open mx ceil close sqrt batch int write array asnumpy ImageIter realpath split 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 nms transpose imresample hstack rnet copy where bbreg astype pad onet int32 tile rerec zeros range where vstack pnet nms transpose pad ceil append imresample range hstack astype copy bbreg tile generateBoundingBox power empty zeros enumerate minimum int rnet onet int32 rerec amin len reshape transpose vstack transpose hstack where fix flipud vstack empty argsort maximum zeros_like minimum ones astype where int32 expand_dims transpose maximum tile resize | # AdvHat: Real-world adversarial attack on ArcFace Face ID system By Stepan Komkov and Aleksandr Petiushko This is the code repository for the AdvHat research article. The article is available [here](https://arxiv.org/abs/1908.08705). The video demo is available [here](https://youtu.be/a4iNg0wWBsQ). Code that is used for the article is available right here. ## Abstract We propose a novel easily reproducible technique to attack the best public Face ID system ArcFace in different shooting conditions. To create an attack, we print the rectangular paper sticker on a common color printer and put it on the hat. The adversarial sticker is prepared with a novel algorithm for off-plane transformations of the image which imitates sticker location on the hat. Such an approach confuses the state-of-the-art public Face ID model LResNet100E-IR, ArcFace@ms1m-refine-v2 and is transferable to other Face ID models. ## The repository The repository is organized as follows: * In the Attack directory, you can find code and instructions on how to reproduce an attack for your images. * In the Demo directory, you can find a demo script which can help you to verify the robustness of the prepared attack to the real-world shooting conditions. ## Built With | 3,253 |
parasgulati8/Neural-Style-Transfer | ['style transfer'] | ['A Neural Algorithm of Artistic Style'] | nst_utils.py generate_noise_image reshape_and_normalize_image save_image CONFIG load_vgg_model reshape _conv2d_relu Variable zeros _avgpool loadmat astype reshape MEANS shape MEANS imsave astype | # Neural Style Transfer This project is an implementation of NST algorithm that generates artistic images. ## 1 - Problem Statement Neural Style Transfer (NST) is one of the most fun techniques in deep learning. As seen below, it merges two images, namely, a "content" image (C) and a "style" image (S), to create a "generated" image (G). The generated image G combines the "content" of the image C with the "style" of image S.  ## 2 - Transfer Learning Neural Style Transfer (NST) uses a previously trained convolutional network, and builds on top of that. Following the original NST paper (https://arxiv.org/abs/1508.06576), we used the VGG-199 network. This model has already been trained on the very large ImageNet database, and thus has learned to recognize a variety of low level features (at the earlier layers) and high level features (at the deeper layers). ## 3 - Neural Style Transfer NST algorithm is build in three steps: | 3,254 |
parisGPB/Neural-Style-Transfer | ['style transfer'] | ['A Neural Algorithm of Artistic Style', 'Exploring the structure of a real-time, arbitrary neural artistic stylization network', 'Preserving Color in Neural Artistic Style Transfer', 'Improving the Neural Algorithm of Artistic Style'] | Results/Network_modified.py | # STYLE TRANSFER - DLAI TEAM #5 This project is carried out by ETSETB students for the Deep Learning for Artificial Intelligence course. The team is formed by Clara Rendé, Cristian Cuadrado, Marc Hernandez and Guillem París. Our [notebook](https://telecombcn-dl.github.io/2018-dlai-team5/) The workload has been divided as follows: - Basic and Improved NST notebook implementations by Clara and Guillem. - Google Cloud Platform set up and management by Marc. - Github notebook and management by Clara and Guillem. - Research on the state-of-the-art techniques by Cristian. - Tests and analysis by Marc and Cristian. - Presentation by Clara and Guillem | 3,255 |
paroj/pose_calib | ['camera calibration'] | ['Efficient Pose Selection for Interactive Camera Calibration', 'calibDB: enabling web based computer vision through on-the-fly camera calibration'] | distvis.py posegen.py pose_calib.py ui.py render.py utils.py loc_from_dist get_diff_heatmap make_distort_map sparse_undistort_map get_bounds pose_from_bounds pose_planar_fullscreen gen_bin oribital_pose unproject PoseGeneratorDist main UVCVideoCapture add_camera_controls project_img BoardPreview debug_jaccard UserGuidance Jc2J Calibrator index_of_dispersion compute_state_cov compute_pose_var ChArucoDetector mean_extr_var estimate_pt_std calibrateCamera argmax boundingRect reshape astype undistortPoints float32 undistortPoints reshape transpose astype float32 zeros T NORM_MINMAX applyColorMap normalize COLORMAP_JET norm T reshape NORM_MINMAX get_bounds normalize pop append ravel dot eye dot min array unproject copy dot unproject ravel array clip manual_focus namedWindow CAP_PROP_FOCUS CAP_PROP_EXPOSURE set manual_exposure createTrackbar WINDOW_AUTOSIZE WINDOW_GUI_NORMAL config VideoCapture string ArgumentParser ChArucoDetector outfile add_camera_controls waitKey imshow real parse_args update format converged copy detect user_info_text CAP_IMAGES empty read namedWindow print add_argument draw write UserGuidance displayOverlay FILE_STORAGE_READ UVCVideoCapture FileStorage dot T imshow copy range copy len zeros sum enumerate var empty array ravel CALIB_FIX_K2 Jc2J CALIB_FIX_K1 CALIB_FIX_K3 extend dot array range len append compute_state_cov array | Abstract ======== The choice of poses for camera calibration with planar patterns is only rarely considered - yet the calibration precision heavily depends on it. This work presents a pose selection method that finds a compact and robust set of calibration poses and is suitable for interactive calibration. Consequently, singular poses that would lead to an unreliable solution are avoided explicitly, while poses reducing the uncertainty of the calibration are favoured. For this, we use uncertainty propagation. Our method takes advantage of a self-identifying calibration pattern to track the camera pose in real-time. This allows to iteratively guide the user to the target poses, until the desired quality level is reached. Therefore, only a sparse set of key-frames is needed for calibration. The method is evaluated on separate training and testing sets, as well as on synthetic data. Our approach performs better than comparable solutions while requiring 30% less calibration frames. [arXiv](https://arxiv.org/abs/1907.04096) Citing ====== If you use this application for scientific work, please consider citing us as ``` @inproceedings{rojtberg2018, author={P. Rojtberg and A. Kuijper}, booktitle={2018 IEEE International Symposium on Mixed and Augmented Reality (ISMAR)}, | 3,256 |
parshwa1999/PeR-ViS | ['person retrieval', 'instance segmentation', 'semantic segmentation', 'human detection'] | ['PeR-ViS: Person Retrieval in Video Surveillance using Semantic Description'] | PeR-ViS WACVw 2021/custom_layers/__init__.py PeR-ViS WACVw 2021/custom_layers/googlenet_custom_layers.py PeR-ViS WACVw 2021/utils.py PeR-ViS Track Unpublished/VideoMaker.py PeR-ViS WACVw 2021/modalities/HeightEstimation.py PeR-ViS WACVw 2021/coco.py PeR-ViS WACVw 2021/DenseGender.py PeR-ViS WACVw 2021/DenseColor.py PeR-ViS WACVw 2021/model.py PeR-ViS WACVw 2021/PersonFilter.py PeR-ViS WACVw 2021/custom_layers/scale_layer.py PeR-ViS WACVw 2021/parallel_model.py PeR-ViS WACVw 2021/config.py PeR-ViS WACVw 2021/Video_demo_person_identification.py CocoConfig Config conv_block transition_block DenseNet dense_block conv_block transition_block DenseNet dense_block fpn_classifier_graph MaskRCNN compose_image_meta rpn_bbox_loss_graph norm_boxes_graph compute_backbone_shapes rpn_class_loss_graph log DetectionTargetLayer trim_zeros_graph log2_graph parse_image_meta parse_image_meta_graph data_generator rpn_graph identity_block BatchNorm build_fpn_mask_graph load_image_gt build_rpn_targets resnet_graph unmold_image PyramidROIAlign apply_box_deltas_graph denorm_boxes_graph generate_random_rois detection_targets_graph build_detection_targets overlaps_graph mrcnn_bbox_loss_graph conv_block batch_pack_graph ProposalLayer smooth_l1_loss clip_boxes_graph mrcnn_class_loss_graph mrcnn_mask_loss_graph mold_image build_rpn_model DetectionLayer refine_detections_graph ParallelModel build_model gender_classification torso_mask_coordinates height_estimation color_classification color_filter height_filter person_identification compute_ap norm_boxes compute_recall apply_box_deltas compute_overlaps compute_iou resize_image box_refinement_graph generate_pyramid_anchors mold_mask generate_anchors compute_ap_range compute_overlaps_masks denorm_boxes unmold_mask download_trained_weights non_max_suppression minimize_mask resize_mask extract_bboxes trim_zeros compute_matches batch_slice expand_mask box_refinement Dataset InferenceConfig PoolHelper LRN Scale head_feet_points variables main undistortion height_calculation array int transition_block Model load_weights dense_block Input range str str conv_block range concatenate ljust print BACKBONE callable str conv_block identity_block range stack minimum concat maximum set_shape split minimum reshape maximum tile expand_dims split concat reduce_max boolean_mask MASK_SHAPE crop_and_resize gather box_refinement_graph round trim_zeros_graph ROI_POSITIVE_RATIO transpose squeeze pad cast expand_dims range USE_MINI_MASK overlaps_graph cond int TRAIN_ROIS_PER_IMAGE float32 greater maximum int32 split minimum apply_box_deltas_graph reshape clip_boxes_graph concat gather map_fn DETECTION_MAX_INSTANCES stack gather_nd DETECTION_MIN_CONFIDENCE pad set_intersection expand_dims argmax BBOX_STD_DEV Input rpn_graph int_shape less abs cast switch constant not_equal squeeze where mean sparse_categorical_crossentropy gather_nd cast int32 equal IMAGES_PER_GPU batch_pack_graph switch constant smooth_l1_loss squeeze where mean gather_nd cast int32 sum equal reduce_sum sparse_softmax_cross_entropy_with_logits cast gather argmax switch constant reshape smooth_l1_loss mean int64 stack cast gather_nd gather switch constant reshape transpose mean shape int64 stack cast gather_nd gather binary_crossentropy uint8 minimize_mask compose_image_meta extract_bboxes load_mask zeros astype randint resize_image shape warning resize_mask MINI_MASK_SHAPE load_image bool fliplr augment_image to_deterministic int ROI_POSITIVE_RATIO concatenate resize astype TRAIN_ROIS_PER_IMAGE compute_iou choice MASK_SHAPE int32 box_refinement USE_MINI_MASK zeros argmax range sum zip ones compute_overlaps choice RPN_TRAIN_ANCHORS_PER_IMAGE zeros argmax amax len int sort min hstack randint zeros max range split image_ids arange IMAGE_SHAPE compute_backbone_shapes RPN_ANCHOR_RATIOS generate_pyramid_anchors BACKBONE_STRIDES MAX_GT_INSTANCES shape expand_dims load_image_gt build_rpn_targets astype shuffle copy choice generate_random_rois build_detection_targets RPN_ANCHOR_SCALES mold_image RPN_ANCHOR_STRIDE float32 extend zeros len list array boolean_mask reduce_sum cast bool abs append range constant concat float32 cast split constant concat float32 cast split reset_default_graph Input int min max main int append str sorted imwrite torso_mask_coordinates print astype float32 expand_dims argsort resize imread listdir predict print str sorted imwrite astype float32 expand_dims resize imread listdir predict str gender_classification imwrite print putText height_estimation color_classification FONT_HERSHEY_SIMPLEX write height_filter rectangle color_filter append range zeros array range minimum maximum zeros range compute_iou T astype float32 dot sum astype delete float32 compute_iou append astype float32 stack cast float32 log astype float32 log dtype min pad resize randint max pad astype resize zeros bool range astype resize zeros bool range zeros bool astype resize arange concatenate reshape flatten sqrt meshgrid array append generate_anchors range len ones trim_zeros compute_overlaps_masks range len arange concatenate cumsum compute_matches astype float32 maximum sum range len compute_ap format print mean append compute_overlaps set argmax max len list graph_fn zip append range len print array array asarray asmatrix transpose hstack inv squeeze dot true_divide variables undistortion dot matrix cos sin sqrt head_feet_points height_calculation | # PeR-ViS: Person Retrieval in Video Surveillance using Semantic Description IEEE/CVF WACVw 2021 Implementation of our [IEEE/CVF WACVw 2021](http://wacv2021.thecvf.com/) paper ["PeR-ViS: Person Retrieval in Video Surveillance using Semantic Description"](https://arxiv.org/abs/2012.02408). If you find this code useful in your research, consider citing: ```@InProceedings{Shah_2021_WACV, author = {Shah, Parshwa and Garg, Arpit and Gajjar, Vandit}, title = {PeR-ViS: Person Retrieval in Video Surveillance Using Semantic Description}, booktitle = {Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (WACV) Workshops}, month = {January}, year = {2021}, pages = {41-50} ``` | 3,257 |
pascalxia/driver_attention_prediction | ['autonomous driving'] | ['Predicting Driver Attention in Critical Situations'] | lstm_prediction.py gaussian_smooth.py train_lstm.py parse_videos.py BatchDatasetReader.py train.py write_tfrecords_for_inference.py write_tfrecords.py add_args.py infer.py visualization_prediction.py make_feature_map_alexnet.py ut.py make_feature_maps.py lstm_full_prediction.py lstm_prediction_evaluation.py networks.py data_point_collector_tests.py predict.py data_point_collector.py my_squeezenet.py my_vgg19.py my_alexnet.py for_evaluation for_lstm for_training add_args for_inference for_visualization for_general for_feature for_full BatchDataset read_datasets get_data_point_names seperate_long_seqs crop_long_seqs write_dummy_files run_tests test_group_assignment clear_old_files leftpad GaussianSmooth main input_fn model_fn main input_fn model_fn AlexNet conv SqueezeNet fire_module VGG19 vgg_encoder alex_encoder big_conv_lstm_readout_net xception_encoder readout_big conv_lstm_readout_net readout_net_BDD readout_bn lstm_readout_net squeeze_encoder lstm_readout_net_old readout_net main parse_videos main input_fn model_fn main input_fn model_fn add_args_for_feature normalize_maps add_args_for_general set_losses add_args_for_inference normalize_map resize_distribution add_args_for_lstm make_summaries add_args_for_evaluation parse_for_general add_args add_args_for_visualization resize_feature_map make_turing_moive parse_for_feature add_args_for_training add_args_for_full make_moive prep_gazemaps_for_visual make_frame_for_heatmap _int64_feature _bytes_feature _int64_feature _bytes_feature add_argument add_args add_args add_args add_args add_args add_args add_args add_args print join get_data_point_names join list str int setdefault print sort seperate_long_seqs append values len append append list range len print str test_group_assignment write_dummy_files list print get_data_point_names clear_old_files dict zip range len str str close leftpad range open endswith join remove listdir int big_conv_lstm_readout_net reshape float32 cast softmax tile TFRecordDataset join padded_batch data_dir list_files shuffle map apply parallel_interleave repeat prefetch model_dir ArgumentParser for_feature str RunConfig Estimator model_iteration parse_args imsave predict for_inference for_evaluation for_lstm join isdir print reshape zfill gazemap_size for_general makedirs clear_session save data_dir feature_name concat convolve split local_response_normalization relu Variable max_pool conv str concatenate _obtain_input_shape get_file fire_module get_source_inputs warn Model load_weights convert_all_kernels_in_model Input _obtain_input_shape get_file get_source_inputs warn Model load_weights convert_all_kernels_in_model get_layer convert_dense_weights_data_format Input print Model Xception output print VGG19 Model concatenate print SqueezeNet Model output constant ones reshape astype maximum float32 matmul add shape log constant ones reshape astype maximum float32 matmul add shape log constant ones reshape astype maximum float32 matmul add shape log constant ones reshape astype maximum float32 matmul add shape pad log constant ones reshape astype maximum float32 matmul add shape log int constant ones reshape astype maximum float32 matmul add shape log int constant ones reshape astype maximum float32 matmul add shape log int constant ones reshape astype maximum float32 matmul add shape log join list arange imwrite print transform_fn len astype zfill tqdm get_data isfile range get_reader makedirs parse_videos image_dir video_dir n_future_steps feature_name boolean_mask image multiply reduce_sum append softmax_cross_entropy SummarySaverHook get_or_create_global_step is_finite mean sqrt merge minimize maximum AdamOptimizer reduce_mean pow scalar for_training copyfile epochs_before_validation range close float train_epochs evaluate rmtree train add_args tuple add_args add_args tuple add_args add_args add_args add_args add_args reshape reduce_max image histogram append reduce_min scalar merge softmax_cross_entropy_with_logits constant arange sigmoid_cross_entropy_with_logits reshape multiply sparsity_weight maximum reduce_sum square sqrt reduce_mean meshgrid epsilon imresize size shape zeros sum range len ones size astype shape sum astype expand_dims ImageSequenceClip to_mask set_mask float CompositeVideoClip gaussian_filter meshgrid astype linspace concatenate append imresize clear int astype axis imshow max subplots duration blackwhite subplots_adjust VideoClip set_opacity ImageSequenceClip fx CompositeVideoClip max heatmap_alpha | # Driver Attention Prediction Model ## Downloading Dataset: The Berkeley DeepDrive Attention dataset can be downloaded here: https://bdd-data.berkeley.edu/. Click on the "Download Dataset" to get to the user portal and then you will find the BDD-Attention dataset listed together with other Berkeley DeepDrive video datasets. ## Project Introduction: This project accompanies the paper **_Predicting Driver Attention in Critical Situations_** (https://arxiv.org/abs/1711.06406) ## Demo:  ### Video demos <a href="http://www.youtube.com/watch?feature=player_embedded&v=IcAtJ0CvYuQ" target="_blank"> <img src="http://img.youtube.com/vi/IcAtJ0CvYuQ/0.jpg" alt="Video demo cover" width="480" height="270" border="10" /> | 3,258 |
passerby233/VSCMR-Visual-Storytelling-with-Corss-Modal-Rules | ['visual storytelling', 'story generation'] | ['Informative Visual Storytelling with Cross-modal Rules'] | vist_eval/bleu/bleu_scorer.py rule_mining/get_rules.py models/BaseModel_back.py vist_eval/album_eval.py rule_mining/fpgrowth_py3.py scripts/preprocess_ngrams.py vist_eval/cider/cider_scorer.py vist_eval/stimgids_eval.py log_utils.py opts.py vist_eval/__init__.py rule_mining/utils.py rule_mining/config.py train.py vist_api/vist.py models/model_utils.py vist_eval/rouge/rouge.py vist_eval/bleu/__init__.py dataset.py models/__init__.py vist_api/test/test.py models/BaseModel.py models/RewardModel.py criterion.py vist_eval/cider/cider.py rule_mining/test.py scripts/extract_feature_max.py rule_mining/detector.py vist_api/download.py vist_eval/tokenizer/__init__.py rule_mining/extract_semantics.py vist_eval/rouge/__init__.py repetition.py vist_eval/tokenizer/ptbtokenizer.py vist_eval/meteor/meteor.py eval_utils.py rule_mining/create_transactions.py vist_eval/bleu/bleu.py vist_eval/meteor/__init__.py vist_eval/cider/__init__.py LanguageModelCriterion ReinforceCriterion to_contiguous VISTDataset Evaluator CocoResFormat TensorBoard Logger parse_opt rep_eval inter_rep intra_rep main tokenize split setup_optimizer train setup_seed test BaseModel BaseModel AttentionLayer _smallest VisualEncoder from_numpy RewardModel setup TextProcesser get_txtdata create_transactions VsDetector extract_semantics main test_semantic_result get_partial_dict FPNode adaptive_convert_to_patterns Route FPTree debug show_freqset convert_to_patterns trace rec_sort main main generate_association_rules adaptive_generate_association_rules split_sentence save_dict_npz load_npz_dict printn plt_texts save_json load_json main MyResnet precook build_dict create_crefs cook_refs compute_doc_freq list_files Story_in_Sequence Description_in_Isolation AlbumEvaluator StimgidsEvaluator Bleu precook BleuScorer cook_test cook_refs Cider precook CiderScorer cook_test cook_refs Meteor my_lcs Rouge PTBTokenizer is_contiguous parse_args add_argument reward_type ArgumentParser join enumerate append join enumerate tuple add set append sum range len clear tuple add append sum range len inter_rep print intra_rep load_json split rep_eval manual_seed load join format learning_rate Adadelta info error Adam RMSprop SGD resume_from load_state_dict isfile optim model zero_grad reward_type ReinforceCriterion epoch_start VISTDataset DataLoader Logger cuda set_lr get_story_length setup metric load_state_dict log_checkpoint grad_clip range setup_optimizer val scheduled_sampling_increase_prob rl_crit format max_epochs synchronize Evaluator scheduled_sampling_increase_every setup_seed info sample rl_weight clip_grad_norm scheduled_sampling_max_prob log_training enumerate load join get_vocab_size ss_prob time set_option learning_rate backward print eval_story log_dir min parameters LanguageModelCriterion scheduled_sampling_start step crit len get_vocab_size get_story_length test_story setup Evaluator VISTDataset DataLoader Logger cuda flatten load join format print error start_from_model resume_from load_state_dict info BaseModel RewardModel exists join defaultdict format tagged_words story_line_file print split_sentence txtdata_file dataset_path save_json load_json _get_tag append len lemmatize dataset_path printn exists sorted defaultdict list rule_data_path add format concatenate mean feature_dir join load items split_sentence savez sort TextProcesser array len defaultdict format savez rule_data_path printn append detect_id range printn Process list rule_data_path save_json append range update format astype load_npz_dict set start keys clear join int remove items len join list format items print rule_data_path join story_line_file rule_data_path printn extract_semantics load_json VsDetector print join str ArgumentParser str list sorted minsupc ceil parse_args printRoutes sortItems format debug save_dict_npz mine_frequent_itemsets root int printTree adaptive_convert_to_patterns FPTree add_argument sort enumerate print print combinations list sorted tuple set append float keys range len items list defaultdict print tuple add range len minconf load_npz_dict zfill adaptive_generate_association_rules append savez_compressed print text enumerate resnet152 cuda MyResnet savez_compressed basename transpose from_numpy imread concatenate glob Compose astype eval mkdir print extend resnet zeros numpy len defaultdict tuple split range len append cook_refs defaultdict set load join list tokens print create_crefs append compute_doc_freq values open execute get get items precook min append float sum max len items precook max range len | passerby233/VSCMR-Visual-Storytelling-with-Corss-Modal-Rules | 3,259 |
passeul/style-transfer-model-evaluation | ['style transfer'] | ['Evaluating Style Transfer for Text'] | code/style_transfer_intensity.py code/style_lexicon.py code/naturalness.py code/utils.py code/globals.py code/tokenizer.py code/content_preservation.py code/tradeoff_plots.py load_word2vec_model mark_style_words calculate_wmd_scores display_correlation_tables load_wmd_scores generate_style_modified_texts train_word2vec_model NeuralBasedClassifier convert_to_indices display_agreements generate_judgments format_inputs NaturalnessClassifier format_relative_judgments UnigramBasedClassifier extract_nonzero_weights extract_ranked_features train collect_style_features_and_weights load_lexicon fit_vectorizer select_feature_numbers extract_scores_for_style_class display_correlation_tables calculate_direction_corrected_emd calculate_emd load_style_distributions account_for_direction tokenize load_corpus_level_scores TradeoffPlotParameters plot_aspect_tradeoffs plot_best_fit_curve normalize_inverses get_val_as_str calculate_correlations merge_datasets compile_binary_dataset load_model save_model calculate_corpus_level_scores get_margin_of_error load_test_set load_turk_scores save_json load_dataset load_json invert_dict calculate_std_err_of_r load_train_set append join tokenize mark_style_words append tokenize Word2Vec save load init_sims wmdistance append tokenize range len get_val_as_str load calculate_correlations print transpose extend load_turk_scores item get_val_as_str append list split append convert_to_indices append int range len load print generate_judgments load_turk_scores format_relative_judgments round get_val_as_str len save_model CountVectorizer fit fit LogisticRegression append coef_ enumerate mean std enumerate select_feature_numbers extract_ranked_features enumerate load_json load ones len calculate_emd account_for_direction int concatenate calculate_direction_corrected_emd load_style_distributions append round range len reciprocal plot fit show list plot xlabel rc Line2D ylabel get_aspect_values ylim clf savefig legend zip append xlim plot_best_fit_curve extend merge_datasets concatenate compile_binary_dataset load_dataset compile_binary_dataset load_dataset dump calculate_std_err_of_r get_margin_of_error linregress len load mean get_val_as_str item | # style-transfer-model-evaluation This is the Python 3 companion codebase for the NAACL-HLT 2019 paper *Evaluating Style Transfer for Text*. 📁 **code** - metrics to evaluate outputs of examined style transfer models 📁 **data** - training and test datasets used in experiments 📁 **evaluations** - human and automated evaluations of style transfer model outputs 📁 **models** - miscellaneous models used for running experiments (not the style transfer models themselves) 📁 **style_lexicon** - words used to compile style lexicon used in evaluation of content preservation 📁 **transfer_model_outputs** - outputs of examined style transfer models Dependencies: gensim, keras, matplotlib, pyemd, scipy, sklearn | 3,260 |
pathak22/hierarchical-imitation | ['imitation learning'] | ['Third-Person Visual Imitation Learning via Decoupled Hierarchical Controller'] | pix2pix/data/unaligned_dataset.py pix2pix/util/visualizer.py run_on_robot.py pix2pix/util/html.py pix2pix/util/get_data.py pix2pix/models/cycle_gan_model.py pix2pix/models/pix2pix_model.py pix2pix/data/aligned_dataset.py dataloader.py pix2pix/options/test_options.py pix2pix/data/__init__.py pix2pix/models/test_model.py inverse_models.py utils.py pix2pix/datasets/combine_A_and_B.py controller_test.py pix2pix/__init__.py pix2pix/datasets/make_dataset_aligned.py pix2pix/models/networks.py pix2pix/options/train_options.py pix2pix/data/image_folder.py pix2pix/util/util.py pix2pix/options/base_options.py pix2pix/data/base_data_loader.py pix2pix/models/__init__.py pix2pix/data/single_dataset.py controller_train.py pix2pix/test.py pix2pix/util/image_pool.py pix2pix/models/base_model.py pix2pix/train.py pix2pix/data/base_dataset.py Dataloading Controller_NN Controller_LSTM postprocess_jointangles Pix2Pix obtain_robot_img run_model_pipelined main Playback image_ready postprocess_jointangles write_dic preprocess_jointangles save_checkpoint default_loader accimage_loader pil_loader AlignedDataset BaseDataset __adjust get_transform __print_size_warning __scale_width BaseDataLoader is_image_file ImageFolder default_loader make_dataset SingleDataset UnalignedDataset find_dataset_using_name CreateDataLoader get_option_setter create_dataset CustomDatasetDataLoader get_file_paths align_images BaseModel CycleGANModel get_norm_layer GANLoss ResnetGenerator ResnetBlock define_D UnetGenerator UnetSkipConnectionBlock init_weights get_scheduler init_net NLayerDiscriminator PixelDiscriminator define_G TestModel get_option_setter create_model find_model_using_name BaseOptions TestOptions TrainOptions GetData HTML ImagePool print_numpy diagnose_network mkdirs mkdir save_image tensor2im save_images Visualizer create_model setup print unsqueeze test set_input range len imwrite Pix2Pix DataParallel unsqueeze initialize load_state_dict sleep Controller_NN imread range postprocess_jointangles format eval AlignedDataset float load perform_action obtain_robot_img model_2 numpy Playback init_node parse run_model_pipelined unsqueeze range cat len literal_eval copy append zeros range len copyfile str save str close write open fineSize Lambda Resize RandomCrop BICUBIC RandomHorizontalFlip append size __print_size_warning int size __print_size_warning print is_image_file join sorted append walk items list replace print exit import_module find_dataset_using_name initialize find_dataset_using_name print name dataset_mode dataset CustomDatasetDataLoader initialize join sorted abspath append walk join format new makedirs len paste save range open BatchNorm2d partial InstanceNorm2d LambdaLR CosineAnnealingLR ReduceLROnPlateau StepLR print apply init_weights to DataParallel ResnetGenerator UnetGenerator get_norm_layer NLayerDiscriminator PixelDiscriminator get_norm_layer items list replace print exit import_module find_model_using_name initialize model print name find_model_using_name data isinstance transpose tile Tensor numpy print parameters fromarray save print float64 astype flatten shape mkdir makedirs join list basename items get_image_dir imresize add_images shape add_header append save_image tensor2im | ## Third-Person Visual Imitation Learning via Decoupled Hierarchical Controller ## ### NeurIPS 2019 #### [[Project Website]](https://pathak22.github.io/hierarchical-imitation/) [[Demo Video]](https://youtu.be/eWBkDuNFEKA) [Pratyusha Sharma](https://scholar.google.co.in/citations?user=RGiCLUgAAAAJ&hl=en), [Deepak Pathak](https://people.eecs.berkeley.edu/~pathak/), [Abhinav Gupta](http://www.cs.cmu.edu/~abhinavg/)<br/> Carnegie Mellon University<br/> University of California, Berkeley<br/> We study a generalized setup for learning from demonstration to build an agent that can manipulate novel objects in unseen scenarios by looking at only a single video of human demonstration from a third-person perspective. If you find this work useful in your research, please cite: @inproceedings{sharma19thirdperson, Author = {Sharma, Pratyusha and Pathak, Deepak and Gupta, Abhinav}, | 3,261 |
pathak22/seg-by-interaction | ['instance segmentation', 'semantic segmentation'] | ['Learning Instance Segmentation by Interaction'] | robust_set_loss.py iou robust_set_loss iou all print logical_and astype copy logical_not shape int32 zeros argmax range astype | ## Learning Instance Segmentation by Interaction ## #### [[Project Website]](https://pathak22.github.io/seg-by-interaction/) [[Videos]](http://pathak22.github.io/seg-by-interaction/index.html#demoVideos) Deepak Pathak\*, Yide Shentu\*, Dian Chen\*, Pulkit Agrawal\*, Trevor Darrell, Sergey Levine, Jitendra Malik<br/> University of California, Berkeley<br/> <img src="https://pathak22.github.io/seg-by-interaction/resources/teaser.jpg" width="300"> This is the implementation for the paper on [Learning Instance Segmentation by Interaction](https://pathak22.github.io/seg-by-interaction). We present an approach for building an active agent that learns to segment its visual observations into individual objects by interacting with its environment in a completely self-supervised manner. The agent uses its current segmentation model to infer pixels that constitute objects and refines the segmentation model by interacting with these pixels. @inproceedings{pathakArxiv18segByInt, Author = {Pathak, Deepak and Shentu, Yide and Chen, Dian and Agrawal, Pulkit and Darrell, Trevor and | 3,262 |
pathak22/zeroshot-imitation | ['imitation learning'] | ['Zero-Shot Visual Imitation'] | train.py data/rope_data.py nets/alexnet_geurzhoy.py data/cropping_utils.py data/database.py data/window.py make_network init_weights leaky_relu RopeImitator RandomCropper crop save_vector ImageLMDB save_img test SensorLMDB get_batch get_size get_runs get_data load_dataset get_rope_segmentation normalize rectify resize_segmentation encode_pixel shift_and_normalize encode_theta encode_length crop network var conv pop str matmul init_weights elu zip int format array_to_datum uint8 asarray format imresize transpose astype array_to_datum ImageLMDB play print ImageLMDB shuffle SensorLMDB i random_crop zip ImageLMDB SensorLMDB get_rope_segmentation normalize sum resize_segmentation print get_data print ImageLMDB i ones encode_length zip zeros range encode_pixel zeros min max zeros bisect_right zeros int concat convolve split | ## Zero-Shot Visual Imitation ## #### In ICLR 2018 [[Project Website]](https://pathak22.github.io/zeroshot-imitation/) [[Videos]](http://pathak22.github.io/zeroshot-imitation/index.html#demoVideos) Deepak Pathak\*, Parsa Mahmoudieh\*, Guanghao Luo\*, Pulkit Agrawal\*, Dian Chen, <br/>Yide Shentu, Evan Shelhamer, Jitendra Malik, Alexei A. Efros, Trevor Darrell<br/> University of California, Berkeley<br/> <img src="https://pathak22.github.io/zeroshot-imitation/resources/turtle.gif" width="300"> <img src="https://pathak22.github.io/zeroshot-imitation/resources/baxter.gif" width="300"> This is the implementation for the [ICLR 2018 paper Zero Shot Visual Imitation](https://pathak22.github.io/zeroshot-imitation). We propose an alternative paradigm wherein an agent first explores the world without any expert supervision and then distills its experience into a goal-conditioned skill policy with a novel forward consistency loss. The key insight is the intuition that, for most tasks, reaching the goal is more important than how it is reached. @inproceedings{pathakICLR18zeroshot, Author = {Pathak, Deepak and Mahmoudieh, Parsa and Luo, Guanghao and Agrawal, Pulkit and Chen, Dian and | 3,263 |
patrick-kidger/NeuralCDE | ['time series'] | ['Neural Controlled Differential Equations for Irregular Time Series'] | experiments/uea.py experiments/models/__init__.py example/example.py controldiffeq/misc.py experiments/speech_commands.py experiments/datasets/__init__.py experiments/parse_results.py experiments/models/metamodel.py controldiffeq/__init__.py controldiffeq/interpolate.py experiments/datasets/sepsis.py experiments/datasets/speech_commands.py experiments/datasets/uea.py controldiffeq/cdeint_module.py experiments/common.py experiments/models/vector_fields.py experiments/sepsis.py setup.py experiments/models/other.py experiments/datasets/common.py VectorField cdeint _natural_cubic_spline_coeffs_with_missing_values_scalar natural_cubic_spline_coeffs _natural_cubic_spline_coeffs_with_missing_values NaturalCubicSpline _natural_cubic_spline_coeffs_without_missing_values tridiagonal_solve cheap_stack get_data CDEFunc main NeuralCDE _TensorEncoder make_model _save_results _train_loop _AttrDict _SqueezeEnd _SuppressAssertions main _add_weight_regularisation _evaluate_metrics _count_parameters _get plot_history table main InitialValueNetwork run_all main run_all main run_all save_data normalise_data split_data wrap_data load_data preprocess_data dataloader get_data download _process_data get_data download _process_data get_data download _process_data _pad ContinuousRNNConverter NeuralCDE _GRU ODERNN GRU_D _ODERNNFunc GRU_dt _GRU_ODE FinalTanh SingleHiddenLayer GRU_ODE VectorField odeint func dX_dt zeros reciprocal size empty_like tridiagonal_solve zeros empty unbind append zip clone isnan iter masked_select append next _natural_cubic_spline_coeffs_without_missing_values _natural_cubic_spline_coeffs_with_missing_values transpose any _natural_cubic_spline_coeffs_without_missing_values size empty range broadcast_tensors rand cos pi randperm stack unsqueeze linspace sin zeros zero_grad get_data DataLoader dtype squeeze Adam TensorDataset binary_cross_entropy_with_logits to sum range format size item NeuralCDE backward print natural_cubic_spline_coeffs parameters step data tuple ReduceLROnPlateau _evaluate_metrics str list append range format inf _AttrDict eval zip deepcopy write accuracy tqdm parameters train step loss int str copy mkdir listdir max make_model reset_max_memory_allocated _save_results _train_loop memory_allocated _AttrDict _SqueezeEnd eval _add_weight_regularisation BCEWithLogitsLoss _evaluate_metrics cross_entropy max_memory_allocated _get Path show str sorted defaultdict list ylabel title legend append update plot tight_layout set zip float listdir enumerate int xlabel fill_between _get items list defaultdict str format std print sort min mean Path append median listdir max dict main range str int min len train_test_split unbind zip mean split_data stack masked_select append std cumsum size natural_cubic_spline_coeffs normalise_data split_data unsqueeze append cat tuple to TensorDataset dataloader str list items save endswith str listdir load str urlretrieve rename mkdir listdir exists preprocess_data endswith size normalise_data split_data linspace append tensor listdir max range cat len save_data _process_data wrap_data mkdir load_data download exists load_wav repeat empty detach tensor full str load_from_tsfile_to_dataframe concatenate transpose OrderedDict stack manual_seed float to_numpy values str int _GRU_ODE | <h1 align='center'> Neural Controlled Differential Equations for Irregular Time Series<br>(NeurIPS 2020 Spotlight)<br> [<a href="https://arxiv.org/abs/2005.08926">arXiv</a>, <a href="https://www.youtube.com/watch?v=sbcIKugElZ4">YouTube</a>] </h1> <p align="center"> <img align="middle" src="./imgs/main.png" width="666" /> </p> Building on the well-understood mathematical theory of _controlled differential equations_, we demonstrate how to construct models that: + Act directly on irregularly-sampled partially-observed multivariate time series. + May be trained with memory-efficient adjoint backpropagation - even across observations. + Demonstrate state-of-the-art performance. They are straightforward to implement and evaluate using existing tools, in particular PyTorch and the [`torchcde`](https://github.com/patrick-kidger/torchcde) library. | 3,264 |
patrick-kidger/generalised_shapelets | ['audio classification', 'time series'] | ['Generalised Interpretable Shapelets for Irregular Time Series'] | torchshapelets/src/torchshapelets/regularisation.py experiments/parse_results.py experiments/uea.py torchshapelets/setup.py torchshapelets/src/torchshapelets/__init__.py get_data/speech_commands.py experiments/speech_commands.py torchshapelets/src/torchshapelets/discrepancies.py torchshapelets/src/torchshapelets/shapelet_transform.py experiments/common.py get_data/uea.py torchshapelets/metadata.py save_results _train_loop assert_not_done _evaluate_model save_top_shapelets_and_minimizers upsample_minimizers_and_shapelets _get_sample_batch dataloader _evaluate_metrics _compute_multiclass_accuracy _TensorEncoder _AttrDict _compute_binary_accuracy main handle_seeds normalise_data LinearShapeletTransform get_discrepancy_fn _count_parameters get main _load_data invert comparison_test _get_sample get_data main hyperparameter_search_old _pad comparison_test missing_and_length_test get_data _subfolder hyperparameter_search_l2 main pendigits_interpretability _save_data _process_data _split_data main download main LogsignatureDiscrepancy CppDiscrepancy L2Discrepancy similarity_regularisation GeneralisedShapeletTransform seed manual_seed sum isdir unbind mean zip append std min len int defaultdict randn_like stack zip append dtype to sum size dtype sum size to argmax LogsignatureDiscrepancy int L2Discrepancy split data model zero_grad ReduceLROnPlateau clip_length _evaluate_metrics dtype list append to range format inf _AttrDict eval zip loss_fn deepcopy backward write accuracy tqdm parameters similarity_regularisation train step loss eval _evaluate_metrics int str copy mkdir save listdir max state_dict load str list format items argmin upsample_minimizers_and_shapelets load_state_dict save cat detach size argmin linspace append upsample_path range Tensor len save_results _train_loop _evaluate_model save_top_shapelets_and_minimizers full_like max Adam binary_cross_entropy_with_logits to cross_entropy size set_kmeans_shapelets lengths requires_grad_ int time register_buffer min parameters LinearShapeletTransform get_discrepancy_fn listdir values str list sorted name stdev add OrderedDict get format inf set mean listdir items print split len endswith str listdir load list listdir load_wav choice zeros_like zero_grad SGD ReduceLROnPlateau numpy linspace tensor _load_data MFCC squeeze argmin transpose shape load_state_dict get_discrepancy_fn append to cat format size item zip trange float empty load int backward print write LinearShapeletTransform bool step mse_loss find _load_data size TensorDataset linspace dataloader get_data main range handle_seeds assert_not_done tensor full randn tensor max values str load_from_tsfile_to_dataframe transpose OrderedDict randperm append train_test_split range cat concatenate reversed stack zip manual_seed normalise_data to_numpy print str main assert_not_done print str main assert_not_done print _subfolder str int print handle_seeds assert_not_done _subfolder main range print main handle_seeds train_test_split str list items save mkdir str urlretrieve exists load_wav listdir unbind mean _split_data stack zip append empty std detach _save_data download _process_data mkdir urlretrieve exists l2_discrepancy | <h1 align='center'> Generalised Interpretable Shapelets for Irregular Time Series<br> [<a href="https://arxiv.org/abs/2005.13948">arXiv</a>] </h1> <p align="center"> <img align="middle" src="./paper/images/new_pendigits.png" width="666" /> </p> A generalised approach to _the shapelet method_ used in time series classification, in which a time series is described by its similarity to each of a collection of 'shapelets'. Given lots of well-chosen shapelets, then you can now look at those similarities and conclude that "This time series is probably of class X, because it has a very high similarity to shapelet Y." We extend the method by: + Extending to irregularly sampled, partially observed multivariate time series. + Differentiably optimising the shapelet lengths. (Previously a discrete parameter.) + Imposing interpretability via regularisation. | 3,265 |
patrikperssonmath/MDPN | ['depth estimation', 'monocular depth estimation'] | ['Monocular Depth Parameterizing Networks'] | BatchLoaders/DepthBatchLoader.py Sfm/sfm_loader.py Converters/sub_sample_sfm.py Converters/convert_rgbd_to_sfm.py Networks/ShapeNetwork.py Converters/rgbd_converter.py Trainer/Manager.py Sample/PhotometricSample.py unittest/unit_test2.py Converters/subsample_depth.py BatchLoaders/Sfm_loader_thread.py DataLoaderTask/DataExample.py Graphics/Graphics3.py Trainer/Trainer.py BatchLoaders/SFMBatchLoader2.py Converters/colmap_reader.py Trainer/Timer.py Converters/sfm_data_converter.py Converters/VoxelMap.py Converters/KeyFrame.py main.py DataLoaderTask/DataLoaderTask.py Sfm/sfm_image.py Converters/sfm_colmap_converter.py Optimizers/DepthOptimizer.py Optimizers/PhotometricOptimizer2.py Sample/DepthSample.py unittest/test.py Sample/metrics.py unittest/GTAReader.py DataLoaderTask/DataLoader.py DepthBatchLoader SFMBatchLoader2 Sfm_loader_thread read_points3D_text Image read_points3d_binary write_points3d_binary write_images_text write_model write_images_binary write_next_bytes read_cameras_binary read_model write_cameras_text rotmat2qvec read_cameras_text write_cameras_binary read_images_binary main write_points3D_text qvec2rotmat read_images_text read_next_bytes convert_rgbd_to_sfm KeyFrame sfm_colmap_converter sfm_data_converter subsample_depth sub_sample_sfm VoxelMap DataExample DataLoader DataLoaderTask Graphics3 ShapeNetwork DepthOptimizer PhotometricOptimizer2 DepthSample get_metrics SqRel accuracy_under_thres2 AbsDiff accuracy_under_thres3 log_scale_inv_RMSE AbsRel RMSE accuracy_under_thres PhotometricSample create_sfm_image sfm_image sfm_loader Manager Timer Trainer GTAReader get_exr_rgb TestStringMethods get_exr_rgb read pack write isinstance format len sum format len sum format len join read_points3D_text read_cameras_binary read_cameras_text read_points3d_binary read_images_text read_images_binary join write_cameras_binary write_points3d_binary write_cameras_text write_images_text write_points3D_text write_images_binary eigh array flat print add_argument read_model write_model ArgumentParser parse_args convert_to_tensor reshape boolean_mask divide reduce_sum reduce_prod shape cast abs reduce_sum reduce_prod shape cast abs divide reduce_sum reduce_prod shape pow cast reduce_sum pow reduce_prod shape cast sqrt reduce_sum reduce_prod shape pow cast log reduce_prod cast reduce_sum shape reduce_prod cast reduce_sum shape reduce_prod cast reduce_sum shape InputFile | # ShapeEstimator ### Installation 1. Make sure you have an updated nvidia grapich card driver 2. Install Docker Community 3. Install NVIDIA Container Toolkit ### Download network and demo images | Network | Demo data | |---|---| |[Google Drive](https://drive.google.com/file/d/1vKiAoWQKeXpnkZLjqF0Kx6xxWqxyVImv/view?usp=sharing)|[Google Drive](https://drive.google.com/file/d/1z7kX1gmeyTf3kAHFRsiaEdeVBbi71ZcL/view?usp=sharing) Unzip network in ./demo/data/models/, | 3,266 |
patverga/bran | ['relation extraction'] | ['Simultaneously Self-Attending to All Mentions for Full-Abstract Biological Relation Extraction'] | src/processing/utils/filter_pubtator_keep_format.py src/processing/utils/sentence_segment_conll.py src/evaluation/utils/plot_attention.py src/processing/utils/word_piece_tokenizer.py src/processing/utils/biocreative_VI_task5.py src/train_multiclass_classifier.py src/evaluation/relation_eval.py src/evaluation/utils/ctd_tune.py src/processing/utils/genia_tokenizer.py src/tf_utils.py src/processing/ner_to_tfrecords.py src/processing/labled_tsv_to_tfrecords.py src/processing/utils/learn_bpe.py src/feed_dicts.py src/evaluation/export_predictions.py src/evaluation/ner_eval.py src/evaluation/utils/biocreative_tune.py src/models/transformer.py src/models/text_encoders.py src/processing/labled_tsv_to_tfrecords_single_sentences.py src/data_utils.py src/processing/utils/process_CDR_data.py src/models/classifier_models.py src/processing/utils/filter_hypernyms.py InMemoryBatcher Batcher NERInMemoryBatcher NERBatcher ner_example_parser ner_feed_dict batch_feed_dict initialize_weights embedding_nearest_neighbors residual_layer calc_f_score orthonormal_initializer last_relevant gather_nd repeat apply_nonlinearity load_pretrained_embeddings attention word_dropout train_model main export_predictions export_scores export_attentions compute_f1 is_seg_start ner_eval segment_eval is_start print_conlleval_format is_background print_training_error is_continue token_eval relation_eval sorted_alphanum MultiLabelClassifier ClassifierModel EntityBinary TextEncoder Transformer GLUAllPairs CNNAllPairs make_example tsv_to_examples feature_list feature_lists make_example_all_mentions int64_feature bytes_feature update_vocab_counts process_file main features tsv_to_examples process_single_annotation feature_list feature_lists make_example_all_mentions int64_feature bytes_feature update_vocab_counts convert_to_single_sentence process_file features main make_example tsv_to_examples feature_list feature_lists int64_feature update_vocab_counts process_file main features _tokenize PTB_escape tokenize PTB_unescape create_parser replace_pair get_pair_statistics prune_stats get_vocabulary main update_pair_statistics make_ner_examples make_examples make_tsv_line get_pairs WordPieceTokenizer recursive_split isolate_glossary read_vocabulary check_vocab_and_split encode BPE read TFRecordReader parse_single_sequence_example lstm_dropout list ones_like final_dropout zip hstack kg_label_file array start_end zeros next_batch full word_dropout enumerate lstm_dropout final_dropout zeros_like hstack start_end zeros word_dropout enumerate unit_norm matmul as_list list reshape transpose unstack cast sum range len reshape tile gather int range reshape shape random where multiply matmul add softmax expand_dims int svd astype eye zeros range initialize_weights get_shape reshape xw_plus_b stack bias_add get_variable randn print name dot sqrt eye sum range print array ner_eval save text_batch max run ner_feed_dict text_weight relation_eval append mean float ner_prob flush int time batch_feed_dict print write variance_min next_batch token_dim join sorted defaultdict entity_embeddings print exit close max_seq position_dim embed_dim embeddings load_pretrained_embeddings len print epoch time set print epoch time print epoch time savez ner_feed_dict items list epoch reshape set zip run next_batch append len print mean masked_array zeros sum diag flush len compute_f1 print zip zeros range len print_context is_seg_start print is_continue zip sum range flush len join print tuple flush len epoch time list batch_feed_dict num_classes print len f_beta calc_f_score set mean append sum range values run tsv_format len split int tsv_format print len write SerializeToString max_len sequence_example split tsv_format print len exit write SerializeToString set max_len sequence_example split get flush TFRecordWriter print write close put acquire float release enumerate get join sorted defaultdict text_in_files glob print write load_vocab close num_threads out_dir kg_in_files Pool flush makedirs tsv_to_examples join join sorted list decode min sentence_window sent_tokenize full_abstract zip append max len list isinstance convert_to_single_sentence append range start_end strip append split len append in_files replace replace sub replace _tokenize print groups match sub PTB_unescape add_argument ArgumentParser int Counter split defaultdict index defaultdict enumerate join list items replace tuple escape sub iter append compile split items list items list get_pair_statistics deepcopy format replace_pair prune_stats write get_vocabulary dict update_pair_statistics max range values sub join int defaultdict list product min make_tsv_line max_distance append values len write enumerate add set get_pairs endswith tuple min extend index check_vocab_and_split append append recursive_split int split add set split | # Full Abstract Relation Extraction from Biological Texts with Bi-affine Relation Attention Networks This code was used in the paper: Simultaneously Self-attending to All Mentions for Full-Abstract Biological Relation Extraction Patrick Verga , Emma Strubell, and Andrew McCallum. North American Chapter of the Association for Computational Linguistics (NAACL) 2018 # Requirements python version 2.7 tensorflow version 1.0.1 ## Setup Environment Variables From this directory call: | 3,267 |
pawelc/NeuralLikelihoods | ['density estimation'] | ['Neural Likelihoods via Cumulative Distribution Functions'] | experiments/density/synthetic/mv_nonlinear/monde_copula_param_cov.py experiments/density/synthetic/inv_sin_t/mdn.py experiments/density/synthetic/sin_normal/mdn.py code/models/tensorflow/mykeras/layers.py experiments/density/synthetic/mv_nonlinear/rnade_normal.py code/data/simple.py experiments/density/synthetic/sin_normal/monde_copula_const_cov.py experiments/density/synthetic/sin_t/rnade_deep_laplace.py code/models/tensorboard.py code/data/uci.py code/mutual_info.py experiments/density/synthetic/mv_nonlinear/mdn.py code/experiment/progress.py code/experiment/experiment_vis.py code/data/power.py experiments/density/synthetic/inv_sin_t/rnade_deep_normal.py code/data/bsds300.py experiments/density/synthetic/sin_t/mdn.py code/data/yahoo.py code/my_log.py code/models/tensorflow/utils.py code/asynch.py experiments/density/synthetic/mv_nonlinear/monde_ar.py experiments/density/synthetic/mv_nonlinear/pumonde.py experiments/density/synthetic/mv_nonlinear/rnade_deep_normal.py experiments/density/synthetic/sin_t/monde_ar.py code/data/maf.py code/models/tensorflow/tf_train_eval.py code/experiment/hyper_param_opt.py experiments/density/synthetic/inv_sin_normal/monde_ar.py experiments/density/synthetic/inv_sin_normal/maf.py experiments/density/synthetic/mv_nonlinear/monde_copula_const_cov.py code/models/tensorflow/masked_autoregressive.py code/data/fxcm.py experiments/density/synthetic/inv_sin_t/rnade_deep_laplace.py code/models/tensorflow/create_model_and_train.py experiments/classification/fx/pumonde.py code/data/np_sin.py experiments/density/synthetic/inv_sin_normal/rnade_deep_normal.py experiments/density/synthetic/inv_sin_t/rnade_laplace.py code/data/trending_sinusoid.py experiments/density/synthetic/sin_normal/maf.py code/models/tensorflow/pumonde_pfor.py code/data/miniboone.py code/data/__init__.py experiments/density/uci_large/bsds300/monde_ar.py code/models/train_eval.py code/models/tensorflow/sample_from_model.py code/models/tensorflow/quadrature.py code/experiment/early_stop.py code/models/tensorflow/common.py code/utils.py code/data/uci/data_preprocess.py code/models/tensorflow/pumonde.py code/models/utils.py experiments/density/synthetic/sin_normal/rnade_deep_laplace.py experiments/density/synthetic/sin_t/rnade_deep_normal.py code/data/gas.py code/data/hepmass.py experiments/density/synthetic/inv_sin_normal/monde_copula_const_cov.py code/experiment/utils.py experiments/density/uci_large/power/monde_ar.py experiments/density/synthetic/mv_nonlinear/rnade_deep_laplace.py code/experiment/__init__.py experiments/density/synthetic/inv_sin_normal/rnade_normal.py code/experiment/experiment.py experiments/density/synthetic/sin_normal/monde_ar.py code/data/registry.py code/data/mvn.py code/models/tensorflow/model.py code/models/tensorflow/monde_ar_block.py code/models/tensorflow/predict_from_model.py experiments/density/synthetic/sin_t/maf.py code/models/tensorflow/compute.py code/models/tensorflow/mdn.py code/models/tensorflow/create_model_and_validate.py experiments/classification/fx/monde_param_cov.py code/data/data_utils.py experiments/density/synthetic/sin_t/monde_copula_const_cov.py experiments/density/synthetic/mv_nonlinear/rnade_laplace.py code/models/tensorflow/batch_norm.py experiments/density/uci_large/hepmass/monde_ar.py code/models/tensorflow/monde_ar.py experiments/density/synthetic/sin_normal/rnade_laplace.py experiments/classification/fx/pumonde_cl.py code/experiment/exporters.py code/models/tensorflow/models.py code/data/tf_gen_data.py experiments/density/uci_large/miniboone/monde_ar.py code/models/tensorflow/rnade.py experiments/classification/fx/nn_classifier.py experiments/density/synthetic/sin_normal/rnade_normal.py experiments/density/synthetic/mv_nonlinear/maf.py experiments/density/synthetic/inv_sin_t/maf.py experiments/density/synthetic/inv_sin_normal/rnade_laplace.py code/models/tensorflow/monde.py experiments/density/synthetic/inv_sin_normal/mdn.py experiments/density/synthetic/inv_sin_t/rnade_normal.py code/models/tensorflow/maf.py experiments/classification/fx/monde_copula_const_cov.py experiments/density/synthetic/sin_t/rnade_laplace.py experiments/density/synthetic/inv_sin_t/monde_copula_const_cov.py code/models/tensorflow/compute_mi.py experiments/density/synthetic/sin_t/rnade_normal.py experiments/density/uci_large/gas/monde_ar.py code/conf.py code/models/tensorflow/rnade_deep.py experiments/density/synthetic/inv_sin_normal/rnade_deep_laplace.py experiments/density/synthetic/sin_normal/rnade_deep_normal.py code/data/x_dep_gauss_mixture.py code/models/tensorflow/monde_ar_made.py experiments/density/synthetic/inv_sin_t/monde_ar.py WorkItem SameProcessFuture Callable invoke_in_process_pool SameProcessExecutor Conf test_mutual_information_2d entropy nearest_distances test_degenerate test_mutual_information mutual_information mutual_information_2d test_entropy entropy_gaussian LoggerWriter init_logging load_model_and_params shan_entropy get_class get_all_2_element_combinations elapsed_timer calc_MI2 calc_MI resolve_dir mutual_information build_inverse_quadrature_for_monotonic load_model_from_json InMemoryCollector Bsds300 EmpiricalCDFTransform plot transform_through_ecdf DataLoader FileDataLoader PercentileAnyGreaterLabelTransform AddNoiseRelativeDiff Fxcm Gas Hepmass BivariateGaussianMaf Miniboone MVN NpSinusoid Power sin_np uci_whitewine mixture_of_experts normal_mixture_1d miniboone uci_parkinsons mixture_nd sin_t_noise gas bsds300 bivariate_gaussian_maf normal_mixture_nd uci_redwine_joint create_data_loader inv_sin_t fx power hepmass x_dep_gauss_mixture mvn uci_parkinsons_joint etf2d mv_nonlinear uci_whitewine_joint sin_normal_noise etf uci_redwine inv_sin_normal multivariate_t_rvs_change_order MixtureOfExperts get_rv TCopulaDistribution NormalMixtureNd MixtureNd NormalMixture1d UniformFactory MPGFactory TfGenerator SinusoidFactory TrendingSinusoid UCI x_dep_gauss_mixture Yahoo EarlyStop Experiment create_vis_notebook create_compare_all_experiments_notebook create_compare_notebooks ExperimentVis create_compare_notebook create_vis_notebooks BestResultExporter HyperParamSearch GPOptimizer GridSearch print_progress_bar is_interactive ProgressMonitor NoOpProgressMonitor load_true_metrics results_all_experiments_comparison_t_paired load_best_model_exp show_exp_res load_best_model_exps compare_stat show_all_experiments_comparison_t_paired scatter_models_pp_evals show_all_experiments_comparison export_to_latext load_best_model_exps_all_data_sets load_true_metrics_all_data_sets Tensorboard get_stats TrainEvalModel Estimator TrainEvalModelFactory experiment_file save_best_model_exp show_exps NumpyEncoder match_list_of_regexp_to_string unpack_data BatchNorm batch_normalization get_bn_params TfModel get_device compute_mi create_model_and_train prepare_data_sets create_model_and_validate prepare_data_sets MAF _create_degrees AutoregressiveNetwork _create_masks _create_input_order MDN Model Context create_model MONDELayer MONDE MondeARLayer MondeAR MondeARBlock MondeARBlockLayer MondeARMADELayer MondeARMADE predict_from_model Pumonde softplus MonotonicConstraint PumondePFor softplus Integrated get_integrate_params _run_mi_for_combination mi_all_vars mi_can_calculate_marginals mi Rnade RnadeLayer RnadeDeep sample_from_model TfTrainEvalModel TfTrainEvalModelFactory TfEstimator mi_all_vars constrain_cdf mi MyDense MonotonicOnlyConstraint Dense MonotonicConstraint list ProgressMonitor result print_progress NoOpProgressMonitor progress len NearestNeighbors kneighbors fit isscalar shape gamma nearest_distances hstack reshape sum log gaussian_filter T RandomState entropy randn assert_array_less dot entropy_gaussian array T RandomState randn print reshape assert_array_less mutual_information dot entropy_gaussian array len RandomState randn T RandomState randn print reshape assert_array_less dot mutual_information_2d entropy_gaussian ravel array len get setFormatter getLogger addHandler WatchedFileHandler Formatter dirname info setLevel makedirs realpath join format dirname join getattr __import__ split model_input_shape training build load_weights getattr load_model_from_json callable argsort reshape sqrt shan_entropy mutual_info_score float sum float32 zeros range split print format default_timer show subplots set_xlabel tight_layout flatten title set_ylabel twinx legend tick_params distplot x searchsorted NormalMixture1d load_data load_data NormalMixtureNd MixtureNd load_data MixtureOfExperts load_data TfGenerator load_data TfGenerator load_data NpSinusoid load_data TrendingSinusoid load_data TrendingSinusoid load_data TfGenerator load_data MVN load_data load_data Yahoo load_data Yahoo add_param UCI load_data add_param UCI load_data add_param UCI load_data add_param UCI load_data add_param UCI load_data add_param UCI load_data Power load_data BivariateGaussianMaf load_data Miniboone load_data Gas load_data Hepmass load_data load_data Bsds300 load_data Fxcm load_data seed registry getattr format new_notebook write ExecutePreprocessor preprocess join format new_notebook print chdir experiment_file write dir invoke_in_process_pool join new_notebook print chdir write dir invoke_in_process_pool print int float format OrderedDict load_best_model_exp split OrderedDict load_best_model_exps split OrderedDict load_true_metrics split show items plot flatten axhline hist figure legend boxplot DataFrame values merge combinations plot xlabel ylabel flatten title figure legend values print items format from_tuples items list set_index ValueError mean flatten nan split append DataFrame keys Index sem items set_index ValueError mean sqrt flatten nan split append DataFrame std Index len results_all_experiments_comparison_t_paired print format split train_eval_choice exp constant add pow create_weights get_variable join list_logical_devices name set_memory_growth set_virtual_device_configuration list_physical_devices visible_device_list full nan enumerate resolve_dir from_tensor_slices name prefetch train_y train_x validation_x test_y test_x shuffle shape validation_y repeat info batch clear_session getLogger TerminateOnNaN save_to_json eval_batch_size TensorBoard Tensorboard prepare_data_sets append ceil train_y summary validation_y info environ float compile join int EarlyStopping fit get_device CSVLogger ModelCheckpoint len clear_session join eval_batch_size update_state getLogger Tensorboard sqrt get_device prepare_data_sets info environ Mean numpy log_prob string_types all arange isinstance concatenate shuffle array string_types isinstance concatenate min zip append startswith clear_session eval_batch_size from_tensor_slices collect isinstance getLogger concatenate prefetch resolve_dir shape enumerate repeat get_device info log_prob batch InMemoryCollector namedtuple parameters Integrated integrate set range full nan len clear_session convert_to_tensor getLogger resolve_dir shape get_device info sample | # NeuralLikelihoods Source code for Neural Likelihoods via Cumulative Distribution Functions paper Currently only the code for [experiments/density/synthetic](experiments/density/synthetic) is working because the code is being rewritten from Tensorflow 1.x to Tensorflow 2.0. Please create conda environment from provided environment.yml. # Training models in a notebook on simple generated data. Open notebook and choose the model to train: 1) [experiments/density/synthetic/sin_normal/test.ipynb](experiments/density/synthetic/sin_normal/test.ipynb) 1) [experiments/density/synthetic/sin_t/test.ipynb](experiments/density/synthetic/sin_t/test.ipynb) 1) [experiments/density/synthetic/inv_sin_normal/test.ipynb](experiments/density/synthetic/inv_sin_normal/test.ipynb) | 3,268 |
pawelc/NeuralLikelihoods0 | ['density estimation'] | ['Neural Likelihoods via Cumulative Distribution Functions'] | code/models/mdn.py code/flags.py code/utils.py code/data/tf_gen_data.py code/data/uci/data_preprocess.py code/models/nn_pdf.py code/models/utils.py labs/debug_train.py code/museum.py code/models/nn_pdf_common.py code/experiment/utils.py code/data/fxcm.py code/data/uci.py labs/eval_best_model.py labs/run_all_experiments.py code/experiment/__init__.py code/experiment/experiment_vis.py code/experiment/experiment.py code/data/registry.py tests/redirect.py code/data/yahoo.py code/models/nn_pdf_ar.py code/test.py labs/run_notebooks.py code/asynch.py code/experiment/train_eval.py code/models/__init__.py code/data/trending_sinusoid.py code/models/nn_pdf_m.py labs/debug_vis.py code/data/data.py code/experiment/factory.py code/data/__init__.py code/models/rnade_deep.py labs/run_exp.py code/experiment/exporters.py code/data/utils.py code/models/rnade.py WorkItem SameProcessFuture Callable invoke_in_process_pool SameProcessExecutor custom_gaussian tf_normal softmax cond adjust_cov show_graph strip_consts create_session_config Config plot color_gen DataLoader prepare_display show_xy_data Fxcm sin_t_noise uci_redwine_joint fx_eur_predicted create_data_loader uci_parkinsons_joint uci_parkinsons etf2d mpg inv_sin fx_all_predicted uci_whitewine uci_whitewine_joint etf sin fx_eurgbp_predicted uci_redwine inv_sin_t_noise MPGFactory compute_ll generate_in_tensorflow TfGenerator SinusoidFactory TrendingSinusoid UCI load_data_seeds store_data_seeds Yahoo Runner create_vis_notebook create_compare_all_experiments_notebook create_compare_notebooks ExperimentVis create_compare_notebook create_vis_notebooks BestResultExporter mdn_param_cov rnade_train_eval_model_factory create_mdn_experiment rnade_laplace rnade_deep_laplace create_nn_pdf_ar_experiment create_rnade_experiment nn_pdf_m_train_eval_model_factory rnade_normal create_nn_pdf_m_experiment create_nn_pdf_experiment nn_pdf_m nn_pdf_ar_train_eval_model_factory create_load_experiment create_rnade_deep_experiment rnade_deep_normal create_run_experiment nn_pdf_ar mdn_train_eval_model_factory mdn_const_cov nn_pdf_const_cov rnade_deep_train_eval_model_factory nn_pdf_param_cov nn_pdf_train_eval_model_factory TrainEvalModel CheckNanTensorHook TrainEvalModelFactory load_true_metrics results_all_experiments_comparison_t_paired chdir_data_set load_best_model_exp show_exp_res load_best_model_exps compare_stat show_all_experiments_comparison_t_paired scatter_models_pp_evals show_all_experiments_comparison export_to_latext load_best_model_exps_all_data_sets load_true_metrics_all_data_sets get_loss compute_log_prob_mixture generate_ensemble get_mixtures mdn_model compute_lls log_likelihood get_loss nn_pdf_model marginals_and_joint nn_pdf_ar_model create_bias create_monotone_dense_layer create_pdf_layer_mv create_cdf_layer_partial_monotonic_MLP transform_x create_positive_weights density_estimator create_partially_monotone_dense_layer create_pdf_layer create_weights cdf_transform cdf_transforms nn_pdf_m_model rnade_model rnade_deep_model ll_for_random_ordering sample_ordering sample_idx compute_ensamble printProgressBar print_tensor predict_estimator generate_seed metric_loglikelihood assert_cov_positive_definite print_tensors correlation_matrix corr compute_mixture_of_laplacians covariance constrain_cdf load_model compute_mixture_of_gaussians get_inputs save_best_model_exp eval_estimator show_exps best_model_file unpack_data tf_cov get_activation get_train_inputs extract_xy train_op get_eval_inputs retrieve_vars add_debug_hooks add_all_summary_stats match_list_of_regexp_to_string log_likelihood_from_cdfs_transforms run run_true_metrics run run list display plot FloatProgress result len reciprocal subtract multiply exp reciprocal exp multiply reduce_max reduce_sum self_adjoint_eig maximum eye abs Print tensor_content MergeFrom node GraphDef add tensor len format hasattr replace strip_consts display as_graph_def HTML output_notebook flatten show scatter figure show subplots set_xlabel tight_layout flatten title set_ylabel twinx legend tick_params distplot reshape uniform load_data TfGenerator add_param reshape uniform load_data TfGenerator add_param Config TrendingSinusoid load_data TrendingSinusoid load_data add_param load_data add_param Yahoo load_data add_param Yahoo add_param UCI load_data add_param UCI load_data add_param UCI load_data add_param UCI load_data add_param UCI load_data add_param UCI load_data reshape uniform load_data TfGenerator add_param add_param load_data Fxcm add_param load_data Fxcm add_param load_data Fxcm data_set registry getattr sample placeholder log_prob placeholder dir makedirs join format new_notebook chdir write dir ExecutePreprocessor preprocess join format new_notebook print chdir write dir best_model_file invoke_in_process_pool join format new_notebook print chdir write dir invoke_in_process_pool create is_compatible_with model load_best_model_or_run num_samples num_workers num_samples_best_eval getattr exp_factory_clazz factory create_data_loader create is_compatible_with model num_samples load_best_model num_workers num_samples_best_eval getattr exp_factory_clazz factory create_data_loader load_best_model_or_run Runner extend Runner load_best_model_or_run Runner load_best_model_or_run load_best_model_or_run Runner extend Runner load_best_model_or_run Runner load_best_model_or_run OrderedDict load_best_model_exp split OrderedDict load_best_model_exps split OrderedDict load_true_metrics split show items plot flatten axhline hist figure legend boxplot DataFrame values merge combinations plot xlabel ylabel flatten title figure legend values print items format from_tuples items list set_index ValueError mean flatten nan split append DataFrame keys Index sem join chdir print getcwd dir makedirs items list set_index ValueError mean flatten nan append DataFrame keys Index split results_all_experiments_comparison_t_paired range split constrain_cdf slice reshape cdf append enumerate dense print_tensor extract_xy get_loss matmul get_mixtures compute_lls range log_likelihood get_variable log zip append log_likelihood_from_cdfs_transforms range len get_loss extract_xy marginals_and_joint transform_x density_estimator extract_xy reduce_mean add_n negative range enumerate add_all_summary_stats get_variable exp softplus square add_all_summary_stats get_variable dense print_tensor get_activation enumerate enumerate concat create_bias create_bias create_positive_weights matmul slice get_activation range softplus slice concat transform_x sigmoid print_tensor extract_xy check_numerics concat cdf_transforms create_pdf_layer_mv maximum reduce_mean negative log print_tensor Normal log_prob get_variable multiply matmul add append range relu slice MixtureSameFamily square fill constant extract_xy reshape maximum add_all_summary_stats Laplace sample Categorical append sample_ordering add_n range extract_xy ll_for_random_ordering sample_ordering sample_idx float32 reduce_mean cast compute_ensamble negative name print_tensors name train_y train_x from_tensor_slices prefetch validation_y validation_x from_tensor_slices prefetch from_tensor_slices prefetch debug_cli debug_tb has_inf_or_nan append add_tensor_filter TensorBoardDebugHook LocalCLIDebugHook add_debug_hooks add_debug_hooks get_checkpoint_state reset_default_graph print format print_tensor matrix_inverse value matrix_set_diag matmul diag_part sqrt diag while_loop constant print_tensor self_adjoint_eig dense matrix_diag slice square matmul add get_activation expand_dims range enumerate get_variable matrix_diag matrix_inverse matmul sqrt matrix_diag_part covariance print_tensor matrix_inverse reshape concat len reduce_sum tf_cov expand_dims matmul Normal assert_cov_positive_definite correlation_matrix eye tile corr enumerate minimum maximum urandom print int float format print_tensor name debug_grad AdamOptimizer apply_gradients add_all_summary_stats zip compute_gradients name summary RunConfig getattr model print_tensor input_layer join chdir eval_best_model_and_save dir create_load_experiment data_set makedirs chdir_data_set print flag_values_dict train_eval_best_model create_run_experiment ll chdir_data_set train_y train_x validation_x test_y test_x validation_y can_compute_ll create_data_loader | # NeuralLikelihoods Source code for the ["Neural Likelihoods via Cumulative Distribution Functions"](https://arxiv.org/abs/1811.00974) paper. | 3,269 |
pawni/BayesByHypernet | ['normalising flows'] | ['Implicit Weight Uncertainty in Neural Networks'] | run_map_exp.py run_bbb_cifar_resnet_exp.py run_bbb_exp_kernels.py run_bbb_exp.py run_dropout_cifar_resnet_exp.py layers.py utils.py run_mnf_cifar_resnet_exp.py run_mnf_exp.py run_ensemble_cifar_resnet_exp.py base_layers.py experiments.py run_dropout_exp.py networks.py run_bbh_cifar_resnet_exp.py run_bbh_exp.py experiments_cifar.py utils_cifar.py run_map_cifar_resnet_exp.py run_ensemble_exp.py MaskedNVPFlow PlanarFlow outer BBHLayer BBBLayer BBHDynLayer BBHDiscriminator Layer run_klapprox_experiment run_disc_experiment run_l2_experiment run_ensemble_experiment weight_summaries run_analytical_experiment analysis run_klapprox_experiment run_disc_experiment run_l2_experiment run_ensemble_experiment weight_summaries run_analytical_experiment analysis run_vanilla_experiment VanillaDenseLayer MNFDenseLayer BBHDenseLayer BBHNormDenseLayer BBHDynDenseLayer MNFConvLayer BBBConvLayer VanillaConvLayer BBHConvLayer BBHNormConvLayer BBHDynConvLayer BBBDenseLayer get_bbh_cifar_resnet get_mnf_cifar_resnet get_ensemble_mnist get_bbb_cifar_resnet get_ensemble_cifar_resnet get_bbb_mnist get_dropout_cifar_resnet get_dropout_mnist get_cifar_image get_bbh_mnist get_mnf_mnist get_vanilla_mnist get_vanilla_cifar_resnet get_pred_df build_result_dict rotate calc_entropy build_adv_examples calc_ent_auc get_probs get_pred_df build_result_dict rotate calc_entropy build_adv_examples calc_ent_auc get_probs reduce_max reduce_mean histogram scalar reduce_min moments subplots concat Saver save corr DataFrame heatmap xticks run yticks build_result_dict savefig range format tight_layout mean swapaxes zip distplot join print set_yticks figure zeros std len concat TRAINABLE_VARIABLES set_random_seed weight_summaries Normal RMSPropOptimizer log seed transpose len get_collection reduce_min reduce_sum merge_all shape cast expand_dims range get format RandomState square sqrt sample float join add_check_numerics_ops minimize labels float32 AdamOptimizer reduce_mean histogram eye global_variables_initializer placeholder_with_default scalar makedirs concat TRAINABLE_VARIABLES set_random_seed weight_summaries Normal RMSPropOptimizer gather seed transpose len get_collection merge_all reduce_sum shape cast discriminator range random_shuffle BBHDiscriminator get format RandomState sample join add_check_numerics_ops optimise reshape labels float32 sigmoid AdamOptimizer reduce_mean histogram global_variables_initializer placeholder_with_default scalar makedirs concat TRAINABLE_VARIABLES set_random_seed weight_summaries add_n RMSPropOptimizer gather seed transpose len get_collection merge_all range random_shuffle get format RandomState join add_check_numerics_ops minimize labels AdamOptimizer histogram global_variables_initializer placeholder_with_default scalar makedirs TRAINABLE_VARIABLES set_random_seed get_regularization_loss RMSPropOptimizer seed len get_collection merge_all get RandomState join add_check_numerics_ops minimize labels AdamOptimizer global_variables_initializer placeholder_with_default scalar makedirs get join seed RandomState makedirs get_collection labels TRAINABLE_VARIABLES set_random_seed AdamOptimizer get_regularization_loss RMSPropOptimizer global_variables_initializer placeholder_with_default len UPDATE_OPS group minimize UPDATE_OPS group UPDATE_OPS get join seed RandomState minimize makedirs get_collection TRAINABLE_VARIABLES group set_random_seed merge_all AdamOptimizer UPDATE_OPS RMSPropOptimizer global_variables_initializer placeholder_with_default scalar len group UPDATE_OPS sign flatten get_regularization_losses add_n argmax random_normal log c2 BBHDenseLayer fc2 get_collection placeholder cast BBHConvLayer append c1 range format relu sparse_softmax_cross_entropy_with_logits stack softmax float moments equal reshape float32 max_pool add_to_collection reduce_mean int32 eye fc1 histogram placeholder_with_default bool cond placeholder sign get_regularization_losses add_n argmax random_normal log BBHDenseLayer placeholder cast BBHConvLayer append prod range call_resnet format sparse_softmax_cross_entropy_with_logits stack softmax get_cifar_image float equal enumerate print reshape float32 add_to_collection reduce_mean int32 eye placeholder_with_default BatchNormalization sign flatten get_regularization_losses BBBDenseLayer argmax c2 fc2 placeholder cast c1 relu BBBConvLayer sparse_softmax_cross_entropy_with_logits softmax equal reshape float32 max_pool reduce_mean int32 fc1 placeholder_with_default sign get_regularization_losses BBBDenseLayer argmax placeholder cast append range call_resnet format BBBConvLayer sparse_softmax_cross_entropy_with_logits softmax get_cifar_image equal enumerate print float32 reduce_mean int32 placeholder_with_default BatchNormalization sign flatten get_regularization_losses argmax c2 MNFDenseLayer fc2 placeholder cast c1 relu sparse_softmax_cross_entropy_with_logits softmax equal MNFConvLayer reshape float32 max_pool reduce_mean int32 fc1 placeholder_with_default sign argmax MNFDenseLayer placeholder cast append range call_resnet format sparse_softmax_cross_entropy_with_logits softmax get_cifar_image equal enumerate print MNFConvLayer float32 reduce_mean int32 placeholder_with_default BatchNormalization dense argmax l2_regularizer reshape float32 placeholder max_pool flatten conv2d reduce_mean sparse_softmax_cross_entropy_with_logits cast int32 softmax sign placeholder_with_default equal sign argmax l2_regularizer placeholder conv2d batch_normalization cast range relu sparse_softmax_cross_entropy_with_logits softmax get_cifar_image equal dense float32 reduce_mean int32 placeholder_with_default len dense argmax l2_regularizer dropout reshape float32 placeholder max_pool flatten conv2d reduce_mean sparse_softmax_cross_entropy_with_logits cast int32 softmax sign placeholder_with_default equal sign argmax l2_regularizer placeholder conv2d batch_normalization cast range relu sparse_softmax_cross_entropy_with_logits softmax get_cifar_image equal dense float32 reduce_mean int32 placeholder_with_default len reshape float32 placeholder int32 placeholder_with_default range float32 placeholder int32 get_cifar_image placeholder_with_default range reshape list concat range zip DataFrame get_probs len len stack zeros range run mean range run cumsum histogram diff calibration_curve arange get_pred_df ones DataFrame mean images calc_entropy build_adv_examples linspace calc_ent_auc get_probs enumerate len stack pad | # Implicit Weight Uncertainty in Neural Networks This repository contains the code for the paper Implicit Weight Uncertainty in Neural Networks ([arXiv](https://arxiv.org/abs/1711.01297)). There is a starting point of a reimplementation in Pytorch [here](https://github.com/pawni/BayesByHypernet_Pytorch). ## Abstract Modern neural networks tend to be overconfident on unseen, noisy or incorrectly labelled data and do not produce meaningful uncertainty measures. Bayesian deep learning aims to address this shortcoming with variational approximations (such as Bayes by Backprop or Multiplicative | 3,270 |
pawni/sgld_online_approximation | ['outlier detection'] | ['Efficient variational Bayesian neural network ensembles for outlier detection'] | inferences.py experiment.py get_model_3layer get_metrics setup get_metrics_ensemble get_gauss_approximation_variables_3layer get_outlier_stats get_pointmass_approximation_variables get_data build_nn get_pointmass_approximation_variables_3layer get_vi_approximation_variables_3layer get_model get_gauss_approximation_variables get_vi_approximation_variables WeightedVariationalGaussSGLD WeightedVariationalGaussNoisyAdam VariationalGaussSGLD VariationalGaussNoisyAdam VariationalGaussAdam reset_default_graph ConfigProto InteractiveSession set_random_seed read_data_sets reshape dropout matmul relu float32 placeholder build_nn Normal int32 Categorical float32 placeholder build_nn Normal int32 Categorical equal float32 reduce_sum stack reduce_mean softmax cast int32 argmax log equal float32 reduce_sum stack reduce_mean softmax cast int32 argmax log mean eval next_batch std Normal Normal Normal Normal Variable PointMass random_normal Variable PointMass random_normal | # Efficient variational Bayesian neural network ensembles for outlier detection This repository contains the code for the paper [Efficient variational Bayesian neural network ensembles for outlier detection](https://openreview.net/forum?id=Hy-po5NFx) ([arXiv](https://arxiv.org/abs/1703.06749), [poster](https://github.com/pawni/sgld_online_approximation/blob/master/poster.pdf)). ## Abstract In this work we perform outlier detection using ensembles of neural networks obtained by variational approximation of the posterior in a Bayesian neural network setting. The variational parameters are obtained by sampling from the true posterior by gradient descent. We show our outlier detection results are comparable to those obtained using other efficient ensembling methods. ## Usage Following libraries were used for development: ``` edward==1.2.4 jupyter==1.0.0 matplotlib==1.5.3 | 3,271 |
pb-brainiac/semseg_od | ['outlier detection', 'semantic segmentation'] | ['Simultaneous Semantic Segmentation and Outlier Detection in Presence of Domain Shift'] | readers/vistas_to_city_mapping.py data/download_lsun.py readers/lsun_reader.py readers/cityscapes_reader.py readers/pascal_wd_reader.py train.py readers/wilddash_1_reader.py models/model_utils.py readers/city_vistas_wd_imagenet_reader.py readers/transform.py evaluation.py readers/segmentation_reader.py inference.py readers/viper_reader.py utils.py readers/viper_mapping.py models/layers.py models/base.py models/two_head.py models/losses.py readers/city_mapping.py data/export_lsun.py get_img_conf_mat odin segment_image compute_errors odin evaluate_AP_patches get_args store_images store_conf colorize_labels store_outputs evaluate_segmentation prepare_for_saving get_conf_img evaluate_AP_negative prepare_for_saving evaluate_segmentation get_args import_module Logger list_categories main download list_categories main export_images Base build SpatialPyramidPooling DenseNet _BNReluConv _Upsample _DenseLayer _DenseBlock Ladder _Transition get_aux_loss DNN _load_imagenet_weights TwoHead build DatasetReader get_train_ids get_class_info DatasetReader DatasetReader DatasetReader SegmentationReader random_crop resize_img denormalize random_flip pad_size_for_pooling pad resize_labels normalize _sample_location numpy_to_torch_image get_train_ids get_class_info DatasetReader DatasetReader model clamp mean softmax to range float64 to cuda print mean trace diagonal zeros sum range Variable odin cuda reshape repeat zeros sum array range len fromarray join uint8 concatenate ones apply_async astype copy colorize_labels shape save sum reshape fromarray join concatenate apply_async save get_conf_img store_images denormalize astype store_conf int32 numpy format save_outputs print segment_image compute_errors store_outputs cuda numpy max enumerate len cuda AP_iters odin std FloatTensor append sum range cat format ByteTensor mean enumerate print Variable clone average_precision_score empty_cache array len AP_iters odin format std FloatTensor Variable print average_precision_score ByteTensor mean array append range cuda enumerate cat len add_argument ArgumentParser stdout join rmtree open Logger save_name Pool exists makedirs spec_from_file_location exec_module module_from_spec print join call format remove print list_categories download len print open export_images format load_state_dict Base _load_imagenet_weights reshape log_softmax clone mean shape unsqueeze masked_select sum list group load_url match keys compile TwoHead get_train_ids get_class_info extend labels fill empty enumerate len append id append range NEAREST resize append crop _sample_location isinstance randint FloatTensor contiguous numpy astype uint8 list range len append transpose FLIP_LEFT_RIGHT choice list ndarray isinstance shape fill round eval eval | # Simultaneous semantic segmentation and outlier detection Code to reproduce the results from <div class="highlight highlight-html"><pre> <b><a href=https://arxiv.org/abs/1908.01098>Simultaneous Semantic Segmentation and Outlier Detection in Presence of Domain Shift</a> <a href=https://github.com/pb-brainiac>Petra Bevandić</a>, <a href=https://ivankreso.github.io/>Ivan Krešo</a>, <a href=https://github.com/orsic>Marin Oršić</a>, <a href=http://www.zemris.fer.hr/~ssegvic/index_en.html>Siniša Šegvić</a></b> GCPR, 2019. </pre></div> ## Run code ### Requirements ``` | 3,272 |
pbecker93/ExpectedInformationMaximization | ['traffic prediction', 'density estimation'] | ['Expected Information Maximization: Using the I-Projection for Mixture Density Estimation'] | EIM/distributions/conditional/GaussianEMM.py EIM/eim/DensityRatioEstimator.py EIM/util/Regression.py EIM/data/RandomGMMData.py EIM/distributions/marginal/Gaussian.py EIM/data/TrafficData.py EIM/itps/MoreGaussian.py EIM/distributions/SaveAndLoad.py EIM/distributions/conditional/ConditionalGaussian.py EIM/itps/RepsCategorical.py EIM/eim/MarginalMixtureEIM.py EIM/traffic_predicition.py EIM/recording/modules/DREModules.py EIM/util/ConfigDict.py EIM/itps/ITPS.py EIM/gmm_test_vis.py EIM/distributions/marginal/Categorical.py EIM/util/NetworkBuilder.py EIM/data/ObstacleData.py EIM/distributions/conditional/Softmax.py EIM/eim/ConditionalMixtureEIM.py EIM/distributions/marginal/GMM.py EIM/recording/modules/ModelModules.py EIM/recording/modules/SimpleModules.py EIM/recording/modules/UpdateModules.py EIM/obstacle_avoidance.py EIM/util/ModelInit.py EIM/gmm_test_random.py EIM/recording/Recorder.py eval_fn eval_fn ObstacleData GMMData RandomGMMData LankershimData StanfordData load_cpp_gmm save_model save_gmm save_gaussian_gmm gaussian_density ConditionalGaussian gaussian_log_density GaussianEMM Softmax Categorical Gaussian GMM ConditionalMixtureEIM AddFeatDensityRatioEstimator logistic_regression_loss accuracy DensityRatioEstimator MarginalMixtureEIM ITPS MoreGaussian RepsCategorical Recorder RecorderModule RecorderKeys _CWFormatter Colors DRERecMod ModelRecMod ObstacleModelRecMod GMM2DModelRecMod EMM1DModelRecMod ModelRecModWithModelVis ConfigInitialRecMod TrainIterationRecMod ComponentUpdateRecMod WeightUpdateRecMod log_res ConfigDict gmm_init build_dense_network NetworkKeys QuadFunc RegressionFunc LinFunc sample zeros range plot de_standardize_data reshape pause imshow clf scatter figure array array save_gaussian_gmm save_gmm isinstance save join stack savez_compressed dict join load triangular_solve square reduce_sum diag_part expand_dims log sigmoid format T RandomState ones range dot cov tile zeros expand_dims sum k_means len get BATCH_NORM L2_REG_FACT Sequential len DROP_PROB add Dense ACTIVATION range Activation BatchNormalization Dropout | # Expected Information Maximization Code for "Expected Information Maximization: Using the I-Projection for Mixture Density Estimation" - published at ICLR 2020, see https://openreview.net/forum?id=ByglLlHFDS Update 23.04.2020: We decided to remove the C++ parts from the code and provide a full python implementation to increase understandability and usability of the implementation. Note that this implementation is a bit slower than the original, especially the component update which is no longer parallelized. The original implementation with the C++ parts can still be found in the branch "cppEIM". We used this older version for all experiments reported in the paper. ### Code Structure - data: Functionality to generate/read the required data and providing it in an unified format - distributions: implementation of GMMs and the Deep Mixture of Expert Model (using tensorflow) | 3,273 |
pbizopoulos/comprehensive-comparison-of-deep-learning-models-for-lung-and-covid-19-lesion-segmentation-in-ct | ['medical image segmentation', 'lesion segmentation', 'semantic segmentation'] | ['Comprehensive Comparison of Deep Learning Models for Lung and COVID-19 Lesion Segmentation in CT scans'] | main.py hubconf.py docs/main.py segmentation_model get_num_parameters save_scatter metrics save_3d save_tfjs CTSegBenchmark MedicalSegmentation1 save_hist MedicalSegmentation2 save_loss save_initialization_box save_weights preprocess main save_image save_architecture_box save_masked_image main load_state_dict_from_url to load_state_dict load remove export_graph randn prepare rmtree export cpu convert_tf_saved_model makedirs float item subplot set_xticklabels set_yticklabels close GridSpec imshow savefig figure numpy range subplots xlabel set_yscale grid close bar ylim savefig linspace legend xlim sum max arange subplots grid tick_params set_major_locator ylim savefig legend MaxNLocator plot close autoscale mean nan zip fill enumerate xlabel reshape nan_to_num fill_between std len T subplots grid close ylim savefig boxplot xticks subplots reshape grid close ylim savefig boxplot xticks subplots grid flatten vstack tick_params set_aspect gaussian_kde shape imshow scatter ylim savefig legend rot90 close mean zip xlim T xlabel reshape marching_cubes set_xlim add_subplot close get_ticklines set_visible set_zlim plot_trisurf figure savefig set_ticklabels set_ylim subplots close imshow savefig tick_params numpy subplots close imshow savefig tick_params numpy affine normalize rand hflip astype resize vflip bool to_tensor to_pil_image zeros_like zero_grad MedicalSegmentation1 from_product flatten DataLoader save_weights DiceLoss device save_image round DataFrame max idxmax seed list idxmin dice_loss transpose Adam save_hist load_state_dict append to prod range manual_seed_all save_scatter to_latex concatenate save_loss save_initialization_box eval mean manual_seed zip float save_architecture_box save_masked_image enumerate load get_num_parameters remove backward reshape save_tfjs min to_csv MedicalSegmentation2 parameters rmtree zeros train step std len generate_page_image_segmentation | pbizopoulos/comprehensive-comparison-of-deep-learning-models-for-lung-and-covid-19-lesion-segmentation-in-ct | 3,274 |
pclucas14/GansFallingShort | ['text generation'] | ['Language GANs Falling Short'] | common/utils.py csv/entropy/process.py scripts/synthetic_rs.py synthetic_data_experiments/oracle_training.py scripts/news_char_rs.py common/data.py common/models.py scripts/news_eval.py real_data_experiments/metrics.py synthetic_data_experiments/oracle_eval.py real_data_experiments/main.py csv/decoding_time/process.py real_data_experiments/main_leak.py real_data_experiments/score_models.py real_data_experiments/scripts/news_disc_rs.py real_data_experiments/__init__.py common/args.py synthetic_data_experiments/leak_oracle_training.py real_data_experiments/scripts/news_eval.py real_data_experiments/scripts/synthetic_rs.py real_data_experiments/scripts/news_rs.py real_data_experiments/scripts/news_char_rs.py common/eval_decode.py scripts/news_disc_rs.py common/losses.py scripts/news_rs.py synthetic_data_experiments/__init__.py real_data_experiments/eval_bleu.py get_train_args get_rlm_args get_test_args Dictionary tokenize sample_from_model compute_lm_score train_discriminator KLD reinforce_critic_loss reinforce_gen_loss NLL cot_gen_loss masked_cross_entropy OldGenerator OldModel Generator Discriminator Model LockedDropout OldDiscriminator RNNClassifier id_to_words print_and_save_args get_cumulative_rewards save_models generate_file print_and_save_samples get_cot_args get_oracle remove_pad_tokens assign_training minibatch_generator maybe_create_dir to_attr load_model_from_file transfer_weights apply_loss print_and_log_scalar remove_sep_spaces get_values save_samples_for_bleu main main Metrics SelfBleu Bleu main sample_from Model_eval main transfer_weights_after_pretraining replace print add_argument parse_known_args ArgumentParser parse_args lm_path lm_epoch batch_size data_dir max_seq_len add_argument character_level parse_known_args get_train_args ArgumentParser cuda get_train_args print Dictionary data zeros_like save_models apply_loss cuda data_dir Adam minibatch_generator load_state_dict binary_cross_entropy_with_logits gen range state_dict BCEL ones_like format eval avg_ avg tokenize enumerate join print sigmoid parameters train len arange zeros_like flatten unsqueeze argmax cuda topk fill_ view squeeze output_layer expand_as sum range cat get format log_softmax size train_discriminator masked_fill_ lower take nonzero item sample float listdir long join time int embedding isinstance print reshape sort max_seq_len clone index_select step log_softmax size squeeze cuda long is_cuda entropy use_baseline clamp adv_clip shape Categorical beta range log_prob detach log_softmax reshape size softmax size Categorical append kl_divergence range log_softmax unsqueeze gather batch_size randint max cuda list view stream_data append sum range LongTensor size shuffle zip long pop Variable mask_padding max_seq_len min zeros len list zeros_like size reversed sigmoid seqgan_reward gamma range log append join replace backward clip_grad_norm_ zero_grad set_trace step format isinstance add_scalar print mean stack len mle_train_iterations disc_train_iterations gen_train_iterations data size append numpy range join int format id_to_words print maybe_create_dir numpy range remove_sep_spaces join str format print len save state_dict print makedirs print float sum hidden_dim_disc num_layers_disc copy to_attr var_dropout_p_disc load T zeros_like concatenate Generator copy get_train_args eval pp to_attr load join list format sorted print Generator old_model to_attr load_state_dict Discriminator OldDiscriminator vars listdir keys OldGenerator data rnns copy_ load_state_dict zip state_dict list print map splitlines array join format print maybe_create_dir alpha_test model_path data zeros_like save_models old_model reinforce_gen_loss apply_loss cuda print_and_log_scalar seed load_gen_path data_dir Generator load_disc_path len Adam assign_training maybe_create_dir minibatch_generator NLL binary_cross_entropy_with_logits mle_epochs transfer_weights gen range cat detach lm_path SummaryWriter print_and_save_args format ones_like get_cumulative_rewards print_and_save_samples reinforce_critic_loss disc get_train_args eval base_dir cot manual_seed tokenize get_rlm_args masked_cross_entropy enumerate cot_gen_loss join print sigmoid parameters adv_epochs train OldGenerator batch_size use_baseline gen_pretrain_epoch Discriminator sample_from disc_pretrain_epoch zip disc_pretrain_epochs leak_info DataLoader get_oracle num_oracle_samples num_oracle_samples_test float oracle numpy | # Language GANs Falling Short Code for reproducing all results in our paper, which can be found [here](https://arxiv.org/abs/1811.02549) ## (key) Requirements - Python 3.6 - Pytorch 0.4.1 - TensorboardX ## Structure - `common` folder: most of the important code is here, including all models and utilities - `synthetic_data_experiments` folder: code to run and reproduce all oracle experiments - `real_data_experiments` folder: code to run results for ImageCoco and News datasets | 3,275 |
pclucas14/lidar_generation | ['point cloud generation'] | ['Deep Generative Modeling of LiDAR Data'] | evaluation/gen_closest.py vae_2d.py kitti_data/parse_velo.py launch_scripts/baseline_rs.py evaluation/generate.py evaluation/__init__.py nndistance/test.py evaluation/find_closest.py nndistance/build.py models.py gan_2d.py nndistance/modules/nnd.py evaluation/emd.py utils.py launch_scripts/vae_rs.py nndistance/_ext/my_lib/__init__.py evaluation/eval.py nndistance/functions/nnd.py PointGenCon VAE netG netD PointGenPSG2 AE_AtlasNet PointNetfeat_ batch_pairwise_dist to_polar_np print_and_save_args chamfer_quadratic show_pc_lite from_polar_np get_chamfer_dist maybe_create_dir to_polar preprocess show_pc to_attr weights_init remove_zeros from_polar load_model_from_file log_point_clouds print_and_log_scalar EMD process_velo quad_to_pc_inv parse_velo fit_quadrant get_quadrant passed_origin NNDFunction NNDModule _import_symbols sqrt transpose stack sqrt stack permute stack unsqueeze linspace pi cos pi stack linspace sin format isinstance add_scalar print mean stack len view add_embedding stack float enumerate print makedirs normal_ __name__ fill_ FloatTensor stack unsqueeze expand_as max_pool2d float concatenate squeeze transpose maximum expand_dims sum range gcf show format view zoom print reshape transpose min close points3d figure savefig max show scatter load join print z_dim VAE netD to_attr load_state_dict bmm sum permute batch_pairwise_dist insert NNDModule int asarray arctan min pi mean append array range len get_quadrant passed_origin append quad_to_pc_inv set_trace parse_velo fit_quadrant zeros range len std argsort sqrt append array range len append dir getattr _wrap_function | # Deep Generative Modeling of LiDAR data (IROS 2019) Code for reproducing all results in our paper, which can be found [here](https://arxiv.org/abs/1812.01180) </br> Additional results can be found [here](https://github.com/pclucas14/lidar_generation/#Additional-Results) ## (key) Requirements - Pytorch 0.4.1/0.4.0 - TensorboardX - Mayavi (for display only) ## Structure ├── Evaluation ├── eval.py # Evaluation of conditional generation, using Chamfer and EMD metrics | 3,276 |
pcy1302/DMGI | ['network embedding'] | ['Unsupervised Attributed Multiplex Network Embedding'] | utils/process.py layers/discriminator.py models/DGI.py data/preprocess_dblp.py models/DMGI.py layers/attention.py layers/readout.py models/__init__.py layers/__init__.py models/logreg.py embedder.py evaluate.py main.py layers/gcn.py embedder run_kmeans evaluate run_similarity_search main parse_args printConfig map_word_dict remove_cnt_stopauthors map_refs_dict make_onehot map_author_dict print_sparsity print_shape print_stats currentTime filter_refs Attention Discriminator GCN AvgReadout DGI modeler DMGI modeler LogReg parse_skipgram preprocess_features normalize_adj sparse_mx_to_torch_sparse_tensor sparse_to_tuple adj_to_bias sample_mask accuracy process_tu parse_index_file load_data preprocess_adj process_adj_gat micro_f1 standardize_data load_data_dblp zero_grad run_similarity_search argmax max log Adam array append to range CrossEntropyLoss run_kmeans LogReg format xent mean item f1_score float backward print index parameters cpu train step std str sum join format print reshape mean tile eye cosine_similarity round append format normalized_mutual_info_score print KMeans len append sum range predict fit add_argument ArgumentParser append vars getattr print parse_args DGI DMGI training localtime format print set round unique sum len print shape format len print sum format mean load format lil_matrix len astype ravel sc metapaths_list append dataset loadmat range open int float empty range todense num_features edge_index coo_matrix zeros range x len round long sum type_as double matmul shape eye empty range append int strip open zeros list format lil_matrix from_dict_of_lists tolil tuple sort min tolist adjacency_matrix parse_index_file vstack zeros max range len to_tuple range isinstance len mean todense std diags flatten dot sum array diags flatten coo_matrix sum array normalize_adj eye data Size astype float32 from_numpy shape int64 todense FloatTensor print array range | # Unsupervised Attributed Multiplex Network Embedding (DMGI) <p align="center"> <a href="https://aaai.org/Conferences/AAAI-20/" alt="Conference"> <img src="https://img.shields.io/badge/AAAI'20-brightgreen" /></a> <a href="https://pytorch.org/" alt="PyTorch"> <img src="https://img.shields.io/badge/PyTorch-%23EE4C2C.svg?e&logo=PyTorch&logoColor=white" /></a> </p> ### Overview Nodes in a multiplex network are connected by multiple types of relations. However, most existing network embedding methods assume that only a single type of relation exists between nodes. Even for those that consider the multiplexity of a network, they overlook node attributes, resort to node labels for training, and fail to model the global properties of a graph. We present a simple yet effective unsupervised network embedding method for attributed multiplex network called DMGI, inspired by Deep Graph Infomax (DGI) that maximizes the mutual information between local patches of a graph, and the global representation of the entire graph. We devise a systematic way to jointly integrate the node embeddings from multiple graphs by introducing 1) the consensus regularization framework that minimizes the disagreements among the relation-type specific node embeddings, and 2) the universal discriminator that discriminates true samples regardless of the relation types. We also show that the attention mechanism infers the importance of each relation type, and thus can be useful for filtering unnecessary relation types as a preprocessing step. Extensive experiments on various downstream tasks demonstrate that DMGI outperforms the state-of-the-art methods, even though DMGI is fully unsupervised. ### Paper | 3,277 |
pcy1302/TapEM | ['network embedding'] | ['Task-Guided Pair Embedding in Heterogeneous Network'] | code/main.py code/embedder.py code/TapEM.py code/Dataset.py code/camel.py code/evaluate.py camel modeler Dataset embedder Evaluator main parse_args printConfig AttentivePooling TapEM modeler add_argument ArgumentParser append vars getattr print print TapEM training parse_args camel | # Task-Guided Pair Embedding in Heterogeneous Network (TapEM) <p align="center"> <a href="http://www.cikm2019.net/" alt="Conference"> <img src="https://img.shields.io/badge/CIKM'19-brightgreen" /></a> <a href="https://pytorch.org/" alt="PyTorch"> <img src="https://img.shields.io/badge/PyTorch-%23EE4C2C.svg?e&logo=PyTorch&logoColor=white" /></a> </p> <img src="https://github.com/pcy1302/TapEM/blob/master/motivations.png" height="300"> ### Overview Many real-world tasks solved by heterogeneous network embedding methods can be cast as modeling the likelihood of a pairwise relationship between two nodes. For example, the goal of author identification task is to model the likelihood of a paper being written by an author (paper–author pairwise relationship). Existing taskguided embedding methods are node-centric in that they simply measure the similarity between the node embeddings to compute the likelihood of a pairwise relationship between two nodes. However, we claim that for task-guided embeddings, it is crucial to focus on directly modeling the pairwise relationship. In this paper, we propose a novel task-guided pair embedding framework in heterogeneous network, called TaPEm, that directly models the relationship between a pair of nodes that are related to a specific task (e.g., paper-author relationship in author identification). To this end, we 1) propose to learn a pair embedding under the guidance of its associated context path, i.e., a sequence of nodes between the pair, and 2) devise the pair validity classifier to distinguish whether the pair is valid with respect to the specific task at hand. By introducing pair embeddings that capture the semantics behind the pairwise relationships, we are able to learn the fine-grained pairwise relationship between two nodes, which is paramount for task-guided embedding methods. Extensive experiments on author identification task demonstrate that TaPEm outperforms the state-of-the-art methods, especially for authors with few publication records. | 3,278 |
pdasigi/onto-lstm | ['word embeddings'] | ['Ontology-Aware Token Embeddings for Prepositional Phrase Attachment'] | keras_extensions.py embedding.py model_pp_relation.py model_sentences.py nse.py pooling.py index_data.py preposition_predictors.py model_pp_attachment.py preposition_model.py test_ontolstm.py model_entailment.py encoders.py onto_attention.py OntoAwareEmbedding LSTMEncoder Encoder OntoLSTMEncoder DataProcessor changing_ndim_rnn_theano switch changing_ndim_rnn_tf changing_ndim_rnn OntoNSEEntailmentModel NSEEntailmentModel OntoLSTMEntailmentModel LSTMEntailmentModel EntailmentModel main main PPAttachmentModel LSTMAttachmentModel OntoLSTMAttachmentModel main PPRelationModel OntoLSTMRelationModel LSTMRelationModel NSE OutputSplitter MultipleMemoryAccessNSE InputMemoryMerger OntoAttentionNSE OntoAttentionLSTM MultipleMemoryAccessOntoNSE AveragePooling IntraAttention PrepositionModel PrepositionPredictor RelationPredictor AttachmentPredictor switch list dimshuffle zeros_like squeeze ndim scan stack step_function zip append unbroadcast expand_dims sum range len zeros_like concat get_shape list transpose squeeze select reverse cast append expand_dims range pack _dynamic_rnn_loop slice unpack tile zip int uint8 any step_function bool len get_shape ones float32 dot cast OntoLSTMEntailmentModel ArgumentParser train_file load_model OntoNSEEntailmentModel process_test_data parse_args print_attention_values NSEEntailmentModel test onto_aware LSTMEntailmentModel nse_shared_memory process_train_data add_argument attention_output load_model_from_epoch test_file train LSTMAttachmentModel OntoLSTMAttachmentModel process_data LSTMRelationModel OntoLSTMRelationModel | # Ontology-Aware Token Embedding and LSTM Encoder This repository contains a Keras implementation of WordNet grounded context sensitive token embeddings, described in the paper [Ontology-Aware Token Embeddings for Prepositional Phrase Attachment](https://arxiv.org/abs/1705.02925). Primarily, we implement two Keras layers here: `OntologyAwareEmbedding` and `OntoAttentionLSTM`, which (in most cases) will be used together. ## Background The idea behind WordNet grounding is to represent words as a distribution over their senses and possible hypernyms from WordNet. That is, given a word **pool** as a noun, WordNet 3.1 identifies 9 senses of the word: * `pool.n.01`: An excavation * `pool.n.02`: A small lake * `pool.n.03`: An organization of people or resources * ... For each of these senses, WordNet also defines hypernyms (generalizations) in order, like: * `pool.n.01`: `excavation.n.01`, `artifact.n.01`, ... | 3,279 |
pdufter/densray | ['sentiment analysis', 'word embeddings'] | ['Ultradense Word Embeddings by Orthogonal Transformation', 'Analytical Methods for Interpretable Ultradense Word Embeddings'] | data/data.py utils/download_data.py utils/utils.py model/model.py utils/case_BATS.py debiasing/debiasing.py evaluation/evaluation.py lexind/run.py lexind/prepare.py analogy/solve_analogy_task.py lexind/evaluate.py Embeddings Lexicon GoogleAnalogy SingleBats Bats plot_bias LexIndEval Densifier AnalogyPredictor LexIndPredictor DensRay Regression download read dump_dict dump_class invdict load_class get_logger str2bool store format subplots plot xlabel ylabel index dict ylim scatter savefig clf annotate xlim format urlretrieve st_size print stat dump open open dump close open setFormatter getLogger addHandler StreamHandler Formatter setLevel FileHandler | ### Introduction This repository compares different methods of obtaining interpretable dimension in word embedding spaces. More specifically it compares: * [Densifier](https://arxiv.org/pdf/1602.07572.pdf) * [DensRay](https://arxiv.org/pdf/1904.08654.pdf): A method closely related to Densifier, but computable in closed form. * Support Vector Machines / Regression * Linear / Logistic Regression. The evaluation tasks are lexicon induction and set-based word analogy. For more details see the [Paper](https://arxiv.org/pdf/1904.08654.pdf). Note that this repo does not include an implementation of the Densifier, but relies on the original Matlab implementation by the authors of Densifier. | 3,280 |
pectinid16/IDHN | ['image retrieval'] | ['Improved Deep Hashing with Soft Pairwise Similarity for Multi-label Image Retrieval'] | train.py test.py tf_record.py alexnet.py reader.py dropout lrn fc max_pool AlexNet conv read_and_decode main hashing_loss as_list int convolve relu reshape concat bias_add split relu int16 read TFRecordReader string_input_producer decode_raw reshape float32 cast parse_single_example exp square reduce_sum matmul where sqrt reduce_mean tile expand_dims abs log belta num_class gradients softsign output_dir decay_step exponential_decay gama num_bit decay_rate list apply_gradients tfrecords group read_and_decode lr alpha zip Variable AlexNet AdamOptimizer hashing_loss shuffle_batch dropout_rate makedirs | # IDHN Code for the following paper: Z. Zhang and Q. Zou and Y. Lin and L. Chen and S. Wang, ["Improved Deep Hashing with Soft Pairwise Similarity for Multi-label Image Retrieval"](https://arxiv.org/abs/1803.02987), IEEE Transactions on Multimedia, 2019. ### Requirements - [Linux](https://www.ubuntu.com/download) - [Tensorflow](https://www.tensorflow.org/) - [NVIDIA GPU + CUDA CuDNN](https://developer.nvidia.com/cudnn) ### Getting Started: - Prepare the datasets Download the [flickr dataset](http://press.liacs.nl/mirflickr/) and put the images into folder `/data/flickr/images/` | 3,281 |
pedrada88/rwe | ['word embeddings'] | ['Relational Word Embeddings'] | preprocessing.py train_RWE.py load_word_vocab_from_relation_vectors load_embeddings_filtered_byvocab load_training_data load_vocab_embeddings split_training_data validate getRWEModel trainEpochs getBatches trainIntervals RWE_Model gradUpdate open add set rsplit exit set add split open int asarray open append split rsplit int asarray str exit open append split int list str print sample range append len RWE_Model MSELoss len str validate print ReduceLROnPlateau trainIntervals step range str print float zero_grad zip train criterion model Variable eval zip step backward criterion model int size | # Relational Word Embeddings Repository containing data (pre-trained embeddings) and code of the paper *[Relational Word Embeddings](https://www.aclweb.org/anthology/P19-1318)* (ACL 2019). With the code of this repository you can learn your own relational word embeddings from a text corpus. ### Pre-trained embeddings We release the 300-dimensional embeddings trained on the English Wikipedia used in our experiments: - [**FastText**](https://drive.google.com/file/d/1SVB7E41c-xvwy61YL3hoDJHRi3RCgf-E/view?usp=sharing) word embeddings \[~300MB\]. - [**Relative-init**](https://drive.google.com/file/d/17bxqdjmn6ZHWgwlstO5d1--3kVf4uQ0N/view?usp=sharing) relation embeddings (symmetrical): \[~6.0GB\] - Output [**RWE**](https://drive.google.com/file/d/1UjjEb6-80bbJ3GFMFhkRkjvWGULgKpfe/view?usp=sharing) relational word embeddings *(as in the reference paper)*: \[~300MB\] - Output [**RWE**](https://drive.google.com/file/d/1szmMDbxS1f2Xr2p6ZceGb_e_REXE1KIn/view?usp=sharing) relational word embeddings *(with default parameters using the code below)*: \[~300MB\] *Note 1:* All vocabulary words are lowercased. *Note 2:* If you want to convert the *txt* files to *bin*, you can use [convertvec](https://github.com/marekrei/convertvec). | 3,282 |
pedropro/TACO | ['instance segmentation', 'semantic segmentation'] | ['TACO: Trash Annotations in Context for Litter Detection'] | detector/utils.py detector/visualize.py detector/split_dataset.py detector/config.py detector/model.py detector/detector.py detector/dataset.py download.py Config Taco evaluate_coco build_coco_results test_dataset TacoTrainConfig fpn_classifier_graph MaskRCNN compose_image_meta rpn_bbox_loss_graph norm_boxes_graph compute_backbone_shapes rpn_class_loss_graph log DetectionTargetLayer trim_zeros_graph log2_graph parse_image_meta parse_image_meta_graph data_generator rpn_graph identity_block BatchNorm build_fpn_mask_graph load_image_gt build_rpn_targets resnet_graph mrcnn_one_mask_loss_graph unmold_image PyramidROIAlign apply_box_deltas_graph denorm_boxes_graph generate_random_rois detection_targets_graph build_detection_targets overlaps_graph mrcnn_bbox_loss_graph conv_block batch_pack_graph ProposalLayer smooth_l1_loss clip_boxes_graph mrcnn_class_loss_graph mrcnn_mask_loss_graph mold_image build_rpn_model DetectionLayer refine_detections_graph compute_ap norm_boxes compute_recall apply_box_deltas compute_overlaps compute_iou resize_image box_refinement_graph generate_pyramid_anchors mold_mask annToMask fuse_instances zoom_in generate_anchors compute_ap_range compute_overlaps_masks denorm_boxes unmold_mask download_trained_weights non_max_suppression minimize_mask annToRLE resize_mask extract_bboxes trim_zeros compute_confusion_matrix compute_matches batch_slice expand_mask box_refinement Dataset display_differences draw_box display_images draw_rois draw_boxes apply_mask random_colors display_instances display_table display_weight_stats plot_overlaps plot_precision_recall display_top_masks array load_image_gt fuse_instances show subplots class_names print shape display_instances range append around range time uint8 format evaluate COCOeval summarize print len astype extend accumulate build_coco_results loadRes load_image enumerate int min num_images lrate ljust print str str conv_block identity_block range stack minimum concat maximum set_shape split minimum reshape maximum tile expand_dims split concat reduce_max boolean_mask MASK_SHAPE crop_and_resize gather box_refinement_graph argmax round trim_zeros_graph ROI_POSITIVE_RATIO transpose squeeze pad cast expand_dims range floatx USE_MINI_MASK overlaps_graph int TRAIN_ROIS_PER_IMAGE maximum int32 split minimum apply_box_deltas_graph reshape clip_boxes_graph concat divide gather map_fn DETECTION_MAX_INSTANCES stack gather_nd DETECTION_MIN_CONFIDENCE pad set_intersection expand_dims argmax BBOX_STD_DEV DETECTION_SCORE_RATIO Input rpn_graph int_shape less floatx abs cast switch constant not_equal squeeze where mean sparse_categorical_crossentropy gather_nd cast int32 equal IMAGES_PER_GPU batch_pack_graph switch constant abs squeeze where mean gather_nd cast int32 floatx less sum equal reduce_sum sparse_softmax_cross_entropy_with_logits cast gather argmax switch constant reshape smooth_l1_loss mean int64 stack cast gather_nd gather switch constant reshape transpose mean shape int64 stack cast gather_nd gather binary_crossentropy switch constant reshape transpose mean shape int64 stack cast clip_by_value gather binary_crossentropy compose_image_meta resize_image zoom_in load_mask IMAGE_MAX_DIM shape MINI_MASK_SHAPE load_image augment_image minimize_mask astype resize_mask to_deterministic uint8 extract_bboxes min HooksImages zeros bool int ROI_POSITIVE_RATIO concatenate resize astype TRAIN_ROIS_PER_IMAGE compute_iou choice float32 MASK_SHAPE int32 box_refinement USE_MINI_MASK zeros argmax range sum zip ones compute_overlaps choice RPN_TRAIN_ANCHORS_PER_IMAGE zeros argmax amax len int sort min hstack randint zeros max range split image_ids arange IMAGE_SHAPE compute_backbone_shapes RPN_ANCHOR_RATIOS generate_pyramid_anchors BACKBONE_STRIDES MAX_GT_INSTANCES shape expand_dims load_image_gt build_rpn_targets astype shuffle copy choice generate_random_rois build_detection_targets RPN_ANCHOR_SCALES mold_image RPN_ANCHOR_STRIDE float32 extend zeros len list array float32 boolean_mask reduce_sum cast bool abs append range concat constant cast split concat constant cast split zeros array range minimum maximum zeros range compute_iou T astype float32 dot sum astype delete float32 compute_iou append astype float32 stack cast float32 log astype float32 log frPyObjects isinstance merge decode annToRLE dtype min pad resize randint max pad uint8 encode astype stack asfortranarray append argmax max range len dtype extract_bboxes min random astype resize_mask resize randint max iou getAnnIds any zeros getCatIds loadAnns range len astype resize zeros bool range astype resize zeros bool range zeros bool astype resize arange concatenate reshape flatten sqrt meshgrid array append generate_anchors range len ones trim_zeros compute_overlaps_masks range len arange concatenate cumsum compute_matches astype float32 maximum sum range len compute_ap format print mean append compute_overlaps set argmax max len list graph_fn zip append range len mkdir print dirname array array show subplot uint8 axis astype imshow title figure zip len list shuffle range where subplots axis show set_title apply_mask imshow find_contours range set_xlim astype copy zeros uint8 Polygon print text add_patch Rectangle randint fliplr set_ylim compute_matches display_instances concatenate len subplots arange rand axis Line2D unmold_mask shape title apply_mask imshow format set_xlim astype copy enumerate add_line print text add_patch Rectangle int32 set_ylim len format arange display_images unique append sum range format subplots set_title plot set_xlim set_ylim list format arange product yticks text xlabel tight_layout ylabel imshow figure xticks max range len subplots axis Line2D random_colors set_title apply_mask imshow find_contours range set_xlim astype copy zeros add_line uint8 Polygon text add_patch Rectangle int32 randint fliplr set_ylim HTML display get_trainable_layers name weights display_table append get_weights enumerate | <p align="center"> <img src="https://raw.githubusercontent.com/wiki/pedropro/TACO/images/logonav.png" width="25%"/> </p> TACO is a growing image dataset of waste in the wild. It contains images of litter taken under diverse environments: woods, roads and beaches. These images are manually labeled and segmented according to a hierarchical taxonomy to train and evaluate object detection algorithms. Currently, images are hosted on Flickr and we have a server that is collecting more images and annotations @ [tacodataset.org](http://tacodataset.org) <div align="center"> <div class="column"> | 3,283 |
peiyunh/alpf | ['active learning'] | ['Active Learning with Partial Feedback'] | script/data/tinyimagenet200/init_indexed_record.py questions.py script/data/cifar100/download_and_extract.py script/data/cifar100/init_indexed_record.py iters.py config.py script/data/tinyimagenet200/create_lst.py script/experiment/train_all_variants.py script/data/cifar10/init_indexed_record.py script/data/cifar10/download_and_extract.py init.py main.py model.py parse_args init_logger get_initializer init_network reinit_network cifar100_iterator MultiSequenceImageIter get_train_aug tinyimagenet200_iterator cifar10_iterator unpack_batch Model loss_func net_copy cifar10_questions_wordnet cifar100_questions_wordnet cifar10_all_questions cifar10_questions cifar100_questions tinyimagenet200_questions_wordnet saveCifarImage extractCategories extractImagesAndLabels init_indexed_record saveCifarImage extractCategories extractImagesAndLabels init_indexed_record init_indexed_record add_argument_group add_argument ArgumentParser get_initializer initialize initialize hybridize architecture get_initializer get_model setFormatter getLogger addHandler StreamHandler Formatter setLevel FileHandler CreateAugmenter batch_size reshape CreateAugmenter square mean sqrt get_train_aug num_threads MultiSequenceImageIter train_idx train_rec ImageIter batch_size reshape CreateAugmenter square mean sqrt get_train_aug num_threads MultiSequenceImageIter train_idx train_rec ImageIter batch_size reshape CreateAugmenter square mean sqrt get_train_aug num_threads MultiSequenceImageIter train_idx train_rec ImageIter softmax split_and_load debug set_data copy zip ones diag zeros range items concatenate ones name hypernym_paths logical_and where set add append zeros diag synsets enumerate load unique open zeros range len items concatenate name hypernym_paths logical_and where set add enumerate unique append zeros range synsets len items concatenate ones name hypernym_paths logical_and where set add append zeros diag enumerate load reshape array open load open COLOR_RGB2BGR transpose cvtColor close MXIndexedRecordIO | # Active Learning with Partial Feedback Peiyun Hu, Zack Lipton, Anima Anandkumar, Deva Ramanan ## Requirements - mxnet-cu90mkl==0.12.1 (or mxnet==0.12.1, mxnet-cu90==0.12.1) - opencv-python - numpy - nltk - tqdm ## Data preparation Since MXNet is more efficient when data is nicely serialized, we first prepare dataset in a record file. We include scripts that convert data form the original format into record files. We automated downloading for cifar10 and cifar100. For tinyimagenet200, please download it from [ImageNet's official website](http://www.image-net.org/download-images) after logging in. Please refer to scripts under script/data for more details. | 3,284 |
pencoa/state-lstm | ['relation extraction'] | ['N-ary Relation Extraction using Graph State LSTM'] | train.py utils/helper.py utils/vocab.py data/loader.py eval.py model/grn.py model/tree.py prepare_vocab.py utils/constant.py utils/torch_utils.py model/trainer.py utils/scorer.py entity_masks count_oov load_tokens main build_vocab parse_args get_positions get_long_tensor DataLoader map_to_ids sort_all word_dropout pool GGNNClassifier GGNNRelationModel State_LSTM rnn_zero_state unpack_batch GNNTrainer Trainer tree_to_adj head_to_tree tree_to_dist Tree FileLogger save_config print_config check_files ensure_dir check_dir load_config score parse_arguments load MyAdagrad change_lr load_config keep_partial_grad set_cuda flatten_indices save get_optimizer build_embedding Vocab load_glove_vocab add_argument ArgumentParser vocab_dir save list data_dir glove_dir count_oov load_tokens parse_args build_vocab build_embedding format wv_dim wv_file lower ensure_dir items print min_freq load_glove_vocab len print format len sorted format print len Counter VOCAB_PREFIX entity_masks sum Counter values LongTensor fill_ max PAD_ID enumerate list masked_fill Variable zeros Variable squeeze cuda int intersection_update add_child tolist len reversed add difference set append range enumerate zeros T children ones dist print format exit print format exit print format makedirs print format print format print items parse_args add_argument ArgumentParser max list sorted format print write Counter float sum keys range values len param_groups append range enumerate zero_ load_state_dict load uniform len set | State-LSTM for Relation Extraction ========== This repo contains the *PyTorch* code for the [State-LSTM](https://arxiv.org/abs/1808.09101) in relation extraction task. Difference between this repo and the [code](https://github.com/freesunshine0316/nary-grn) released by author - this repo is more clean, while the author's code including many unrelated code for Machine Reading, Sequence Tagging. - this repo is implemented in adjacency matrix manner. - this is using PyTorch, the author's code is using Tensorflow. The scaffold is forked from [this repo](https://github.com/qipeng/gcn-over-pruned-trees/blob/master/model/gcn.py). See below for an overview of the model architecture:  | 3,285 |
pengj97/Byzantine-robust-decentralized-stochastic-optimization | ['stochastic optimization'] | ['Byzantine-Robust Decentralized Stochastic Optimization over Static and Time-Varying Networks'] | MainModel.py Models/BRIDGE/bridge.py Models/ByRDiE/byrdie.py LoadMnist.py Attacks.py Models/DPSGD/dpsgd.py Config.py Draw.py Models/Ours/ours.py sign_flipping_attacks sample_duplicating_attack same_value_attack gen_graph draw draw_imopp get_image get_number get_label data_redistribute getData readfile Softmax get_learning_v2 get_learning get_accuracy get_vars predict bridge BRIDGEWorker byrdie ByRDiEWorker dpsgd DPSGDWorker gragh_timevarying OursWorker ours ones fast_gnp_random_graph connected_components remove_node copy yscale show plot yticks xlabel ylabel figure legend xticks range len yscale show plot yticks xlabel ylabel figure legend xticks range len append unpack_from array range unpack_from calcsize unpack_from get_number get_label get_image readfile append range len dot T argmax range predict len append mean array range get_learning get_accuracy open regular attack byzantine append range get_para dump format copy choice BRIDGEWorker info train int print data_redistribute getData zeros get_vars get_learning get_accuracy get_vars open list regular attack ByRDiEWorker byzantine append range get_para dump format copy choice info int print data_redistribute getData zeros train get_learning get_accuracy open DPSGDWorker regular attack byzantine append range get_para dump format copy choice info train int print data_redistribute getData zeros get_vars rand copy remove_edges_from edges append get_learning OursWorker get_accuracy get_vars open regular attack byzantine append range get_para dump format copy choice info int print gragh_timevarying data_redistribute getData zeros train | # Byzantine-Robust Decentralized Stochastic Optimization over Static and Time-varying Networks ## Paper * [Byzantine-Robust Decentralized Stochastic Optimization over Static and Time-varying Networks](https://www.sciencedirect.com/science/article/pii/S0165168421000591) ## Environment * python 3.7.0 ## Files * `Models`: Directory of the code of our proposed method and other benchmark methods, include DPSGD, BRIDGE, ByRDiE * The main code can be founded in `./Models/(method)/(method).py` . You can run the code and save the experiment results in `experiment-results` directory. * `Attacks.py`: Different Byzantine attacks, include same-value attacks, sign-flipping attacks, sample-duplicating attacks. | 3,286 |
peria1/VAEconvMNIST | ['style transfer'] | ['Deep Feature Consistent Variational Autoencoder'] | src/util.py src/vanilla_vae.py load_pickle disp_to_term save_pickle resume_training latent_space_transition perform_latent_space_arithmatics rand_faces last_model_to_cpu VAE test see2 loss_function load_last_model train write flush load close open dump close open reconstruction_function recon_loss add_ mul_ format model backward print pause zero_grad see2 loss_function item to step cuda enumerate len data format model print eval to enumerate save_image data decode ndf ngf linspace save_image cuda view iter append cat nc get_latent_var stack eval load_last_model zip Variable split data decode ndf ngf linspace save_image cuda view iter append cat nc get_latent_var stack eval load_last_model zip Variable split data decode latent_variable_size randn Variable eval load_last_model save_image cuda load glob print load_state_dict max format test load_last_model save train epochs range state_dict cpu load_last_model save state_dict imshow numpy permute concatenate | # Variational Autoencoder for face image generation in PyTorch Variational Autoencoder for face image generation implemented with PyTorch, Trained over a combination of CelebA + FaceScrub + JAFFE datasets. Based on Deep Feature Consistent Variational Autoencoder (https://arxiv.org/abs/1610.00291 | https://github.com/houxianxu/DFC-VAE) TODO: Add DFC-VAE implementation Pretrained model available at https://drive.google.com/open?id=0B4y-iigc5IzcTlJfYlJyaF9ndlU ## Results Original Faces vs. Reconstructed Faces: <div> <img src='imgs/Epoch_28_data.jpg', width="48%"> <img src='imgs/Epoch_28_recon.jpg', width="48%"> | 3,287 |
perrying/ssn-pytorch | ['superpixels'] | ['Superpixel Sampling Networks'] | train.py lib/dataset/augmentation.py lib/ssn/test.py lib/utils/sparse_utils.py lib/dataset/bsds.py lib/ssn/pair_wise_distance.py inference.py lib/ssn/pair_wise_distance_cuda_source.py lib/utils/loss.py lib/utils/meter.py model.py lib/ssn/ssn.py inference SSNModel conv_bn_relu eval train update_param RandomCrop Compose RandomHorizontalFlip RandomScale convert_label BSDS PairwiseDistFunction sparse_ssn_iter get_abs_indices get_hard_abs_labels calc_init_centroid ssn_iter naive_pair_wise_dist test reconstruction reconstruct_loss_with_cross_etnropy reconstruct_loss_with_mse sparse_reconstruction Meter sparse_permute naive_sparse_bmm load int arange model float sqrt eval stack rgb2lab load_state_dict meshgrid to numpy max cat int arange model float reshape train sqrt stack numpy nspix meshgrid to achievable_segmentation_accuracy max cat int arange model backward float reshape step zero_grad sqrt stack nspix meshgrid to reconstruct_loss_with_cross_etnropy max cat reconstruct_loss_with_mse pos_scale state batchsize color_scale Meter DataLoader save str BSDS Adam add to state_dict Compose eval lr update_param root is_available compactness join int time print parameters out_dir tolist astype float32 shape reshape adaptive_avg_pool2d device arange shape device long cat arange cat int get_abs_indices reshape sparse_coo_tensor apply get_hard_abs_labels sqrt softmax permute naive_sparse_bmm calc_init_centroid range int bmm get_abs_indices reshape contiguous sparse_coo_tensor apply get_hard_abs_labels sqrt softmax calc_init_centroid sum range int fill_ shape stack device append sum range naive_pair_wise_dist backward print grad apply gradcheck zero_ to contiguous stack sparse_permute naive_sparse_bmm bmm contiguous sum stack reconstruction sum reconstruction list contiguous values indices | # Superpixel Sampling Networks PyTorch implementation of Superpixel Sampling Networks paper: https://arxiv.org/abs/1807.10174 original code: https://github.com/NVlabs/ssn_superpixels # Requirements - PyTorch >= 1.4 - scikit-image - matplotlib # Usage ## inference | 3,288 |
peteflorence/visuomotor_correspondence | ['imitation learning'] | ['Self-Supervised Correspondence in Visuomotor Policy Learning'] | deploy/ros_imitation_parser.py nodes/lstm_ee_position_agent_node.py model/load_and_run_model.py nodes/mlp_ee_position_agent_node.py deploy/ros_task_space_control_agent.py experiments/01/move_to_box_vision_comparison.py test/test_imitation_episode.py tools/convert_yaml_to_json.py dataset/simple_dataset_test.py evaluation/push_plate_evaluator.py model/model_based_vision.py tools/log_plot.py training/train_vis.py model/model_factory.py objects/sugar_box.py tools/fix_unlogged_rotations.py nodes/ee_velocity_agent_node.py experiments/05/flip_box_vision_comparison_LSTM.py tools/debug_plot.py dataset/feature_saver.py training/train_pose_estimation.py dataset/compute_object_start_poses.py dataset/precompute_helper_dataset.py experiments/06/push_plate_vision_comparison.py model/spatial_autoencoder.py experiments/03/push_box_vision_comparison.py dataset/statistics.py tasks/push_plate.py tasks/move_to_box.py tasks/push_box.py dataset/imitation_episode_sequence_dataset.py evaluation/push_box_evaluator.py test/test_visibility_checker.py training/optimizer_schedulers.py training/train_lstm.py utils/utils.py dataset/dataset_utils.py evaluation/dataframe_wrapper.py deploy/mlp_ee_position_agent.py dataset/convex_hull_helper.py model/mlpstateless.py deploy/lstm_ee_position_agent.py model/lstm_standard.py deploy/ee_velocity_agent.py dataset/imitation_episode_dataset.py loss_functions/loss_functions.py dataset/function_factory.py test/test_flip_box_reward.py tasks/flip_box.py dataset/directory_structure.py evaluation/move_to_box_evaluator.py deploy/software_safety.py utils/visibility_checker.py training/train_utils.py model/train_autoencoder.py experiments/03/push_box_vision_comparison_LSTM.py deploy/utils.py training/train_mlp_position.py dataset/compute_object_pose_distribution.py experiments/pose/train_pose.py experiments/02/move_to_box_se2_sample_complexity.py utils/visibility_utils.py model/visuo_motor.py dataset/imitation_episode.py model/don_spatial_softmax.py training/train_ee_velocity.py config/parameters.py dataset/compute_visible_logs.py run run run ConvexHullHelper build_spartan_dataset get_object_starting_poses SingleEpisodeDirectoryStructure ImitationEpisodeDataset ImitationEpisodeSequenceDataset PrecomputeHelperDataset test_sequence_dataset test_stateless_dataset EEVelocityAgent LSTMPositionAgent MLPPositionAgent compute_action ROSTaskSpaceControlAgent tf_matrix_from_pose interpolate_frames make_cartesian_gains_msg PandaDataFrameWrapper run_one_lstm_position_agent load_network_mlp_position MoveToBoxPandasTemplate construct_imitation_episode get_most_recent_network_lstm_position load_network_lstm_position test FlipBoxPandasTemplate run_one_mlp_position_agent get_most_recent_network_mlp_posiiton MoveToBoxEvaluator run_one_lstm_position_agent load_network_mlp_position PushBoxEvaluator construct_imitation_episode PushBoxPandasTemplate get_most_recent_network_lstm_position load_network_lstm_position test sample_initial_pose_uniform run_one_mlp_position_agent get_most_recent_network_mlp_posiiton run_one_lstm_position_agent load_network_mlp_position PushPlatePandasTemplate construct_imitation_episode run_one_mlp_position_agent get_most_recent_network_lstm_position load_network_lstm_position test PushPlateEvaluator get_most_recent_network_mlp_posiiton get_deploy_cmd get_deploy_cmd NLL_MDN l2_l1 cosine_loss acos_loss l2_sequence l1_scaled l2_scaled log_vectorized_norm_pdf_multivariate_torch_s parse_mdn_params DenseObjectNetSpatialSoftmax LSTMStandard MLPStateless hard_pixels_to_3D_world soft_pixels_to_3D_world compute_expected_z ModelFactory SpatialAutoencoderWrapper SpatialAutoencoder VisuoMotorNetwork load_network construct_imitation_episode construct_imitation_episode get_most_recent_network shoe_flip_reset hang_hat_reset grab_plate_reset load_network push_box_reset get_most_recent_network load_network construct_imitation_episode compute_reward is_sucessful vectors_within_angle_threshold is_vertical angle_error_to_target get_end_effector_to_box compute_ee_target_pose compute_reward compute_transform_cost compute_reward should_terminate should_terminate compute_distance_to_goal sample_initial_pose test_vertical_check test_imitation_episode plot_y_action_correlation minimize_mse_y construct_dataset plot_y_object_correlation plot_x_object_correlation plot_actions_test plot_dynamic_pose construct_dataset plot_actions plot_dynamic_pose_angle_axis plot_observations plot_dynamic_pose_pos construct_network train save_network construct_dataset construct_trainset_testset construct_loss_criterion train save_network construct_network compute_test_loss construct_trainset_testset construct_loss_criterion train save_network construct_network compute_test_loss visualize construct_trainset_testset train save_network compute_test_loss construct_pose_network draw_2d_trajectory_plots draw_signal_fitting_plots get_T_W_Cnominal_from_config get_deploy_image_topic_from_config get_image_index_to_sample_from_config get_software_safety_params_from_config get_gripper_width_default_from_config sugar_box_visible check_point_in_frame check_sugar_box_in_frame join sim_config_file SingleEpisodeDirectoryStructure saveToYaml print read_json state_file append getDictFromYamlFilename array get_object_starting_poses save dict append keys ib join get_data_dir print len getSpartanSourceDir shape action_from_config ImitationEpisodeSequenceDataset getDictFromYamlFilename type keys range get_function join get_data_dir print len getSpartanSourceDir shape action_from_config ImitationEpisodeDataset getDictFromYamlFilename type keys range get_function T_cmd_E print rotation_matrix_from_angle_axis matmul dict eye get_gripper_width_default_from_config zeros CartesianGain quaternion_matrix norm angle_axis_from_rotation_matrix inv as_dcm matmul eye join get_data_dir join get_data_dir print load get_most_recent_network_lstm_position print load get_most_recent_network_mlp_posiiton ImitationEpisode action_from_config get_function _config join seed make_deterministic init_node construct_imitation_episode run_loop_of_deploys getSpartanSourceDir load_network MoveToBoxEvaluator _config load unset_use_precomputed_descriptor_images join set_use_flip set_use_se2 print init_node construct_imitation_episode unset_use_precomputed_features ConvexHullHelper load_network_lstm_position dict set_random_seed run_single_deploy MoveToBoxEvaluator _config load unset_use_precomputed_descriptor_images load_network_mlp_position join set_use_se2 set_use_flip init_node construct_imitation_episode unset_use_precomputed_features ConvexHullHelper set_random_seed run_single_deploy MoveToBoxEvaluator uniform array pi deg2rad PushBoxEvaluator PushBoxEvaluator PushBoxEvaluator print PushPlateEvaluator PushPlateEvaluator PushPlateEvaluator clamp norm sum acos l2_scaled l1_scaled l2_scaled cuda pi pow float sum prod len exp detach view squeeze shape sum log_vectorized_norm_pdf_multivariate_torch_s parse_mdn_params pinhole_projection_image_to_world_coordinates numpy cuda range unsqueeze interpolate sum cuda range pinhole_projection_image_to_world_coordinates eye numpy cuda range load join get_data_dir getSpartanSourceDir join get_data_dir print moveToJointPosition sleep print moveToJointPosition sendGripperCommand sleep print moveToJointPosition sendGripperCommand moveToJointPosition print exit sendGripperCommand grab_mouse_focus raw_input release_mouse_focus sleep get_most_recent_network dot norm dot array angle_axis_from_rotation_matrix norm inv matmul is_sucessful angle_error_to_target rad2deg array quaternion_matrix get_end_effector_to_box matmul compute_ee_target_pose inv compute_transform_cost matmul abs norm rotation_from_matrix deg2rad norm angle_axis_from_rotation_matrix deg2rad array clip compute_distance_to_goal uniform array print is_sucessful rad2deg quaternion_matrix angle_error_to_target is_vertical array ImitationEpisodeConfig zeros array action_from_config ImitationEpisodeDataset observation_from_config scatter numpy scatter numpy scatter numpy print mean append tensor float range len ee_position_history_observation ImitationEpisodeSequenceDataset arange plot print shape numpy arange plot print shape numpy arange plot print shape numpy numpy arange plot numpy arange plot numpy arange plot get_function get_model join zfill save StepOpt construct_dataset zero_grad DataLoader Logger xrange set_normalization_parameters cuda Adam construct_network param_groups l1_scaled log_value compute_dataset_statistics save_network item enumerate join initialize_parameters_via_dataset time backward print makedirs parameters step network len dict action_from_config ImitationEpisodeSequenceDataset get_function str time print NLL_MDN l2_l1 set_states_initial asarray zip print chunk dict dot eval log_value item append loss_criterion train sum cuda enumerate detach construct_trainset_testset randn rate clip_grad_norm_ _vision_net compute_sequence_dataset_statistics __getitem__ str forward_on_series loss_criterion action_size exit set_use_precomputed_descriptor_images precompute_all_features RMSprop gumbel_sample cat saveToYaml construct_loss_criterion chunk precompute_all_descriptor_images zip set_use_precomputed_features compute_test_loss keys set_states_initial set_states_zero dict set_do_surfing set_length detach_parameters ImitationEpisodeDataset unset_visualize set_visualize detach N_TEST_IMG rgb_image_to_tensor dict eval get_rgb_image_from_scene_name_and_idx_and_cam train cuda range len unset_use_only_first_index array set_use_only_first_index compute_dataset_statistics_with_precomputed_features precompute_only_first_frame_features compute_dataset_statistics_with_precomputed_descriptor_images SpatialAutoencoder forward_for_pose construct_pose_network l2_scaled make_deterministic arange plot pause draw legend cpu numpy cla plot pause draw cpu numpy cla array T_E_cmd matmul T_W_cmd_init join euler_matrix get_camera_pose_matrix print check_sugar_box_in_frame len get_K_matrix getSpartanSourceDir action_from_config ImitationEpisodeDataset get_entry xrange getDictFromYamlFilename homogenous_transform_from_dict get_function pinhole_projection_world_to_image check_point_in_frame range points | This is the code used for our paper "Self-Supervised Correspondence in Visuomotor Policy Learning". See the paper [here on arXiv](https://arxiv.org/pdf/1909.06933.pdf). [](https://www.youtube.com/watch?v=nDRBKb4AGmA) ## Documentation to come Without documentation, this code will not be of much use to try and actually use. We've open-sourced it sooner-than-later so we can more easily point people to it as reference. Soon we will have documentation. Stay tuned! | 3,289 |
peter-yh-wu/multilingual | ['data augmentation'] | ['Automatically Identifying Language Family from Acoustic Examples in Low Resource Scenarios'] | src/build_ethnologue_tree.py src/evaluate_embs.py main stock_img verbose ArgumentParser save max std colorbar mk_ancestor_mat title scatter savefig DictImporter append parse_args RenderTree fit_transform range import_ get_node_ethnologue set mean enumerate load axes add_argument makedirs fit index path figure array len | # Automatically Identifying Language Family from Acoustic Examples in Low Resource Scenarios Code for respective [paper](https://arxiv.org/pdf/2012.00876). ## Background Existing multilingual speech NLP works focus on a relatively small subset of languages, and thus current linguistic understanding of languages predominantly stems from classical approaches. In this work, we propose a method to analyze language similarity using deep learning. Namely, we train a model on the Wilderness dataset and investigate how its latent space compares with classical language family findings. Our approach provides a new direction for cross-lingual data augmentation in any speech-based NLP task. ## Quick Start - Download language embeddings from [here](https://drive.google.com/file/d/190kaLfQtYDEzaScb2_P2nsTkUEcxE5zf/view?usp=sharing). - Download Ethnologue language family trees from [here](https://drive.google.com/file/d/1wFXfhhDc2Fwk8oyhdq5VQF3W_f8XwG8P/view?usp=sharing). - Move `ethnologue_forest.json` to the `metadata` folder. - `pip3 install -r requirements.txt` - `cd src` | 3,290 |
peterbjorgensen/vorosym | ['formation energy'] | ['Materials property prediction using symmetry-labeled graphs as atomic-position independent descriptors'] | setup.py src/vorosym/voronoi.py src/examples/plot_faces.py src/vorosym/__init__.py rotation_matrix reflection atoms_to_graph_voronoi orthogonal_proj plot_individual_faces plot_faces VoronoiCell polygon_solid_angle axis_align_cell voro_tessellate ase_axis_align_cell solid_angle VoronoiFace faces list symmetries area distance voro_tessellate solid_angle append atom_to_node_fn get_atomic_numbers sum range len set_aspect Axes3D asarray set_ylim3d print set_axis_off cell get_positions set_zlim3d add_collection3d voro_tessellate figure set_xlim3d diag Poly3DCollection set_aspect normal join faces rotation_matrix set_title Polygon set_axis_off cell add_subplot set_xlim get_positions add_patch voro_tessellate figure vertices diag set_ylim reflection norm eye len dot reshape dot det norm prod T get_scaled_positions set_scaled_positions qr set_cell get_scaled_positions set_scaled_positions wrap cell_to_cellpar cellpar_to_cell get_cell set_cell VoronoiCell append get_scaled_positions ase_axis_align_cell add_face get_cell VoronoiFace tessellate | # vorosym Python library (numpy extension) for Voronoi diagrams with periodic boundary conditions and symmetry measures The library implements the construction of symmetry labeled graphs from atomic positions as described in our paper: *Materials property prediction using symmetry-labeled graphs as atomic-position independent descriptors* [arXiv:1905.06048](https://arxiv.org/abs/1905.06048) # install Make sure the following dependencies are installed on the system - [Voro++](http://math.lbl.gov/voro++/) - Computes the Voronoi diagram - [CGAL](https://www.cgal.org/) - Used for convex hull computations - [gmp](http://gmplib.org/) - Required by CGAL run | 3,291 |
pfnet-research/autogbt-alt | ['automl'] | ['Automatically Optimized Gradient Boosting Trees for Classifying Large Volume High Cardinality Data Streams Under Concept Drift'] | autogbt/preprocessor.py autogbt/objective.py autogbt/classifier.py autogbt/sampler/__init__.py benchmark/vis_model_and_task.py autogbt/logging.py benchmark/main.py autogbt/validation.py autogbt/sampler/train_data_sampler.py autogbt/sampler/null_sampler.py autogbt/__init__.py example/custom_objective.py autogbt/regressor.py example/breast_cancer.py test/test_sampler.py autogbt/sampler/majority_under_sampler.py benchmark/vis_frac_and_duration.py benchmark/dataset.py test/test_regressor.py autogbt/trainer.py autogbt/optimizer.py test/test_train_data_sampler.py benchmark/print.py test/test_classifier.py benchmark/const.py test/test_preprocessor.py setup.py autogbt/average.py example/boston.py AveragingLGBMClassifier AutoGBTClassifier _configure get_logger Objective create_optimizer OptunaOptimizer _extract_datetime_features _datetime_columns Preprocessor _extract_datetime_difference AutoGBTRegressor GBTCVTrainer create_trainer validate_dataset MajorityUnderSampler NullTrainDataSampler TrainDataSampler get main main _handle_nan main main main main main CustomObjective test_check_estimator test_init test_extract_datetime_features test_extract_datetime_difference test_check_estimator test_sample_for_regression test_sample_with_series _test_sample test_sample_with_ndarray test_sample test_init setFormatter getLogger handlers addHandler StreamHandler ColoredFormatter setLevel INFO _configure OptunaOptimizer _datetime_columns astype range len _datetime_columns getattr dt GBTCVTrainer check_X_y DataFrame Series pop parent to_datetime astype DataFrame read_csv model_train_frac model TrainDataSampler Path ArgumentParser AutoGBTClassifier DataFrame exists roc_auc_score seed n_trials map XGBClassifier parse_args get_logger KFold get LGBMClassifier Preprocessor mkdir best_score info join task time n_jobs result_dir add_argument to_csv model_valid_frac transform fit groupby models values str columns apply input append sort_values reset_index agg competitions compute pop print tabulate sorted name ylabel title savefig legend errorbar unique enumerate xlabel figure mean_squared_error load_boston AutoGBTRegressor train_test_split predict load_breast_cancer check_estimator _extract_datetime_features DataFrame DataFrame _extract_datetime_difference Preprocessor sample MajorityUnderSampler sample Series _test_sample concatenate _test_sample concatenate sample MajorityUnderSampler concatenate TrainDataSampler arange TrainDataSampler Series sample zeros DataFrame | ## About This is an experimental Python package that reimplements [AutoGBT](https://github.com/flytxtds/AutoGBT) using [LightGBM](https://github.com/Microsoft/LightGBM) and [Optuna](https://github.com/pfnet/optuna/). AutoGBT is an automatically tuned machine learning classifier which won the first prize at [NeurIPS'18 AutoML Challenge](https://competitions.codalab.org/competitions/19836). AutoGBT has the following features: * Automatic Hyperparameter Tuning: the hyperparameters of LightGBM are automatically optimized, * Automatic Feature Engineering: simple feature engineering is applied for categorical and datetime features, and * Automatic Sampling: data rows are sampled for handling imbalanced and large datasets. This implementation has the following differences from original AutoGBT: 1. This implementation uses Optuna for the hyperparameter tuning of LightGBM instead of [Hyperopt](https://github.com/hyperopt/hyperopt), 1. it optimizes k-fold cross-validation AUC score, and 1. it equips simplified scikit-learn-like API interface. ## Installation | 3,292 |
pfnet-research/chainer-gogh | ['style transfer'] | ['A Neural Algorithm of Artistic Style'] | models.py chainer-gogh-multi.py chainer-gogh.py subtract_mean Clip image_resize get_matrix add_mean save_image generate_image subtract_mean Clip image_resize get_matrix add_mean save_image generate_image VGG_chainer VGG I2V GoogLeNet NIN copy copy print reshape subtract_mean astype float32 zeros open get to_img add_mean reshape float32 batch_matmul data zeros_like zero_grads lam save_image forward setup Adam shape uniform range update astype zeros backward Variable print float32 get_matrix out_dir mean_squared_error len matmul W Parameter matmul grad zerograds reshape | # chainer-gogh Implementation of "A neural algorithm of Artistic style" (http://arxiv.org/abs/1508.06576) in Chainer. The Japanese readme can be found [here](README-ja.md). ## Accompanying article: https://research.preferred.jp/2015/09/chainer-gogh/ <img src="https://raw.githubusercontent.com/mattya/chainer-gogh/master/sample_images/cat.png" height="150px"> <img src="https://raw.githubusercontent.com/mattya/chainer-gogh/master/sample_images/style_0.png" height="150px"> <img src="https://raw.githubusercontent.com/mattya/chainer-gogh/master/sample_images/im0.png" height="150px"> <img src="https://raw.githubusercontent.com/mattya/chainer-gogh/master/sample_images/style_1.png" height="150px"> <img src="https://raw.githubusercontent.com/mattya/chainer-gogh/master/sample_images/im1.png" height="150px"> <img src="https://raw.githubusercontent.com/mattya/chainer-gogh/master/sample_images/style_2.png" height="150px"> <img src="https://raw.githubusercontent.com/mattya/chainer-gogh/master/sample_images/im2.png" height="150px"> | 3,293 |
pg2455/AudioAge | ['outlier detection', 'anomaly detection', 'semi supervised anomaly detection'] | ['Deep Semi-Supervised Anomaly Detection'] | mlogger/test/test_index.py run-gausswindow.py train.py train_anom.py shell_utils.py train_transfer.py data_cleaning.py confusion.py configuration.py mlogger/logger/stdout.py mlogger/logger/metrics.py mlogger/examples/example.py mlogger/logger/__init__.py mlogger/logger/xp.py train_utils.py mlogger/logger/index.py mlogger/logger/utils.py mlogger/test/test_xp.py basics.py mlogger/logger/plotter.py mlogger/test/test_metrics.py base_utils.py mlogger/setup.py audio_norm parse_soundfile Params set_logger async_playback transcribe_audio_google transcribe_audio_sphinx audio_norm sync_playback covert_all get_lr_l2_combinations tabulate_results generate_shell_script FixedDict eval_model compute_loss loss_fn train get_weight_vector train eval_model compute_loss get_weight_vector loss_fn train eval_model compute_loss FileIterator AgeDataHandler init_visdom AnomModel training_data validation_data test_data oracle random_data_generator TimeIndex_ ValueIndex_ Index_ AvgMetric_ SimpleMetric_ Accumulator_ DynamicMetric_ BestMetric_ TimeMetric_ SumMetric_ ParentWrapper_ BaseMetric_ Cache Plotter stdout_to WriteOut_ to_float Experiment _dict_process TestValueIndexer TestTimeIndexer TestAvgMetric TestSimpleMetric TestSumMetric TestBestMetric TestParentWrapper TestTimeMetric TestExperiment min max read audio_norm pad mfcc randint spectrogram len setFormatter basicConfig getLogger addHandler StreamHandler Formatter setLevel INFO FileHandler load sleep init play read play Recognizer recognize_sphinx Recognizer recognize_google_cloud join remove FFmpeg listdir run append join dump format get_lr_l2_combinations dict save open Params makedirs load join from_tuples format columns list to_string DataFrame print sort_values range append Params walk len loss_fn model backward len parse_soundfile stack append zeros cuda enumerate compute_loss enumerate zero_grad compute_loss save state_dict update format eval_model sqrt plot_norm info log_metrics update_metrics enumerate load join requires_grad print dict parameters isfile step BCEWithLogitsLoss get float where mean eval train sum roc_auc_score item squeeze flatten repeat sum len Experiment ParentWrapper log_config normal randint range rand numel size ndarray isinstance pop items sorted defaultdict list OrderedDict dict append keys split | # Use of Audio Features from Age Detector to Diagnose Cognitive Impairment ## Data Quality in Healthcare Data collection in healthcare is expensive and time consuming. Most importantly, it should be done with utmost care because a poor data quality will only push back the progress of AI in healthcare. The machine learning community has been working hard to beat the benchmarks on the healthcare datasets. However, a recent research [1] revisited some of these healthcare datasets to evaluate their quality which wasn't found to be at par with experts. On the other hand, collecting data in healthcare for rare diseases just takes time. For example, if one needs to study the correlation between the changes in voice patterns and the decline of cognitive status in an Alzheimer's patient, the study needs to be done across several years to uncover any meaningful insights. And this needs to be done for several patients. And it needs to be done with high quality microphones so that the models can be built upon them. | 3,294 |
pgcool/Cross-sentence-Relation-Extraction-iDepNN | ['relation extraction'] | ['Neural Relation Extraction Within and Across Sentence Boundaries'] | code/core/idepnn/rnn/elman_bidirection_RC.py code/core/idepnn/rnn/elman_bidirection_RC_LSTM.py code/core/idepnn/utils/features_muc6.py code/core/idepnn/recursive_net_utils/recursive_nn.py code/core/idepnn/utils/features_bb2016.py code/scripts/postprocessing/bb2016_evaluation/bb2016_threshold.py code/core/idepnn/utils/tools.py code/core/idepnn/utils/getMacroFScore_bb2016.py code/core/idepnn/utils/getMacroFScore.py code/core/idepnn/utils/load_save_pkl.py code/scripts/postprocessing/bb2016_evaluation/load_save_pkl.py code/scripts/postprocessing/bb2016_evaluation/bionlp_rnn_results_annotations.py code/scripts/postprocessing/bb2016_evaluation/bb2016_threshold_dev.py code/scripts/preprocessing/bionlp/generate_pos.py code/scripts/preprocessing/muc6/generate_muc6_data.py code/scripts/postprocessing/bb2016_evaluation/bionlp_svm_results_annotations.py code/core/idepnn/recursive_net_utils/data_utils.py code/core/idepnn/utils/__init__.py code/core/idepnn/utils/features.py code/core/idepnn/recursive_net_utils/tree_rnn.py code/core/idepnn/utils/features_bb2011_13.py code/core/idepnn/optimiser/grad_optimiser.py code/scripts/preprocessing/bionlp/generate_bb_training_data_2016_negatives.py code/scripts/postprocessing/bb2016_evaluation/bionlp_rnn_results_annotations_dev.py code/scripts/preprocessing/bionlp/generate_sdp.py code/scripts/preprocessing/bionlp/generate_bb_training_data_2016.py code/core/idepnn/utils/getMacroFScore_muc6.py code/core/idepnn/load_save_pkl.py code/core/idepnn/optimiser/test.py code/core/idepnn/elman-bidirection.py code/core/idepnn/recursive_net_utils/test.py code/core/idepnn/utils/getMacroFScore_bb2011_13.py code/scripts/postprocessing/bb2016_evaluation/bb2016_threshold_ensemble.py code/core/idepnn/utils/theano_expressions.py code/scripts/postprocessing/bb2016_evaluation/bionlp_svm_results_annotations_dev.py code/scripts/preprocessing/bionlp/generate_pos_iob.py code/core/idepnn/hyper_param_search.py code/scripts/postprocessing/bb2016_evaluation/bb2016_threshold_ensemble_dev.py code/core/idepnn/rnn/elman_bidirection_RC_to_be_used.py run load_pickle_file save_as_pkl_json save_as_pkl create_optimization_updates read_trees _remap_tokens_and_labels recnn_read_muc6_dataset read_embeddings_into_numpy combine_parents_list combine_data_samples read_tree recnn_read_dataset_inter read_sentences Vocab read_sent_tree get_model RecursiveNNModel _clear_indices gen_nn_inputs TreeRNN BinaryNode _get_tree_traversal Node _get_leaf_vals EB_RNN_4 EB_LSTM EB_RNN_4 read_filler_candidate_sent_list_bk read_semVal_test get_word_vectoriser_vocab_size_tokenized_sents replace_regex_fn get_position_features_for_each_token read_semVal_train remove_stop_words get_position_features_for_each_token_slot_fill numpy_floatX replace_numbers_fn read_iob get_w2v_emb_dict_vocab remove_punctuation_from_sentences get_stop_word_list get_entity_presence_position_features_NEs get_train_test_word_indices minibatch get_entity_presence_in_context_window read_slot_fill generate_dict_for_word2vec_emb get_train_test_word_indices_from_emb_dict label_words_by_NE replace_time_units_fn repalce_currency_symbols_fn shuffle get_word2vec_emb get_text_neighbourhood_to_entity get_train_dev_test_word_indices_from_emb_dict read_filler_candidate_sent_list get_word_vectoriser_vocab_size get_word2vec_emb_entity_presence_position_features get_NER_for_entity_from_relation_type get_train_test_word_indices_slot_fill get_target_entities_locs get_w2v_emb_dict_full_vocab get_one_hot_word_representation contextwin extract_target_entities_from_sentence read_postag read_train read_filler_candidate_sent_list_bk read_semVal_test get_word_vectoriser_vocab_size_tokenized_sents replace_regex_fn get_position_features_for_each_token read_semVal_train remove_stop_words get_position_features_for_each_token_slot_fill numpy_floatX replace_numbers_fn read_iob get_w2v_emb_dict_vocab remove_punctuation_from_sentences get_stop_word_list get_entity_presence_position_features_NEs get_train_test_word_indices minibatch get_entity_presence_in_context_window read_slot_fill generate_dict_for_word2vec_emb get_train_test_word_indices_from_emb_dict label_words_by_NE replace_time_units_fn shuffle get_word2vec_emb get_text_neighbourhood_to_entity get_train_dev_test_word_indices_from_emb_dict read_filler_candidate_sent_list get_word_vectoriser_vocab_size get_word2vec_emb_entity_presence_position_features get_NER_for_entity_from_relation_type get_train_test_word_indices_slot_fill get_target_entities_locs get_w2v_emb_dict_full_vocab get_one_hot_word_representation contextwin extract_target_entities_from_sentence replace_currency_symbols_fn read_postag read_train read_filler_candidate_sent_list_bk read_semVal_test get_word_vectoriser_vocab_size_tokenized_sents replace_regex_fn get_position_features_for_each_token read_semVal_train remove_stop_words get_position_features_for_each_token_slot_fill numpy_floatX replace_numbers_fn read_iob get_w2v_emb_dict_vocab remove_punctuation_from_sentences get_stop_word_list get_entity_presence_position_features_NEs get_train_test_word_indices minibatch get_entity_presence_in_context_window read_slot_fill generate_dict_for_word2vec_emb get_train_test_word_indices_from_emb_dict label_words_by_NE replace_time_units_fn shuffle get_word2vec_emb get_text_neighbourhood_to_entity get_train_dev_test_word_indices_from_emb_dict read_filler_candidate_sent_list get_word_vectoriser_vocab_size get_word2vec_emb_entity_presence_position_features get_NER_for_entity_from_relation_type get_train_test_word_indices_slot_fill get_target_entities_locs get_w2v_emb_dict_full_vocab get_one_hot_word_representation contextwin extract_target_entities_from_sentence replace_currency_symbols_fn read_postag read_train read_filler_candidate_sent_list_bk read_semVal_test get_word_vectoriser_vocab_size_tokenized_sents replace_regex_fn get_position_features_for_each_token read_semVal_train remove_stop_words get_position_features_for_each_token_slot_fill numpy_floatX replace_numbers_fn read_iob get_w2v_emb_dict_vocab remove_punctuation_from_sentences get_stop_word_list get_entity_presence_position_features_NEs get_train_test_word_indices minibatch get_entity_presence_in_context_window read_slot_fill generate_dict_for_word2vec_emb get_train_test_word_indices_from_emb_dict label_words_by_NE replace_time_units_fn shuffle get_word2vec_emb get_text_neighbourhood_to_entity get_train_dev_test_word_indices_from_emb_dict read_filler_candidate_sent_list get_word_vectoriser_vocab_size get_word2vec_emb_entity_presence_position_features get_NER_for_entity_from_relation_type get_train_test_word_indices_slot_fill get_target_entities_locs get_w2v_emb_dict_full_vocab get_one_hot_word_representation contextwin extract_target_entities_from_sentence replace_currency_symbols_fn read_postag read_train getMacroFScore getRelation getIndex getMacroFScore getRelation getIndex getMacroFScore getRelation getIndex getMacroFScore getRelation getIndex load_pickle_file save_as_pkl_json save_as_pkl l2_norm hessian_times_vector minibatch contextwin shuffle dict_subset pack named_copy shared_floatx zipdir run_evaluation get_svm_predictions_prob get_predictions_prob run_evaluation ensure_directory zipdir get_predictions_prob_dev run_evaluation ensure_directory get_svm_predictions_prob_dev zipdir zipdir run_evaluation zipdir run_evaluation zipdir run_evaluation zipdir run_evaluation load_pickle_file save_as_pkl_json save_as_pkl get_filepaths gen_annotation_dict_doc_list_dict get_filepaths gen_annotation_dict_doc_list_dict write_pos write_pos_iob generate_sdp get_entity_index prepare_svm_dep_sdp annotate_sentences extract_sentences generate_rel_tuples generate_key_dict annotate_sentence permutation score save predict_prob abs argmax round read_iob open seed str EB_RNN_4 get_w2v_emb_dict_vocab normalize_pos_emb train_step gen_nn_inputs getMacroFScore exit get_entity_presence_position_features_NEs get_train_test_word_indices append generate_dict_for_word2vec_emb get_entity_presence_in_context_window normalize classify range precision_recall_fscore_support format inf replace amax readlines recnn_read_dataset_inter astype today get_train_dev_test_word_indices_from_emb_dict close sqrt mkdir normalize_ent_pres_emb get_word_vectoriser_vocab_size EB_LSTM float get_word2vec_emb_entity_presence_position_features enumerate load int time effective_momentum join normalize_pos_emb_e2 isdir print reshape write index get_one_hot_word_representation normalize_pos_emb_e1 contextwin normalize_ent_pres_emb_e1 read_postag load_pickle_file amin array read_train len load close open dump close open dump close open minimum norm floatX astype OrderedDict sqrt cast zip shared insert extend index append enumerate int read_sent_tree _remap_tokens_and_labels replace combine_parents_list print insert combine_data_samples append max range enumerate int read_sent_tree list _remap_tokens_and_labels replace print insert zip append max range enumerate children add_child Node sum max range values len children add_child Node sum max range values len _clear_indices extend _get_tree_traversal _get_leaf_vals len val all extend reversed sent_idx append label enumerate extend reversed sent_idx append label len str replace lower find split findall lstrip rstrip split rstrip replace lstrip findall split lstrip rstrip split lstrip rstrip split minimum rindex index len get_NER_for_entity_from_relation_type replace get_target_entities_locs strip append split append strip str rindex replace replace_time_units_fn print repalce_currency_symbols_fn strip exit len index get_text_neighbourhood_to_entity delete sub append get_position_features_for_each_token_slot_fill replace_numbers_fn split str rindex replace replace_time_units_fn print repalce_currency_symbols_fn strip delete index get_text_neighbourhood_to_entity sub split append get_position_features_for_each_token_slot_fill replace_numbers_fn len max rindex replace replace_time_units_fn repalce_currency_symbols_fn strip index get_text_neighbourhood_to_entity append replace_numbers_fn len getRelation lower split strip delete get_position_features_for_each_token_slot_fill replace_numbers_fn rindex find append replace replace_time_units_fn repalce_currency_symbols_fn get_text_neighbourhood_to_entity get_NER_for_entity_from_relation_type int print index sub extract_target_entities_from_sentence split len get_NER_for_entity_from_relation_type int max rindex replace replace_time_units_fn repalce_currency_symbols_fn strip len index get_text_neighbourhood_to_entity getIndex extract_target_entities_from_sentence append replace_numbers_fn find append open split append open split strip replace_regex_fn delete get_position_features_for_each_token_slot_fill replace_numbers_fn str rindex exit find append replace replace_time_units_fn repalce_currency_symbols_fn get_text_neighbourhood_to_entity get_NER_for_entity_from_relation_type int print index sub extract_target_entities_from_sentence split len lower lstrip split toarray print lower CountVectorizer append fit_transform toarray print strip CountVectorizer append fit_transform split append get split append get split int print append zeros abs range len int print len min append zeros max range split label_words_by_NE concatenate get_position_features_for_each_token append range len concatenate get_NER_for_entity_from_relation_type transform sign split append get_position_features_for_each_token_slot_fill abs range len get_NER_for_entity_from_relation_type transform zip concatenate get_word2vec_emb sign split append get_position_features_for_each_token_slot_fill abs array range len seed list list fromstring strip zip append append lower strip append generate_dict_for_word2vec_emb strip lower append generate_dict_for_word2vec_emb split append zip split append zip split lstrip rstrip split replace_currency_symbols_fn replace_currency_symbols_fn replace_currency_symbols_fn replace_currency_symbols_fn replace_currency_symbols_fn replace_currency_symbols_fn list set getRelation keys range len join isinstance floatX copy object join write walk join str defaultdict items print readlines Counter ensure_directory load_pickle_file enumerate append len readlines readlines makedirs get_svm_predictions_prob get_predictions_prob readlines readlines get_predictions_prob_dev get_svm_predictions_prob_dev append join walk join str get_filepaths replace print endswith strip exit readlines dict save_as_pkl startswith append tokenize len replace index pos_tag open append enumerate replace print index pos_tag open append range enumerate append word_tokenize range len items word_tokenize raw_parse sorted int Graph shortest_path strip len extend sent_tokenize get_entity_index append next range split defaultdict replace split open generate_sdp enumerate append defaultdict readlines strip items list defaultdict literal_eval set append defaultdict str replace min append abs max enumerate items list extend annotate_sentence | # AAAI-19 paper: "Neural Relation Extraction Within and Across Sentence Boundaries" This repository consists of the following data 1. data: The folder contains MUC6 entity and relation annotations. 2. code Contains the codebase for idepnn models - hyper_param_search.py - specify various hyper parameter configurations in this file Features: Major features used for training are: - position_indicator_embedding | 3,295 |
pgcorpus/gutenberg | ['information retrieval'] | ['A standardized Project Gutenberg corpus for statistical analysis of natural language and quantitative linguistics'] | src/metaquery.py src/tokenizer.py src/cleanup.py src/utils.py src/bookshelves.py src/pipeline.py get_data.py src/metadataparser.py process_data.py get_bookshelves parse_bookshelves strip_headers cleanup fixsubtitles getrdfdata safeunicode etextno parsemetadata make_df_metadata readmetadata meta_query process_book filter_tokens tokenize_text list_duplicates_in_mirror get_langs_dict populate_raw_from_mirror get_PG_number call items list concatenate glob set DataFrame keys values strip_headers join str rstrip linesep any splitlines append T set_index to_csv apply readmetadata parsemetadata getrdfdata find urlretrieve get int fixsubtitles basename fromkeys safeunicode text add findall find search group sub join tokenize_f len cleanup_f Counter count filter_tokens TreebankWordTokenizer tokenize sent_tokenize print replace join get_PG_number iglob isfile append walk join get_PG_number iglob print call walk | # Standardized Project Gutenberg Corpus Easily generate a local, up-to-date copy of the Standardized Project Gutenberg Corpus (SPGC). The Standardized Project Gutenberg Corpus was presented in [A standardized Project Gutenberg corpus for statistical analysis of natural language and quantitative linguistics](https://arxiv.org/abs/1812.08092) M. Gerlach, F. Font-Clos, arXiv:1812.08092, Dec 2018 acompanied by a 'frozen' version of the corpus (SPGC-2018-07-18) as a Zenodo dataset: [](https://doi.org/10.5281/zenodo.2422560) SPGC-2018-07-18 contains the `tokens/` and `counts/` files of all books that were part of Project Gutenbergh (PG) as of Jul 18, 2018, matching exactly those used in the paper. Since then, a few more thousands books have been added to PG, so if you want to exactly reproduce the results of the paper, then you should use SPGC-2018-07-18. For **most other use cases**, however, you probably want the latest, most recent version of the corpus, in which case you should use this repository to **generate the corpus locally** on your computer. In particular, you will need to generate the corpus locally if you need to work with the original full text files in `raw/` and `text/`, since these are not included in the SPGC-2018-07-18 Zenodo dataset. ## Installation | 3,296 |
pgcorpus/gutenberg-analysis | ['information retrieval'] | ['A standardized Project Gutenberg corpus for statistical analysis of natural language and quantitative linguistics'] | src/jsd.py src/data_io.py run_jsda.py src/ent.py src/bookshelves.py jsda filter_bookshelves get_book get_dict_words_counts get_p12_same_support D_alpha_max D_alpha H_alpha jsdalpha_null jsdalpha print jsdalpha_null jsdalpha filter_lang meta_query print index dropna join list print dict zip pardir sorted list union set zeros sum keys enumerate values len sum array len log D_alpha_max H_alpha list isinstance get_dict_words_counts D_alpha get_p12_same_support float sum values percentile items list isinstance system get_dict_words_counts shuffle Counter jsdalpha mean zeros sum range values | # Standardized Project Gutenberg Corpus Tutorial This repository contains some example notebooks that illustrate how to use the Standardized Project Gutenberg Corpus (SPGC) and reproduce the analysis presented in the manuscript [A standardized Project Gutenberg corpus for statistical analysis of natural language and quantitative linguistics](https://arxiv.org/abs/1812.08092) M. Gerlach, F. Font-Clos, arXiv:1812.08092, Dec 2018 The data is not included in this repository, but you can easily get in in two ways: 1. Run the [code](https://github.com/pgcorpus/gutenberg) yourself to get the latest version of the corpus, which will include all books in PG as of today. 2. Download the [pre-processed data](https://doi.org/10.5281/zenodo.2422560) to get exactly the same books we used in the manuscript (those available up to July 18, 2018) We assume that you have the two folders at the same level in your folder-hierarchy: 1. `gutenberg/` in which you have the data. 2. `gutenberg-analysis/` with the code in this repository. | 3,297 |
phibenz/double-targeted-uap.pytorch | ['autonomous driving'] | ['Double Targeted Universal Adversarial Perturbations'] | utils/custom_loss.py networks/mobilenet_v2.py networks/vgg_cifar.py utils/data.py train_dt_uap.py config/sample_config.py dataset_utils/ycb_preparation.py utils/training.py train_model.py dataset_utils/generate_custom_imagenet.py networks/uap.py utils/dataset.py networks/resnet.py utils/network.py dataset_utils/ycb_downloader.py dataset_utils/gtsrb_utils.py utils/utils.py dataset_utils/gtsrb_preparation.py main parse_arguments main parse_arguments preprocess_gtsrb_img check_url tgz_url fetch_objects download_file extract_tgz InvertedResidual _make_divisible ConvBNReLU mobilenet_v2 MobileNetV2 resnet110 resnet20 preact_resnet110 preact_resnet1001 PreActBasicBlock ResNet resnet44 Bottleneck resnet164 resnet1001 conv3x3 resnet1202 preact_resnet164 resnet56 PreActBottleneck resnet32 BasicBlock PreAct_ResNet uap UAP VGG ce_sink LossConstructor bounded_logit_inc empty_loss bounded_logit_inc_sink bounded_logit_dec l1 l2 neg_ce bounded_logit_source_sink logit_dec logit_inc ce lt2 lt1 ce_source_sink get_data DatasetFromNumpy get_data_specs generate_separated_dataset get_dataset_dicts get_class_specific_dataset_folder_name get_num_parameters set_parameter_requires_grad get_network get_num_non_trainable_parameters get_num_trainable_parameters metrics_evaluate train_target_model validate RecorderMeter AverageMeter accuracy adjust_learning_rate save_checkpoint train_half_half time_file_str one_hot time_string get_result_path convert_secs2time print_log get_model_path parse_args add_argument randint ArgumentParser metrics_evaluate arange pretrained_arch batch_size Sequential get_network get_data print_log DataLoader __version__ DataParallel save_checkpoint train_half_half cuda open seed list set_parameter_requires_grad get_data_specs Adam OrderedDict parse_arguments load_state_dict manual_seed_all LossConstructor format inf replace close get_num_non_trainable_parameters eval get_model_path version pretrained_seed manual_seed pretrained_dataset get_num_trainable_parameters load join items get_num_parameters time use_cuda norm print reshape source_classes get_result_path parameters train numpy UAP gammas validate RecorderMeter time_string SGD adjust_learning_rate convert_secs2time plot_curve CrossEntropyLoss range train_target_model update momentum schedule avg max_accuracy learning_rate AverageMeter epochs equalizeHist resize urlopen loads read int read chr print len write close urlopen info open remove format system Request urlopen int max load format print load_state_dict MobileNetV2 ResNet ResNet ResNet ResNet ResNet ResNet ResNet ResNet PreAct_ResNet PreAct_ResNet PreAct_ResNet tensor cuda cross_entropy ones_like cross_entropy cpu sum cuda one_hot cpu cuda one_hot one_hot clamp cpu sum cuda one_hot clamp cpu sum cuda ones_like one_hot clamp zip cpu tensor sum cuda cat detach ones_like cross_entropy one_hot clamp zip cpu tensor sum cuda cat detach ones_like one_hot clamp zip cpu tensor sum cuda cat detach one_hot clamp cpu sum cuda abs sum sum DatasetFromNumpy get_class_specific_dataset_folder_name ImageFolder sorted COLOR_BGR2RGB tolist append train_test_split imread CIFAR100 range concatenate glob Compose preprocess_gtsrb_img CIFAR10 listdir enumerate join int generate_separated_dataset zeros array cvtColor join sorted listdir join format len join list sorted print get_dataset_dicts get_class_specific_dataset_folder_name rmtree symlink abspath zip listdir keys range enumerate makedirs resnet20 vgg19 set_parameter_requires_grad resnet50 VGG in_features alexnet resnet56 resnet18 resnet152 mobilenet_v2 vgg16 inception_v3 Linear parameters param_groups zip data model time_string zero_grad print_log argmax cuda update format size item enumerate time criterion backward AverageMeter accuracy train step len data model time_string zero_grad print_log argmax cuda iter next cat update format size eval item time criterion backward clamp target_model AverageMeter accuracy train step data update format print size AverageMeter accuracy print_log eval item cuda enumerate data print_log argmax cuda append range update ones_like format size eval avg zip item enumerate print AverageMeter accuracy len join save join format makedirs join time format len strftime gmtime makedirs gmtime format time strftime int gmtime format time strftime print format write flush | # Double Targeted Universal Adversarial Perturbations This is the repository for our ACCV 2020 paper titled [Double Targeted Universal Adversarial Perturbations](https://arxiv.org/pdf/2010.03288.pdf) ## Abstract Despite their impressive performance, deep neural networks (DNNs) are widely known to be vulnerable to adversarial attacks, which makes it challenging for them to be deployed in security-sensitive applications, such as autonomous driving. Image-dependent perturbations can fool a network for one specific image, while universal adversarial perturbations are capable of fooling a network for samples from all classes without selection. We introduce a double targeted universal adversarial perturbations (DT-UAPs) to bridge the gap between the instancediscriminative image-dependent perturbations and the generic universal perturbations. This universal perturbation attacks one targeted source class to sink class, while having a limited adversarial effect on other nontargeted source classes, for avoiding raising suspicions. Targeting the source and sink class simultaneously, we term it double targeted attack (DTA). This provides an attacker with the freedom to perform precise attacks on a DNN model while raising little suspicion. We show the effectiveness of the proposed DTA algorithm on a wide range of datasets and also demonstrate its potential as a physical attack. ## Setup We performed our experiments with `PyTorch v.0.4.1` ### Config Copy `config/sample_config.py ` to `config/config.py`. Edit the paths in `config/config.py` according to your system. ### Datasets #### ImageNet | 3,298 |
philadias/freelabel | ['semantic segmentation'] | ['FreeLabel: A Publicly Available Annotation Tool based on Freehand Traces'] | freelabel/models.py FreeLabel_api/wsgi.py freelabel/urls.py FreeLabel_api/settings.py freelabel/tests.py freelabel/views.py manage.py freelabel/forms.py freelabel/ourLib.py freelabel/setup.py FreeLabel_api/freelabel/models.py freelabel/driveapi.py load-labels.py freelabel/apps.py FreeLabel_api/freelabel/admin.py FreeLabel_api/urls.py freelabel/admin.py FreeLabel_api/freelabel/tests.py freelabel/numpyctypes.py lut2index_refactor FreelabelConfig UserForm Page Category c_ndarray regGrowing startRGR traceRect loadLocalGT readLocalImg traceLine tracePolyline traceCircle saveGTasImg saveAnnsAsPNG cmpToGT main playVideo refine threadfunction playCustomScratch register writeCustomLog shuffleList HTTPServer HTTPHandler loadcustom drawTrace NumpyEncoder setcustomfolder refineCustom user_logout playCustom play user_login main cmpGT showFinalImg initanns Page Category uint8 size flatten zeros enumerate split CharField IntegerField CharField IntegerField URLField CharField ForeignKey POINTER char data_as ndim copy ndarrayInterfaceToCtypes asanyarray array range arange random flatten hsplit floor DataFrame seed int64 asarray insert astype callRGR mean enumerate reshape moveaxis int32 zeros ravel split threshold default_rng cpu_count delete flatten LUT save resize argmax values count_nonzero Process list exp COLOR_GRAY2RGB multiply MORPH_RECT shape ceil append loadLocalGT sum range asarray size astype Manager start nonzero unique splitext cvtColor merge load join time putmask uint8 getStructuringElement print divide THRESH_BINARY dict repeat int32 zeros moveaxis amax split main imwrite str load COLOR_GRAY2RGB uint8 threshold imwrite THRESH_BINARY dstack LUT cvtColor line polylines reshape int32 rectangle int32 round int32 circle load COLOR_GRAY2RGB uint8 threshold asarray imwrite str THRESH_BINARY merge LUT loadmat cvtColor split imread loadmat asarray load sum list asarray reshape flatten shape repmat nonzero histogram resize zeros float loadmat range len HTTPServer handle_request serve_forever exists open shuffleList HTTPServer list username getsockname append get Thread glob readlines close start enumerate join int print loadtxt makedirs extend len refineCustom get int remove asarray startRGR getlist glob size readLocalImg delete dumps drawTrace username loads unique float array loads saveAnnsAsPNG open count_nonzero str basename username savetxt get glob size close float load int join remove getlist write savemat array permutation savetxt int remove getlist dumps username save zeros exists get username urlretrieve cmpToGT get int remove glob username saveGTasImg int uint8 traceRect traceCircle tracePolyline append empty range len UserForm is_valid print set_password password save errors get str format login print makedirs close now write username authenticate is_active open str print close now write logout username open | FreeLabel: A Publicly Available Annotation Tool based on Freehand Traces ## Underlying ideas: the paper This README file is to accompany code for pixel-level image annotation, lead by Philipe Dias to his paper: FreeLabel: A Publicly Available Annotation Tool based on Freehand Traces published in [WACV 2019](https://ieeexplore.ieee.org/document/8659167): ``` @INPROCEEDINGS{8659167, author={P. A. {Dias} and Z. {Shen} and A. {Tabb} and H. {Medeiros}}, booktitle={2019 IEEE Winter Conference on Applications of Computer Vision (WACV)}, title={FreeLabel: A Publicly Available Annotation Tool Based on Freehand Traces}, year={2019}, volume={}, | 3,299 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.