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
|
---|---|---|---|---|---|
liuzrcc/PIRE | ['content based image retrieval', 'image retrieval'] | ["Who's Afraid of Adversarial Queries? The Impact of Image Modifications on Content-based Image Retrieval"] | pire.py gen_pire.py src/gem_init.py image_loader proj_lp enlarge_to_pixel pert_each_im data_input_init_sz l2n ResNetIR ImageRetrievalNet init_network gem GeM L2N Variable float unsqueeze open clamp norm min to Compose ceil abs sign data model proj_lp zero_grad save_image list Adam MSELoss append to range inf image_loader size item data_input_init_sz backward Variable enlarge_to_pixel tqdm parameters loss_fn step get children list format basename join get_data_root print ImageRetrievalNet load_url load_state_dict startswith ReLU append Rpool Linear | ## PIRE: Adversarial Queries for Blocking Content-based Image Retrieval (CBIR). This repository releases the pytorch implementation of "PIRE" in our paper ["Who's Afraid of Adversarial Queries? The Impact of Image Modifications on Content-based Image Retrieval"](https://arxiv.org/abs/1901.10332). Basically, PIRE generates adversarial examples for blocking neural feature-based CBIR. Now PIRE is tested on<br/> 1. State-of-the-art CNN-based CBIR method GeM[1] with pre-trained ResNet-101-GeMsupports model and feature extraction codes provided by [cnnimageretrieval-pytorch](https://github.com/filipradenovic/cnnimageretrieval-pytorch). 2. Off-the-shelf ResNet-101 pre-trained on ImageNet by replacing the original AvgPool2d with adaptiveAvgPool2d for allowing arbitrary size of the input image, and adding an additional L2N layer for feature normalization. The code for retrieval performance evaluation (implementation of CBIR system) is not included. In order to generate adversarial queries for different models, please specific the parameter 'cnnmodel' when running the main file ```gen_pire.py```. ### Pytorch implementaiton of PIRE: #### Prerequisites | 2,800 |
liviniuk/DORN_depth_estimation_Pytorch | ['depth estimation', 'monocular depth estimation'] | ['Deep Ordinal Regression Network for Monocular Depth Estimation'] | train.py progress_tracking.py data.py discritization.py create_nyu_h5.py lr_decay.py resnet_dilated.py model.py loss.py get_dataloaders NYUDataset SID OrdinalLoss PolynomialLRDecay OrdinalRegressionLayer SceneUnderstandingModule FullImageEncoder weights_init DORN Result log10 ImageBuilder AverageMeter ResNet conv3x3 resnet101dilated Bottleneck print join DataLoader NYUDataset data fill_ isinstance modules zero_ xavier_normal_ BatchNorm2d load urlretrieve print ResNet copy dirname load_state_dict split makedirs | # DORN_depth_estimation_Pytorch This is an unoficial Pytorch implementation of [Deep Ordinal Regression Network for Monocular Depth Estimation](http://arxiv.org/abs/1806.02446) paper by Fu et. al. Table. Performance on NYU V2. | Source | δ1 | δ2 | δ3 | rel | log10 | rms | | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | |Original paper*| 0.828 | 0.965 | 0.992 | 0.115 | 0.051 | 0.509 | | This repo* | 0.806 | 0.957 | 0.989 | 0.151 | 0.062 | 0.586 | *Note, that the data splits are different (see Known Differences below for details). The worse performance might be due to the smaller training set (795 vs about 120K images). ## How to use These steps show how to run the code on the official split of the NYU V2 depth dataset. | 2,801 |
liweitianux/cdae-eor | ['denoising'] | ['Separating the EoR Signal with a Convolutional Denoising Autoencoder: A Deep-learning-based Method'] | code/cwt.py cwt/pycwt1d/cwt1d/cwt_filter.py cwt/pycwt1d/setup.py code/cdae.py code/polyfit.py cwt/pycwt1d/cwt1d/__init__.py preprocess_ds_noft plot_modelresult expfmt_ rfft_decode2 plot_simudata a_summary rfft_encode2 plot_slice_eor normalize_ds ModelFit plot_cubes plot_slice rfft_decode1 calc_rfft irfft_cube corrcoef_freqpix plot_occlusion_fgeor corrcoef rfft_encode1 occlusion_test calc_ps2d plot_modelfit plot_fgeor_rms gen_mask plot_ps2d plot_occlusion_epoch corrcoef_ds rms test_cwt corrcoef_freqpix corrcoef a_summary corrcoef_ds rms plot_cwt fgrm_cwt corrcoef_freqpix fit_foreground corrcoef a_summary corrcoef_ds rms plot_fitresult generate_mask std print min mean median max nuttall reshape shape swapaxes array len shape fliplr mean zeros range corrcoef shape range zeros corrcoef percentile array show subplots arange plot concatenate grid lines tight_layout set set_zorder train_loss twinx legend fill_between get_legend_handles_labels array len show arange subplots plot concatenate print tight_layout set linspace legend rfft_decode1 axvspan irfft len show subplots plot grid tight_layout set twinx linspace legend rms diff show subplots plot grid tight_layout set shape set_ylabel twinx linspace legend rms get_legend_handles_labels abs diff show subplots arange set_xlabel tight_layout pcolormesh colorbar set shape get_clim subplots_adjust int shape rfft_decode2 swapaxes irfft show subplots arange set_xlabel pcolormesh set subplots_adjust shape add_axes colorbar set_ticklabels arange deg2rad pi abs shape meshgrid range value fftshift FlatLambdaCDM concatenate astype mean sqrt nonzero fftfreq zeros fftn len set_xlabel colorbar pcolormesh set log10 FuncFormatter percentile reshape shape swapaxes array ones min max print gen_model gen_mask mean shape corrcoef_ds zeros std range predict show subplots arange plot tight_layout set twinx legend len show subplots arange plot concatenate grid tight_layout set twinx legend get_legend_handles_labels axvspan len show arange subplots plot grid tight_layout corrcoef set twinx legend zeros get_legend_handles_labels keys enumerate len show subplots grid tight_layout set imshow abs morlet cwt icwt print pi corrcoef generate_log_scales generate_mask plot_cwt len morlet cwt print icwt pi shape generate_log_scales generate_mask zeros range len polyfit show subplots plot tight_layout shape linspace enumerate zeros range | EoR Signal Separation with a CDAE ================================= **Weitian LI** `<[email protected]>` Introduction ------------ This repository holds the [code](code), [data](data), and [documentation](doc) that are associated with the following paper: **Title**: Separating the EoR Signal with a Convolutional Denoising Autoencoder: A Deep-learning-based Method **Authors**: | 2,802 |
lixilinx/TriNet4PdfEst | ['density estimation'] | ['A Triangular Network For Density Estimation'] | misc/tabular_data_density.py toy_data_generation_demo.py utility.py CIFAR10_Cshift_Adam_Log.py mnist_dim_reduction.py mnist_demo.py celeba_dim_reduction.py CIFAR10_L1Reg_Adam_Log.py MNIST_Cshift_Adam_Log_NoFlip.py MNIST_L1Reg_Adam_Tanh_NoFlip.py mnist_density.py toy_density_estimate_demo.py celeba_demo.py celeba_density.py preconditioned_stochastic_gradient_descent.py main main conv_decoder conv_coder logit cifar_normalization cifar_performance rand_cshift logit cifar_normalization cifar_performance mnist_normalization logit mnist_performance rand_cshift main main mnist_normalization logit mnist_performance update_precond_kron precond_grad_kron precond_grad_scaw update_precond_splu precond_grad_splu precond_grad_scan update_precond_diag update_precond_scaw precond_grad_diag update_precond_scan update_precond_dense precond_grad_dense ring_sampling ring_sampling decoding_fnn mono_tri_fnn_init encoding_tri_fnn mono_tri_fnn_unit_init encoding_fnn MonoTriNetUnitInit MonoTriNet encoding_mono_tri_fnn median_dist MonoTriNetUnit fnn_init MonoTriNetInit encoding_mono_tri_fnn_unit tri_fnn_init normalization load_data performance clf floor max open subplot semilogy log10 append to sum range decoding_fnn dump conv_coder plot encoding_fnn grad item enumerate clamp len tanh conv2d view len tanh conv2d interpolate view conv_decoder shape randint cat logit view diag rand log t shape inverse cholesky zeros sum range enumerate rand_cshift logit view diag rand log t shape inverse cholesky zeros sum range enumerate rand_cshift sigmoid t triu mm max cat reshape shape append mm range cat len abs sign mm t sqrt triu abs max sum reshape mm t sqrt abs max cat t mm sum mm t sqrt triu abs max mm t sqrt triu abs max cat tril reshape shape append mm range cat len append rand randn sqrt append range len bmm tanh view log pi shape repeat append sum range len tanh append norm range len sum concatenate ones to sqrt append triu kron range len tanh view ones matmul log pi shape sum range len sum arange FloatTensor ones concatenate randn abs sqrt triu kron log expm1 arange view phi repeat_interleave logsumexp stack float sum append mono_tri_fnn_unit_init log pi shape encoding_mono_tri_fnn_unit sum flip range len sum arange FloatTensor ones concatenate randn abs sqrt triu kron log cat expm1 arange view phi repeat_interleave t device sum append MonoTriNetUnitInit pi shape MonoTriNetUnit sum flip log diag t inverse cholesky sum log tensor | # Triangular network for density estimation and data generation A highly compact and modular monotonic triangular network is implemented. We applied it to neural autoregressive flow (NAF) for density estimation, and achieved the-state-of-art results on MNIST and CIFAR-10 data sets in the category of general-purpose density estimators. Please check report [A Triangular Network For Density Estimation](https://arxiv.org/abs/2004.14593) for design details. Please check utility.MonoTriNetInit and utility.MonoTriNet for usage and implementation details. The default activation function is tanh; use log, sign(x)log(1 + abs(x)), if bijection is a must. When several monotonic triangular network units are cascaded, by default, outputs of each unit is flipped before feeding to its successive one. You may set flip to False to disable it. ### Density estimation demos ##### Toy demo Please check toy_density_estimate_demo for details. ##### MNIST demo Run MNIST_L1Reg_Adam_Tanh_NoFlip for test results with L1 regularization. Test bits-per-dimension should be slightly below 1.13. Run MNIST_Cshift_Adam_Log_NoFlip for test results with data augmentation. Test bits-per-dimension should be below 1.1. Note that Pytorch rescales pixel value 255 to 1, not 255/256. We need to keep this detail in mind to write the right code. | 2,803 |
lixiny/bihand | ['pose tracking'] | ['BiHand: Recovering Hand Mesh with Multi-stage Bisected Hourglass Networks'] | bihand/models/net_sik.py bihand/datasets/sik1m.py bihand/models/__init__.py training/train_seednet.py bihand/datasets/sikoffline.py bihand/datasets/__init__.py bihand/models/bases/hourglass.py bihand/vis/renderer.py bihand/datasets/handataset.py bihand/datasets/stb.py scripts/train_siknet_sikoffline.py bihand/datasets/rhd.py bihand/models/net_seed.py bihand/__init__.py run.py bihand/utils/eval/zimeval.py bihand/utils/imgutils.py bihand/losses/sikloss.py bihand/losses/upsloss.py scripts/gen_sikdata_offline.py bihand/vis/drawer.py bihand/models/net_lift.py bihand/models/net_bihand.py training/train_siknet.py bihand/utils/eval/evalutils.py bihand/utils/misc.py bihand/config.py bihand/models/bases/resnet.py bihand/utils/quatutils.py bihand/utils/func.py bihand/models/net_upstream.py bihand/utils/handutils.py bihand/utils/heatmaputils.py training/train_siknet_sik1m.py bihand/models/bases/bottleneck.py training/train_liftnet.py bihand/losses/__init__.py main one_forward_pass validate HandDataset RHDDataset main main SIK1M _SIK1M SIKOFFLINE sk_xyz_depth2color stb_palm2wrist STBDataset sk_rot_mx _stb_palm2wrist main SIKLoss UpstreamLoss NetBiHand main LiftNet SeedNet SIKNet IntegralPose NetUpstream BottleneckBlock HourglassBisected Hourglass NetStackedHourglass NetStackedHourglass3d conv1x1 ResNet resnet50 Bottleneck resnet152 conv3x3 resnet34 resnet18 BasicBlock resnet101 to_numpy bhwc_2_bchw bchw_2_bhwc batch_denormalize uvd2xyz transform_img get_affine_trans_no_rot gen_cam_param get_annot_scale persp_joint2kp get_annot_center get_affine_transform transform_coords get_affine_transform_bak xyz2uvd get_joint_bone rot_kp2d get_heatmap_pred gen_heatmap get_color_params batch_with_joint sample_with_heatmap gauss draw_hand_skeloten batch_with_heatmap color_jitter batch_with_dep color_heatmap load_checkpoint save_pred print_args save_checkpoint adjust_learning_rate adjust_learning_rate_in_group resume_learning_rate_in_group resume_learning_rate param_count quaternion_inv normalize_quaternion quaternion_mul quaternion_to_angle_axis angle_axis_to_quaternion accuracy_heatmap dist_acc AverageMeter calc_dists EvalUtil HandDrawer render_model get_original append_alpha _rotateY draw_text simple_renderer MeshRenderer _create_renderer get_alpha main one_forward_pass validate main validate train one_fowrard_pass main one_forward_pass train validate main one_forward_pass train validate main validate train one_fowrard_pass validate print_args one_forward_pass main train validate format print len print_args DataLoader NetBiHand load_checkpoints HandDataset to checkpoint makedirs to model item start eval Bar colored EvalUtil HandDrawer RHDDataset get_sample SIK1M quaternion_to_angle_axis shape norm array cos sin tile _new_root STBDataset view LiftNet cprint float range net param_count load_url ResNet load_state_dict load_url ResNet load_state_dict print ResNet load_url load_state_dict load_url ResNet load_state_dict load_url ResNet load_state_dict dtype as_tensor clone sub_ is_tensor ndarray isinstance device zip zeros to is_tensor size expand device unsqueeze expand_as to DEPTH_MIN DEPTH_RANGE size expand expand_as unsqueeze device to DEPTH_MIN DEPTH_RANGE transpose matmul transpose matmul concatenate min max int min max inv concatenate transform tuple inv AFFINE tolist copy dot eye zeros get_affine_trans_no_rot zeros float astype float32 copy eye zeros float concatenate reshape transpose inv matmul zeros array range exp astype int32 arange view size floor float max uniform max append func shuffle get_color_params addWeighted uint8 concatenate astype repeat swapaxes resize append to_numpy range uint8 concatenate astype draw_hand_skeloten append to_numpy SNAP_BONES range line tuple zip range circle len sample_with_heatmap concatenate min append to_numpy range int uint8 arange astype copy resize ceil zeros float color_heatmap enumerate len zeros uint8 astype gauss items sorted format print cprint vars copyfile join format save load format isinstance print OrderedDict load_state_dict startswith colored keys to_numpy join savemat print param_groups print print param_groups print norm cat shape bmm view size dist zeros float range dist_acc calc_dists ones size zeros float range ColoredRenderer ProjectPoints array vc LambertianPointLight set dtype astype merge split dtype uint8 astype merge issubdtype split list append_alpha simple_renderer _create_renderer get_alpha values int hstack array dtype uint8 sorted putText astype float32 copy keys issubdtype float array DataParallel device_count append concatenate close datasets colored join remove data_split fine_tune sik_genpath epochs cuda format concatenate print finish get_measures saved_prefix save_checkpoint SIKOFFLINE StepLR Adam lr_decay_step param_groups SIKLoss start_epoch SIKNet evaluate load_checkpoint train step update time format backward AverageMeter zero_grad next one_fowrard_pass colored Bar item finish step enumerate to cuda compute_loss model evaluate_liftnet_pth modules kaiming_normal_ resume_liftnet_pth UpstreamLoss isinstance Conv2d parameters weight update ups_loss compute_loss one_forward_pass evaluate_seednet_pth resume_seednet_pth AverageMeter evaluate_siknet_pth resume_siknet_pth item evaluate_siknet_synth_pth | # BiHand - 3D Hand Mesh Reconstruction This repo contains model, demo, training codes for our paper: "BiHand: Recovering Hand Mesh with Multi-stage Bisected Hourglass Networks"([PDF](https://arxiv.org/abs/2008.05079)) (BMVC2020) <img src="assets/teaser.png"> ## Get the code ``` git clone --recursive https://github.com/lixiny/bihand.git cd bihand ``` ## Install Requirements Install the dependencies listed in `environment.yml` through conda: | 2,804 |
lixx2938/unsupervised-learning-intrinsic-images | ['intrinsic image decomposition'] | ['Learning Intrinsic Image Decomposition from Watching the World'] | models/saw_utils.py options/train_options.py data/image_folder.py data/unaligned_data_loader.py data/data_loader.py data/energy.py util/image_pool.py util/png.py data/krahenbuhl2013/setup.py models/base_model.py models/models.py util/html.py data/params.py data/base_data_loader.py options/base_options.py test_iiw.py data/aligned_data_loader.py util/util.py data/image_util.py test_saw.py models/networks.py options/test_options.py util/visualizer.py models/pix2pix_model.py test_iiw test_SAW AlignedDataLoader_TEST IIWTestData IIWTESTDataLoader AlignedDataLoader TLData BaseDataLoader CreateDataLoaderIIWTest CreateDataLoader IntrinsicEnergy is_image_file rgb_to_chromaticity make_dataset ImageFolder IIW_ImageFolder load rescale_for_display n_distinct_colors load_mask irg_to_rgb luminance rgb_to_irg rgb_to_srgb save srgb_to_rgb gray_to_rgb IntrinsicParameters UnalignedDataLoader PairedData BaseModel create_model SingleUnetSkipConnectionBlock MultiUnetSkipConnectionBlock SingleUnetGenerator MultiUnetGenerator get_norm_layer ResnetGenerator Sparse ResnetBlock UnetGenerator UnetSkipConnectionBlock JointLoss weights_init print_network UnetWrapper define_G Pix2PixModel load_img_arr get_pr_from_conf_mx gen_pr_thres_list grouped_confusion_matrix load_pixel_labels compute_gradmag resize_img_arr grouped_weighted_confusion_matrix load_photo_ids_for_split BaseOptions TestOptions TrainOptions HTML ImagePool encode print_numpy varname diagnose_network mkdirs mkdir info save_image tensor2im Visualizer CreateDataLoaderIIWTest print switch_to_eval evlaute_iiw load_data range enumerate print compute_pr switch_to_eval AlignedDataLoader IIWTESTDataLoader sum zeros_like load open float astype imread uint8 rescale_for_display zeros_like astype rgb_to_srgb dirname imsave makedirs zeros shape T reshape power zeros_like power zeros_like sum zeros_like zeros_like Pix2PixModel name print normal_ __name__ fill_ print BatchNorm2d InstanceNorm2d MultiUnetGenerator get_norm_layer print ResnetGenerator UnetGenerator apply UnetWrapper cuda print parameters join join float sum astype str astype open float resize zeros sum xrange zeros sum xrange list sorted linspace log sobel transpose numpy print parameters fromarray save print join search print float64 astype flatten shape mkdir makedirs | Learning Intrinsic Image Decomposition from Watching the World =========================== This is an implementation of the intrinsic image decomposition algorithm described in "Learning Intrinsic Image Decomposition from Watching the World, Z. Li and N. Snavely, CVPR 2018". The code skeleton is based on "https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix". If you use our code for academic purposes, please consider citing: @inproceedings{BigTimeLi18, title={Learning Intrinsic Image Decomposition from Watching the World}, author={Zhengqi Li and Noah Snavely}, booktitle={Computer Vision and Pattern Recognition (CVPR)}, year={2018} } Website: http://www.cs.cornell.edu/projects/bigtime/ | 2,805 |
liyunqianggyn/Deep-Unsupervised-Image-Hashing | ['action recognition'] | ['Can Spatiotemporal 3D CNNs Retrace the History of 2D CNNs and ImageNet?', 'Deep Unsupervised Image Hashing by Maximizing Bit Entropy'] | VideoHashing/models/densenet.py VideoHashing/main.py VideoHashing/datasets/hmdb51.py VideoHashing/temporal_transforms.py VideoHashing/utils/fps.py VideoHashing/datasets/kinetics.py VideoHashing/utils/n_frames_ucf101_hmdb51.py ImageHashing/Cifar10_I.py VideoHashing/utils/video_jpg_kinetics.py VideoHashing/datasets/ucf101.py AutoEncoder/SignReg.py VideoHashing/cal_map.py AutoEncoder/Sign.py VideoHashing/utils/n_frames_kinetics.py ImageHashing/cal_map_single.py AutoEncoder/BiHalf.py ImageHashing/cal_map_mult.py ImageHashing/Mscoco.py VideoHashing/models/resnext.py VideoHashing/utils/hmdb51_json.py VideoHashing/utils/kinetics_json.py VideoHashing/test.py VideoHashing/utils/eval_ucf101.py VideoHashing/models/pre_act_resnet.py VideoHashing/mean.py VideoHashing/utils/ucf101_json.py ImageHashing/Cifar10_II.py VideoHashing/dataset.py VideoHashing/models/wide_resnet.py VideoHashing/datasets/activitynet.py VideoHashing/model.py ImageHashing/data/flickr25k.py VideoHashing/models/resnet.py VideoHashing/utils/eval_hmdb51.py ImageHashing/Flickr25k.py VideoHashing/opts.py VideoHashing/utils.py VideoHashing/utils/video_jpg_ucf101_hmdb51.py AutoEncoder/cal_map.py AutoEncoder/utilscluster.py VideoHashing/utils/eval_kinetics.py VideoHashing/utils/video_jpg.py VideoHashing/spatial_transforms.py VideoHashing/target_transforms.py to_img min_max_normalization autoencoder adjust_learning_rate hash hash_layer main tensor_round calculate_hamming compress calculate_top_map calculate_map extractab compute_precision_at_k mean_average_precision precision extractab1 to_img min_max_normalization autoencoder adjust_learning_rate hash hash_layer main tensor_round to_img min_max_normalization autoencoder adjust_learning_rate hash hash_layer main tensor_round plot_latent_variable3d calculate_hamming compress calculate_top_map calculate_precision_recall_k calculate_map pr_curve calculate_p_r_curve calculate_top_map calculate_hamming compress calculate_map CNN adjust_learning_rate hash main hash_layer CNN adjust_learning_rate hash main hash_layer CNN adjust_learning_rate hash main hash_layer CNN MScoco adjust_learning_rate default_loader accimage_loader hash main hash_layer pil_loader Flickr25k load_data calculate_hamming compress calculate_top_map calculate_map extractab compute_precision_at_k mean_average_precision precision extractab1 get_training_set get_test_set get_validation_set ReNet34 hash Identity main hash_layer get_std get_mean generate_model Identity parse_opts MultiScaleCornerCrop CenterCrop MultiScaleRandomCrop ToTensor Compose Scale Normalize RandomHorizontalFlip CornerCrop ClassLabel VideoID Compose TemporalBeginCrop LoopPadding TemporalCenterCrop TemporalRandomCrop calculate_video_results test calculate_accuracy AverageMeter Logger load_value_file modify_frame_indices get_class_labels load_annotation_data video_loader get_end_t make_dataset ActivityNet accimage_loader get_default_image_loader get_default_video_loader make_untrimmed_dataset pil_loader get_video_names_and_annotations get_class_labels load_annotation_data video_loader make_dataset accimage_loader HMDB51 get_default_image_loader get_default_video_loader pil_loader get_video_names_and_annotations get_class_labels load_annotation_data video_loader make_dataset accimage_loader Kinetics get_default_image_loader get_default_video_loader pil_loader get_video_names_and_annotations UCF101 get_class_labels load_annotation_data video_loader make_dataset accimage_loader get_default_image_loader get_default_video_loader pil_loader get_video_names_and_annotations get_fine_tuning_parameters DenseNet densenet201 densenet169 densenet264 _DenseLayer _DenseBlock _Transition densenet121 conv3x3x3 get_fine_tuning_parameters resnet50 downsample_basic_block resnet152 PreActivationBasicBlock resnet34 resnet200 PreActivationBottleneck resnet18 PreActivationResNet resnet101 conv3x3x3 get_fine_tuning_parameters ResNet downsample_basic_block resnet50 Bottleneck resnet152 resnet34 resnet200 resnet18 resnet10 BasicBlock resnet101 ResNeXtBottleneck conv3x3x3 get_fine_tuning_parameters resnet50 downsample_basic_block ResNeXt resnet152 resnet101 conv3x3x3 get_fine_tuning_parameters WideBottleneck resnet50 downsample_basic_block WideResNet convert_hmdb51_csv_to_activitynet_json get_labels convert_csv_to_dict load_labels convert_kinetics_csv_to_activitynet_json convert_csv_to_dict class_process class_process load_labels convert_ucf101_csv_to_activitynet_json convert_csv_to_dict class_process class_process to_img min_max_normalization autoencoder adjust_learning_rate hash hash_layer main tensor_round calculate_hamming compress calculate_top_map calculate_map extractab compute_precision_at_k mean_average_precision precision extractab1 to_img min_max_normalization autoencoder adjust_learning_rate hash hash_layer main tensor_round plot_latent_variable3d calculate_hamming compress calculate_top_map calculate_precision_recall_k calculate_map pr_curve calculate_p_r_curve calculate_top_map calculate_hamming compress calculate_map CNN adjust_learning_rate hash main hash_layer CNN adjust_learning_rate hash main hash_layer CNN adjust_learning_rate hash main hash_layer MScoco default_loader accimage_loader pil_loader Flickr25k load_data calculate_hamming compress calculate_top_map calculate_map extractab compute_precision_at_k mean_average_precision precision extractab1 get_training_set get_test_set get_validation_set ReNet34 hash Identity main hash_layer get_std get_mean generate_model Identity parse_opts MultiScaleCornerCrop CenterCrop MultiScaleRandomCrop ToTensor Compose Scale Normalize RandomHorizontalFlip CornerCrop ClassLabel VideoID Compose TemporalBeginCrop LoopPadding TemporalCenterCrop TemporalRandomCrop calculate_video_results test calculate_accuracy AverageMeter Logger load_value_file modify_frame_indices get_class_labels load_annotation_data video_loader get_end_t make_dataset ActivityNet accimage_loader get_default_image_loader get_default_video_loader make_untrimmed_dataset pil_loader get_video_names_and_annotations get_class_labels load_annotation_data video_loader make_dataset accimage_loader HMDB51 get_default_image_loader get_default_video_loader pil_loader get_video_names_and_annotations get_class_labels load_annotation_data video_loader make_dataset accimage_loader Kinetics get_default_image_loader get_default_video_loader pil_loader get_video_names_and_annotations UCF101 get_fine_tuning_parameters DenseNet densenet201 densenet169 densenet264 _DenseLayer _DenseBlock _Transition densenet121 conv3x3x3 get_fine_tuning_parameters resnet50 downsample_basic_block resnet152 PreActivationBasicBlock resnet34 resnet200 PreActivationBottleneck resnet18 PreActivationResNet resnet101 conv3x3x3 get_fine_tuning_parameters ResNet downsample_basic_block resnet50 Bottleneck resnet152 resnet34 resnet200 resnet18 resnet10 BasicBlock resnet101 ResNeXtBottleneck conv3x3x3 resnet50 downsample_basic_block ResNeXt resnet152 resnet101 WideBottleneck WideResNet convert_hmdb51_csv_to_activitynet_json get_labels convert_csv_to_dict load_labels convert_kinetics_csv_to_activitynet_json convert_csv_to_dict class_process class_process convert_ucf101_csv_to_activitynet_json class_process size view min max param_groups data autoencoder permutation model zero_grad DataLoader adjust_learning_rate numpy vstack seed list compress view Adam calculate_map append range cat format concatenate size Compose hstack targets BCELoss enumerate MNIST criterion backward print Variable plot_latent_variable3d extend parameters step array list view model Variable size extend sign numpy array enumerate list view model Variable size extend sign numpy array enumerate list view model Variable size extend sign numpy array enumerate dot transpose calculate_hamming asarray astype float32 where argsort mean linspace sum range calculate_hamming asarray astype float32 where argsort mean linspace sum range T arange cumsum astype sign dot argsort append sum array range count_nonzero sum asarray arange concatenate print cumsum astype argsort mean repeat int32 save zeros numpy max range FloatTensor size expand mean type div_ sum cat ShortTensor ones transpose mean pow mm show format set_pane_color axes yticks view_init grid scatter3D set_zticks where set_zlim3d ylim savefig figure xlim xticks enumerate ones concatenate cuda calculate_hamming asarray arange cumsum astype float32 where argsort mean linspace zeros sum range calculate_hamming int astype float32 zeros sum max range squeeze t zeros float sum range CNN SGD mse_loss cuda astype eval CIFAR10 long calculate_top_map cnn cosine_similarity train load_data MScoco query_transform Flickr25k DataLoader init train_transform cuda cuda video_path UCF101 ActivityNet Kinetics annotation_path HMDB51 video_path UCF101 n_val_samples ActivityNet Kinetics annotation_path HMDB51 video_path UCF101 ActivityNet Kinetics annotation_path HMDB51 nesterov MultiScaleCornerCrop TemporalRandomCrop sample_size get_test_set dampening ReduceLROnPlateau values get_validation_set get_training_set load_state_dict ClassLabel is_tensor begin_epoch sample_duration Normalize n_epochs LoopPadding load items ReNet34 resume_path MultiScaleRandomCrop generate_model Identity scales std get_fine_tuning_parameters in_features densenet264 DataParallel ft_begin_index resnet34 resnet152 cuda codelength load_state_dict resnet200 resnet101 resnet18 format resnet50 resnet10 n_finetune_classes Linear load densenet169 densenet201 print pretrain_path densenet121 parse_args set_defaults add_argument ArgumentParser topk size mean stack append range update time format model print Variable cpu AverageMeter size eval softmax calculate_video_results append range enumerate len topk view size t eq join format image_loader append exists get_default_image_loader append enumerate append items format append join format items join format deepcopy get_class_labels list load_annotation_data print modify_frame_indices len load_value_file ceil max range append get_video_names_and_annotations sort listdir items join format deepcopy get_class_labels list load_annotation_data print modify_frame_indices len load_value_file get_end_t ceil max range append get_video_names_and_annotations int min DenseNet DenseNet DenseNet DenseNet append format range named_parameters data isinstance FloatTensor Variable zero_ avg_pool3d cuda cat PreActivationResNet PreActivationResNet PreActivationResNet PreActivationResNet PreActivationResNet PreActivationResNet ResNet ResNet ResNet ResNet ResNet ResNet ResNet ResNeXt ResNeXt ResNeXt WideResNet join read_csv append listdir range len append join listdir update get_labels convert_csv_to_dict read_csv update load_labels convert_csv_to_dict join int print sort append listdir split append range update load_labels convert_csv_to_dict format call mkdir splitext exists | # Deep Unsupervised Image Hashing by Maximizing Bit Entropy This is the PyTorch implementation of accepted AAAI 2021 paper: [Deep Unsupervised Image Hashing by Maximizing Bit Entropy](https://arxiv.org/abs/2012.12334) <!-- Our paper presentation is on [YouTube](https://www.youtube.com/watch?v=riZDqdTrNrg) --> <!-- Meantime, a re-implemented version of our work: [Training code](https://github.com/swuxyj/DeepHash-pytorch) --> ## Proposed Bi-half layer <table border=0 > <tbody> <tr> <tr> | 2,806 |
liyzcj/leakgan-py3 | ['text generation'] | ['Long Text Generation via Adversarial Training with Leaked Information'] | Synthetic Data/LeakGANModel.py Image COCO/convert.py Synthetic Data/Main.py Image COCO/LeakGANModel.py Image COCO/Main.py No Temperature/Synthetic Data/Main.py No Temperature/Synthetic Data/Discriminator.py Synthetic Data/target_lstm.py No Temperature/Synthetic Data/dataloader.py No Temperature/Image COCO/eval_bleu.py No Temperature/Image COCO/LeakGANModel.py Synthetic Data/Discriminator.py No Temperature/Synthetic Data/LeakGANModel.py Image COCO/split_sentence.py No Temperature/Image COCO/Main.py Synthetic Data/dataloader.py No Temperature/Image COCO/Discriminator.py No Temperature/Synthetic Data/target_lstm.py No Temperature/Image COCO/convert.py No Temperature/Image COCO/dataloader.py Image COCO/Discriminator.py Synthetic Data/target_lstm20.py Image COCO/dataloader.py Image COCO/eval_bleu.py No Temperature/Synthetic Data/target_lstm20.py Gen_Data_loader Dis_dataloader cosine_similarity linear highway Discriminator LeakGAN generate_samples rescale get_reward main target_loss redistribution pre_train_epoch split_sentence_file split_sentence get_rewords_from_discriminator Gen_Data_loader Dis_dataloader cosine_similarity linear highway Discriminator Gen_Data_loader Dis_dataloader cosine_similarity linear highway Discriminator LeakGAN generate_samples rescale get_reward main target_loss redistribution pre_train_epoch TARGET_LSTM TARGET_LSTM20 Gen_Data_loader Dis_dataloader cosine_similarity linear highway Discriminator LeakGAN generate_samples split_sentence rescale get_reward main split_sentence_file target_loss get_rewords_from_discriminator redistribution pre_train_epoch TARGET_LSTM TARGET_LSTM20 multiply l2_normalize as_list int range extend generate num_batch append next_batch reset_pointer range run pretrain_step num_batch append next_batch reset_pointer range shape redistribution zeros array range len int gen_for_reward step_size concatenate transpose min ypred_for_auc rescale sequence_length append next_batch array range run model Dis_dataloader num_batch Gen_Data_loader create_batches Saver split_sentence_file save update_feature_function Session open seed run str restore global_variables Discriminator generate pre_train_epoch range latest_checkpoint load_train_data close gen_x get_rewords_from_discriminator ConfigProto generate_samples LeakGAN print write global_variables_initializer next_batch reset_pointer split_sentence transpose ypred_for_auc append array range run append pad range print pretrain_loss TARGET_LSTM target_loss length get_reward load TARGET_LSTM20 | # LeakGAN The code of research paper [Long Text Generation via Adversarial Training with Leaked Information](https://arxiv.org/abs/1709.08624). This paper has been accepted at the Thirty-Second AAAI Conference on Artificial Intelligence ([AAAI-18](https://aaai.org/Conferences/AAAI-18/)). ## Requirements * **Tensorflow r1.13.1** * Python 3.6 * CUDA 7.5+ (For GPU) ## Introduction Automatically generating coherent and semantically meaningful text has many applications in machine translation, dialogue systems, image captioning, etc. Recently, by combining with policy gradient, Generative Adversarial Nets (GAN) that use a discriminative model to guide the training of the generative model as a reinforcement learning policy has shown promising results in text generation. However, the scalar guiding signal is only available after the entire text has been generated and lacks intermediate information about text structure during the generative process. As such, it limits its success when the length of the generated text samples is long (more than 20 words). In this project, we propose a new framework, called LeakGAN, to address the problem for long text generation. We allow the discriminative net to leak its own high-level extracted features to the generative net to further help the guidance. The generator incorporates such informative signals into all generation steps through an additional Manager module, which takes the extracted features of current generated words and outputs a latent vector to guide the Worker module for next-word generation. Our extensive experiments on synthetic data and various real-world tasks with Turing test demonstrate that LeakGAN is highly effective in long text generation and also improves the performance in short text generation scenarios. More importantly, without any supervision, LeakGAN would be able to implicitly learn sentence structures only through the interaction between Manager and Worker.  | 2,807 |
liyzcj/seggan | ['text generation'] | ['Adversarial Sub-sequence for Text Generation'] | utils/metrics/NumA.py models/relgan/Relgan.py utils/others/OracleLstm.py models/mle/MleGenerator.py utils/utils.py utils/text_process.py models/mle/MleDataLoader.py models/seqgan/SeqganGenerator.py utils/config.py models/relgan/RelganGenerator.py models/leakgan/Leakgan.py utils/metrics/EmbSim.py utils/oracle/OracleSru.py utils/oracle/OracleLstm.py utils/metrics/Bleu.py models/leakgan/LeakganDataLoader.py models/leakgan/LeakganGenerator.py utils/metrics/Nll.py models/leakgan/LeakganReward.py models/seqgan/SeqganReward.py models/seqgan/SeqganDiscriminator.py models/relgan/RelganDataLoader.py models/relgan/RelganDiscriminator.py utils/metrics/UniqueGram.py models/seqgan/SeqganDataLoader.py utils/metrics/Metrics.py utils/metrics/DocEmbSim.py models/seqgan/Seqgan.py utils/oracle/OracleCfg.py utils/others/Bleu.py main.py utils/metrics/SelfBleu.py utils/metrics/Cfg.py models/leakgan/LeakganDiscriminator.py utils/ops.py models/mle/Mle.py utils/oracle/OracleGru.py models/relgan/RelganMemory.py models/Gan.py utils/metrics/Scalar.py def_flags set_gan main set_training Dis Gen Gan Leakgan generate_samples_gen pre_train_epoch_gen DataLoader DisDataloader cosine_similarity linear highway Discriminator Generator redistribution rescale Reward Mle DataLoader DisDataloader Generator Relgan get_fixed_temperature OracleDataLoader RealDataLoader Discriminator Generator RelationalMemory Seqgan DataLoader DisDataloader linear highway Discriminator Generator Reward Config lrelu mlp create_bias_initializer linear create_linear_initializer create_output_unit add_gumbel_cond l2_norm spectral_norm hw_flatten conv2d get_losses highway self_attention add_gumbel gradient_penalty save_dict_file get_dict_from_vocab text_precess get_tokenlized chinese_process get_word_list code_to_text text_to_code get_dict generate_samples pre_train_epoch init_sess Bleu Cfg DocEmbSim EmbSim Metrics Nll NumA Scalar SelfBleu UniqueGram OracleCfg OracleGru OracleLstm OracleGru Bleu OracleLstm Gan train_real print exit RED train_oracle train_cfg RESET DEFINE_boolean DEFINE_enum list DEFINE_string DEFINE_integer flags keys Config save_dict_file train_f model gan restore exit copyfile summary_path set_gan get_dict_from_vocab pretrain save_path mkdir join print set_training FLAGS set_config output_path mode pretrain_step num_batch append next_batch reset_pointer range int list join extend generate range multiply l2_normalize as_list shape redistribution zeros array range len sqrt exp log sqrt linear act_func range len sqrt reshape matmul hw_flatten conv2d softmax get_variable as_list reshape transpose l2_norm matmul range get_variable get_variable shape random_uniform add as_list format reduce_logsumexp print truncated_gumbel reduce_sum shape random_uniform norm square flatten reduce_mean discriminator random_uniform gen_x_onehot_adv tanh get_logits sigmoid_cross_entropy_with_logits gradient_penalty relu square gen_o reduce_mean x_real_onehot log squared_difference len map len list append list dict str get_tokenlized get_word_list get_dict list get_tokenlized get_word_list get_dict max len int list join extend generate range str Session print ERROR set_verbosity FLAGS ConfigProto gpu pretrain_step num_batch append next_batch reset_pointer range | ## Introduction This is source code of ``Adversarial Sub-sequence for Text Generation``. ## LICENSE This code is based on [texygen](https://github.com/geek-ai/Texygen) and [RelGAN](https://github.com/weilinie/RelGAN) ## Requirement ```bash colorama numpy>=1.12.1 tensorflow>=1.5.0 scipy>=0.19.0 | 2,808 |
lizhemin15/self-distillation | ['information retrieval'] | ['Distillation $\\approx$ Early Stopping? Harvesting Dark Knowledge Utilizing Anisotropic Information Retrieval For Overparameterized Neural Network'] | train.py cosine_optim.py frequency.py generate.py cross_entropy.py newtxt.py new.py utils.py model.py plthis.py cosine_annealing_scheduler _cosine_annealing InterpolationLoss4 TestCrossEntropyLoss InterpolationLoss2 InterpolationLoss3 InterpolationLoss5 CrossEntropyLoss InterpolationLoss1 compute_distances_no_loops gauss_filter_normalize2 cifar get_f_high_low normal_kernel ResidualBranch ShakeResNet ShakeShake ShakeBlock shake_shake SkippingBranch CIFAR100 CIFAR10 train fre test check_integrity gen_bar_updater download_url LambdaLR dot T sum sum exp matmul compute_distances_no_loops gauss_filter_normalize2 append range normal_kernel len reshape append sum get_f_high_low range len ShakeResNet format criterion backward print len zero_grad to step max net enumerate format print eval mkdir save len print zeros cifar format md5 hexdigest print join urlretrieve makedirs | # self-distillation self-distillation Ref: [1]Dong, B., Hou, J., Lu, Y., & Zhang, Z. (2019). Distillation $\approx$ Early Stopping? Harvesting Dark Knowledge Utilizing Anisotropic Information Retrieval For Overparameterized Neural Network. 1–22. Retrieved from http://arxiv.org/abs/1910.01255 [2]Jacot, A., Gabriel, F., & Hongler, C. (2018). Neural tangent kernel: Convergence and generalization in neural networks. Advances in Neural Information Processing Systems, 2018-Decem(5), 8571–8580. [3]Xu, Z.-Q. J., Zhang, Y., Luo, T., Xiao, Y., & Ma, Z. (2019). Frequency Principle: Fourier Analysis Sheds Light on Deep Neural Networks. Retrieved from http://arxiv.org/abs/1901.06523 I'm trying to analysis why distillation > early stopping in frequency domain. All the codes are based on pytorch. # How to use? My codes inculde:(you can run all the codes in this sequntial) 1. generate.py . We choose Cifar-10 as the datasets. This code allow us generate a new dataset which with 40% wrong labels, we marked it as $\mathcal{D}$. You can modified it by youself. | 2,809 |
ljuvela/GELP | ['speech synthesis'] | ['GELP: GAN-Excited Linear Prediction for Speech Synthesis from Mel-spectrogram'] | train.py model_discriminator.py model_causal.py demopage/create_demopage_nancy_copysyn.py cond_model.py make_filelist.py data_provider.py sigproc.py demopage/create_demopage_nancy_tacotron.py utils.py generate_copysyn.py model.py melspec.py get_weight_variable UpsampleBilinearInterp get_bias_variable ConvModel NumpyDataProvider TestDataProvider get_config copy_synthesis get_args pre_emphasis get_args _build_mel_basis _mel_to_linear _denormalize inv_melspectrogram melspectrogram _linear_to_mel _db_to_amp _amp_to_db _normalize WaveNet get_weight_variable get_bias_variable WaveNet get_weight_variable get_bias_variable convolution get_weight_variable get_bias_variable Wavenet window_fn_cosine energy_from_spectrogram levinson spec2poly_ref spec_to_ar pre_emphasis ar_analysis_filter ar_synthesis_filter levinson_inner forward_levinson train_model get_config get_args random_crop_batch get_gan_losses ganLossContainer wasserstein_gradient_penalty get_perceptual_stft_loss get_stft_loss upsample_cond R1_gradient_penalty noise_gate get_audio_cell get_audiotable_header get_main_header parse_args get_row_header get_col_header get_audio_cell get_audiotable_header get_main_header parse_args get_row_header get_col_header Variable xavier_initializer_conv2d get_variable ERROR add_argument suppress_warnings set_verbosity ArgumentParser parse_args input_wav_dir inv_melspectrogram model_dir floor abs random_normal UpsampleBilinearInterp Generator placeholder shape pad cast pre_emphasis melspectrogram ceil expand_dims get format glob get_config NumpyDataProvider Encoder spec_to_ar ar_synthesis_filter forward_pass join int stft makedirs pinv mel constant T _build_mel_basis matmul _build_mel_basis matmul _amp_to_db _linear_to_mel _mel_to_linear _db_to_amp _denormalize maximum pad ifft T concatenate square maximum real append solve_toeplitz enumerate concat range reverse maximum concat square maximum reduce_sum reverse range concat square maximum reduce_sum reverse range ifft concat transpose maximum square complex64 levinson cast real abs hann_window abs maximum reduce_sum rfft stft energy_from_spectrogram inverse_stft pad rfft exp angle stft energy_from_spectrogram maximum complex64 inverse_stft pad cast abs config inv_melspectrogram get_stft_loss abs random_normal get_R1_gradient_penalty Generator placeholder get_variable_list pre_emphasis Discriminator melspectrogram append expand_dims get format get_args get_config NumpyDataProvider get_gan_losses ganLossContainer Encoder copy get_perceptual_stft_loss upsample_cond spec_to_ar ar_synthesis_filter ar_analysis_filter forward_pass merge load int join minimize stft reshape get_wasserstein_gradient_penalty isfile scalar makedirs rfft constant stft float32 square pow pad reduce_mean cast amp_to_db abs range stft square reduce_mean amp_to_db abs append random_crop range square reduce_sum sqrt stack reduce_mean random_uniform forward_pass sqrt reduce_sum square gradients get_receptive_field random_crop_batch concat wasserstein_gradient_penalty reduce_mean R1_gradient_penalty forward_pass zeros_like frame square copy where mean filtfilt log10 linspace interp power expand_dims hanning UpsampleBilinearInterp shape pad floor cast ceil forward_pass add_argument ArgumentParser | # GELP: GAN-Excited Linear Prediction This repository contains source code and pre-trained models to reproduce the neural vocoding part in our paper "GELP: GAN-Excited Linear Prediction for Speech Synthesis from Mel-spectrogram" The published version of the paper is freely available at https://www.isca-speech.org/archive/Interspeech_2019/abstracts/2008.html Alternatively, the paper is also available at https://arxiv.org/abs/1904.03976 Audio samples for copy-synthesis and Tacotron TTS are available at https://ljuvela.github.io/GELP/demopage/ ### Citing If you find the code useful, please use the following citation Juvela, L., Bollepalli, B., Yamagishi, J., Alku, P. (2019) GELP: GAN-Excited Linear Prediction for Speech Synthesis from Mel-Spectrogram. Proc. Interspeech 2019, 694-698, DOI: 10.21437/Interspeech.2019-2008. ``` | 2,810 |
ljuvela/ResGAN | ['speech synthesis'] | ['Speech waveform synthesis from MFCC sequences with generative adversarial networks'] | train.py get_mfcc.py data_utils.py models.py download_data.py norm_stats load_test_data nc_data_provider read_binary_file load_data download_file_from_google_drive get_filterbank get_args get_mfcc_lsf poly2lsf mfbe2lsf read_binary_file lsf2poly spec2lsf lsf2mfbe generator time_glot_model tensorflow_fft fft_output_shape identity_output_shape log_operation exp_operation tf_log10 discriminator fft_model gan_container get_args plot_feats train_pls_model train_noise_model generate join asarray print vstack zeros range enumerate join asarray fromkeys print vstack zeros range enumerate fromfile reshape open get get_confirm_token save_response_content Session dtype convolve float64 len astype array poly roots sort angle minimum int maximum outer fft_frequencies mel_frequencies zeros float range diff freqz get_filterbank ones lsf2poly dot log10 zeros abs enumerate ifft freqz get_filterbank poly2lsf maximum square dot pinv real power solve_toeplitz abs zeros enumerate ifft freqz T poly2lsf square maximum shape real zeros solve_toeplitz abs enumerate parse_args add_argument ArgumentParser lfilter dct abs get_filterbank log10 spec2lsf ceil sum input_file asarray nfft pinv hop_size power load int T mel_filters stft maximum dot mfcc_order len constant log fft zeros_like concat maximum sqrt cast clip_by_value tf_log10 abs Model Input fft_layer Model Input fft_layer fft_layer concatenate add Model Input Model Input concatenate generator Model Input discriminator format plot close savefig figure int train_on_batch permutation nc_data_provider evaluate print predict plot_feats range save_weights adam time_glot_model array fft_model compile generator nc_data_provider permutation randn SGD save_weights train_on_batch str ones adam discriminator time_glot_model fft_model range predict plot_feats load_weights compile gan_container int print summary zeros array generator join list items nc_data_provider randn print tofile predict load_weights output_dir time_glot_model compile set_defaults | # MFCC residual waveform generation with GAN This repository contains code related to our ICASSP 2018 paper https://arxiv.org/abs/1804.00920 Residual learning with generative adversarial networks is involved (hence the name ResGAN). For details, check the paper and model architecture section below. Audio samples are available at http://tts.org.aalto.fi/mfcc_synthesis/. ## Requirements Requirement versions are based on my experiment system, an there's no specific reason why the code wouldn't work on older versions. The code now uses Tensorflow backend and python 3, theano has been removed from requirements * python >= 3.6 * numpy >= 1.11.0 | 2,811 |
lkyahpu/EPI_ORM | ['depth estimation', 'data augmentation'] | ['EPI-based Oriented Relation Networks for Light Field Depth Estimation'] | file_io2.py func_epimodel.py EPI_test/test_LF.py save_load_loss.py epi_train.py func_savedata.py EPI_test/read_LF.py func_pfm.py load_LF.py threadsafe_generator save_variable load_variavle LossHistory threadsafe_iter myGenerator read_pfm read_img _get_next_line read_depth read_lightfield write_hdf5 write_pfm read_parameters read_disparity layer2_2 layer2_1 layer_mid res_block_2 define_epi ORM res_block_1 write_pfm read_pfm display_current_output generate_valdata load_LFdata data_augmentation_for_train generate_traindata load_LF_valdata save_variable load_variavle read_pinhole_LF read_all_LF dump close open load close open generate_traindata join sorted read_img read_parameters zeros enumerate dict join read_pfm join read_pfm imread items list File close create_dataset asarray byteorder print flatten flipud rstrip startswith int Sequential add Conv2D range Activation BatchNormalization int Sequential add Conv2D range Activation BatchNormalization int Sequential add Conv2D range Activation BatchNormalization concatenate range add range add concatenate compile RMSprop Model res_block_2 Input ORM res_block_1 uint8 astype float32 zeros abs zeros astype float32 minimum reshape astype float32 maximum choice zeros range minimum load_LFdata reshape float32 maximum zeros range fromarray int minimum astype float32 maximum randomColor array range uint16 read_pfm reshape transpose float32 copy read_lightfield zeros minimum uint8 reshape transpose float32 copy maximum zeros rot90 range minimum join uint8 sort transpose reshape float32 copy maximum shape zeros imread rot90 range enumerate | # EPI_ORM We release the code of [EPI-based Oriented Relation Networks for Light Field Depth Estimation](https://arxiv.org/abs/2007.04538). ## Overall network <div align=center><img src ="https://github.com/lkyahpu/EPI_ORM/raw/master/images/network.png" width="800" height="400"/></div> <font size=2>The proposed network architecture. ## The proposed oriented relation module <div align=center><img src ="https://github.com/lkyahpu/EPI_ORM/raw/master/images/ORM.png" width="800" height="200"/></div> <font size=2> The architecture of ORM. ## Installation [Python 3.6](https://www.anaconda.com/distribution/) | 2,812 |
llien30/GANomaly | ['semi supervised anomaly detection', 'anomaly detection'] | ['GANomaly: Semi-Supervised Anomaly Detection via Adversarial Training'] | train.py libs/transform.py data.py test.py libs/dataloader.py net.py libs/meter.py libs/loss.py libs/roc.py model.py libs/weights.py load_data get_cifar_anomaly_dataset get_mnist_anomaly_dataset ganomaly make_Decoder make_Encoder NetD NetG test get_parameters Dataset L2_Loss AverageMeter roc MNIST_ImageTransform weights_init int arange clone from_numpy cat len int arange concatenate copy array len MNIST get_cifar_anomaly_dataset Compose CIFAR10 get_mnist_anomaly_dataset L1Loss zero_grad input_size device save_image BCEWithLogitsLoss log open L1_Loss ones Adam to range update format D_Loss w_adv test D w_enc avg item num_epochs enumerate time G L2_Loss backward print reshape AverageMeter w_con parameters channel zeros train step format Sequential add_module Conv2d BatchNorm2d LeakyReLU range Linear format print Sequential add_module Tanh ReLU BatchNorm2d ConvTranspose2d range format print reshape size min input_size roc eval channel zeros to num_epochs max test_batch_size enumerate add_argument ArgumentParser join plot xlabel roc_curve close ylabel dict ylim title savefig figure brentq legend cpu xlim auc normal_ __name__ fill_ | # reimplementation of GANomaly Reimplementation of GANomaly by using pytorch [arXiv](https://arxiv.org/abs/1805.06725)\ [GitHub](https://github.com/samet-akcay/ganomaly)\ [My Paper Summary](https://github.com/mn1204/paper_summary/issues/1) ## About CONFIG file config file must be written in the following format ```.yaml dataset: MNIST abnormal_class: 0 | 2,813 |
lliutianc/gan-flow | ['density estimation'] | ['An Empirical Comparison of GANs and Normalizing Flows for Density Estimation'] | model_plot.py wgan_plot.py wgan_best_configs.py util.py hyperopt_wgan.py gu.py residualblock.py GU GausUniffMixture Generator Critic WGANTrainer plot_separately ResidualBlock count_parameters save_best_result_from_tune w_distance retrieve_best_result_from_tune get_logger makedirs plot_separately generator arange grid set_ticks set_visible kdeplot tick_params get_transforms abs round prior set_title view squeeze density savefig legend append parse_args to cat get_sample get_position plot set_position set_xlim close cla mean eval w_distance sampling GausUniffMixture item load join int print sample_fn total_datapoints set_ylabel set_facecolor figure fill_between set_ylim split squeeze getLogger addHandler StreamHandler setLevel INFO FileHandler join listdir exists copy join listdir subplots enumerate | Implementations and results for [An Empirical Comparison of GANs and Normalizing Flows for Density Estimation.](https://arxiv.org/abs/2006.10175) ## Abstract Generative adversarial networks (GANs) and normalizing flows are both approaches to density estimation that use deep neural networks to transform samples from an uninformative prior distribution to an approximation of the data distribution. There is great interest in both for general-purpose statistical modeling, but the two approaches have seldom been compared to each other for modeling non-image data. The difficulty of computing likelihoods with GANs, which are implicit models, makes conducting such a comparison challenging. We work around this difficulty by considering several low-dimensional synthetic datasets. An extensive grid search over GAN architectures, hyperparameters, and training procedures suggests that no GAN is capable of modeling our simple low-dimensional data well, a task we view as a prerequisite for an approach to be considered suitable for general-purpose statistical modeling. Several normalizing flows, on the other hand, excelled at these tasks, even substantially outperforming WGAN in terms of Wasserstein distance -- the metric that WGAN alone targets. Scientists and other practitioners should be wary of relying on WGAN for applications that require accurate density estimation. ## Dependency - Python 3 Some important dependencies: - Numpy - Pandas - Pytorch - torchdiffeq | 2,814 |
llmpass/medianDenoise | ['denoising', 'salt and pepper noise removal'] | ['Convolutional Neural Network with Median Layers for Denoising Salt-and-Pepper Contaminations'] | code/metrics.py code/train.py code/model.py code/inference.py median_pool2d_output_shape median_pool2d find_medians fully_conv data_aug gen_patches TrainValTensorBoard slice int top_k extract_image_patches merge find_medians split list _residual_block Model load_weights summary Input range int shape resize append imread range | # Convolutional Neural Network with Median Layers for Denoising Salt-and-Pepper Contaminations **This is a [Keras](https://keras.io/) version of Median Layer based CNN denoiser implemented by [Luming Liang](https://sites.google.com/site/lumingliangshomepage/) for removing salt-and-pepper noise** ### Prerequisites Python 3.6 Cuda, Cudnn, ... All python package requirements could be found in requirements.txt. Users can simply run ** pip install -r requirements.txt ** to install all required python packages. ### Publication ~~~ | 2,815 |
lmb-freiburg/deeptam | ['depth estimation'] | ['DeepTAM: Deep Tracking and Mapping'] | tracking/python/deeptam_tracker/evaluation/rgbd_benchmark/evaluate_rpe.py tracking/examples/example_basic.py mapping/example/mapping_test_deeptam_2.py tracking/python/deeptam_tracker/utils/helpers.py mapping/python/deeptam_mapper/evaluation/metrics.py tracking/python/deeptam_tracker/tracker.py mapping/python/deeptam_mapper/models/helpers.py mapping/python/deeptam_mapper/mapper.py tracking/python/deeptam_tracker/utils/view_utils.py mapping/python/deeptam_mapper/utils/datatypes.py tracking/python/deeptam_tracker/utils/datatypes.py mapping/python/deeptam_mapper/utils/helpers.py mapping/python/deeptam_mapper/utils/vis_utils.py tracking/python/deeptam_tracker/evaluation/rgbd_sequence.py tracking/python/deeptam_tracker/utils/vis_utils.py tracking/python/deeptam_tracker/utils/rotation_conversion.py tracking/python/deeptam_tracker/models/networks.py tracking/python/deeptam_tracker/models/blocks.py mapping/python/deeptam_mapper/models/networks_base.py tracking/python/deeptam_tracker/models/networks_base.py tracking/python/deeptam_tracker/evaluation/rgbd_benchmark/evaluate_ate.py tracking/python/deeptam_tracker/evaluation/metrics.py mapping/python/deeptam_mapper/models/networks.py mapping/example/mapping_test_deeptam.py mapping/python/deeptam_mapper/models/blocks.py tracking/examples/example_advanced_sequence.py mapping/python/deeptam_mapper/utils/rotation_conversion.py tracking/python/deeptam_tracker/models/helpers.py tracking/python/deeptam_tracker/evaluation/rgbd_benchmark/associate.py create_cv_conf_from_sequence_py mapping_with_pose update_visualization init_visualization compute_depth_metrics main main visualization Mapper sq_relative compute_depth_scale_factor compute_motion_errors abs_relative compute_flow_epe compute_valid_depth_mask l1 ratio_threshold compute_errors rmse_log scale_invariant evaluate_depth rmse avg_log10 l1_inverse _predict_depth depth_fb_block _refine _upsample_prediction depth_nb_refine_block depth_nb_block _predict_flow compute_sad_volume_for_sequence convrelu compute_sad_volume_with_confidence convrelu2 get_depth_label_list default_weights_initializer fcrelu myLeakyRelu conv2d create_border_mask_for_image compute_confidence_for_costvolume_2 create_depthsweep_images_tensor CVGenerateNetwork MappingFBNetwork MappingNBNetwork MappingNBRefineNetwork MappingNetworkBase SeqPy SubSeqPy generate_sub_seq_list_py Frame Pose_identity optimistic_restore load_myNetworks_module_noname load_myNetworks_module angleaxis_to_angle_axis numpy_to_Vector3 angleaxis_to_rotation_matrix rotation_matrix_to_angleaxis angleaxis_to_quaternion convert_array_to_colorimg convert_array_to_grayimg update_visualization main init_visualization track_rgbd_sequence main simple_evaluation simple_visualization Tracker TrackerCore rgbd_ate angle_diff rgbd_rpe position_diff RGBDSequence read_file_list associate evaluate_ate align plot_traj percentile transform44 compute_distance read_trajectory distances_along_trajectory evaluate_trajectory scale rotations_along_trajectory compute_angle ominus evaluate_rpe find_closest_index _refine _upsample_prediction create_flow_inputs_and_gt motion_block _predict_flow flow_block convert_NCHW_to_NHWC convrelu apply_motion_increment resize_area_NCHW convrelu2 default_weights_initializer fcrelu myLeakyRelu convert_NHWC_to_NCHW conv2d scale_tensor resize_nearest_neighbor_NCHW TrackingNetwork TrackingNetworkBase Pose_identity optimistic_restore load_myNetworks_module_noname load_myNetworks_module angleaxis_to_angle_axis numpy_to_Vector3 angleaxis_to_rotation_matrix rotation_matrix_to_angleaxis angleaxis_to_quaternion safe_crop_image adjust_intrinsics safe_crop_array2d convert_array_to_colorimg convert_array_to_grayimg convert_between_c2w_w2c set_size_inches set_title suptitle add_subplot set_visible figure set_title squeeze pause imshow convert_array_to_colorimg convert_array_to_grayimg array compute_valid_depth_mask zeros_like len seq_len append range run update_visualization SubSeqPy get_depth reset_default_graph GPUOptions Session run show ones create_cv_conf_from_sequence_py load_myNetworks_module_noname build_net optimistic_restore range MappingFBNetwork get_image CVGenerateNetwork MappingNBNetwork init_visualization seq_len MappingNBRefineNetwork compute_depth_metrics global_variables_initializer join mapping_with_pose dirname show set_size_inches set_title suptitle squeeze add_subplot imshow set_visible figure convert_array_to_colorimg convert_array_to_grayimg array clear Mapper feed_frame seq_len compute_keyframe_depth image intrinsics visualization range isfinite size float reciprocal size float size float log size float size float log size float size float log10 size float size float log compute_valid_depth_mask ratio_threshold startswith float sum reciprocal exp compute_valid_depth_mask multiply print mean sum log reciprocal compute_depth_scale_factor compute_valid_depth_mask compute_errors dot sqrt compute_valid_depth_mask sqrt norm Vector3 Quaternion dot _numpy_to_Vector3 angularDistance normalize acos clip conv2d convrelu convolution2d convolution2d_transpose conv2d_transpose conv2d isinstance as_list exp reduce_min reduce_sum get_shape constant ndarray isinstance append SubSeqPy seq_len adjust_pose_wrt_ref View append join exec_module module_from_spec dirname spec_from_file_location format sorted NewCheckpointReader restore global_variables Saver dbg get_variable_to_shape_map float64 astype norm normalized Vector3 angleaxis_to_angle_axis toRotationMatrix Vector3 float64 astype angleaxis_to_quaternion toAngleAxis uint8 astype rollaxis copy uint8 astype nan copy plot set_zlim legend plot difference cla update_visualization image_height RGBDSequence show feed_frame append range format set_init_pose Tracker get_timestamp get_sun3d_intrinsics clear rgbd_rpe print poses init_visualization image_width get_sequence_length get_dict track_rgbd_sequence data_dir add_argument ArgumentParser parse_args print angle_diff position_diff format show subplot format set_title print squeeze difference imshow set_visible convert_array_to_colorimg format set_keyframe print image_width simple_evaluation get_dict image_height get_sun3d_intrinsics compute_current_pose RGBDSequence TrackerCore simple_visualization dot row remove format close mkstemp write_rgbd_pose_format evaluate_rpe split remove format evaluate_ate close mkstemp write_rgbd_pose_format split read split open list remove sort append keys svd transpose identity set_printoptions mean zeros matrix range plot sort append median range len max_difference align add_subplot verbose read_file_list ArgumentParser save second_file max open list A use offset plot_traj transpose set_xlabel save_associations savefig legend parse_args first_file plot close mean sqrt zip float keys join print sort add_argument min write associate dot set_ylabel figure median std len dot array outer read write isnan dict open enumerate append split int abs len append sort list keys append sort list keys median list sort pi sample compute_distance distances_along_trajectory scale append rotations_along_trajectory compute_angle ominus keys range find_closest_index len sort list add_subplot pi verbose evaluate_trajectory ArgumentParser save max open seed use max_pairs offset fixed_delta set_xlabel delta read_trajectory savefig groundtruth_file parse_args estimated_file plot close mean sqrt scale float int join print add_argument write min dot set_ylabel delta_unit figure median std len transfer_key_frame2 stop_gradient concat replace_nonfinite conv2d convrelu conv2d_transpose as_list list print slice min append as_list int constant convert_NCHW_to_NHWC pow int32 resize_nearest_neighbor squeeze angle_axis_to_rotation_matrix matmul add rotation_matrix_to_angle_axis expand_dims new crop paste mode full int height print safe_crop_image crop astype width float32 resize depth round max Vector3 R transpose t inverse Identity | # DeepTAM DeepTAM is a learnt system for keyframe-based dense camera tracking and mapping. If you use this code for research, please cite the following paper: @InProceedings{ZUB18, author = "H. Zhou and B. Ummenhofer and T. Brox", title = "DeepTAM: Deep Tracking and Mapping", booktitle = "European Conference on Computer Vision (ECCV)", month = " ", year = "2018", url = "http://lmb.informatik.uni-freiburg.de/Publications/2018/ZUB18" | 2,816 |
lmbxmu/FilterSketch | ['network pruning'] | ['Filter Sketch for Network Pruning'] | model/googlenet.py get_flops_params.py sketch_cifar.py model/resnet_imagenet.py model/resnet.py test.py sketch_imagenet.py data/imagenet.py utils/common.py data/cifar10.py data/imagenet_dali.py utils/options.py test sketch_matrix load_resnet_sketch_model load_googlenet_sketch_model main train weight_norm load_resnet_imagenet_sketch_model test sketch_matrix adjust_learning_rate get_data_set main train weight_norm main test Data Data get_imagenet_iter_torch get_imagenet_iter_dali HybridTrainPipe HybridValPipe GoogLeNet Inception googlenet resnet110 ResNet LambdaLayer ResBasicBlock conv3x3 resnet resnet56 ResNet18 ResNet Bottleneck ResNet34 ResNet101 resnet ResNet50 BasicBlock ResNet152 AverageMeter accuracy get_sketch_rate get_logger checkpoint int svd mul view size mm clone where range t sqrt eye zeros sum diag named_modules sketch_model str load_state_dict append to range state_dict size test info enumerate load Linear isinstance testLoader Conv2d sketch_matrix BatchNorm2d load named_modules isinstance testLoader size test Conv2d sketch_matrix Linear load_state_dict info append BatchNorm2d to sketch_model state_dict model zero_grad loss_func dataset update format size avg info item float enumerate time backward AverageMeter accuracy step train_batch_size len eval AverageMeter time save_model SGD MultiStepLR load_resnet_sketch_model DataParallel load_googlenet_sketch_model max sketch_rate trainLoader to range format test get_sketch_rate info float num_epochs testLoader print parameters train step load str named_modules isinstance size test Conv2d sketch_matrix enumerate Linear load_state_dict info append BatchNorm2d to range sketch_model state_dict adjust_learning_rate _size to reset reset param_groups float lr load_resnet_imagenet_sketch_model load load_state_dict sketch_model DALIClassificationIterator HybridTrainPipe HybridValPipe build ImageFolder Compose DataLoader setFormatter getLogger addHandler StreamHandler Formatter setLevel INFO FileHandler int replace findall compile split | # Filter Sketch for Network Pruning ([Link](https://arxiv.org/abs/2001.08514)). Pruning neural network model via filter sketch. <div align=center><img src="img/framework.jpeg" height = "50%" width = "60%"/></div> ## Tips Any problem, free to contact the authors via emails: [email protected] or [email protected]. Do not post issues with github as much as possible, just in case that I could not receive the emails from github thus ignore the posted issues. ## Citation If you find FilterSketch useful in your research, please consider citing: ``` @article{lin2020filter, title={Filter Sketch for Network Pruning}, | 2,817 |
lmbxmu/HRank | ['network pruning'] | ['HRank: Filter Pruning using High-Rank Feature Map'] | get_flops.py rank_generation.py models/googlenet_cifar.py models/resnet_cifar.py cal_flops_params.py mask.py models/densenet_cifar.py models/vgg.py data/imagenet.py models/resnet_imagenet.py models/__init__.py data/cifar10.py evaluate.py main.py utils.py test get_layer_info is_pruned is_leaf get_layer_param measure_model measure_layer get_num_gen train test mask_vgg_16_bn mask_resnet_56 mask_resnet_50 mask_resnet_110 mask_googlenet mask_densenet_40 get_feature_hook_googlenet test get_feature_hook_densenet get_feature_hook AverageMeter progress_bar accuracy print_params format_time get_logger checkpoint Data Data densenet_40 DenseBasicBlock Transition DenseNet GoogLeNet Inception googlenet ResNet LambdaLayer resnet_56 ResBasicBlock conv3x3 resnet_110 Downsample ResNet conv3x3 resnet_50 ResBottleneck vgg_16_bn VGG eval AverageMeter len mask str strip int hasattr cp_rate parameters last_prune_num enumerate int get_layer_info cp_rate print size last_prune_num get_layer_param numel out_channels in_channels groups conv1 tmp_name modify_forward restore_forward eval to forward enumerate info str format info avg mkdir save arch job_dir tensor float sum tensor float sum tensor float sum limit setFormatter getLogger addHandler StreamHandler Formatter setLevel INFO FileHandler items sorted prtf format upper int time join format_time write append range flush len int ResNet | # HRank: Filter Pruning using High-Rank Feature Map ([Link](https://128.84.21.199/abs/2002.10179)). Pytorch implementation of HRank (CVPR 2020, Oral). This repository was what we used during the preparation of CVPR 2020. You can enjoy it! A better version of HRank (in both fine-tuning efficiency and accuracy performance) are released at [HRankPlus](https://github.com/lmbxmu/HRankPlus). It is highly suggested! <div align=center><img src="img/framework.jpeg" height = "60%" width = "70%"/></div> Framework of HRank. In the left column, we first use images to run through the convolutional layers to get the feature maps. In the middle column, we then estimate the rank of each feature map, which is used as the criteria for pruning. The right column shows the pruning (the red filters), and fine-tuning where the green filters are updated and the blue filters are frozen. ## Tips Any problem, please contact the authors via emails: [email protected] or [email protected]. Do not post issues with github as much as possible, just in case that I could not receive the emails from github thus ignore the posted issues. ## Citation If you find HRank useful in your research, please consider citing: | 2,818 |
lminvielle/mom-kde | ['density estimation'] | ['Robust Kernel Density Estimation with Median-of-Means principle'] | libs/metrics.py plot_results.py compare_kde_methods_synthetic.py libs/kde_lib.py compare_kde_methods.py libs/exp_lib.py libs/data.py verify set_datasetname set_metricname set_algoname set_datasetname set_io_class make_grid generate_situations balance_outlier true_density_situations downsample true_density load_data generate load_data_outlier Density_model area_density spkde mom_kde phi psi rkde gaussian_kernel rho area_MC_mom kde loss irls bandwidth_cvgrid kl ws js empty data format load_breast_cancer load_digits print loadtxt load_iris hstack target set vstack len set_io_class set_datasetname load_data zeros StandardScaler fit_transform resample int print downsample zeros sum T linspace append meshgrid abs range normal int print zeros generate pdf exp pi sum ones logical_and shape abs ones shape logical_and zeros T format ones reshape print phi dot sqrt append sum loss fit print reshape trapz enumerate exp append product KernelDensity mean uniform sample median abs array range score_samples fit int area_density exp std print shuffle KernelDensity area_MC_mom append median array range score_samples fit percentile rbf_kernel pi dot shape median irls ones reshape rbf_kernel pi qp zeros matrix sum range len GridSearchCV print KernelDensity logspace fit sinkhorn2 dist | # Median-of-Means Kernel Density Estimator (MoM-KDE) Code of the Median-of-Means Kernel Density Estimator (MoM-KDE) used in: [Robust Kernel Density Estimation with Median-of-Means principle.](https://arxiv.org/abs/2006.16590) ## Container The reposity contains codes for MoM-KDE, RKDE [1], and SPKDE [2]. ## Requirements This code runs on Python >= 3.5. Set up environment with: ``` pip install -r requirements.txt ``` | 2,819 |
locuslab/uniform-convergence-NeurIPS19 | ['generalization bounds'] | ['Uniform convergence may be unable to explain generalization in deep learning'] | experiments.py main h_dim get_margin_distribution strip TRAINABLE_VARIABLES get_random_mnist_test_set depth max exists get_error open run str get_collection placeholder GradientDescentOptimizer savetxt initialize_all_variables reinitialize_weights close n_train tag perform_op_over_data sqrt __flags InteractiveSession eta int norm n_batch sigmoid_cross_entropy_with_logits minimize print float32 noise reduce_mean get_random_mnist_train_set margin split read_data_sets makedirs | locuslab/uniform-convergence-NeurIPS19 | 2,820 |
logchan/dde | ['density estimation', 'denoising'] | ['Learning Generative Models using Denoising Density Estimators'] | celeba/models_cleaned.py dde.py celeba/train_cleaned.py celeba/test_cleaned.py datasets.py modules.py fashionLoader toyLoader StackedMNISTDataset eightGaussiansLoader ringsLoader uciLoader _sample_2d_data _loadAllData _getTransform mnistLoader stackedMnistLoader ToyDataset checkerboardLoader _createLoader twoSpiralsLoader activation_from_name _get_noisy testAverageLL getLogPartition SinActivation visualize run getDdeDensity plotDdeDensity _get_noise NetModel train_ncsn DdeModel plotDensity _print_stats createFigure getNormalizingConstant _get_dde_output train plotToySamples MlpModule createLinearLayers ReShape Generator NCSNDde Discriminator BasicNet weights_init _xavier_override createLinear DenseNetModule dde_32 generator_32 pixel_norm leaky_relu imgrid get_layer_noise swish get_noise_placeholders main leaky_relu l2 print_over swish test_data Normalize main train randn rand cos pi sqrt stack floor sin randint tensor cat zeros DataLoader enumerate len ToyDataset MNIST FashionMNIST _getTransform StackedMNISTDataset load TensorDataset from_numpy concatenate lower startswith add_axes set_axis_off Axes figure set_title mean imshow set_facecolor jet std clip dde min linspace device meshgrid to numpy plotDensity getDdeDensity hist2d sum exp max log concatenate astype float32 pi mean sqrt n_input getLogPartition range log getNormalizingConstant concatenate mean array range n_uci_samples subplots save_toy_samples_to vis_path testAverageLL savez_compressed plotDdeDensity transpose squeeze train_generator imshow savefig range close createFigure print reshape set_axis_off figure numpy plotToySamples zeros normal_ requires_grad_ dde print nets zero_grad random_with_grad min_sigma _get_noisy save device max visualize sigma train_generator Adam epochs to sum range save_to _print_stats enumerate reduce_sigma_gamma _get_dde_output backward print parameters step mse_loss len zero_grad get_ncsn_dde_output _get_noisy save device step Adam to range save_to _print_stats net enumerate backward print visualize_ncsn parameters epochs mse_loss batch_size eightGaussiansLoader n_feat_gen NCSNDde vis_path gen_bn activation_from_name min_sigma stackedMnistLoader ArgumentParser fashionLoader device n_feat_dsc visualize list gen_activation Generator shape dde_activation uciLoader Discriminator DenseNetModule checkerboardLoader n_hidden NetModel load_from train_ncsn n_layers DdeModel startswith dataset_dir download load MlpModule print n_gen_hidden add_argument makedirs datasize dsc_activation n_input train mnistLoader twoSpiralsLoader sqrt float _no_grad_uniform_ bias xavier_uniform_ _xavier_override weight Linear append createLinear range activation data bias xavier_uniform_ normal_ _xavier_override weight __name__ constant_ softplus int zeros enumerate rvs batch_size reshape append zeros GPUOptions write flush GPUOptions print Lambda Compose ImageFolder DataLoader dataset_dir next enumerate chpt_dir sorted makedirs sum_dir map zfill train enumerate | # Learning Generative Models using Denoising Density Estimators ([pdf](https://arxiv.org/abs/2001.02728)) Siavash A Bigdeli, Geng Lin, Tiziano Portenier, L Andrea Dunbar, Matthias Zwicker ### Abstract: Learning generative probabilistic models that can estimate the continuous density given a set of samples, and that can sample from that density, is one of the fundamental challenges in unsupervised machine learning. In this paper we introduce a new approach to obtain such models based on what we call denoising density estimators (DDEs). A DDE is a scalar function, parameterized by a neural network, that is efficiently trained to represent a kernel density estimator of the data. Leveraging DDEs, our main contribution is to develop a novel approach to obtain generative models that sample from given densities. We prove that our algorithms to obtain both DDEs and generative models are guaranteed to converge to the correct solutions. Advantages of our approach include that we do not require specific network architectures like in normalizing flows, ordinary differential equation solvers as in continuous normalizing flows, nor do we require adversarial training as in generative adversarial networks (GANs). Finally, we provide experimental results that demonstrate practical applications of our technique. See the [manuscript](https://arxiv.org/abs/2001.02728) for details of our method. # Interactive tutorial Check [this repository](https://github.com/siavashBigdeli/DDE) for interactive tutorials with Jupyter notebooks. # How to use For toy data, MNIST, UCI datasets: check the `train_*.sh` scripts for training. To run experiments for UCI datasets, download the data from [Google Drive](https://drive.google.com/file/d/1eyT2h04GkhRkD8S4-tyWZ6oxZpPgjY3S/view?usp=sharing). For CelebA, check the `celeba` folder. | 2,821 |
logpai/loglizer | ['anomaly detection'] | ['Anomaly Detection using Autoencoders in High Performance Computing Systems'] | demo/InvariantsMiner_demo_without_labels.py loglizer/models/SVM.py loglizer/models/LR.py loglizer/dataloader.py loglizer/models/InvariantsMiner.py demo/InvariantsMiner_demo.py demo/DeepLog_demo.py demo/SVM_demo.py demo/PCA_demo.py loglizer/models/DeepLog.py loglizer/models/DecisionTree.py loglizer/preprocessing.py demo/PCA_demo_without_labels.py loglizer/models/__init__.py benchmarks/HDFS_bechmark.py demo/LogClustering_demo.py demo/LR_demo.py demo/DecisionTree_demo.py loglizer/models/PCA.py loglizer/models/IsolationForest.py loglizer/models/LogClustering.py loglizer/utils.py demo/IsolationForest_demo.py slice_hdfs load_BGL bgl_preprocess_data _split_data load_HDFS Vectorizer FeatureExtractor Iterator metrics DecisionTree DeepLog InvariantsMiner IsolationForest LogClustering LR PCA SVM int hstack arange shuffle slice_hdfs endswith DataFrame values iterrows list apply OrderedDict _split_data append sum format set load items set_index print to_csv findall to_dict read_csv format print len append DataFrame enumerate str list print tuple set savetxt mkdir append zeros sum range values len precision_recall_fscore_support | <p align="center"> <a href="https://github.com/logpai"> <img src="https://github.com/logpai/logpai.github.io/blob/master/img/logpai_logo.jpg" width="425"></a></p> # loglizer **Loglizer is a machine learning-based log analysis toolkit for automated anomaly detection**. > Loglizer是一款基于AI的日志大数据分析工具, 能用于自动异常检测、智能故障诊断等场景 Logs are imperative in the development and maintenance process of many software systems. They record detailed runtime information during system operation that allows developers and support engineers to monitor their systems and track abnormal behaviors and errors. Loglizer provides a toolkit that implements a number of machine-learning based log analysis techniques for automated anomaly detection. :telescope: If you use loglizer in your research for publication, please kindly cite the following paper. + Shilin He, Jieming Zhu, Pinjia He, Michael R. Lyu. [Experience Report: System Log Analysis for Anomaly Detection](https://jiemingzhu.github.io/pub/slhe_issre2016.pdf), *IEEE International Symposium on Software Reliability Engineering (ISSRE)*, 2016. [[Bibtex](https://dblp.org/rec/bibtex/conf/issre/HeZHL16)][[中文版本](https://github.com/AmateurEvents/article/issues/2)] **(ISSRE Most Influential Paper)** | 2,822 |
longlongman/CasRel-pytorch-reimplement | ['relation extraction'] | ['A Novel Cascade Binary Tagging Framework for Relational Triple Extraction'] | CasRel-reimplement/data_loader.py CasRel-reimplement/models/casrel.py CasRel-reimplement/models/__init__.py CasRel-reimplement/framework/framework.py CasRel-reimplement/train.py CasRel-reimplement/framework/__init__.py CasRel-reimplement/utils/__init__.py CasRel-reimplement/test.py CasRel-reimplement/utils/tokenize.py CasRel-reimplement/config/config.py CasRel-reimplement/config/__init__.py cmed_collate_fn CMEDDataset DataPreFetcher get_loader find_head_idx Config Framework Casrel get_tokenizer HBTokenizer range len list sort copy_ from_numpy zero_ zip max range len CMEDDataset DataLoader | # CasRel-pytorch-reimplement Pytorch reimplement of the paper "A Novel Cascade Binary Tagging Framework for Relational Triple Extraction" ACL2020. The [original code](https://github.com/weizhepei/CasRel) was written in keras. # Requirements - keras-bert - tensorflow-gpu - transformers # Dataset - [CMED](biendata.xyz/competition/chip_2020_2/): CHIP-2020 中文医学文本实体关系抽取 # Usage 1. Get the pre-trained Chinese BERT model | 2,823 |
longnguyen2/blazeface | ['face detection'] | ['BlazeFace: Sub-millisecond Neural Face Detection on Mobile GPUs'] | my_blazeface.py pt_blazeFace.py tf_blazeFace.py blazeface.py BlazeFace intersect BlazeBlock jaccard overlap_similarity MyBlazeFace clamp size min expand max intersect expand_as | # blazeface # blazeface | 2,824 |
longodj/tcvaemolgen | ['molecular property prediction'] | ['Path-Augmented Graph Transformer Network'] | tcvaemolgen/interfaces/wandb.py tcvaemolgen/models/modules/__init__.py tcvaemolgen/models/atom_predictor.py tcvaemolgen/preprocessing/shortest_paths.py tcvaemolgen/models/modules/jtnn_enc.py tcvaemolgen/utils/test_fixtures.py tcvaemolgen/structures/moltree.py tcvaemolgen/train/train_atom_predictor.py tcvaemolgen/preprocessing/tests/test_shortest_paths.py tcvaemolgen/structures/vocab.py tcvaemolgen/utils/path_utils.py tcvaemolgen/models/tcvae.py tcvaemolgen/models/modules/jtnn_dec.py tcvaemolgen/structures/test/test_moltree.py tcvaemolgen/bridge/factory.py tcvaemolgen/train/train_transformer.py tcvaemolgen/patterns/adapter.py tcvaemolgen/models/transformer.py tcvaemolgen/structures/molgraph.py tcvaemolgen/datasets/mol_dataset.py tcvaemolgen/structures/test/test_mol_features.py tcvaemolgen/models/modules/jtgcn.py tcvaemolgen/models/prop_predictor.py tcvaemolgen/utils/__init__.py tcvaemolgen/utils/tests/test_path_utils.py tcvaemolgen/utils/data.py tcvaemolgen/structures/__init__.py notebooks/4_T-CVAE.py tcvaemolgen/models/jtnn_vae.py tcvaemolgen/models/modules/attention.py tcvaemolgen/utils/chem.py tcvaemolgen/utils/cuda.py tcvaemolgen/train/train_prop.py tcvaemolgen/__init__.py __init__.py tcvaemolgen/structures/mol_features.py tcvaemolgen/models/modules/gcn.py sample_posterior TCVAE ArgsTemp test sample_prior train ProviderList ProviderFactory combine_data MolDataset Args get_loader WandBExperiment AtomPredictor DGLJTNNVAE PropPredictor drawheatmaps drawmols TCVAE MoleculeTransformer Attention GraphConvNet GatherUpdate LoopyBPUpdate mol2dgl_single DGLJTMPN dfs_order dec_tree_node_update create_node_dict can_assemble have_slots DGLJTNNDecoder EncoderGatherUpdate DGLJTNNEncoder level_order Adapter read_mol_smiles main get_ring_paths ordered_pair get_shortest_paths parse_mol test_fused_ring test_simple_aro_ring test_simple assert_dict_equal test_complex test_simple_ring MolGraph MolTree bt_index_to_float get_bt_feature get_bond_features get_path_bond_feature get_atom_features onek_unk_encoding mol2tensors get_bt_index Vocab get_slots test_edge_construction test_tree test_node_construction test_mol2tensors test_bt_index_to_float test_get_bt_index main main main dfs_assemble_nx attach_mols_nx atom_equal enum_attach_nx decode_stereo copy_atom sanitize copy_edit_mol tree_decomp local_attach_nx enum_assemble_nx ring_bond_equal set_atommap get_clique_mol get_smiles get_mol cuda move_dgl_to_cuda GRUUpdate read_smiles_from_dir load_shortest_paths write_props read_smiles_ring_data read_splits read_smiles_from_file read_smiles_multiclass merge_path_inputs get_num_path_features get_path_features get_ring_features get_path_input get_path_atoms ordered_pair smiles_set single_smiles test_path_input get_args str model print backward step zero_grad range tqdm DataLoader item beta save maxsize enumerate flush state_dict decode print move_to_cuda sample smiles DataLoader encode enumerate list merge_path_inputs Args zip max DataLoader MolDataset batch_size append MolFromSmiles log_image len int reshape tostring_rgb draw fromstring close sqrt imshow figure ImageGrid zip ceil numpy log_image has_edge_between GetIdx GetBeginAtom GetBonds GetNumBonds get_bond_features GetAtoms get_atom_features DGLGraph add_nodes append GetEndAtom GetNumAtoms add_edges enumerate dfs_labeled_edges_generator zip pop list zip append enumerate sorted enum_assemble_nx enumerate successors bfs_edges_generator find_edges append ordered_pair enumerate len get_atom_frag GetShortestPath get_ring_paths GetNumAtoms range GetMolFrags len append readlines close open MolFromSmiles dump read_mol_smiles print set_trace tqdm get_shortest_paths open data_dir add_argument ArgumentParser max_path_length parse_args parse_mol items list assert_dict_equal MolFromSmiles get_shortest_paths MolFromSmiles get_shortest_paths MolFromSmiles get_shortest_paths GetNumAtoms range MolFromSmiles get_shortest_paths GetNumAtoms range MolFromSmiles get_shortest_paths GetDegree GetExplicitValence GetFormalCharge GetImplicitValence onek_unk_encoding GetSymbol len onek_unk_encoding GetBondType onek_unk_encoding GetBondType tree_decomp get_bond_features get_smiles count GetAtoms append GetBonds LongTensor get_atom_features get_clique_mol zip GetNumAtoms enumerate GetIdx GetNumBonds print clone dict zeros Tensor len MolFromSmiles MolTree MolTree print nodes_dict MolTree print MolFromSmiles mol2tensors load_shortest_paths AtomPredictor fit Trainer data info n_rounds test read_smiles_multiclass PropPredictor dataset range CometLogger len MoleculeTransformer SetAtomMapNum GetAtoms Kekulize MolFromSmiles MolFromSmiles list CHI_UNSPECIFIED EnumerateStereoisomers MolToSmiles SetChiralTag append get_smiles get_mol SetAtomMapNum SetFormalCharge GetFormalCharge Atom GetSymbol GetAtomMapNum AddAtom MolFromSmiles GetIdx copy_atom GetAtoms GetBondType AddBond GetBonds RWMol GetMol MolFromSmiles sanitize MolFragmentToSmiles GetIdx list defaultdict minimum_spanning_tree csr_matrix extend set nonzero zip append GetBonds GetNumAtoms range len AddAtom SetAtomMapNum copy_atom GetAtomWithIdx RemoveBond GetAtoms GetBondType AddBond GetBonds GetAtomMapNum copy_edit_mol attach_mols_nx int atom_equal GetAtomWithIdx GetBondTypeAsDouble GetAtoms ring_bond_equal append GetBonds GetBondWithIdx MolFromSmiles MolToSmiles local_attach_nx search set add Kekulize append list sorted enum_assemble_nx index zip attach_mols_nx is_available update data load print open readlines open append readlines close open append readlines open int readlines open append split read_smiles_from_file get_num_path_features view concatenate get_path_features reshape get_ring_features ordered_pair stack get_path_atoms ring_embed tensor p_embed range append enumerate get_num_path_features debug zeros float Tensor enumerate N_BOND_FEATS max_path_length GetBondBetweenAtoms get_path_bond_feature append zeros range len zeros parse_args add_argument ArgumentParser merge_path_inputs get_args squeeze get_path_input max | # Stanford CS236 Final Project ## David Longo - T-CVAE-MolGen Repository containing a [pyTorch Lightning](https://github.com/williamFalcon/pytorch-lightning) port of the [Path Augmented Graph Transformer Network](https://arxiv.org/abs/1905.12712) paper by [Chen](https://www.csail.mit.edu/person/benson-chen), [Barzilay](https://people.csail.mit.edu/regina/), and [Jaakkola](http://people.csail.mit.edu/tommi/). >Chen, B.S., Barzilay, R., & Jaakkola, T.S. (2019). Path-Augmented Graph Transformer Network. ArXiv, abs/1905.12712. ## Creating a new project from this template Simply follow the [instructions](https://help.github.com/en/articles/creating-a-repository-from-a-template) to create a new project repository from this template. ## Todo: - [x] Implement Path Augmented Graph Transformer Network in PyTorch Lightning - [ ] Complete implementation in PyTorch-Geometric - [x] Run algorithm on QM7 | 2,825 |
longrongyang/LNCIS | ['instance segmentation', 'semantic segmentation'] | ['Learning with Noisy Class Labels for Instance Segmentation'] | configs/grid_rcnn/grid_rcnn_r50_fpn_gn-head_1x_coco.py configs/grid_rcnn/grid_rcnn_r50_fpn_gn-head_2x_coco.py configs/_base_/datasets/coco_instance.py mmdet/models/roi_heads/roi_extractors/single_level_roi_extractor.py tests/test_models/test_heads.py mmdet/models/roi_heads/grid_roi_head.py mmdet/core/bbox/coder/legacy_delta_xywh_bbox_coder.py mmdet/core/utils/misc.py mmdet/models/detectors/__init__.py configs/_base_/datasets/cityscapes_detection.py configs/lvis/mask_rcnn_x101_64x4d_fpn_sample1e-3_mstrain_2x_lvis.py mmdet/models/roi_heads/mask_heads/__init__.py configs/foveabox/fovea_align_r50_fpn_gn-head_mstrain_640-800_4x4_2x_coco.py configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py tests/test_ops/test_soft_nms.py configs/fsaf/fsaf_x101_64x4d_fpn_1x_coco.py configs/_base_/models/faster_rcnn_r50_fpn.py tests/test_models/test_necks.py mmdet/core/bbox/iou_calculators/builder.py tools/pytorch2onnx.py mmdet/models/detectors/fcos.py configs/rpn/rpn_r101_fpn_2x_coco.py tests/test_ops/test_nms.py mmdet/core/utils/dist_utils.py configs/libra_rcnn/libra_fast_rcnn_r50_fpn_1x_coco.py configs/detectors/detectors_cascade_rcnn_r50_1x_coco.py configs/fcos/fcos_x101_64x4d_fpn_gn-head_mstrain_640-800_4x2_2x_coco.py configs/cityscapes/mask_rcnn_r50_fpn_1x_cityscapes_nl_2.py configs/cascade_rcnn/cascade_mask_rcnn_r50_fpn_20e_coco.py mmdet/core/bbox/coder/tblr_bbox_coder.py mmdet/models/losses/accuracy.py mmdet/models/detectors/single_stage.py configs/groie/mask_rcnn_r50_fpn_syncbn-backbone_r4_gcb_c3-c5_groie_1x_coco.py mmdet/datasets/__init__.py mmdet/datasets/pipelines/loading.py configs/htc/htc_x101_32x4d_fpn_16x1_20e_coco.py configs/fsaf/fsaf_r50_fpn_1x_coco.py mmdet/datasets/pipelines/auto_augment.py tools/test.py configs/guided_anchoring/ga_retinanet_r101_caffe_fpn_mstrain_2x.py mmdet/models/dense_heads/fovea_head.py mmdet/models/dense_heads/pisa_retinanet_head.py tests/test_fp16.py configs/fast_rcnn/fast_rcnn_r50_caffe_fpn_1x_coco.py mmdet/datasets/cityscapes.py mmdet/ops/corner_pool/corner_pool.py configs/wider_face/ssd300_wider_face.py configs/mask_rcnn/mask_rcnn_r50_caffe_fpn_mstrain-poly_2x_coco.py mmdet/core/post_processing/merge_augs.py configs/pisa/pisa_ssd300_coco.py configs/gn+ws/mask_rcnn_x50_32x4d_fpn_gn_ws-all_2x_coco.py configs/pascal_voc/faster_rcnn_r50_fpn_1x_voc0712.py mmdet/core/anchor/builder.py mmdet/models/detectors/grid_rcnn.py mmdet/models/backbones/detectors_resnext.py configs/lvis/mask_rcnn_r101_fpn_sample1e-3_mstrain_2x_lvis.py tests/test_models/test_roi_extractor.py mmdet/models/utils/__init__.py configs/dynamic_rcnn/dynamic_rcnn_r50_fpn_1x.py configs/fcos/fcos_r101_caffe_fpn_gn-head_4x4_1x_coco.py tests/test_async.py configs/cascade_rcnn/cascade_rcnn_r101_fpn_1x_coco.py mmdet/models/dense_heads/reppoints_head.py mmdet/models/backbones/hrnet.py configs/reppoints/reppoints_moment_r50_fpn_gn-neck+head_1x_coco.py mmdet/models/dense_heads/retina_sepbn_head.py configs/reppoints/reppoints_moment_r101_fpn_gn-neck+head_2x_coco.py tests/test_anchor.py configs/dcn/mask_rcnn_r50_fpn_mdconv_c3-c5_1x_coco.py mmdet/core/bbox/assigners/atss_assigner.py configs/faster_rcnn/faster_rcnn_r50_fpn_giou_1x_coco.py mmdet/models/roi_heads/test_mixins.py configs/cascade_rcnn/cascade_mask_rcnn_r101_fpn_1x_coco.py configs/gn+ws/mask_rcnn_x50_32x4d_fpn_gn_ws-all_20_23_24e_coco.py configs/hrnet/cascade_mask_rcnn_hrnetv2p_w40_20e_coco.py configs/deepfashion/mask_rcnn_r50_fpn_15e_deepfashion.py configs/fast_rcnn/fast_rcnn_r101_fpn_1x_coco.py configs/gn+ws/faster_rcnn_r101_fpn_gn_ws-all_1x_coco.py configs/nas_fpn/retinanet_r50_fpn_crop640_50e_coco.py mmdet/models/losses/utils.py tests/test_data/test_models_aug_test.py configs/cascade_rcnn/cascade_mask_rcnn_r101_fpn_20e_coco.py configs/guided_anchoring/ga_retinanet_r50_caffe_fpn_1x_coco.py configs/foveabox/fovea_r101_fpn_4x4_2x_coco.py mmdet/models/losses/iou_loss.py mmdet/apis/test.py configs/_base_/models/rpn_r50_caffe_c4.py configs/gcnet/mask_rcnn_r101_fpn_syncbn-backbone_r4_gcb_c3-c5_1x_coco.py configs/faster_rcnn/faster_rcnn_r50_fpn_2x_coco.py mmdet/ops/dcn/deform_conv.py tests/async_benchmark.py configs/lvis/mask_rcnn_x101_32x4d_fpn_sample1e-3_mstrain_2x_lvis.py configs/foveabox/fovea_align_r50_fpn_gn-head_4x4_2x_coco.py configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco-person-bicycle-car.py configs/dcn/cascade_rcnn_r50_fpn_dconv_c3-c5_1x_coco.py configs/hrnet/faster_rcnn_hrnetv2p_w18_1x_coco.py configs/regnet/faster_rcnn_regnetx-3.2GF_fpn_mstrain_3x_coco.py mmdet/models/roi_heads/htc_roi_head.py mmdet/models/roi_heads/__init__.py mmdet/core/bbox/assigners/approx_max_iou_assigner.py configs/gcnet/mask_rcnn_r50_fpn_syncbn-backbone_r4_gcb_c3-c5_1x_coco.py mmdet/models/necks/__init__.py configs/res2net/faster_rcnn_r2_101_fpn_2x_coco.py mmdet/utils/profiling.py mmdet/models/losses/__init__.py mmdet/ops/saconv.py configs/_base_/datasets/deepfashion.py noisy_labels_AN_VOC.py mmdet/core/bbox/coder/base_bbox_coder.py configs/cascade_rcnn/cascade_mask_rcnn_r101_caffe_fpn_1x_coco.py configs/gfl/gfl_x101_32x4d_fpn_dconv_c4-c5_mstrain_2x_coco.py configs/ms_rcnn/ms_rcnn_r101_caffe_fpn_1x_coco.py configs/guided_anchoring/ga_retinanet_x101_64x4d_fpn_1x_coco.py configs/pascal_voc/ssd300_voc0712.py mmdet/datasets/pipelines/compose.py configs/guided_anchoring/ga_rpn_x101_64x4d_fpn_1x_coco.py configs/free_anchor/retinanet_free_anchor_r101_fpn_1x_coco.py mmdet/models/__init__.py mmdet/ops/dcn/deform_pool.py configs/instaboost/mask_rcnn_r50_fpn_instaboost_4x_coco.py tests/test_data/test_transform.py configs/retinanet/retinanet_x101_32x4d_fpn_1x_coco.py tools/upgrade_model_version.py configs/gn/mask_rcnn_r101_fpn_gn-all_3x_coco.py configs/mask_rcnn/mask_rcnn_x101_32x8d_fpn_mstrain-poly_3x_coco.py configs/_base_/models/rpn_r50_fpn.py mmdet/core/fp16/decorators.py configs/cascade_rcnn/cascade_rcnn_r101_caffe_fpn_1x_coco.py mmdet/models/necks/nas_fpn.py configs/hrnet/htc_hrnetv2p_w40_28e_coco.py mmdet/models/roi_heads/mask_heads/grid_head.py configs/gn/mask_rcnn_r50_fpn_gn-all_2x_coco.py configs/ms_rcnn/ms_rcnn_r50_caffe_fpn_1x_coco.py configs/gcnet/cascade_mask_rcnn_x101_32x4d_fpn_syncbn-backbone_1x_coco.py configs/cascade_rcnn/cascade_rcnn_r50_fpn_20e_coco.py configs/hrnet/htc_hrnetv2p_w40_20e_coco.py tests/test_ops/test_wrappers.py configs/mask_rcnn/mask_rcnn_x101_32x8d_fpn_mstrain-poly_1x_coco.py mmdet/models/detectors/fovea.py configs/guided_anchoring/ga_retinanet_r50_fpn_1x_coco.py mmdet/models/backbones/hourglass.py tools/analyze_logs.py mmdet/models/detectors/reppoints_detector.py configs/albu_example/mask_rcnn_r50_fpn_albu_1x_coco.py tests/test_config.py configs/gn/mask_rcnn_r50_fpn_gn-all_contrib_2x_coco.py tests/test_ops/test_corner_pool.py configs/mask_rcnn/mask_rcnn_r50_caffe_fpn_1x_coco.py mmdet/core/utils/__init__.py configs/hrnet/fcos_hrnetv2p_w32_gn-head_4x4_2x_coco.py configs/groie/mask_rcnn_r101_fpn_syncbn-backbone_r4_gcb_c3-c5_groie_1x_coco.py mmdet/datasets/pipelines/instaboost.py configs/_base_/models/faster_rcnn_r50_caffe_c4.py configs/res2net/cascade_rcnn_r2_101_fpn_20e_coco.py mmdet/core/mask/utils.py mmdet/models/necks/nasfcos_fpn.py configs/gn+ws/mask_rcnn_x101_32x4d_fpn_gn_ws-all_20_23_24e_coco.py configs/gcnet/cascade_mask_rcnn_x101_32x4d_fpn_syncbn-backbone_dconv_c3-c5_r4_gcb_c3-c5_1x_coco.py mmdet/models/dense_heads/rpn_head.py configs/empirical_attention/faster_rcnn_r50_fpn_attention_1111_1x_coco.py mmdet/datasets/deepfashion.py mmdet/core/bbox/coder/__init__.py configs/_base_/models/fast_rcnn_r50_fpn.py configs/hrnet/fcos_hrnetv2p_w18_gn-head_4x4_1x_coco.py configs/gn/mask_rcnn_r101_fpn_gn-all_2x_coco.py configs/dcn/faster_rcnn_x101_32x4d_fpn_dconv_c3-c5_1x_coco.py mmdet/datasets/samplers/group_sampler.py mmdet/models/dense_heads/anchor_head.py configs/nas_fpn/retinanet_r50_nasfpn_crop640_50e_coco.py mmdet/models/losses/mse_loss.py configs/reppoints/bbox_r50_grid_center_fpn_gn-neck+head_1x_coco.py configs/faster_rcnn/faster_rcnn_r50_fpn_ohem_1x_coco.py configs/fp16/faster_rcnn_r50_fpn_fp16_1x_coco.py demo/webcam_demo.py configs/hrnet/fcos_hrnetv2p_w18_gn-head_4x4_2x_coco.py mmdet/models/necks/hrfpn.py mmdet/utils/collect_env.py configs/gcnet/cascade_mask_rcnn_x101_32x4d_fpn_syncbn-backbone_dconv_c3-c5_1x_coco.py configs/guided_anchoring/ga_retinanet_r101_caffe_fpn_1x_coco.py configs/point_rend/point_rend_r50_caffe_fpn_mstrain_1x_coco.py mmdet/models/detectors/nasfcos.py configs/_base_/models/cascade_mask_rcnn_r50_fpn.py configs/dcn/faster_rcnn_r101_fpn_dconv_c3-c5_1x_coco.py configs/rpn/rpn_r101_caffe_fpn_1x_coco.py mmdet/ops/nms/__init__.py mmdet/ops/merge_cells.py configs/gn/mask_rcnn_r50_fpn_gn-all_3x_coco.py configs/legacy_1.x/mask_rcnn_r50_fpn_1x_coco_v1.py mmdet/ops/roi_align/roi_align.py configs/groie/faster_rcnn_r50_fpn_groie_1x_coco.py mmdet/models/detectors/mask_rcnn.py tools/convert_datasets/pascal_voc.py mmdet/core/evaluation/class_names.py mmdet/ops/carafe/__init__.py configs/cascade_rcnn/cascade_mask_rcnn_r50_caffe_fpn_1x_coco.py configs/grid_rcnn/grid_rcnn_x101_32x4d_fpn_gn-head_2x_coco.py configs/faster_rcnn/faster_rcnn_r50_caffe_fpn_mstrain_2x_coco.py configs/gcnet/cascade_mask_rcnn_x101_32x4d_fpn_syncbn-backbone_r4_gcb_c3-c5_1x_coco.py configs/mask_rcnn/mask_rcnn_r101_fpn_1x_coco.py configs/gn+ws/mask_rcnn_r50_fpn_gn_ws-all_2x_coco.py docs/conf.py configs/gfl/gfl_r101_fpn_dconv_c3-c5_mstrain_2x_coco.py mmdet/core/bbox/samplers/instance_balanced_pos_sampler.py configs/hrnet/mask_rcnn_hrnetv2p_w18_2x_coco.py configs/fcos/fcos_r101_caffe_fpn_gn-head_mstrain_640-800_4x4_2x_coco.py mmdet/models/necks/rfp.py mmdet/models/roi_heads/roi_extractors/__init__.py mmdet/models/dense_heads/ga_retina_head.py configs/ms_rcnn/ms_rcnn_x101_64x4d_fpn_2x_coco.py mmdet/core/fp16/__init__.py configs/dcn/mask_rcnn_r50_fpn_dconv_c3-c5_1x_coco.py configs/htc/htc_without_semantic_r50_fpn_1x_coco.py mmdet/models/detectors/cascade_rcnn.py configs/cascade_rcnn/cascade_mask_rcnn_x101_64x4d_fpn_20e_coco.py configs/point_rend/point_rend_r50_caffe_fpn_mstrain_3x_coco.py configs/ghm/retinanet_ghm_x101_32x4d_fpn_1x_coco.py configs/detectors/htc_r50_rfp_1x_coco.py configs/faster_rcnn/faster_rcnn_x101_64x4d_fpn_2x_coco.py configs/gcnet/mask_rcnn_r101_fpn_syncbn-backbone_r16_gcb_c3-c5_1x_coco.py configs/_base_/schedules/schedule_1x.py mmdet/utils/logger.py configs/faster_rcnn/faster_rcnn_r101_caffe_fpn_1x_coco.py configs/faster_rcnn/faster_rcnn_x101_32x4d_fpn_2x_coco.py mmdet/models/dense_heads/free_anchor_retina_head.py mmdet/models/detectors/rpn.py configs/hrnet/mask_rcnn_hrnetv2p_w32_1x_coco.py configs/guided_anchoring/ga_rpn_r50_fpn_1x_coco.py tools/benchmark.py mmdet/utils/contextmanagers.py mmdet/models/necks/bfp.py configs/detectors/detectors_htc_r50_1x_coco.py configs/fast_rcnn/fast_rcnn_r101_fpn_2x_coco.py tests/test_masks.py configs/gfl/gfl_r50_fpn_mstrain_2x_coco.py tools/test_robustness.py configs/retinanet/retinanet_r50_fpn_1x_coco.py configs/scratch/faster_rcnn_r50_fpn_gn-all_scratch_6x_coco.py mmdet/datasets/pipelines/__init__.py configs/fcos/fcos_center-normbbox-centeronreg-giou_r50_caffe_fpn_gn-head_dcn_4x4_1x_coco.py mmdet/models/backbones/__init__.py mmdet/models/roi_heads/bbox_heads/bbox_head.py noisy_labels_AN_Cityscapes.py configs/atss/atss_r50_fpn_1x_coco.py noisy_labels_SN_COCO.py configs/res2net/htc_r2_101_fpn_20e_coco.py mmdet/ops/carafe/grad_check.py configs/rpn/rpn_r50_caffe_c4_1x_coco.py mmdet/ops/nms/nms_wrapper.py configs/detectors/htc_r50_sac_1x_coco.py configs/cityscapes/mask_rcnn_r50_fpn_1x_cityscapes.py tests/test_models/test_pisa_heads.py mmdet/datasets/lvis.py mmdet/apis/__init__.py configs/hrnet/mask_rcnn_hrnetv2p_w40_1x_coco.py configs/regnet/mask_rcnn_regnetx-12GF_fpn_1x_coco.py mmdet/core/evaluation/mean_ap.py configs/dcn/cascade_mask_rcnn_r101_fpn_dconv_c3-c5_1x_coco.py mmdet/datasets/dataset_wrappers.py mmdet/ops/non_local.py configs/instaboost/mask_rcnn_x101_64x4d_fpn_instaboost_4x_coco.py configs/cascade_rcnn/cascade_mask_rcnn_r50_fpn_1x_coco.py configs/fcos/fcos_r50_caffe_fpn_gn-head_mstrain_640-800_4x4_2x_coco.py tests/test_data/test_loading.py mmdet/datasets/pipelines/test_time_aug.py mmdet/models/backbones/detectors_resnet.py mmdet/models/roi_heads/shared_heads/__init__.py configs/foveabox/fovea_align_r101_fpn_gn-head_mstrain_640-800_4x4_2x_coco.py mmdet/datasets/pipelines/formating.py configs/regnet/retinanet_regnetx-1.6GF_fpn_1x_coco.py configs/_base_/datasets/voc0712.py configs/dcn/cascade_mask_rcnn_r50_fpn_dconv_c3-c5_1x_coco.py configs/libra_rcnn/libra_faster_rcnn_r101_fpn_1x_coco.py configs/foveabox/fovea_align_r101_fpn_gn-head_4x4_2x_coco.py mmdet/models/losses/ghm_loss.py configs/mask_rcnn/mask_rcnn_r50_caffe_fpn_mstrain_1x_coco.py mmdet/models/roi_heads/mask_heads/fcn_mask_head.py configs/lvis/mask_rcnn_r50_fpn_sample1e-3_mstrain_2x_lvis.py mmdet/ops/corner_pool/__init__.py configs/dcn/faster_rcnn_r50_fpn_mdconv_c3-c5_1x_coco.py configs/mask_rcnn/mask_rcnn_r50_caffe_fpn_mstrain-poly_3x_coco.py configs/regnet/faster_rcnn_regnetx-3.2GF_fpn_1x_coco.py configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco-person.py configs/ssd/ssd300_coco.py configs/free_anchor/retinanet_free_anchor_x101_32x4d_fpn_1x_coco.py mmdet/models/detectors/mask_scoring_rcnn.py configs/hrnet/faster_rcnn_hrnetv2p_w32_2x_coco.py mmdet/core/bbox/samplers/__init__.py mmdet/models/dense_heads/gfl_head.py mmdet/core/bbox/samplers/combined_sampler.py tests/test_data/test_dataset.py configs/hrnet/faster_rcnn_hrnetv2p_w18_2x_coco.py configs/mask_rcnn/mask_rcnn_r50_caffe_c4_1x_coco.py mmdet/models/roi_heads/mask_heads/fused_semantic_head.py mmdet/ops/roi_pool/gradcheck.py configs/pisa/pisa_retinanet_x101_32x4d_fpn_1x_coco.py mmdet/models/dense_heads/fsaf_head.py configs/gn+ws/mask_rcnn_x101_32x4d_fpn_gn_ws-all_2x_coco.py configs/grid_rcnn/grid_rcnn_x101_64x4d_fpn_gn-head_2x_coco.py configs/reppoints/reppoints_partial_minmax_r50_fpn_gn-neck+head_1x_coco.py configs/reppoints/reppoints_moment_x101_fpn_dconv_c3-c5_gn-neck+head_2x_coco.py mmdet/core/fp16/utils.py mmdet/models/roi_heads/double_roi_head.py configs/ms_rcnn/ms_rcnn_r50_caffe_fpn_2x_coco.py mmdet/models/dense_heads/retina_head.py configs/_base_/datasets/wider_face.py mmdet/models/dense_heads/pisa_ssd_head.py mmdet/ops/carafe/setup.py configs/faster_rcnn/faster_rcnn_r50_fpn_soft_nms_1x_coco.py configs/ghm/retinanet_ghm_x101_64x4d_fpn_1x_coco.py configs/ms_rcnn/ms_rcnn_r50_fpn_1x_coco.py configs/hrnet/faster_rcnn_hrnetv2p_w40_1x_coco.py configs/free_anchor/retinanet_free_anchor_r50_fpn_1x_coco.py configs/dcn/cascade_mask_rcnn_x101_32x4d_fpn_dconv_c3-c5_1x_coco.py configs/gcnet/mask_rcnn_r101_fpn_r16_gcb_c3-c5_1x_coco.py configs/pisa/pisa_faster_rcnn_r50_fpn_1x_coco.py configs/_base_/schedules/schedule_2x.py configs/fcos/fcos_r50_caffe_fpn_4x4_1x_coco.py mmdet/datasets/samplers/distributed_sampler.py tools/detectron2pytorch.py mmdet/models/dense_heads/guided_anchor_head.py mmdet/core/anchor/point_generator.py configs/rpn/rpn_r101_fpn_1x_coco.py configs/legacy_1.x/retinanet_r50_caffe_fpn_1x_coco_v1.py mmdet/core/evaluation/__init__.py configs/gcnet/mask_rcnn_r50_fpn_syncbn-backbone_r16_gcb_c3-c5_1x_coco.py configs/ms_rcnn/ms_rcnn_x101_32x4d_fpn_1x_coco.py mmdet/datasets/pipelines/transforms.py configs/fcos/fcos_r101_caffe_fpn_gn-head_4x4_2x_coco.py tools/regnet2mmdet.py mmdet/ops/masked_conv/__init__.py configs/reppoints/bbox_r50_grid_fpn_gn-neck+head_1x_coco.py mmdet/core/bbox/samplers/pseudo_sampler.py mmdet/models/backbones/regnet.py mmdet/models/backbones/res2net.py configs/retinanet/retinanet_x101_64x4d_fpn_1x_coco.py configs/guided_anchoring/ga_faster_r50_caffe_fpn_1x_coco.py configs/fcos/fcos_r50_caffe_fpn_gn-head_4x4_1x_coco.py mmdet/models/losses/gaussian_focal_loss.py configs/hrnet/htc_hrnetv2p_w18_20e_coco.py mmdet/core/post_processing/bbox_nms.py configs/guided_anchoring/ga_faster_x101_32x4d_fpn_1x_coco.py mmdet/models/losses/generalized_cross_entropy_loss.py configs/instaboost/mask_rcnn_r101_fpn_instaboost_4x_coco.py configs/faster_rcnn/faster_rcnn_r50_fpn_bounded_iou_1x_coco.py mmdet/models/roi_heads/mask_heads/htc_mask_head.py mmdet/models/roi_heads/point_rend_roi_head.py configs/hrnet/mask_rcnn_hrnetv2p_w18_1x_coco.py mmdet/datasets/builder.py configs/res2net/cascade_mask_rcnn_r2_101_fpn_20e_coco.py configs/foveabox/fovea_r50_fpn_4x4_1x_coco.py configs/_base_/datasets/lvis_instance.py configs/hrnet/cascade_rcnn_hrnetv2p_w32_20e_coco.py mmdet/models/losses/gfocal_loss.py mmdet/models/dense_heads/fcos_head.py configs/fast_rcnn/fast_rcnn_r50_fpn_2x_coco.py configs/detectors/cascade_rcnn_r50_sac_1x_coco.py tools/convert_datasets/cityscapes.py configs/dcn/faster_rcnn_r50_fpn_mdpool_1x_coco.py configs/guided_anchoring/ga_rpn_r101_caffe_fpn_1x_coco.py setup.py configs/empirical_attention/faster_rcnn_r50_fpn_attention_0010_1x_coco.py mmdet/utils/__init__.py configs/cascade_rcnn/cascade_rcnn_x101_32x4d_fpn_1x_coco.py mmdet/models/losses/balanced_l1_loss.py noisy_labels_SN_VOC.py tools/get_flops.py configs/hrnet/mask_rcnn_hrnetv2p_w40_2x_coco.py configs/mask_rcnn/mask_rcnn_x101_32x4d_fpn_2x_coco.py mmdet/models/losses/focal_loss.py configs/mask_rcnn/mask_rcnn_x101_64x4d_fpn_1x_coco.py configs/hrnet/faster_rcnn_hrnetv2p_w32_1x_coco.py mmdet/core/bbox/demodata.py configs/reppoints/reppoints_moment_r50_fpn_gn-neck+head_2x_coco.py configs/cascade_rcnn/cascade_rcnn_r50_fpn_1x_coco.py configs/libra_rcnn/libra_faster_rcnn_x101_64x4d_fpn_1x_coco.py configs/ghm/retinanet_ghm_r101_fpn_1x_coco.py configs/mask_rcnn/mask_rcnn_r101_caffe_fpn_1x_coco.py configs/faster_rcnn/faster_rcnn_r101_fpn_1x_coco.py configs/regnet/mask_rcnn_regnetx-4GF_fpn_1x_coco.py configs/legacy_1.x/ssd300_coco_v1.py configs/cascade_rcnn/cascade_rcnn_x101_64x4d_fpn_1x_coco.py mmdet/core/evaluation/recall.py configs/_base_/schedules/schedule_20e.py configs/_base_/datasets/coco_detection.py configs/mask_rcnn/mask_rcnn_r50_caffe_fpn_mstrain-poly_1x_coco.py configs/regnet/mask_rcnn_regnetx-8GF_fpn_1x_coco.py configs/empirical_attention/faster_rcnn_r50_fpn_attention_0010_dcn_1x_coco.py configs/gcnet/mask_rcnn_r50_fpn_syncbn-backbone_1x_coco.py configs/libra_rcnn/libra_faster_rcnn_r50_fpn_1x_coco.py configs/gn/mask_rcnn_r50_fpn_gn-all_contrib_3x_coco.py configs/scratch/mask_rcnn_r50_fpn_gn-all_scratch_6x_coco.py mmdet/models/roi_heads/mask_heads/mask_point_head.py mmdet/core/__init__.py configs/hrnet/cascade_rcnn_hrnetv2p_w18_20e_coco.py configs/mask_rcnn/mask_rcnn_x101_32x4d_fpn_1x_coco.py configs/legacy_1.x/cascade_mask_rcnn_r50_fpn_1x_coco_v1.py mmdet/models/backbones/resnext.py mmdet/models/utils/res_layer.py tests/test_models/test_backbones.py configs/_base_/datasets/cityscapes_instance.py mmdet/ops/__init__.py configs/faster_rcnn/faster_rcnn_r50_caffe_fpn_1x_coco.py configs/regnet/retinanet_regnetx-800MF_fpn_1x_coco.py configs/pascal_voc/retinanet_r50_fpn_1x_voc0712.py mmdet/core/bbox/samplers/base_sampler.py configs/cascade_rcnn/cascade_rcnn_r50_caffe_fpn_1x_coco.py tools/fuse_conv_bn.py configs/carafe/mask_rcnn_r50_fpn_carafe_1x_coco.py configs/hrnet/mask_rcnn_hrnetv2p_w32_2x_coco.py configs/gn+ws/mask_rcnn_r101_fpn_gn_ws-all_2x_coco.py configs/fp16/retinanet_r50_fpn_fp16_1x_coco.py mmdet/ops/roi_align/__init__.py configs/cascade_rcnn/cascade_mask_rcnn_x101_64x4d_fpn_1x_coco.py configs/mask_rcnn/mask_rcnn_r101_fpn_2x_coco.py configs/reppoints/reppoints_moment_r101_fpn_dconv_c3-c5_gn-neck+head_2x_coco.py mmdet/core/bbox/transforms.py mmdet/ops/roi_align/gradcheck.py configs/dcn/mask_rcnn_r101_fpn_dconv_c3-c5_1x_coco.py configs/htc/htc_r50_fpn_1x_coco.py mmdet/core/bbox/assigners/max_iou_assigner.py configs/pisa/pisa_mask_rcnn_x101_32x4d_fpn_1x_coco.py mmdet/core/bbox/assigners/point_assigner.py mmdet/models/detectors/faster_rcnn.py mmdet/core/bbox/coder/pseudo_bbox_coder.py mmdet/models/dense_heads/atss_head.py tests/test_assigner.py configs/retinanet/retinanet_r101_fpn_1x_coco.py configs/empirical_attention/faster_rcnn_r50_fpn_attention_1111_dcn_1x_coco.py configs/gn+ws/faster_rcnn_x101_32x4d_fpn_gn_ws-all_1x_coco.py mmdet/ops/sigmoid_focal_loss/sigmoid_focal_loss.py mmdet/core/anchor/__init__.py mmdet/models/dense_heads/anchor_free_head.py mmdet/models/detectors/point_rend.py mmdet/models/necks/pafpn.py configs/gn+ws/mask_rcnn_r50_fpn_gn_ws-all_20_23_24e_coco.py mmdet/models/roi_heads/bbox_heads/double_bbox_head.py mmdet/ops/sigmoid_focal_loss/__init__.py configs/reppoints/reppoints_minmax_r50_fpn_gn-neck+head_1x_coco.py mmdet/models/losses/pisa_loss.py configs/regnet/mask_rcnn_regnetx-3.2GF_fpn_mdconv_c3-c5_1x_coco.py mmdet/models/dense_heads/rpn_test_mixin.py configs/gcnet/mask_rcnn_r101_fpn_syncbn-backbone_1x_coco.py configs/dcn/faster_rcnn_r50_fpn_mdconv_c3-c5_group4_1x_coco.py mmdet/core/anchor/anchor_generator.py configs/retinanet/retinanet_r50_caffe_fpn_1x_coco.py mmdet/models/roi_heads/bbox_heads/__init__.py mmdet/core/mask/mask_target.py mmdet/ops/masked_conv/masked_conv.py configs/ssd/ssd512_coco.py configs/nas_fcos/nas_fcos_nashead_r50_caffe_fpn_gn-head_4x4_1x_coco.py mmdet/core/post_processing/__init__.py configs/faster_rcnn/faster_rcnn_r50_caffe_fpn_mstrain_3x_coco.py configs/hrnet/htc_x101_64x4d_fpn_16x1_28e_coco.py tests/test_ops/test_merge_cells.py noisy_labels_AN_COCO.py tests/test_data/test_formatting.py mmdet/datasets/samplers/__init__.py configs/gfl/gfl_x101_32x4d_fpn_mstrain_2x_coco.py mmdet/core/anchor/utils.py configs/ms_rcnn/ms_rcnn_x101_64x4d_fpn_1x_coco.py configs/pafpn/faster_rcnn_r50_pafpn_1x_coco.py configs/guided_anchoring/ga_rpn_x101_32x4d_fpn_1x_coco.py mmdet/core/bbox/samplers/ohem_sampler.py mmdet/models/detectors/base.py mmdet/models/roi_heads/pisa_roi_head.py mmdet/datasets/custom.py configs/dcn/cascade_rcnn_r101_fpn_dconv_c3-c5_1x_coco.py configs/double_heads/dh_faster_rcnn_r50_fpn_1x_coco.py demo/image_demo.py mmdet/datasets/wider_face.py tools/coco_error_analysis.py mmdet/core/evaluation/bbox_overlaps.py configs/htc/htc_x101_64x4d_fpn_16x1_20e_coco.py configs/fcos/fcos_r50_caffe_fpn_gn-head_4x4_2x_coco.py mmdet/models/dense_heads/__init__.py configs/detectors/cascade_rcnn_r50_rfp_1x_coco.py configs/pisa/pisa_mask_rcnn_r50_fpn_1x_coco.py mmdet/ops/roi_pool/roi_pool.py configs/rpn/rpn_r50_fpn_2x_coco.py mmdet/models/backbones/resnet.py mmdet/utils/util_mixins.py mmdet/core/bbox/samplers/random_sampler.py configs/groie/mask_rcnn_r50_fpn_groie_1x_coco.py mmdet/ops/point_sample.py configs/fsaf/fsaf_r101_fpn_1x_coco.py configs/fcos/fcos_center-normbbox-centeronreg-giou_r50_caffe_fpn_gn-head_4x4_1x_coco.py mmdet/models/roi_heads/mask_heads/maskiou_head.py configs/hrnet/cascade_rcnn_hrnetv2p_w40_20e_coco.py mmdet/ops/dcn/__init__.py configs/hrnet/htc_hrnetv2p_w32_20e_coco.py configs/instaboost/cascade_mask_rcnn_r50_fpn_instaboost_4x_coco.py mmdet/core/bbox/samplers/score_hlr_sampler.py mmdet/models/roi_heads/roi_extractors/base_roi_extractor.py mmdet/models/detectors/gfl.py mmdet/ops/conv_ws.py configs/pisa/pisa_faster_rcnn_x101_32x4d_fpn_1x_coco.py configs/fp16/mask_rcnn_r50_fpn_fp16_1x_coco.py mmdet/models/roi_heads/standard_roi_head.py mmdet/__init__.py configs/guided_anchoring/ga_rpn_r50_caffe_fpn_1x_coco.py configs/retinanet/retinanet_r50_caffe_fpn_mstrain_1x_coco.py mmdet/models/roi_heads/mask_heads/coarse_mask_head.py configs/guided_anchoring/ga_faster_r101_caffe_fpn_1x_coco.py configs/mask_rcnn/mask_rcnn_r50_fpn_2x_coco.py configs/gcnet/cascade_mask_rcnn_x101_32x4d_fpn_syncbn-backbone_dconv_c3-c5_r16_gcb_c3-c5_1x_coco.py configs/mask_rcnn/mask_rcnn_x101_64x4d_fpn_2x_coco.py configs/regnet/faster_rcnn_regnetx-3.2GF_fpn_2x_coco.py mmdet/core/bbox/coder/delta_xywh_bbox_coder.py mmdet/models/backbones/ssd_vgg.py configs/gcnet/mask_rcnn_x101_32x4d_fpn_syncbn-backbone_r4_gcb_c3-c5_1x_coco.py configs/mask_rcnn/mask_rcnn_r50_fpn_1x_coco.py configs/_base_/models/mask_rcnn_r50_fpn.py tests/test_data/test_sampler.py configs/legacy_1.x/retinanet_r50_fpn_1x_coco_v1.py configs/legacy_1.x/faster_rcnn_r50_fpn_1x_coco_v1.py mmdet/models/dense_heads/ssd_head.py configs/gcnet/mask_rcnn_x101_32x4d_fpn_syncbn-backbone_r16_gcb_c3-c5_1x_coco.py mmdet/ops/context_block.py tools/browse_dataset.py mmdet/core/bbox/assigners/__init__.py configs/instaboost/cascade_mask_rcnn_r101_fpn_instaboost_4x_coco.py configs/guided_anchoring/ga_retinanet_x101_32x4d_fpn_1x_coco.py configs/retinanet/retinanet_r101_fpn_2x_coco.py mmdet/core/bbox/assigners/base_assigner.py configs/cascade_rcnn/cascade_rcnn_x101_64x4d_fpn_20e_coco.py mmdet/core/evaluation/eval_hooks.py mmdet/models/necks/fpn_carafe.py configs/fast_rcnn/fast_rcnn_r50_fpn_1x_coco.py configs/gcnet/mask_rcnn_r50_fpn_r16_gcb_c3-c5_1x_coco.py configs/nas_fcos/nas_fcos_fcoshead_r50_caffe_fpn_gn-head_4x4_1x_coco.py mmdet/ops/wrappers.py configs/rpn/rpn_r50_fpn_1x_coco.py configs/cascade_rcnn/cascade_rcnn_r101_fpn_20e_coco.py mmdet/core/bbox/assigners/assign_result.py tools/print_config.py configs/faster_rcnn/faster_rcnn_x101_64x4d_fpn_1x_coco.py configs/faster_rcnn/faster_rcnn_r50_caffe_c4_1x_coco.py configs/guided_anchoring/ga_faster_x101_64x4d_fpn_1x_coco.py mmdet/models/roi_heads/mask_scoring_roi_head.py configs/pisa/pisa_retinanet_r50_fpn_1x_coco.py tests/test_models/test_losses.py configs/fast_rcnn/fast_rcnn_r101_caffe_fpn_1x_coco.py configs/rpn/rpn_x101_32x4d_fpn_1x_coco.py configs/hrnet/fcos_hrnetv2p_w32_gn-head_mstrain_640-800_4x4_2x_coco.py mmdet/models/builder.py configs/cityscapes/mask_rcnn_r50_fpn_1x_cityscapes_nl_1.py mmdet/core/bbox/iou_calculators/iou2d_calculator.py mmdet/core/bbox/samplers/iou_balanced_neg_sampler.py configs/_base_/models/ssd300.py mmdet/models/dense_heads/nasfcos_head.py configs/_base_/models/mask_rcnn_r50_caffe_c4.py mmdet/models/losses/new_combination_loss.py mmdet/models/roi_heads/roi_extractors/generic_roi_extractor.py configs/regnet/retinanet_regnetx-3.2GF_fpn_1x_coco.py mmdet/models/roi_heads/shared_heads/res_layer.py configs/foveabox/fovea_r101_fpn_4x4_1x_coco.py configs/reppoints/reppoints_moment_r50_fpn_1x_coco.py mmdet/core/bbox/samplers/sampling_result.py configs/res2net/mask_rcnn_r2_101_fpn_2x_coco.py configs/cascade_rcnn/cascade_mask_rcnn_x101_32x4d_fpn_1x_coco.py tools/robustness_eval.py configs/hrnet/fcos_hrnetv2p_w32_gn-head_4x4_1x_coco.py configs/guided_anchoring/ga_faster_r50_fpn_1x_coco.py configs/gfl/gfl_r50_fpn_1x_coco.py configs/gcnet/mask_rcnn_x101_32x4d_fpn_syncbn-backbone_1x_coco.py configs/hrnet/fcos_hrnetv2p_w40_gn-head_mstrain_640-800_4x4_2x_coco.py configs/hrnet/cascade_mask_rcnn_hrnetv2p_w32_20e_coco.py configs/pascal_voc/ssd512_voc0712.py noisy_labels_SN_cityscapes.py mmdet/models/detectors/htc.py configs/faster_rcnn/faster_rcnn_r50_caffe_fpn_mstrain_1x_coco.py mmdet/ops/plugin.py configs/hrnet/cascade_mask_rcnn_hrnetv2p_w18_20e_coco.py configs/mask_rcnn/mask_rcnn_x101_32x8d_fpn_1x_coco.py configs/grid_rcnn/grid_rcnn_r101_fpn_gn-head_2x_coco.py mmdet/models/losses/symmetric_cross_entropy_loss.py configs/gfl/gfl_r101_fpn_mstrain_2x_coco.py configs/htc/htc_r101_fpn_20e_coco.py configs/rpn/rpn_x101_64x4d_fpn_2x_coco.py mmdet/apis/inference.py configs/foveabox/fovea_r50_fpn_4x4_2x_coco.py configs/ghm/retinanet_ghm_r50_fpn_1x_coco.py configs/faster_rcnn/faster_rcnn_r101_fpn_2x_coco.py configs/fcos/fcos_center_r50_caffe_fpn_gn-head_4x4_1x_coco.py configs/gn+ws/mask_rcnn_r101_fpn_gn_ws-all_20_23_24e_coco.py mmdet/core/fp16/hooks.py configs/hrnet/faster_rcnn_hrnetv2p_w40_2x_coco.py configs/libra_rcnn/libra_retinanet_r50_fpn_1x_coco.py mmdet/core/bbox/iou_calculators/__init__.py configs/mask_rcnn/mask_rcnn_r50_caffe_fpn_poly_1x_coco_v1.py mmdet/models/detectors/atss.py configs/mask_rcnn/mask_rcnn_r50_fpn_poly_1x_coco.py mmdet/models/detectors/fast_rcnn.py configs/faster_rcnn/faster_rcnn_x101_32x4d_fpn_1x_coco.py tools/publish_model.py mmdet/models/losses/ae_loss.py configs/retinanet/retinanet_r50_caffe_fpn_mstrain_3x_coco.py mmdet/ops/roi_pool/__init__.py mmdet/models/dense_heads/base_dense_head.py configs/pisa/pisa_ssd512_coco.py mmdet/models/roi_heads/cascade_roi_head.py configs/_base_/default_runtime.py configs/guided_anchoring/ga_fast_r50_caffe_fpn_1x_coco.py mmdet/models/detectors/fsaf.py configs/rpn/rpn_r50_caffe_fpn_1x_coco.py tools/train.py configs/_base_/models/cascade_rcnn_r50_fpn.py mmdet/ops/generalized_attention.py mmdet/models/detectors/retinanet.py configs/rpn/rpn_x101_64x4d_fpn_1x_coco.py mmdet/models/losses/cross_entropy_loss.py configs/regnet/mask_rcnn_regnetx-6.4GF_fpn_1x_coco.py mmdet/models/losses/smooth_l1_loss.py configs/dcn/faster_rcnn_r50_fpn_dconv_c3-c5_1x_coco.py mmdet/models/roi_heads/base_roi_head.py configs/retinanet/retinanet_r101_caffe_fpn_1x_coco.py mmdet/datasets/voc.py configs/cityscapes/faster_rcnn_r50_fpn_1x_cityscapes.py mmdet/ops/carafe/carafe.py configs/_base_/datasets/coco_instance_semantic.py configs/gn+ws/faster_rcnn_x50_32x4d_fpn_gn_ws-all_1x_coco.py tests/test_models/test_forward.py mmdet/core/bbox/assigners/center_region_assigner.py mmdet/models/necks/fpn.py mmdet/datasets/xml_style.py mmdet/datasets/coco.py configs/regnet/mask_rcnn_regnetx-3.2GF_fpn_mstrain_3x_coco.py configs/retinanet/retinanet_x101_32x4d_fpn_2x_coco.py configs/gcnet/cascade_mask_rcnn_x101_32x4d_fpn_syncbn-backbone_r16_gcb_c3-c5_1x_coco.py configs/ms_rcnn/ms_rcnn_r101_caffe_fpn_2x_coco.py mmdet/models/dense_heads/ga_rpn_head.py configs/retinanet/retinanet_r50_caffe_fpn_mstrain_2x_coco.py mmdet/models/detectors/two_stage.py configs/instaboost/cascade_mask_rcnn_x101_64x4d_fpn_instaboost_4x_coco.py mmdet/ops/utils/__init__.py configs/htc/htc_x101_64x4d_fpn_dconv_c3-c5_mstrain_400_1400_16x1_20e_coco.py configs/_base_/models/retinanet_r50_fpn.py mmdet/core/mask/__init__.py mmdet/core/bbox/builder.py configs/retinanet/retinanet_r50_fpn_2x_coco.py configs/dcn/faster_rcnn_r50_fpn_dpool_1x_coco.py configs/groie/grid_rcnn_r50_fpn_gn-head_groie_1x_coco.py configs/hrnet/fcos_hrnetv2p_w18_gn-head_mstrain_640-800_4x4_2x_coco.py mmdet/models/roi_heads/dynamic_roi_head.py configs/gcnet/mask_rcnn_r50_fpn_r4_gcb_c3-c5_1x_coco.py configs/gcnet/mask_rcnn_r101_fpn_r4_gcb_c3-c5_1x_coco.py mmdet/core/bbox/__init__.py configs/cascade_rcnn/cascade_rcnn_x101_32x4d_fpn_20e_coco.py configs/rpn/rpn_x101_32x4d_fpn_2x_coco.py configs/htc/htc_r50_fpn_20e_coco.py configs/retinanet/retinanet_x101_64x4d_fpn_2x_coco.py configs/gn+ws/faster_rcnn_r50_fpn_gn_ws-all_1x_coco.py mmdet/core/mask/structures.py configs/cascade_rcnn/cascade_mask_rcnn_x101_32x4d_fpn_20e_coco.py configs/carafe/faster_rcnn_r50_fpn_carafe_1x_coco.py configs/regnet/mask_rcnn_regnetx-3.2GF_fpn_1x_coco.py mmdet/apis/train.py mmdet/models/roi_heads/bbox_heads/convfc_bbox_head.py configs/faster_rcnn/faster_rcnn_r50_fpn_iou_1x_coco.py unjson unjson unjson unjson unjson unjson make_cuda_ext write_version_py readme get_version parse_requirements get_git_hash get_hash main main parse_args show_result_pyplot LoadImage inference_detector init_detector multi_gpu_test collect_results_cpu collect_results_gpu single_gpu_test train_detector set_random_seed LegacyAnchorGenerator AnchorGenerator LegacySSDAnchorGenerator SSDAnchorGenerator build_anchor_generator PointGenerator calc_region images_to_levels anchor_inside_flags build_assigner build_bbox_coder build_sampler ensure_rng random_boxes roi2bbox bbox2distance bbox_flip distance2bbox bbox_mapping bbox2result bbox_mapping_back bbox2roi ApproxMaxIoUAssigner AssignResult ATSSAssigner BaseAssigner is_located_in scale_boxes bboxes_area CenterRegionAssigner MaxIoUAssigner PointAssigner BaseBBoxCoder bbox2delta delta2bbox DeltaXYWHBBoxCoder legacy_delta2bbox LegacyDeltaXYWHBBoxCoder legacy_bbox2delta PseudoBBoxCoder bboxes2tblr TBLRBBoxCoder tblr2bboxes build_iou_calculator bbox_overlaps BboxOverlaps2D BaseSampler CombinedSampler InstanceBalancedPosSampler IoUBalancedNegSampler OHEMSampler PseudoSampler RandomSampler SamplingResult ScoreHLRSampler bbox_overlaps get_classes imagenet_vid_classes voc_classes imagenet_det_classes coco_classes cityscapes_classes wider_face_classes DistEvalHook EvalHook eval_map tpfp_imagenet print_map_summary average_precision get_cls_results tpfp_default plot_iou_recall set_recall_param print_recall_summary _recalls eval_recalls plot_num_recall force_fp32 auto_fp16 Fp16OptimizerHook wrap_fp16_model patch_forward_method patch_norm_fp32 cast_tensor_type mask_target mask_target_single BitmapMasks polygon_to_bitmap BaseInstanceMasks PolygonMasks split_combined_polys encode_mask_results multiclass_nms merge_aug_scores merge_aug_masks merge_aug_bboxes merge_aug_proposals DistOptimizerHook allreduce_grads _allreduce_coalesced unmap tensor2imgs multi_apply build_dataloader build_dataset worker_init_fn _concat_dataset CityscapesDataset CocoDataset CustomDataset ClassBalancedDataset RepeatDataset ConcatDataset DeepFashionDataset LVISDataset VOCDataset WIDERFaceDataset XMLDataset AutoAugment Compose DefaultFormatBundle Transpose ToTensor Collect WrapFieldsToLists to_tensor ImageToTensor ToDataContainer InstaBoost LoadImageFromFile LoadMultiChannelImageFromFiles LoadProposals LoadAnnotations MultiScaleFlipAug RandomFlip Pad Corrupt RandomCenterCropPad PhotoMetricDistortion MinIoURandomCrop SegRescale Resize RandomCrop Albu Normalize Expand DistributedSampler GroupSampler DistributedGroupSampler build_shared_head build_detector build_loss build build_backbone build_roi_extractor build_head build_neck DetectoRS_ResNet ResLayer Bottleneck DetectoRS_ResNeXt Bottleneck HourglassNet HourglassModule HRModule HRNet RegNet Res2Net Res2Layer Bottle2neck ResNet BasicBlock Bottleneck ResNetV1d ResNeXt Bottleneck SSDVGG L2Norm AnchorFreeHead AnchorHead reduce_mean ATSSHead BaseDenseHead FCOSHead FeatureAlign FoveaHead FreeAnchorRetinaHead FSAFHead GARetinaHead GARPNHead reduce_mean Integral GFLHead FeatureAdaption GuidedAnchorHead NASFCOSHead PISARetinaHead PISASSDHead RepPointsHead RetinaHead RetinaSepBNHead RPNHead RPNTestMixin SSDHead ATSS BaseDetector CascadeRCNN FasterRCNN FastRCNN FCOS FOVEA FSAF GFL GridRCNN HybridTaskCascade MaskRCNN MaskScoringRCNN NASFCOS PointRend RepPointsDetector RetinaNet RPN SingleStageDetector TwoStageDetector Accuracy accuracy ae_loss_per_image AssociativeEmbeddingLoss BalancedL1Loss balanced_l1_loss binary_cross_entropy mask_cross_entropy _expand_binary_labels CrossEntropyLoss cross_entropy sigmoid_focal_loss py_sigmoid_focal_loss FocalLoss GaussianFocalLoss gaussian_focal_loss GeneralizedCrossEntropyLoss binary_cross_entropy mask_cross_entropy _expand_binary_labels cross_entropy DistributionFocalLoss quality_focal_loss distribution_focal_loss QualityFocalLoss GHMR _expand_onehot_labels GHMC bounded_iou_loss iou_loss IoULoss BoundedIoULoss GIoULoss giou_loss mse_loss MSELoss binary_cross_entropy NewCombinationLoss mask_cross_entropy _expand_binary_labels cross_entropy isr_p carl_loss L1Loss smooth_l1_loss SmoothL1Loss l1_loss binary_cross_entropy mask_cross_entropy _expand_binary_labels SymmetricCrossEntropyLoss cross_entropy weight_reduce_loss weighted_loss reduce_loss BFP FPN FPN_CARAFE HRFPN NASFCOS_FPN NASFPN PAFPN RFP ASPP BaseRoIHead CascadeRoIHead DoubleHeadRoIHead DynamicRoIHead GridRoIHead HybridTaskCascadeRoIHead MaskScoringRoIHead PISARoIHead PointRendRoIHead StandardRoIHead MaskTestMixin BBoxTestMixin BBoxHead Shared4Conv1FCBBoxHead Shared2FCBBoxHead ConvFCBBoxHead DoubleConvFCBBoxHead BasicResBlock CoarseMaskHead _do_paste_mask FCNMaskHead FusedSemanticHead GridHead HTCMaskHead MaskIoUHead MaskPointHead BaseRoIExtractor GenericRoIExtractor SingleRoIExtractor ResLayer ResLayer last_zero_init ContextBlock ConvAWS2d conv_ws_2d ConvWS2d GeneralizedAttention SumCell ConcatCell BaseMergeCell GlobalPoolingCell NonLocal2D build_plugin_layer rel_roi_point_to_rel_img_point rel_roi_point_to_abs_img_point SimpleRoIAlign abs_img_point_to_rel_img_point denormalize point_sample generate_grid normalize SAConv2d MaxPool2d Conv2d ConvTranspose2d NewEmptyTensorOp Linear CARAFEPack CARAFENaive CARAFENaiveFunction CARAFE CARAFEFunction CornerPool RightPoolFunction BottomPoolFunction LeftPoolFunction TopPoolFunction DeformConvFunction ModulatedDeformConv DeformConvPack ModulatedDeformConvPack DeformConv ModulatedDeformConvFunction DeformRoIPoolingPack DeformRoIPoolingFunction ModulatedDeformRoIPoolingPack DeformRoIPooling MaskedConv2dFunction MaskedConv2d nms batched_nms soft_nms nms_match RoIAlign RoIAlignFunction RoIPool RoIPoolFunction SigmoidFocalLoss SigmoidFocalLossFunction collect_env get_root_logger profile_time NiceRepr test_anchor_generator_with_tuples test_retina_anchor test_strides test_standard_anchor_generator test_guided_anchor test_ssd_anchor_generator test_approx_iou_assigner_with_empty_boxes test_point_assigner test_max_iou_assigner test_approx_iou_assigner_with_empty_gt test_point_assigner_with_empty_gt test_random_assign_result test_center_region_assigner_with_ignore test_center_region_assigner_with_empty_bboxes test_approx_iou_assigner test_point_assigner_with_empty_boxes_and_gt test_max_iou_assigner_with_empty_boxes_and_gt test_max_iou_assigner_with_empty_boxes test_center_region_assigner_with_empty_gts test_max_iou_assigner_with_empty_gt test_max_iou_assigner_with_ignore test_center_region_assigner test_approx_iou_assigner_with_empty_boxes_and_gt test_max_iou_assigner_with_empty_boxes_and_ignore MaskRCNNDetector AsyncTestCase AsyncInferenceTestCase _check_mask_head test_config_build_detector _get_config_directory _check_anchorhead _check_roi_head _check_roi_extractor _check_bbox_head test_config_data_pipeline test_auto_fp16 test_force_fp32 test_cast_tensor_type test_polygon_mask_index test_bitmap_mask_flip test_bitmap_mask_index test_bitmap_mask_pad test_polygon_mask_crop_and_resize test_bitmap_mask_to_ndarray test_bitmap_mask_crop dummy_bboxes dummy_raw_polygon_masks test_polygon_mask_crop test_polygon_mask_iter test_bitmap_mask_crop_and_resize test_bitmap_mask_iter test_bitmap_mask_resize test_polygon_mask_area test_polygon_mask_resize test_bitmap_mask_expand test_polygon_mask_to_ndarray test_bitmap_mask_to_tensor test_bitmap_mask_area test_polygon_to_tensor test_polygon_mask_expand test_polygon_mask_pad test_polygon_mask_rescale dummy_raw_bitmap_masks test_bitmap_mask_rescale test_polygon_mask_to_bitmap test_bitmap_mask_init test_polygon_mask_flip test_polygon_mask_init test_custom_classes_override_default test_dataset_wrapper test_default_format_bundle TestLoading test_htc_aug_test test_mask_rcnn_aug_test test_cascade_rcnn_aug_test model_aug_test_template test_random_sampler_empty_pred test_ohem_sampler _context_for_ohem test_ohem_sampler_empty_gt test_random_sampler_empty_gt test_random_sampler test_random_sample_result test_ohem_sampler_empty_pred test_score_hlr_sampler_empty_pred test_resize test_pad test_random_center_crop_pad test_normalize test_multi_scale_flip_aug test_min_iou_random_crop test_random_crop test_albu_transform test_flip test_resnext_backbone check_norm_state test_resnet_basic_block all_zeros test_res2net_backbone test_resnet_bottleneck is_block test_res2net_bottle2neck test_renext_bottleneck test_hourglass_backbone is_norm test_regnet_backbone test_resnet_backbone test_resnet_res_layer _get_config_directory _get_config_module test_single_stage_forward_gpu _get_detector_cfg test_faster_rcnn_ohem_forward _demo_mm_inputs test_single_stage_forward_cpu test_rpn_forward test_two_stage_forward test_ga_anchor_head_loss _dummy_bbox_sampling test_anchor_head_loss test_bbox_head_loss test_mask_head_loss _demodata_refine_boxes test_fsaf_head_loss test_fcos_head_loss test_refine_boxes test_ce_loss test_accuracy test_fpn test_pisa_retinanet_head_loss test_pisa_ssd_head_loss test_pisa_roi_head_loss test_groie test_corner_pool_device_and_dtypes_cpu test_resize_methods test_sum_cell test_concat_cell test_global_pool_cell test_nms_device_and_dtypes_cpu test_nms_match test_nms_device_and_dtypes_gpu test_soft_nms_device_and_dtypes_cpu test_linear test_conv_transposed_2d test_nn_op_forward_called test_conv2d test_max_pool_2d cal_train_time plot_curve load_json_logs main parse_args add_plot_parser add_time_parser main parse_args main parse_args retrieve_data_cfg main analyze_results analyze_individual_category makeplot main convert convert_bn convert_conv_fc main fuse_module fuse_conv_bn parse_args main parse_args main parse_args main parse_args process_checkpoint main parse_args export_onnx_model convert_reslayer convert convert_head main convert_stem get_distortions_from_results print_coco_results get_distortions_from_file get_coco_style_results get_voc_style_results get_results main main parse_args voc_eval_with_return single_gpu_test collect_results coco_eval_with_return main multi_gpu_test parse_args main parse_args convert parse_config truncate_reg_channel truncate_cls_channel is_head reorder_cls_channel main collect_annotations cvt_annotations load_img_info main collect_files parse_args main cvt_annotations parse_xml parse_args decode _minimal_ext_cmd exists join format asctime get_hash split print list gen_packages_items config img add_argument inference_detector show_result_pyplot ArgumentParser init_detector parse_args checkpoint add_argument ArgumentParser VideoCapture camera_id read print waitKey device show_result get_classes isinstance model load_checkpoint warn eval build_detector fromfile simplefilter to data isinstance Compose warn cfg dict modules test_pipeline device is_cuda collate show hasattr bgr2rgb imshow figure show_result module data join encode_mask_results update isinstance imresize show_result ProgressBar eval zip append dataset tensor2imgs range enumerate len data update get_dist_info ProgressBar eval collect_results_cpu collect_results_gpu sleep append dataset range enumerate len rstrip tensor broadcast list get_dist_info mkdtemp encode append range dump bytearray zip load join barrier extend rmtree mkdir_or_exist full list get_dist_info bytearray dumps extend tobytes shape loads all_gather zip append tensor max zeros seed manual_seed_all manual_seed workflow log_level MMDistributedDataParallel warning DistSamplerSeedHook cuda run total_epochs build_optimizer checkpoint_config get_root_logger EpochBasedRunner build_dataset optimizer_config get val load_from build_dataloader imgs_per_gpu resume_from register_training_hooks resume optimizer eval_hook lr_config OptimizerHook load_checkpoint register_hook dict log_config Fp16OptimizerHook MMDataParallel append stack clamp long _rand RandomState isinstance minimum astype float32 maximum from_numpy ensure_rng clone new_tensor bbox_flip new_tensor view new_full new_zeros append cat enumerate cpu append unique numpy clamp clamp zeros_like stack unsqueeze div_ float log exp clamp size repeat expand_as view_as abs log stack unsqueeze div_ float log exp clamp size repeat expand_as view_as abs log tensor unsqueeze cat split clamp_ unsqueeze tensor cat split clamp size min new_tensor max minimum T astype maximum float32 zeros range items list eval is_str arange ones hstack maximum zeros sum range minimum zeros_like concatenate argsort vstack zeros bbox_overlaps range enumerate len max zeros_like concatenate argsort vstack zeros argmax bbox_overlaps enumerate len append empty starmap cumsum tuple vstack Pool get_cls_results list print_map_summary append range eps close mean item zip enumerate maximum argsort any average_precision zeros len get_classes ndarray isinstance table len is_str print_log AsciiTable append zeros range enumerate sum sort hstack copy zeros float argmax fliplr range enumerate array isinstance min set_recall_param print_recall_summary _recalls array append zeros bbox_overlaps range len arange table insert size tolist print_log AsciiTable append array enumerate show ndarray plot isinstance xlabel tolist axis ylabel figure show ndarray plot isinstance xlabel tolist axis ylabel figure hasattr patch_norm_fp32 modules half children isinstance half patch_forward_method float forward ndarray isinstance Iterable Tensor Mapping list map cat mask_size size to_ndarray new_zeros device to numpy clip _pair frPyObjects bool astype merge tolist append slice_list range len append range isinstance len view size new_zeros expand batched_nms nms nms_thr sort min clone max_num zip append bbox_mapping_back cat append mean bbox_mapping_back zip Tensor isinstance mean average zip append array list _take_tensors _flatten_dense_tensors zip _unflatten_dense_tensors OrderedDict all_reduce copy_ div_ append type values all_reduce _allreduce_coalesced get_world_size div_ uint8 transpose size astype ascontiguousarray append array range list map new_full get deepcopy isinstance append build_dataset range len get isinstance ConcatDataset _concat_dataset build_from_cfg ClassBalancedDataset RepeatDataset DistributedSampler get_dist_info DistributedGroupSampler DataLoader seed Tensor ndarray isinstance isinstance all_reduce clone get_world_size div_ topk isinstance size t eq mul_ expand_as append sum max view abs size type_as pow permute append sum cat log abs e where float weight_reduce_loss new_full size squeeze expand size weight_reduce_loss binary_cross_entropy_with_logits _expand_binary_labels float squeeze arange type_as sigmoid pow weight_reduce_loss binary_cross_entropy_with_logits _sigmoid_focal_loss size weight_reduce_loss view pow eq size squeeze new_zeros sigmoid shape pow binary_cross_entropy_with_logits sum long float long cross_entropy new_full size squeeze expand clamp view zeros_like size min where abs max clamp min max decode pos_assigned_gt_inds loss_cls max list view append sum range cat detach size unique float reshape sort pow bbox_overlaps len view reshape size pow loss_bbox float sum abs where abs get_enum sum reduce_loss arange grid_sample isinf size where expand stack any device to split Sequential isinstance constant_init size view pop str plugin_layer copy Size tensor affine_grid normalize tensor view abs_img_point_to_rel_img_point rel_roi_point_to_abs_img_point denormalize squeeze unsqueeze grid_sample ndarray isinstance new_zeros Tensor to numpy is_cuda ndarray isinstance from_numpy cpu Tensor pop copy nms_op eval to max cat isinstance from_numpy cpu Tensor show join str defaultdict list replace items check_output strip get_compiler_version device_count __version__ get_compiling_cuda_version platform is_available range append get_logger record_event monotonic Event dict build_anchor_generator AnchorGenerator tensor grid_anchors base_anchors build_anchor_generator grid_anchors dict valid_flags is_available enumerate build_anchor_generator dict zip is_available grid_anchors base_anchors grid_anchors dict valid_flags build_head is_available enumerate base_anchors grid_anchors dict valid_flags build_head is_available enumerate FloatTensor assign LongTensor MaxIoUAssigner LongTensor FloatTensor assign MaxIoUAssigner Tensor FloatTensor assign LongTensor MaxIoUAssigner LongTensor FloatTensor assign MaxIoUAssigner empty LongTensor FloatTensor assign MaxIoUAssigner Tensor empty assign empty MaxIoUAssigner LongTensor assign PointAssigner FloatTensor LongTensor assign PointAssigner FloatTensor assign PointAssigner FloatTensor FloatTensor assign LongTensor ApproxMaxIoUAssigner FloatTensor assign LongTensor ApproxMaxIoUAssigner FloatTensor assign empty ApproxMaxIoUAssigner assign empty ApproxMaxIoUAssigner random LongTensor FloatTensor get_extra_property assign CenterRegionAssigner assign CenterRegionAssigner LongTensor FloatTensor LongTensor FloatTensor assign float CenterRegionAssigner LongTensor FloatTensor assign CenterRegionAssigner float long int getenv join dirname join list _get_config_directory model print glob build_detector build_optimizer train_cfg _check_roi_head roi_head test_cfg fromfile optimizer pop join get _get_config_directory print Compose astype float32 dict train_pipeline test_pipeline fromfile randint _check_mask_head mask_iou_head grid_points mask_head bbox_head bbox_roi_extractor mask_roi_extractor grid_roi_extractor _check_roi_extractor _check_bbox_head with_mask ModuleList isinstance get hasattr isinstance ModuleList zip get isinstance ModuleList zip ndarray FloatTensor float32 dict cast_tensor_type int32 array model ones ExampleModule is_available cuda model ones ExampleModule is_available cuda append randint range randint min BitmapMasks dummy_raw_bitmap_masks empty dummy_raw_bitmap_masks BitmapMasks array rescale dummy_raw_bitmap_masks BitmapMasks array resize dummy_raw_bitmap_masks BitmapMasks flip dummy_raw_bitmap_masks BitmapMasks pad dummy_raw_bitmap_masks BitmapMasks crop array dummy_raw_bitmap_masks BitmapMasks dummy_bboxes crop_and_resize randint dummy_raw_bitmap_masks BitmapMasks expand dummy_raw_bitmap_masks BitmapMasks areas dummy_raw_bitmap_masks BitmapMasks to_ndarray dummy_raw_bitmap_masks BitmapMasks to_tensor dummy_raw_bitmap_masks BitmapMasks dummy_raw_bitmap_masks BitmapMasks enumerate BitmapMasks PolygonMasks dummy_raw_polygon_masks uint8 rescale array PolygonMasks dummy_raw_polygon_masks uint8 PolygonMasks stack resize array dummy_raw_polygon_masks flip PolygonMasks dummy_raw_polygon_masks PolygonMasks crop array dummy_raw_polygon_masks pad PolygonMasks dummy_raw_polygon_masks dummy_bboxes crop_and_resize randint PolygonMasks dummy_raw_polygon_masks areas PolygonMasks dummy_raw_polygon_masks to_bitmap PolygonMasks dummy_raw_polygon_masks to_ndarray PolygonMasks dummy_raw_polygon_masks to_tensor PolygonMasks dummy_raw_polygon_masks PolygonMasks dummy_raw_polygon_masks PolygonMasks dummy_raw_polygon_masks enumerate get MagicMock CLASSES close NamedTemporaryFile dataset_class items list defaultdict MagicMock ConcatDataset values cumsum CustomDataset ceil set mean ClassBalancedDataset append randint max RepeatDataset len dict load build_from_cfg bundle load transform model dict eval test_pipeline build_detector fromfile build_from_cfg model_aug_test_template model_aug_test_template model_aug_test_template LongTensor FloatTensor RandomSampler assign MaxIoUAssigner sample Tensor FloatTensor RandomSampler assign MaxIoUAssigner sample empty long LongTensor FloatTensor RandomSampler assign MaxIoUAssigner sample empty insert roi_head dirname _get_detector_cfg LongTensor FloatTensor OHEMSampler _context_for_ohem assign MaxIoUAssigner sample Tensor LongTensor FloatTensor OHEMSampler _context_for_ohem assign MaxIoUAssigner sample Tensor empty LongTensor FloatTensor OHEMSampler _context_for_ohem assign MaxIoUAssigner sample Tensor empty random range MaxIoUAssigner LongTensor FloatTensor _context_for_ohem assign ScoreHLRSampler sample Tensor empty pop join deepcopy dict shape dirname resize_module imread build_from_cfg join deepcopy flip_module dict shape dirname imread build_from_cfg join crop_module dict shape dirname create_random_bboxes imread build_from_cfg join deepcopy crop_module reshape dict shape array dirname create_random_bboxes imread build_from_cfg mode join deepcopy dict shape dirname transform resize_module imread build_from_cfg join deepcopy dict shape array dirname transform imread build_from_cfg load dict normalize albu_transform build_from_cfg load deepcopy crop_module dict create_random_bboxes build_from_cfg load join deepcopy dict shape dirname test_pipeline transform imread build_from_cfg isinstance isinstance data hasattr zeros_like allclose isinstance block BasicBlock randn dict block Bottleneck randn randn ResLayer range layer len isinstance check_norm_state randn ResNet stem model is_block init_weights parameters getattr modules is_norm train range ResNetV1d dict BottleneckX block randn randn model ResNeXt is_block init_weights modules train model RegNet randn init_weights train dict block randn Bottle2neck randn model Res2Net is_block init_weights modules train model randn HourglassNet init_weights train fromfile join _get_config_directory Config deepcopy model _get_config_module train_cfg test_cfg pop _get_detector_cfg _demo_mm_inputs build_detector forward pop skip _get_detector_cfg _demo_mm_inputs build_detector forward cuda pop _parse_losses _get_detector_cfg _demo_mm_inputs build_detector forward pop _parse_losses backward _get_detector_cfg requires_grad_ _demo_mm_inputs build_detector forward pop _get_detector_cfg _demo_mm_inputs build_detector forward T RandomState LongTensor FloatTensor rand BitmapMasks append randint range clip Config FCOSHead dict forward loss Config sum AnchorHead dict forward loss Config sum FSAFHead dict is_available forward cuda loss Config sum dict cuda is_available forward GuidedAnchorHead loss Config loss _dummy_bbox_sampling forward rand get_targets dict BBoxHead sum bbox2roi print refine_bboxes _demodata_refine_boxes BBoxHead int random_boxes group_items astype from_numpy ensure_rng numpy randint empty long cat Config FCNMaskHead mask_iou_head _dummy_bbox_sampling forward rand get_targets dict MaskIoUHead randint sum loss cat build_sampler rand dict build_assigner assign sample range append dict Tensor build_loss long accuracy Accuracy Tensor empty long FPN isinstance num_outs modules fpn_model range Config sum PISARetinaHead dict forward loss Config sum PISASSDHead dict forward loss Config forward_train dict PISARoIHead sum dict tensor GenericRoIExtractor groie pool tensor CornerPool sum_cell SumCell randn ConcatCell concat_cell randn GlobalPoolingCell gp_cell randn randn interpolate _resize max_pool2d BaseMergeCell nms FloatTensor float64 astype float32 DoubleTensor array nms print astype float32 skip device_count to array range from_numpy nms_match zeros array range len FloatTensor float64 astype float32 DoubleTensor soft_nms array wrapper ref product randn backward Conv2d OrderedDict requires_grad_ eval manual_seed wrapper ref product randn backward min OrderedDict eval manual_seed ConvTranspose2d wrapper ref product randn MaxPool2d OrderedDict wrapper ref product randn backward OrderedDict eval manual_seed Linear list std print argmin mean array append argmax keys include_outliers enumerate arange backend max out show list title savefig legend gca append plot concatenate cla keys enumerate json_logs switch_backend print style xlabel set_xticks set_style array len add_argument add_parser add_argument add_parser add_plot_parser add_subparsers add_time_parser zip json_logs load_json_logs model fuse_module build_detector fromfile build_dataset get build_dataloader wrap_fp16_model synchronize perf_counter test eval enumerate load_checkpoint fuse_conv_bn MMDataParallel fromfile train update imshow_det_bboxes train ProgressBar retrieve_data_cfg skip_type len subplot plot insert xlabel close ylabel xlim shape ylim title vstack figure legend savefig zeros fill_between range len deepcopy evaluate COCOeval print createIndex accumulate getImgIds append getCatIds enumerate deepcopy evaluate COCOeval print makeplot COCO accumulate getImgIds recThrs loadRes dirname vstack getCatIds enumerate makedirs analyze_results ann result types ones size add from_numpy zeros from_numpy add load convert_conv_fc print len set OrderedDict dict save range convert_bn enumerate src convert dst depth Parameter eps reshape running_mean bias sqrt weight running_var named_children isinstance fuse_conv_bn Conv2d Identity save_checkpoint out forward_dummy hasattr tuple get_model_complexity_info is_available shape cuda options merge_from_dict load decode endswith save Popen in_file process_checkpoint out_file get_available_passes optimize apply passes modules save export_onnx_model printable_graph empty isinstance graph print replace add print replace add print int add split items list convert_reslayer convert_head startswith convert_stem zeros _print load list print_coco_results isinstance print mean zeros keys enumerate len load list isinstance print mean zeros keys enumerate len print get_coco_style_results get_voc_style_results load append replace enumerate task get_results filename str local_rank tmpdir launcher MMDistributedDataParallel format_only show get_dist_info format_results gpu_collect dump CLASSES init_dist single_gpu_test evaluate multi_gpu_test show_dir show_score_thr list evaluate COCOeval summarize is_str COCO accumulate getImgIds loadRes stats load eval_map CLASSES size img_norm_cfg size collect_results rstrip tensor broadcast list get_dist_info mkdtemp encode append range dump bytearray zip load join barrier extend rmtree mkdir_or_exist full set_random_seed coco_eval_with_return final_prints seed corruptions voc_eval_with_return final_prints_aggregate obj_from_dict workers_per_gpu insert iou_thr results2json deepcopy coco severities dict add_mutually_exclusive_group localtime abspath train_detector basename strftime get_root_logger work_dir append val resume_from info gpu_ids join collect_env mkdir_or_exist pipeline isinstance close NamedTemporaryFile reg_class_agnostic fromfile reshape size cat reshape reshape pop format replace search parse_config truncate_reg_channel reorder_cls_channel truncate_cls_channel num_classes append join print glob print track_progress track_parallel_progress int decode asarray basename area id dict dirname unique append imread toBbox pop dump labels dict append gt_dir list items img_dir cityscapes_path int parse findall text getroot append zeros array find join list print track_progress extend zip list_from_file isdir devkit_path cvt_annotations | # Learning-with-Noisy-Class-Labels-for-Instance-Segmentation The code for implementing the [Learning with Noisy Class Labels for Instance Segmentation](https://www.ecva.net/papers/eccv_2020/papers_ECCV/papers/123590035.pdf). ## 1. Introducton Instance segmentation has achieved siginificant progress in the presence of correctly annotated datasets. Yet, object classes in largescale datasets are sometimes ambiguous, which easily causes confusion. In addition, limited experience and knowledge of annotators can also lead to mislabeled object classes. To solve this issue, a novel method is proposed in this paper, which uses different losses describing different roles of noisy class labels to enhance the learning. Specifically, in instance segmentation, noisy class labels play different roles in the foregroundbackground sub-task and the foreground-instance sub-task. Hence, on the one hand, the noise-robust loss (e.g., symmetric loss) is used to prevent incorrect gradient guidance for the foreground-instance sub-task. On the other hand, standard cross entropy loss is used to fully exploit correct gradient guidance for the foreground-background sub-task.  The project is based on mmdetection v2.2.0. Main results in the paper are based on older mmdetection (v1.0rc0). More details will be released. ## 2. Main Results On Cityscapes dataset:  | 2,826 |
longrongyang/Learning-with-Noisy-Class-Labels-for-Instance-Segmentation | ['instance segmentation', 'semantic segmentation'] | ['Learning with Noisy Class Labels for Instance Segmentation'] | configs/grid_rcnn/grid_rcnn_r50_fpn_gn-head_1x_coco.py configs/grid_rcnn/grid_rcnn_r50_fpn_gn-head_2x_coco.py configs/_base_/datasets/coco_instance.py mmdet/models/roi_heads/roi_extractors/single_level_roi_extractor.py tests/test_models/test_heads.py mmdet/models/roi_heads/grid_roi_head.py mmdet/core/bbox/coder/legacy_delta_xywh_bbox_coder.py mmdet/core/utils/misc.py mmdet/models/detectors/__init__.py configs/_base_/datasets/cityscapes_detection.py configs/lvis/mask_rcnn_x101_64x4d_fpn_sample1e-3_mstrain_2x_lvis.py mmdet/models/roi_heads/mask_heads/__init__.py configs/foveabox/fovea_align_r50_fpn_gn-head_mstrain_640-800_4x4_2x_coco.py configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py tests/test_ops/test_soft_nms.py configs/fsaf/fsaf_x101_64x4d_fpn_1x_coco.py configs/_base_/models/faster_rcnn_r50_fpn.py tests/test_models/test_necks.py mmdet/core/bbox/iou_calculators/builder.py tools/pytorch2onnx.py mmdet/models/detectors/fcos.py configs/rpn/rpn_r101_fpn_2x_coco.py tests/test_ops/test_nms.py mmdet/core/utils/dist_utils.py configs/libra_rcnn/libra_fast_rcnn_r50_fpn_1x_coco.py configs/detectors/detectors_cascade_rcnn_r50_1x_coco.py configs/fcos/fcos_x101_64x4d_fpn_gn-head_mstrain_640-800_4x2_2x_coco.py configs/cityscapes/mask_rcnn_r50_fpn_1x_cityscapes_nl_2.py configs/cascade_rcnn/cascade_mask_rcnn_r50_fpn_20e_coco.py mmdet/core/bbox/coder/tblr_bbox_coder.py mmdet/models/losses/accuracy.py mmdet/models/detectors/single_stage.py configs/groie/mask_rcnn_r50_fpn_syncbn-backbone_r4_gcb_c3-c5_groie_1x_coco.py mmdet/datasets/__init__.py mmdet/datasets/pipelines/loading.py configs/htc/htc_x101_32x4d_fpn_16x1_20e_coco.py configs/fsaf/fsaf_r50_fpn_1x_coco.py mmdet/datasets/pipelines/auto_augment.py tools/test.py configs/guided_anchoring/ga_retinanet_r101_caffe_fpn_mstrain_2x.py mmdet/models/dense_heads/fovea_head.py mmdet/models/dense_heads/pisa_retinanet_head.py tests/test_fp16.py configs/fast_rcnn/fast_rcnn_r50_caffe_fpn_1x_coco.py mmdet/datasets/cityscapes.py mmdet/ops/corner_pool/corner_pool.py configs/wider_face/ssd300_wider_face.py configs/mask_rcnn/mask_rcnn_r50_caffe_fpn_mstrain-poly_2x_coco.py mmdet/core/post_processing/merge_augs.py configs/pisa/pisa_ssd300_coco.py configs/gn+ws/mask_rcnn_x50_32x4d_fpn_gn_ws-all_2x_coco.py configs/pascal_voc/faster_rcnn_r50_fpn_1x_voc0712.py mmdet/core/anchor/builder.py mmdet/models/detectors/grid_rcnn.py mmdet/models/backbones/detectors_resnext.py configs/lvis/mask_rcnn_r101_fpn_sample1e-3_mstrain_2x_lvis.py tests/test_models/test_roi_extractor.py mmdet/models/utils/__init__.py configs/dynamic_rcnn/dynamic_rcnn_r50_fpn_1x.py configs/fcos/fcos_r101_caffe_fpn_gn-head_4x4_1x_coco.py tests/test_async.py configs/cascade_rcnn/cascade_rcnn_r101_fpn_1x_coco.py mmdet/models/dense_heads/reppoints_head.py mmdet/models/backbones/hrnet.py configs/reppoints/reppoints_moment_r50_fpn_gn-neck+head_1x_coco.py mmdet/models/dense_heads/retina_sepbn_head.py configs/reppoints/reppoints_moment_r101_fpn_gn-neck+head_2x_coco.py tests/test_anchor.py configs/dcn/mask_rcnn_r50_fpn_mdconv_c3-c5_1x_coco.py mmdet/core/bbox/assigners/atss_assigner.py configs/faster_rcnn/faster_rcnn_r50_fpn_giou_1x_coco.py mmdet/models/roi_heads/test_mixins.py configs/cascade_rcnn/cascade_mask_rcnn_r101_fpn_1x_coco.py configs/gn+ws/mask_rcnn_x50_32x4d_fpn_gn_ws-all_20_23_24e_coco.py configs/hrnet/cascade_mask_rcnn_hrnetv2p_w40_20e_coco.py configs/deepfashion/mask_rcnn_r50_fpn_15e_deepfashion.py configs/fast_rcnn/fast_rcnn_r101_fpn_1x_coco.py configs/gn+ws/faster_rcnn_r101_fpn_gn_ws-all_1x_coco.py configs/nas_fpn/retinanet_r50_fpn_crop640_50e_coco.py mmdet/models/losses/utils.py tests/test_data/test_models_aug_test.py configs/cascade_rcnn/cascade_mask_rcnn_r101_fpn_20e_coco.py configs/guided_anchoring/ga_retinanet_r50_caffe_fpn_1x_coco.py configs/foveabox/fovea_r101_fpn_4x4_2x_coco.py mmdet/models/losses/iou_loss.py mmdet/apis/test.py configs/_base_/models/rpn_r50_caffe_c4.py configs/gcnet/mask_rcnn_r101_fpn_syncbn-backbone_r4_gcb_c3-c5_1x_coco.py configs/faster_rcnn/faster_rcnn_r50_fpn_2x_coco.py mmdet/ops/dcn/deform_conv.py tests/async_benchmark.py configs/lvis/mask_rcnn_x101_32x4d_fpn_sample1e-3_mstrain_2x_lvis.py configs/foveabox/fovea_align_r50_fpn_gn-head_4x4_2x_coco.py configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco-person-bicycle-car.py configs/dcn/cascade_rcnn_r50_fpn_dconv_c3-c5_1x_coco.py configs/hrnet/faster_rcnn_hrnetv2p_w18_1x_coco.py configs/regnet/faster_rcnn_regnetx-3.2GF_fpn_mstrain_3x_coco.py mmdet/models/roi_heads/htc_roi_head.py mmdet/models/roi_heads/__init__.py mmdet/core/bbox/assigners/approx_max_iou_assigner.py configs/gcnet/mask_rcnn_r50_fpn_syncbn-backbone_r4_gcb_c3-c5_1x_coco.py mmdet/models/necks/__init__.py configs/res2net/faster_rcnn_r2_101_fpn_2x_coco.py mmdet/utils/profiling.py mmdet/models/losses/__init__.py mmdet/ops/saconv.py configs/_base_/datasets/deepfashion.py noisy_labels_AN_VOC.py mmdet/core/bbox/coder/base_bbox_coder.py configs/cascade_rcnn/cascade_mask_rcnn_r101_caffe_fpn_1x_coco.py configs/gfl/gfl_x101_32x4d_fpn_dconv_c4-c5_mstrain_2x_coco.py configs/ms_rcnn/ms_rcnn_r101_caffe_fpn_1x_coco.py configs/guided_anchoring/ga_retinanet_x101_64x4d_fpn_1x_coco.py configs/pascal_voc/ssd300_voc0712.py mmdet/datasets/pipelines/compose.py configs/guided_anchoring/ga_rpn_x101_64x4d_fpn_1x_coco.py configs/free_anchor/retinanet_free_anchor_r101_fpn_1x_coco.py mmdet/models/__init__.py mmdet/ops/dcn/deform_pool.py configs/instaboost/mask_rcnn_r50_fpn_instaboost_4x_coco.py tests/test_data/test_transform.py configs/retinanet/retinanet_x101_32x4d_fpn_1x_coco.py tools/upgrade_model_version.py configs/gn/mask_rcnn_r101_fpn_gn-all_3x_coco.py configs/mask_rcnn/mask_rcnn_x101_32x8d_fpn_mstrain-poly_3x_coco.py configs/_base_/models/rpn_r50_fpn.py mmdet/core/fp16/decorators.py configs/cascade_rcnn/cascade_rcnn_r101_caffe_fpn_1x_coco.py mmdet/models/necks/nas_fpn.py configs/hrnet/htc_hrnetv2p_w40_28e_coco.py mmdet/models/roi_heads/mask_heads/grid_head.py configs/gn/mask_rcnn_r50_fpn_gn-all_2x_coco.py configs/ms_rcnn/ms_rcnn_r50_caffe_fpn_1x_coco.py configs/gcnet/cascade_mask_rcnn_x101_32x4d_fpn_syncbn-backbone_1x_coco.py configs/cascade_rcnn/cascade_rcnn_r50_fpn_20e_coco.py configs/hrnet/htc_hrnetv2p_w40_20e_coco.py tests/test_ops/test_wrappers.py configs/mask_rcnn/mask_rcnn_x101_32x8d_fpn_mstrain-poly_1x_coco.py mmdet/models/detectors/fovea.py configs/guided_anchoring/ga_retinanet_r50_fpn_1x_coco.py mmdet/models/backbones/hourglass.py tools/analyze_logs.py mmdet/models/detectors/reppoints_detector.py configs/albu_example/mask_rcnn_r50_fpn_albu_1x_coco.py tests/test_config.py configs/gn/mask_rcnn_r50_fpn_gn-all_contrib_2x_coco.py tests/test_ops/test_corner_pool.py configs/mask_rcnn/mask_rcnn_r50_caffe_fpn_1x_coco.py mmdet/core/utils/__init__.py configs/hrnet/fcos_hrnetv2p_w32_gn-head_4x4_2x_coco.py configs/groie/mask_rcnn_r101_fpn_syncbn-backbone_r4_gcb_c3-c5_groie_1x_coco.py mmdet/datasets/pipelines/instaboost.py configs/_base_/models/faster_rcnn_r50_caffe_c4.py configs/res2net/cascade_rcnn_r2_101_fpn_20e_coco.py mmdet/core/mask/utils.py mmdet/models/necks/nasfcos_fpn.py configs/gn+ws/mask_rcnn_x101_32x4d_fpn_gn_ws-all_20_23_24e_coco.py configs/gcnet/cascade_mask_rcnn_x101_32x4d_fpn_syncbn-backbone_dconv_c3-c5_r4_gcb_c3-c5_1x_coco.py mmdet/models/dense_heads/rpn_head.py configs/empirical_attention/faster_rcnn_r50_fpn_attention_1111_1x_coco.py mmdet/datasets/deepfashion.py mmdet/core/bbox/coder/__init__.py configs/_base_/models/fast_rcnn_r50_fpn.py configs/hrnet/fcos_hrnetv2p_w18_gn-head_4x4_1x_coco.py configs/gn/mask_rcnn_r101_fpn_gn-all_2x_coco.py configs/dcn/faster_rcnn_x101_32x4d_fpn_dconv_c3-c5_1x_coco.py mmdet/datasets/samplers/group_sampler.py mmdet/models/dense_heads/anchor_head.py configs/nas_fpn/retinanet_r50_nasfpn_crop640_50e_coco.py mmdet/models/losses/mse_loss.py configs/reppoints/bbox_r50_grid_center_fpn_gn-neck+head_1x_coco.py configs/faster_rcnn/faster_rcnn_r50_fpn_ohem_1x_coco.py configs/fp16/faster_rcnn_r50_fpn_fp16_1x_coco.py demo/webcam_demo.py configs/hrnet/fcos_hrnetv2p_w18_gn-head_4x4_2x_coco.py mmdet/models/necks/hrfpn.py mmdet/utils/collect_env.py configs/gcnet/cascade_mask_rcnn_x101_32x4d_fpn_syncbn-backbone_dconv_c3-c5_1x_coco.py configs/guided_anchoring/ga_retinanet_r101_caffe_fpn_1x_coco.py configs/point_rend/point_rend_r50_caffe_fpn_mstrain_1x_coco.py mmdet/models/detectors/nasfcos.py configs/_base_/models/cascade_mask_rcnn_r50_fpn.py configs/dcn/faster_rcnn_r101_fpn_dconv_c3-c5_1x_coco.py configs/rpn/rpn_r101_caffe_fpn_1x_coco.py mmdet/ops/nms/__init__.py mmdet/ops/merge_cells.py configs/gn/mask_rcnn_r50_fpn_gn-all_3x_coco.py configs/legacy_1.x/mask_rcnn_r50_fpn_1x_coco_v1.py mmdet/ops/roi_align/roi_align.py configs/groie/faster_rcnn_r50_fpn_groie_1x_coco.py mmdet/models/detectors/mask_rcnn.py tools/convert_datasets/pascal_voc.py mmdet/core/evaluation/class_names.py mmdet/ops/carafe/__init__.py configs/cascade_rcnn/cascade_mask_rcnn_r50_caffe_fpn_1x_coco.py configs/grid_rcnn/grid_rcnn_x101_32x4d_fpn_gn-head_2x_coco.py configs/faster_rcnn/faster_rcnn_r50_caffe_fpn_mstrain_2x_coco.py configs/gcnet/cascade_mask_rcnn_x101_32x4d_fpn_syncbn-backbone_r4_gcb_c3-c5_1x_coco.py configs/mask_rcnn/mask_rcnn_r101_fpn_1x_coco.py configs/gn+ws/mask_rcnn_r50_fpn_gn_ws-all_2x_coco.py docs/conf.py configs/gfl/gfl_r101_fpn_dconv_c3-c5_mstrain_2x_coco.py mmdet/core/bbox/samplers/instance_balanced_pos_sampler.py configs/hrnet/mask_rcnn_hrnetv2p_w18_2x_coco.py configs/fcos/fcos_r101_caffe_fpn_gn-head_mstrain_640-800_4x4_2x_coco.py mmdet/models/necks/rfp.py mmdet/models/roi_heads/roi_extractors/__init__.py mmdet/models/dense_heads/ga_retina_head.py configs/ms_rcnn/ms_rcnn_x101_64x4d_fpn_2x_coco.py mmdet/core/fp16/__init__.py configs/dcn/mask_rcnn_r50_fpn_dconv_c3-c5_1x_coco.py configs/htc/htc_without_semantic_r50_fpn_1x_coco.py mmdet/models/detectors/cascade_rcnn.py configs/cascade_rcnn/cascade_mask_rcnn_x101_64x4d_fpn_20e_coco.py configs/point_rend/point_rend_r50_caffe_fpn_mstrain_3x_coco.py configs/ghm/retinanet_ghm_x101_32x4d_fpn_1x_coco.py configs/detectors/htc_r50_rfp_1x_coco.py configs/faster_rcnn/faster_rcnn_x101_64x4d_fpn_2x_coco.py configs/gcnet/mask_rcnn_r101_fpn_syncbn-backbone_r16_gcb_c3-c5_1x_coco.py configs/_base_/schedules/schedule_1x.py mmdet/utils/logger.py configs/faster_rcnn/faster_rcnn_r101_caffe_fpn_1x_coco.py configs/faster_rcnn/faster_rcnn_x101_32x4d_fpn_2x_coco.py mmdet/models/dense_heads/free_anchor_retina_head.py mmdet/models/detectors/rpn.py configs/hrnet/mask_rcnn_hrnetv2p_w32_1x_coco.py configs/guided_anchoring/ga_rpn_r50_fpn_1x_coco.py tools/benchmark.py mmdet/utils/contextmanagers.py mmdet/models/necks/bfp.py configs/detectors/detectors_htc_r50_1x_coco.py configs/fast_rcnn/fast_rcnn_r101_fpn_2x_coco.py tests/test_masks.py configs/gfl/gfl_r50_fpn_mstrain_2x_coco.py tools/test_robustness.py configs/retinanet/retinanet_r50_fpn_1x_coco.py configs/scratch/faster_rcnn_r50_fpn_gn-all_scratch_6x_coco.py mmdet/datasets/pipelines/__init__.py configs/fcos/fcos_center-normbbox-centeronreg-giou_r50_caffe_fpn_gn-head_dcn_4x4_1x_coco.py mmdet/models/backbones/__init__.py mmdet/models/roi_heads/bbox_heads/bbox_head.py noisy_labels_AN_Cityscapes.py configs/atss/atss_r50_fpn_1x_coco.py noisy_labels_SN_COCO.py configs/res2net/htc_r2_101_fpn_20e_coco.py mmdet/ops/carafe/grad_check.py configs/rpn/rpn_r50_caffe_c4_1x_coco.py mmdet/ops/nms/nms_wrapper.py configs/detectors/htc_r50_sac_1x_coco.py configs/cityscapes/mask_rcnn_r50_fpn_1x_cityscapes.py tests/test_models/test_pisa_heads.py mmdet/datasets/lvis.py mmdet/apis/__init__.py configs/hrnet/mask_rcnn_hrnetv2p_w40_1x_coco.py configs/regnet/mask_rcnn_regnetx-12GF_fpn_1x_coco.py mmdet/core/evaluation/mean_ap.py configs/dcn/cascade_mask_rcnn_r101_fpn_dconv_c3-c5_1x_coco.py mmdet/datasets/dataset_wrappers.py mmdet/ops/non_local.py configs/instaboost/mask_rcnn_x101_64x4d_fpn_instaboost_4x_coco.py configs/cascade_rcnn/cascade_mask_rcnn_r50_fpn_1x_coco.py configs/fcos/fcos_r50_caffe_fpn_gn-head_mstrain_640-800_4x4_2x_coco.py tests/test_data/test_loading.py mmdet/datasets/pipelines/test_time_aug.py mmdet/models/backbones/detectors_resnet.py mmdet/models/roi_heads/shared_heads/__init__.py configs/foveabox/fovea_align_r101_fpn_gn-head_mstrain_640-800_4x4_2x_coco.py mmdet/datasets/pipelines/formating.py configs/regnet/retinanet_regnetx-1.6GF_fpn_1x_coco.py configs/_base_/datasets/voc0712.py configs/dcn/cascade_mask_rcnn_r50_fpn_dconv_c3-c5_1x_coco.py configs/libra_rcnn/libra_faster_rcnn_r101_fpn_1x_coco.py configs/foveabox/fovea_align_r101_fpn_gn-head_4x4_2x_coco.py mmdet/models/losses/ghm_loss.py configs/mask_rcnn/mask_rcnn_r50_caffe_fpn_mstrain_1x_coco.py mmdet/models/roi_heads/mask_heads/fcn_mask_head.py configs/lvis/mask_rcnn_r50_fpn_sample1e-3_mstrain_2x_lvis.py mmdet/ops/corner_pool/__init__.py configs/dcn/faster_rcnn_r50_fpn_mdconv_c3-c5_1x_coco.py configs/mask_rcnn/mask_rcnn_r50_caffe_fpn_mstrain-poly_3x_coco.py configs/regnet/faster_rcnn_regnetx-3.2GF_fpn_1x_coco.py configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco-person.py configs/ssd/ssd300_coco.py configs/free_anchor/retinanet_free_anchor_x101_32x4d_fpn_1x_coco.py mmdet/models/detectors/mask_scoring_rcnn.py configs/hrnet/faster_rcnn_hrnetv2p_w32_2x_coco.py mmdet/core/bbox/samplers/__init__.py mmdet/models/dense_heads/gfl_head.py mmdet/core/bbox/samplers/combined_sampler.py tests/test_data/test_dataset.py configs/hrnet/faster_rcnn_hrnetv2p_w18_2x_coco.py configs/mask_rcnn/mask_rcnn_r50_caffe_c4_1x_coco.py mmdet/models/roi_heads/mask_heads/fused_semantic_head.py mmdet/ops/roi_pool/gradcheck.py configs/pisa/pisa_retinanet_x101_32x4d_fpn_1x_coco.py mmdet/models/dense_heads/fsaf_head.py configs/gn+ws/mask_rcnn_x101_32x4d_fpn_gn_ws-all_2x_coco.py configs/grid_rcnn/grid_rcnn_x101_64x4d_fpn_gn-head_2x_coco.py configs/reppoints/reppoints_partial_minmax_r50_fpn_gn-neck+head_1x_coco.py configs/reppoints/reppoints_moment_x101_fpn_dconv_c3-c5_gn-neck+head_2x_coco.py mmdet/core/fp16/utils.py mmdet/models/roi_heads/double_roi_head.py configs/ms_rcnn/ms_rcnn_r50_caffe_fpn_2x_coco.py mmdet/models/dense_heads/retina_head.py configs/_base_/datasets/wider_face.py mmdet/models/dense_heads/pisa_ssd_head.py mmdet/ops/carafe/setup.py configs/faster_rcnn/faster_rcnn_r50_fpn_soft_nms_1x_coco.py configs/ghm/retinanet_ghm_x101_64x4d_fpn_1x_coco.py configs/ms_rcnn/ms_rcnn_r50_fpn_1x_coco.py configs/hrnet/faster_rcnn_hrnetv2p_w40_1x_coco.py configs/free_anchor/retinanet_free_anchor_r50_fpn_1x_coco.py configs/dcn/cascade_mask_rcnn_x101_32x4d_fpn_dconv_c3-c5_1x_coco.py configs/gcnet/mask_rcnn_r101_fpn_r16_gcb_c3-c5_1x_coco.py configs/pisa/pisa_faster_rcnn_r50_fpn_1x_coco.py configs/_base_/schedules/schedule_2x.py configs/fcos/fcos_r50_caffe_fpn_4x4_1x_coco.py mmdet/datasets/samplers/distributed_sampler.py tools/detectron2pytorch.py mmdet/models/dense_heads/guided_anchor_head.py mmdet/core/anchor/point_generator.py configs/rpn/rpn_r101_fpn_1x_coco.py configs/legacy_1.x/retinanet_r50_caffe_fpn_1x_coco_v1.py mmdet/core/evaluation/__init__.py configs/gcnet/mask_rcnn_r50_fpn_syncbn-backbone_r16_gcb_c3-c5_1x_coco.py configs/ms_rcnn/ms_rcnn_x101_32x4d_fpn_1x_coco.py mmdet/datasets/pipelines/transforms.py configs/fcos/fcos_r101_caffe_fpn_gn-head_4x4_2x_coco.py tools/regnet2mmdet.py mmdet/ops/masked_conv/__init__.py configs/reppoints/bbox_r50_grid_fpn_gn-neck+head_1x_coco.py mmdet/core/bbox/samplers/pseudo_sampler.py mmdet/models/backbones/regnet.py mmdet/models/backbones/res2net.py configs/retinanet/retinanet_x101_64x4d_fpn_1x_coco.py configs/guided_anchoring/ga_faster_r50_caffe_fpn_1x_coco.py configs/fcos/fcos_r50_caffe_fpn_gn-head_4x4_1x_coco.py mmdet/models/losses/gaussian_focal_loss.py configs/hrnet/htc_hrnetv2p_w18_20e_coco.py mmdet/core/post_processing/bbox_nms.py configs/guided_anchoring/ga_faster_x101_32x4d_fpn_1x_coco.py mmdet/models/losses/generalized_cross_entropy_loss.py configs/instaboost/mask_rcnn_r101_fpn_instaboost_4x_coco.py configs/faster_rcnn/faster_rcnn_r50_fpn_bounded_iou_1x_coco.py mmdet/models/roi_heads/mask_heads/htc_mask_head.py mmdet/models/roi_heads/point_rend_roi_head.py configs/hrnet/mask_rcnn_hrnetv2p_w18_1x_coco.py mmdet/datasets/builder.py configs/res2net/cascade_mask_rcnn_r2_101_fpn_20e_coco.py configs/foveabox/fovea_r50_fpn_4x4_1x_coco.py configs/_base_/datasets/lvis_instance.py configs/hrnet/cascade_rcnn_hrnetv2p_w32_20e_coco.py mmdet/models/losses/gfocal_loss.py mmdet/models/dense_heads/fcos_head.py configs/fast_rcnn/fast_rcnn_r50_fpn_2x_coco.py configs/detectors/cascade_rcnn_r50_sac_1x_coco.py tools/convert_datasets/cityscapes.py configs/dcn/faster_rcnn_r50_fpn_mdpool_1x_coco.py configs/guided_anchoring/ga_rpn_r101_caffe_fpn_1x_coco.py setup.py configs/empirical_attention/faster_rcnn_r50_fpn_attention_0010_1x_coco.py mmdet/utils/__init__.py configs/cascade_rcnn/cascade_rcnn_x101_32x4d_fpn_1x_coco.py mmdet/models/losses/balanced_l1_loss.py noisy_labels_SN_VOC.py tools/get_flops.py configs/hrnet/mask_rcnn_hrnetv2p_w40_2x_coco.py configs/mask_rcnn/mask_rcnn_x101_32x4d_fpn_2x_coco.py mmdet/models/losses/focal_loss.py configs/mask_rcnn/mask_rcnn_x101_64x4d_fpn_1x_coco.py configs/hrnet/faster_rcnn_hrnetv2p_w32_1x_coco.py mmdet/core/bbox/demodata.py configs/reppoints/reppoints_moment_r50_fpn_gn-neck+head_2x_coco.py configs/cascade_rcnn/cascade_rcnn_r50_fpn_1x_coco.py configs/libra_rcnn/libra_faster_rcnn_x101_64x4d_fpn_1x_coco.py configs/ghm/retinanet_ghm_r101_fpn_1x_coco.py configs/mask_rcnn/mask_rcnn_r101_caffe_fpn_1x_coco.py configs/faster_rcnn/faster_rcnn_r101_fpn_1x_coco.py configs/regnet/mask_rcnn_regnetx-4GF_fpn_1x_coco.py configs/legacy_1.x/ssd300_coco_v1.py configs/cascade_rcnn/cascade_rcnn_x101_64x4d_fpn_1x_coco.py mmdet/core/evaluation/recall.py configs/_base_/schedules/schedule_20e.py configs/_base_/datasets/coco_detection.py configs/mask_rcnn/mask_rcnn_r50_caffe_fpn_mstrain-poly_1x_coco.py configs/regnet/mask_rcnn_regnetx-8GF_fpn_1x_coco.py configs/empirical_attention/faster_rcnn_r50_fpn_attention_0010_dcn_1x_coco.py configs/gcnet/mask_rcnn_r50_fpn_syncbn-backbone_1x_coco.py configs/libra_rcnn/libra_faster_rcnn_r50_fpn_1x_coco.py configs/gn/mask_rcnn_r50_fpn_gn-all_contrib_3x_coco.py configs/scratch/mask_rcnn_r50_fpn_gn-all_scratch_6x_coco.py mmdet/models/roi_heads/mask_heads/mask_point_head.py mmdet/core/__init__.py configs/hrnet/cascade_rcnn_hrnetv2p_w18_20e_coco.py configs/mask_rcnn/mask_rcnn_x101_32x4d_fpn_1x_coco.py configs/legacy_1.x/cascade_mask_rcnn_r50_fpn_1x_coco_v1.py mmdet/models/backbones/resnext.py mmdet/models/utils/res_layer.py tests/test_models/test_backbones.py configs/_base_/datasets/cityscapes_instance.py mmdet/ops/__init__.py configs/faster_rcnn/faster_rcnn_r50_caffe_fpn_1x_coco.py configs/regnet/retinanet_regnetx-800MF_fpn_1x_coco.py configs/pascal_voc/retinanet_r50_fpn_1x_voc0712.py mmdet/core/bbox/samplers/base_sampler.py configs/cascade_rcnn/cascade_rcnn_r50_caffe_fpn_1x_coco.py tools/fuse_conv_bn.py configs/carafe/mask_rcnn_r50_fpn_carafe_1x_coco.py configs/hrnet/mask_rcnn_hrnetv2p_w32_2x_coco.py configs/gn+ws/mask_rcnn_r101_fpn_gn_ws-all_2x_coco.py configs/fp16/retinanet_r50_fpn_fp16_1x_coco.py mmdet/ops/roi_align/__init__.py configs/cascade_rcnn/cascade_mask_rcnn_x101_64x4d_fpn_1x_coco.py configs/mask_rcnn/mask_rcnn_r101_fpn_2x_coco.py configs/reppoints/reppoints_moment_r101_fpn_dconv_c3-c5_gn-neck+head_2x_coco.py mmdet/core/bbox/transforms.py mmdet/ops/roi_align/gradcheck.py configs/dcn/mask_rcnn_r101_fpn_dconv_c3-c5_1x_coco.py configs/htc/htc_r50_fpn_1x_coco.py mmdet/core/bbox/assigners/max_iou_assigner.py configs/pisa/pisa_mask_rcnn_x101_32x4d_fpn_1x_coco.py mmdet/core/bbox/assigners/point_assigner.py mmdet/models/detectors/faster_rcnn.py mmdet/core/bbox/coder/pseudo_bbox_coder.py mmdet/models/dense_heads/atss_head.py tests/test_assigner.py configs/retinanet/retinanet_r101_fpn_1x_coco.py configs/empirical_attention/faster_rcnn_r50_fpn_attention_1111_dcn_1x_coco.py configs/gn+ws/faster_rcnn_x101_32x4d_fpn_gn_ws-all_1x_coco.py mmdet/ops/sigmoid_focal_loss/sigmoid_focal_loss.py mmdet/core/anchor/__init__.py mmdet/models/dense_heads/anchor_free_head.py mmdet/models/detectors/point_rend.py mmdet/models/necks/pafpn.py configs/gn+ws/mask_rcnn_r50_fpn_gn_ws-all_20_23_24e_coco.py mmdet/models/roi_heads/bbox_heads/double_bbox_head.py mmdet/ops/sigmoid_focal_loss/__init__.py configs/reppoints/reppoints_minmax_r50_fpn_gn-neck+head_1x_coco.py mmdet/models/losses/pisa_loss.py configs/regnet/mask_rcnn_regnetx-3.2GF_fpn_mdconv_c3-c5_1x_coco.py mmdet/models/dense_heads/rpn_test_mixin.py configs/gcnet/mask_rcnn_r101_fpn_syncbn-backbone_1x_coco.py configs/dcn/faster_rcnn_r50_fpn_mdconv_c3-c5_group4_1x_coco.py mmdet/core/anchor/anchor_generator.py configs/retinanet/retinanet_r50_caffe_fpn_1x_coco.py mmdet/models/roi_heads/bbox_heads/__init__.py mmdet/core/mask/mask_target.py mmdet/ops/masked_conv/masked_conv.py configs/ssd/ssd512_coco.py configs/nas_fcos/nas_fcos_nashead_r50_caffe_fpn_gn-head_4x4_1x_coco.py mmdet/core/post_processing/__init__.py configs/faster_rcnn/faster_rcnn_r50_caffe_fpn_mstrain_3x_coco.py configs/hrnet/htc_x101_64x4d_fpn_16x1_28e_coco.py tests/test_ops/test_merge_cells.py noisy_labels_AN_COCO.py tests/test_data/test_formatting.py mmdet/datasets/samplers/__init__.py configs/gfl/gfl_x101_32x4d_fpn_mstrain_2x_coco.py mmdet/core/anchor/utils.py configs/ms_rcnn/ms_rcnn_x101_64x4d_fpn_1x_coco.py configs/pafpn/faster_rcnn_r50_pafpn_1x_coco.py configs/guided_anchoring/ga_rpn_x101_32x4d_fpn_1x_coco.py mmdet/core/bbox/samplers/ohem_sampler.py mmdet/models/detectors/base.py mmdet/models/roi_heads/pisa_roi_head.py mmdet/datasets/custom.py configs/dcn/cascade_rcnn_r101_fpn_dconv_c3-c5_1x_coco.py configs/double_heads/dh_faster_rcnn_r50_fpn_1x_coco.py demo/image_demo.py mmdet/datasets/wider_face.py tools/coco_error_analysis.py mmdet/core/evaluation/bbox_overlaps.py configs/htc/htc_x101_64x4d_fpn_16x1_20e_coco.py configs/fcos/fcos_r50_caffe_fpn_gn-head_4x4_2x_coco.py mmdet/models/dense_heads/__init__.py configs/detectors/cascade_rcnn_r50_rfp_1x_coco.py configs/pisa/pisa_mask_rcnn_r50_fpn_1x_coco.py mmdet/ops/roi_pool/roi_pool.py configs/rpn/rpn_r50_fpn_2x_coco.py mmdet/models/backbones/resnet.py mmdet/utils/util_mixins.py mmdet/core/bbox/samplers/random_sampler.py configs/groie/mask_rcnn_r50_fpn_groie_1x_coco.py mmdet/ops/point_sample.py configs/fsaf/fsaf_r101_fpn_1x_coco.py configs/fcos/fcos_center-normbbox-centeronreg-giou_r50_caffe_fpn_gn-head_4x4_1x_coco.py mmdet/models/roi_heads/mask_heads/maskiou_head.py configs/hrnet/cascade_rcnn_hrnetv2p_w40_20e_coco.py mmdet/ops/dcn/__init__.py configs/hrnet/htc_hrnetv2p_w32_20e_coco.py configs/instaboost/cascade_mask_rcnn_r50_fpn_instaboost_4x_coco.py mmdet/core/bbox/samplers/score_hlr_sampler.py mmdet/models/roi_heads/roi_extractors/base_roi_extractor.py mmdet/models/detectors/gfl.py mmdet/ops/conv_ws.py configs/pisa/pisa_faster_rcnn_x101_32x4d_fpn_1x_coco.py configs/fp16/mask_rcnn_r50_fpn_fp16_1x_coco.py mmdet/models/roi_heads/standard_roi_head.py mmdet/__init__.py configs/guided_anchoring/ga_rpn_r50_caffe_fpn_1x_coco.py configs/retinanet/retinanet_r50_caffe_fpn_mstrain_1x_coco.py mmdet/models/roi_heads/mask_heads/coarse_mask_head.py configs/guided_anchoring/ga_faster_r101_caffe_fpn_1x_coco.py configs/mask_rcnn/mask_rcnn_r50_fpn_2x_coco.py configs/gcnet/cascade_mask_rcnn_x101_32x4d_fpn_syncbn-backbone_dconv_c3-c5_r16_gcb_c3-c5_1x_coco.py configs/mask_rcnn/mask_rcnn_x101_64x4d_fpn_2x_coco.py configs/regnet/faster_rcnn_regnetx-3.2GF_fpn_2x_coco.py mmdet/core/bbox/coder/delta_xywh_bbox_coder.py mmdet/models/backbones/ssd_vgg.py configs/gcnet/mask_rcnn_x101_32x4d_fpn_syncbn-backbone_r4_gcb_c3-c5_1x_coco.py configs/mask_rcnn/mask_rcnn_r50_fpn_1x_coco.py configs/_base_/models/mask_rcnn_r50_fpn.py tests/test_data/test_sampler.py configs/legacy_1.x/retinanet_r50_fpn_1x_coco_v1.py configs/legacy_1.x/faster_rcnn_r50_fpn_1x_coco_v1.py mmdet/models/dense_heads/ssd_head.py configs/gcnet/mask_rcnn_x101_32x4d_fpn_syncbn-backbone_r16_gcb_c3-c5_1x_coco.py mmdet/ops/context_block.py tools/browse_dataset.py mmdet/core/bbox/assigners/__init__.py configs/instaboost/cascade_mask_rcnn_r101_fpn_instaboost_4x_coco.py configs/guided_anchoring/ga_retinanet_x101_32x4d_fpn_1x_coco.py configs/retinanet/retinanet_r101_fpn_2x_coco.py mmdet/core/bbox/assigners/base_assigner.py configs/cascade_rcnn/cascade_rcnn_x101_64x4d_fpn_20e_coco.py mmdet/core/evaluation/eval_hooks.py mmdet/models/necks/fpn_carafe.py configs/fast_rcnn/fast_rcnn_r50_fpn_1x_coco.py configs/gcnet/mask_rcnn_r50_fpn_r16_gcb_c3-c5_1x_coco.py configs/nas_fcos/nas_fcos_fcoshead_r50_caffe_fpn_gn-head_4x4_1x_coco.py mmdet/ops/wrappers.py configs/rpn/rpn_r50_fpn_1x_coco.py configs/cascade_rcnn/cascade_rcnn_r101_fpn_20e_coco.py mmdet/core/bbox/assigners/assign_result.py tools/print_config.py configs/faster_rcnn/faster_rcnn_x101_64x4d_fpn_1x_coco.py configs/faster_rcnn/faster_rcnn_r50_caffe_c4_1x_coco.py configs/guided_anchoring/ga_faster_x101_64x4d_fpn_1x_coco.py mmdet/models/roi_heads/mask_scoring_roi_head.py configs/pisa/pisa_retinanet_r50_fpn_1x_coco.py tests/test_models/test_losses.py configs/fast_rcnn/fast_rcnn_r101_caffe_fpn_1x_coco.py configs/rpn/rpn_x101_32x4d_fpn_1x_coco.py configs/hrnet/fcos_hrnetv2p_w32_gn-head_mstrain_640-800_4x4_2x_coco.py mmdet/models/builder.py configs/cityscapes/mask_rcnn_r50_fpn_1x_cityscapes_nl_1.py mmdet/core/bbox/iou_calculators/iou2d_calculator.py mmdet/core/bbox/samplers/iou_balanced_neg_sampler.py configs/_base_/models/ssd300.py mmdet/models/dense_heads/nasfcos_head.py configs/_base_/models/mask_rcnn_r50_caffe_c4.py mmdet/models/losses/new_combination_loss.py mmdet/models/roi_heads/roi_extractors/generic_roi_extractor.py configs/regnet/retinanet_regnetx-3.2GF_fpn_1x_coco.py mmdet/models/roi_heads/shared_heads/res_layer.py configs/foveabox/fovea_r101_fpn_4x4_1x_coco.py configs/reppoints/reppoints_moment_r50_fpn_1x_coco.py mmdet/core/bbox/samplers/sampling_result.py configs/res2net/mask_rcnn_r2_101_fpn_2x_coco.py configs/cascade_rcnn/cascade_mask_rcnn_x101_32x4d_fpn_1x_coco.py tools/robustness_eval.py configs/hrnet/fcos_hrnetv2p_w32_gn-head_4x4_1x_coco.py configs/guided_anchoring/ga_faster_r50_fpn_1x_coco.py configs/gfl/gfl_r50_fpn_1x_coco.py configs/gcnet/mask_rcnn_x101_32x4d_fpn_syncbn-backbone_1x_coco.py configs/hrnet/fcos_hrnetv2p_w40_gn-head_mstrain_640-800_4x4_2x_coco.py configs/hrnet/cascade_mask_rcnn_hrnetv2p_w32_20e_coco.py configs/pascal_voc/ssd512_voc0712.py noisy_labels_SN_cityscapes.py mmdet/models/detectors/htc.py configs/faster_rcnn/faster_rcnn_r50_caffe_fpn_mstrain_1x_coco.py mmdet/ops/plugin.py configs/hrnet/cascade_mask_rcnn_hrnetv2p_w18_20e_coco.py configs/mask_rcnn/mask_rcnn_x101_32x8d_fpn_1x_coco.py configs/grid_rcnn/grid_rcnn_r101_fpn_gn-head_2x_coco.py mmdet/models/losses/symmetric_cross_entropy_loss.py configs/gfl/gfl_r101_fpn_mstrain_2x_coco.py configs/htc/htc_r101_fpn_20e_coco.py configs/rpn/rpn_x101_64x4d_fpn_2x_coco.py mmdet/apis/inference.py configs/foveabox/fovea_r50_fpn_4x4_2x_coco.py configs/ghm/retinanet_ghm_r50_fpn_1x_coco.py configs/faster_rcnn/faster_rcnn_r101_fpn_2x_coco.py configs/fcos/fcos_center_r50_caffe_fpn_gn-head_4x4_1x_coco.py configs/gn+ws/mask_rcnn_r101_fpn_gn_ws-all_20_23_24e_coco.py mmdet/core/fp16/hooks.py configs/hrnet/faster_rcnn_hrnetv2p_w40_2x_coco.py configs/libra_rcnn/libra_retinanet_r50_fpn_1x_coco.py mmdet/core/bbox/iou_calculators/__init__.py configs/mask_rcnn/mask_rcnn_r50_caffe_fpn_poly_1x_coco_v1.py mmdet/models/detectors/atss.py configs/mask_rcnn/mask_rcnn_r50_fpn_poly_1x_coco.py mmdet/models/detectors/fast_rcnn.py configs/faster_rcnn/faster_rcnn_x101_32x4d_fpn_1x_coco.py tools/publish_model.py mmdet/models/losses/ae_loss.py configs/retinanet/retinanet_r50_caffe_fpn_mstrain_3x_coco.py mmdet/ops/roi_pool/__init__.py mmdet/models/dense_heads/base_dense_head.py configs/pisa/pisa_ssd512_coco.py mmdet/models/roi_heads/cascade_roi_head.py configs/_base_/default_runtime.py configs/guided_anchoring/ga_fast_r50_caffe_fpn_1x_coco.py mmdet/models/detectors/fsaf.py configs/rpn/rpn_r50_caffe_fpn_1x_coco.py tools/train.py configs/_base_/models/cascade_rcnn_r50_fpn.py mmdet/ops/generalized_attention.py mmdet/models/detectors/retinanet.py configs/rpn/rpn_x101_64x4d_fpn_1x_coco.py mmdet/models/losses/cross_entropy_loss.py configs/regnet/mask_rcnn_regnetx-6.4GF_fpn_1x_coco.py mmdet/models/losses/smooth_l1_loss.py configs/dcn/faster_rcnn_r50_fpn_dconv_c3-c5_1x_coco.py mmdet/models/roi_heads/base_roi_head.py configs/retinanet/retinanet_r101_caffe_fpn_1x_coco.py mmdet/datasets/voc.py configs/cityscapes/faster_rcnn_r50_fpn_1x_cityscapes.py mmdet/ops/carafe/carafe.py configs/_base_/datasets/coco_instance_semantic.py configs/gn+ws/faster_rcnn_x50_32x4d_fpn_gn_ws-all_1x_coco.py tests/test_models/test_forward.py mmdet/core/bbox/assigners/center_region_assigner.py mmdet/models/necks/fpn.py mmdet/datasets/xml_style.py mmdet/datasets/coco.py configs/regnet/mask_rcnn_regnetx-3.2GF_fpn_mstrain_3x_coco.py configs/retinanet/retinanet_x101_32x4d_fpn_2x_coco.py configs/gcnet/cascade_mask_rcnn_x101_32x4d_fpn_syncbn-backbone_r16_gcb_c3-c5_1x_coco.py configs/ms_rcnn/ms_rcnn_r101_caffe_fpn_2x_coco.py mmdet/models/dense_heads/ga_rpn_head.py configs/retinanet/retinanet_r50_caffe_fpn_mstrain_2x_coco.py mmdet/models/detectors/two_stage.py configs/instaboost/cascade_mask_rcnn_x101_64x4d_fpn_instaboost_4x_coco.py mmdet/ops/utils/__init__.py configs/htc/htc_x101_64x4d_fpn_dconv_c3-c5_mstrain_400_1400_16x1_20e_coco.py configs/_base_/models/retinanet_r50_fpn.py mmdet/core/mask/__init__.py mmdet/core/bbox/builder.py configs/retinanet/retinanet_r50_fpn_2x_coco.py configs/dcn/faster_rcnn_r50_fpn_dpool_1x_coco.py configs/groie/grid_rcnn_r50_fpn_gn-head_groie_1x_coco.py configs/hrnet/fcos_hrnetv2p_w18_gn-head_mstrain_640-800_4x4_2x_coco.py mmdet/models/roi_heads/dynamic_roi_head.py configs/gcnet/mask_rcnn_r50_fpn_r4_gcb_c3-c5_1x_coco.py configs/gcnet/mask_rcnn_r101_fpn_r4_gcb_c3-c5_1x_coco.py mmdet/core/bbox/__init__.py configs/cascade_rcnn/cascade_rcnn_x101_32x4d_fpn_20e_coco.py configs/rpn/rpn_x101_32x4d_fpn_2x_coco.py configs/htc/htc_r50_fpn_20e_coco.py configs/retinanet/retinanet_x101_64x4d_fpn_2x_coco.py configs/gn+ws/faster_rcnn_r50_fpn_gn_ws-all_1x_coco.py mmdet/core/mask/structures.py configs/cascade_rcnn/cascade_mask_rcnn_x101_32x4d_fpn_20e_coco.py configs/carafe/faster_rcnn_r50_fpn_carafe_1x_coco.py configs/regnet/mask_rcnn_regnetx-3.2GF_fpn_1x_coco.py mmdet/apis/train.py mmdet/models/roi_heads/bbox_heads/convfc_bbox_head.py configs/faster_rcnn/faster_rcnn_r50_fpn_iou_1x_coco.py unjson unjson unjson unjson unjson unjson make_cuda_ext write_version_py readme get_version parse_requirements get_git_hash get_hash main main parse_args show_result_pyplot LoadImage inference_detector init_detector multi_gpu_test collect_results_cpu collect_results_gpu single_gpu_test train_detector set_random_seed LegacyAnchorGenerator AnchorGenerator LegacySSDAnchorGenerator SSDAnchorGenerator build_anchor_generator PointGenerator calc_region images_to_levels anchor_inside_flags build_assigner build_bbox_coder build_sampler ensure_rng random_boxes roi2bbox bbox2distance bbox_flip distance2bbox bbox_mapping bbox2result bbox_mapping_back bbox2roi ApproxMaxIoUAssigner AssignResult ATSSAssigner BaseAssigner is_located_in scale_boxes bboxes_area CenterRegionAssigner MaxIoUAssigner PointAssigner BaseBBoxCoder bbox2delta delta2bbox DeltaXYWHBBoxCoder legacy_delta2bbox LegacyDeltaXYWHBBoxCoder legacy_bbox2delta PseudoBBoxCoder bboxes2tblr TBLRBBoxCoder tblr2bboxes build_iou_calculator bbox_overlaps BboxOverlaps2D BaseSampler CombinedSampler InstanceBalancedPosSampler IoUBalancedNegSampler OHEMSampler PseudoSampler RandomSampler SamplingResult ScoreHLRSampler bbox_overlaps get_classes imagenet_vid_classes voc_classes imagenet_det_classes coco_classes cityscapes_classes wider_face_classes DistEvalHook EvalHook eval_map tpfp_imagenet print_map_summary average_precision get_cls_results tpfp_default plot_iou_recall set_recall_param print_recall_summary _recalls eval_recalls plot_num_recall force_fp32 auto_fp16 Fp16OptimizerHook wrap_fp16_model patch_forward_method patch_norm_fp32 cast_tensor_type mask_target mask_target_single BitmapMasks polygon_to_bitmap BaseInstanceMasks PolygonMasks split_combined_polys encode_mask_results multiclass_nms merge_aug_scores merge_aug_masks merge_aug_bboxes merge_aug_proposals DistOptimizerHook allreduce_grads _allreduce_coalesced unmap tensor2imgs multi_apply build_dataloader build_dataset worker_init_fn _concat_dataset CityscapesDataset CocoDataset CustomDataset ClassBalancedDataset RepeatDataset ConcatDataset DeepFashionDataset LVISDataset VOCDataset WIDERFaceDataset XMLDataset AutoAugment Compose DefaultFormatBundle Transpose ToTensor Collect WrapFieldsToLists to_tensor ImageToTensor ToDataContainer InstaBoost LoadImageFromFile LoadMultiChannelImageFromFiles LoadProposals LoadAnnotations MultiScaleFlipAug RandomFlip Pad Corrupt RandomCenterCropPad PhotoMetricDistortion MinIoURandomCrop SegRescale Resize RandomCrop Albu Normalize Expand DistributedSampler GroupSampler DistributedGroupSampler build_shared_head build_detector build_loss build build_backbone build_roi_extractor build_head build_neck DetectoRS_ResNet ResLayer Bottleneck DetectoRS_ResNeXt Bottleneck HourglassNet HourglassModule HRModule HRNet RegNet Res2Net Res2Layer Bottle2neck ResNet BasicBlock Bottleneck ResNetV1d ResNeXt Bottleneck SSDVGG L2Norm AnchorFreeHead AnchorHead reduce_mean ATSSHead BaseDenseHead FCOSHead FeatureAlign FoveaHead FreeAnchorRetinaHead FSAFHead GARetinaHead GARPNHead reduce_mean Integral GFLHead FeatureAdaption GuidedAnchorHead NASFCOSHead PISARetinaHead PISASSDHead RepPointsHead RetinaHead RetinaSepBNHead RPNHead RPNTestMixin SSDHead ATSS BaseDetector CascadeRCNN FasterRCNN FastRCNN FCOS FOVEA FSAF GFL GridRCNN HybridTaskCascade MaskRCNN MaskScoringRCNN NASFCOS PointRend RepPointsDetector RetinaNet RPN SingleStageDetector TwoStageDetector Accuracy accuracy ae_loss_per_image AssociativeEmbeddingLoss BalancedL1Loss balanced_l1_loss binary_cross_entropy mask_cross_entropy _expand_binary_labels CrossEntropyLoss cross_entropy sigmoid_focal_loss py_sigmoid_focal_loss FocalLoss GaussianFocalLoss gaussian_focal_loss GeneralizedCrossEntropyLoss binary_cross_entropy mask_cross_entropy _expand_binary_labels cross_entropy DistributionFocalLoss quality_focal_loss distribution_focal_loss QualityFocalLoss GHMR _expand_onehot_labels GHMC bounded_iou_loss iou_loss IoULoss BoundedIoULoss GIoULoss giou_loss mse_loss MSELoss binary_cross_entropy NewCombinationLoss mask_cross_entropy _expand_binary_labels cross_entropy isr_p carl_loss L1Loss smooth_l1_loss SmoothL1Loss l1_loss binary_cross_entropy mask_cross_entropy _expand_binary_labels SymmetricCrossEntropyLoss cross_entropy weight_reduce_loss weighted_loss reduce_loss BFP FPN FPN_CARAFE HRFPN NASFCOS_FPN NASFPN PAFPN RFP ASPP BaseRoIHead CascadeRoIHead DoubleHeadRoIHead DynamicRoIHead GridRoIHead HybridTaskCascadeRoIHead MaskScoringRoIHead PISARoIHead PointRendRoIHead StandardRoIHead MaskTestMixin BBoxTestMixin BBoxHead Shared4Conv1FCBBoxHead Shared2FCBBoxHead ConvFCBBoxHead DoubleConvFCBBoxHead BasicResBlock CoarseMaskHead _do_paste_mask FCNMaskHead FusedSemanticHead GridHead HTCMaskHead MaskIoUHead MaskPointHead BaseRoIExtractor GenericRoIExtractor SingleRoIExtractor ResLayer ResLayer last_zero_init ContextBlock ConvAWS2d conv_ws_2d ConvWS2d GeneralizedAttention SumCell ConcatCell BaseMergeCell GlobalPoolingCell NonLocal2D build_plugin_layer rel_roi_point_to_rel_img_point rel_roi_point_to_abs_img_point SimpleRoIAlign abs_img_point_to_rel_img_point denormalize point_sample generate_grid normalize SAConv2d MaxPool2d Conv2d ConvTranspose2d NewEmptyTensorOp Linear CARAFEPack CARAFENaive CARAFENaiveFunction CARAFE CARAFEFunction CornerPool RightPoolFunction BottomPoolFunction LeftPoolFunction TopPoolFunction DeformConvFunction ModulatedDeformConv DeformConvPack ModulatedDeformConvPack DeformConv ModulatedDeformConvFunction DeformRoIPoolingPack DeformRoIPoolingFunction ModulatedDeformRoIPoolingPack DeformRoIPooling MaskedConv2dFunction MaskedConv2d nms batched_nms soft_nms nms_match RoIAlign RoIAlignFunction RoIPool RoIPoolFunction SigmoidFocalLoss SigmoidFocalLossFunction collect_env get_root_logger profile_time NiceRepr test_anchor_generator_with_tuples test_retina_anchor test_strides test_standard_anchor_generator test_guided_anchor test_ssd_anchor_generator test_approx_iou_assigner_with_empty_boxes test_point_assigner test_max_iou_assigner test_approx_iou_assigner_with_empty_gt test_point_assigner_with_empty_gt test_random_assign_result test_center_region_assigner_with_ignore test_center_region_assigner_with_empty_bboxes test_approx_iou_assigner test_point_assigner_with_empty_boxes_and_gt test_max_iou_assigner_with_empty_boxes_and_gt test_max_iou_assigner_with_empty_boxes test_center_region_assigner_with_empty_gts test_max_iou_assigner_with_empty_gt test_max_iou_assigner_with_ignore test_center_region_assigner test_approx_iou_assigner_with_empty_boxes_and_gt test_max_iou_assigner_with_empty_boxes_and_ignore MaskRCNNDetector AsyncTestCase AsyncInferenceTestCase _check_mask_head test_config_build_detector _get_config_directory _check_anchorhead _check_roi_head _check_roi_extractor _check_bbox_head test_config_data_pipeline test_auto_fp16 test_force_fp32 test_cast_tensor_type test_polygon_mask_index test_bitmap_mask_flip test_bitmap_mask_index test_bitmap_mask_pad test_polygon_mask_crop_and_resize test_bitmap_mask_to_ndarray test_bitmap_mask_crop dummy_bboxes dummy_raw_polygon_masks test_polygon_mask_crop test_polygon_mask_iter test_bitmap_mask_crop_and_resize test_bitmap_mask_iter test_bitmap_mask_resize test_polygon_mask_area test_polygon_mask_resize test_bitmap_mask_expand test_polygon_mask_to_ndarray test_bitmap_mask_to_tensor test_bitmap_mask_area test_polygon_to_tensor test_polygon_mask_expand test_polygon_mask_pad test_polygon_mask_rescale dummy_raw_bitmap_masks test_bitmap_mask_rescale test_polygon_mask_to_bitmap test_bitmap_mask_init test_polygon_mask_flip test_polygon_mask_init test_custom_classes_override_default test_dataset_wrapper test_default_format_bundle TestLoading test_htc_aug_test test_mask_rcnn_aug_test test_cascade_rcnn_aug_test model_aug_test_template test_random_sampler_empty_pred test_ohem_sampler _context_for_ohem test_ohem_sampler_empty_gt test_random_sampler_empty_gt test_random_sampler test_random_sample_result test_ohem_sampler_empty_pred test_score_hlr_sampler_empty_pred test_resize test_pad test_random_center_crop_pad test_normalize test_multi_scale_flip_aug test_min_iou_random_crop test_random_crop test_albu_transform test_flip test_resnext_backbone check_norm_state test_resnet_basic_block all_zeros test_res2net_backbone test_resnet_bottleneck is_block test_res2net_bottle2neck test_renext_bottleneck test_hourglass_backbone is_norm test_regnet_backbone test_resnet_backbone test_resnet_res_layer _get_config_directory _get_config_module test_single_stage_forward_gpu _get_detector_cfg test_faster_rcnn_ohem_forward _demo_mm_inputs test_single_stage_forward_cpu test_rpn_forward test_two_stage_forward test_ga_anchor_head_loss _dummy_bbox_sampling test_anchor_head_loss test_bbox_head_loss test_mask_head_loss _demodata_refine_boxes test_fsaf_head_loss test_fcos_head_loss test_refine_boxes test_ce_loss test_accuracy test_fpn test_pisa_retinanet_head_loss test_pisa_ssd_head_loss test_pisa_roi_head_loss test_groie test_corner_pool_device_and_dtypes_cpu test_resize_methods test_sum_cell test_concat_cell test_global_pool_cell test_nms_device_and_dtypes_cpu test_nms_match test_nms_device_and_dtypes_gpu test_soft_nms_device_and_dtypes_cpu test_linear test_conv_transposed_2d test_nn_op_forward_called test_conv2d test_max_pool_2d cal_train_time plot_curve load_json_logs main parse_args add_plot_parser add_time_parser main parse_args main parse_args retrieve_data_cfg main analyze_results analyze_individual_category makeplot main convert convert_bn convert_conv_fc main fuse_module fuse_conv_bn parse_args main parse_args main parse_args main parse_args process_checkpoint main parse_args export_onnx_model convert_reslayer convert convert_head main convert_stem get_distortions_from_results print_coco_results get_distortions_from_file get_coco_style_results get_voc_style_results get_results main main parse_args voc_eval_with_return single_gpu_test collect_results coco_eval_with_return main multi_gpu_test parse_args main parse_args convert parse_config truncate_reg_channel truncate_cls_channel is_head reorder_cls_channel main collect_annotations cvt_annotations load_img_info main collect_files parse_args main cvt_annotations parse_xml parse_args decode _minimal_ext_cmd exists join format asctime get_hash split print list gen_packages_items config img add_argument inference_detector show_result_pyplot ArgumentParser init_detector parse_args checkpoint add_argument ArgumentParser VideoCapture camera_id read print waitKey device show_result get_classes isinstance model load_checkpoint warn eval build_detector fromfile simplefilter to data isinstance Compose warn cfg dict modules test_pipeline device is_cuda collate show hasattr bgr2rgb imshow figure show_result module data join encode_mask_results update isinstance imresize show_result ProgressBar eval zip append dataset tensor2imgs range enumerate len data update get_dist_info ProgressBar eval collect_results_cpu collect_results_gpu sleep append dataset range enumerate len rstrip tensor broadcast list get_dist_info mkdtemp encode append range dump bytearray zip load join barrier extend rmtree mkdir_or_exist full list get_dist_info bytearray dumps extend tobytes shape loads all_gather zip append tensor max zeros seed manual_seed_all manual_seed workflow log_level MMDistributedDataParallel warning DistSamplerSeedHook cuda run total_epochs build_optimizer checkpoint_config get_root_logger EpochBasedRunner build_dataset optimizer_config get val load_from build_dataloader imgs_per_gpu resume_from register_training_hooks resume optimizer eval_hook lr_config OptimizerHook load_checkpoint register_hook dict log_config Fp16OptimizerHook MMDataParallel append stack clamp long _rand RandomState isinstance minimum astype float32 maximum from_numpy ensure_rng clone new_tensor bbox_flip new_tensor view new_full new_zeros append cat enumerate cpu append unique numpy clamp clamp zeros_like stack unsqueeze div_ float log exp clamp size repeat expand_as view_as abs log stack unsqueeze div_ float log exp clamp size repeat expand_as view_as abs log tensor unsqueeze cat split clamp_ unsqueeze tensor cat split clamp size min new_tensor max minimum T astype maximum float32 zeros range items list eval is_str arange ones hstack maximum zeros sum range minimum zeros_like concatenate argsort vstack zeros bbox_overlaps range enumerate len max zeros_like concatenate argsort vstack zeros argmax bbox_overlaps enumerate len append empty starmap cumsum tuple vstack Pool get_cls_results list print_map_summary append range eps close mean item zip enumerate maximum argsort any average_precision zeros len get_classes ndarray isinstance table len is_str print_log AsciiTable append zeros range enumerate sum sort hstack copy zeros float argmax fliplr range enumerate array isinstance min set_recall_param print_recall_summary _recalls array append zeros bbox_overlaps range len arange table insert size tolist print_log AsciiTable append array enumerate show ndarray plot isinstance xlabel tolist axis ylabel figure show ndarray plot isinstance xlabel tolist axis ylabel figure hasattr patch_norm_fp32 modules half children isinstance half patch_forward_method float forward ndarray isinstance Iterable Tensor Mapping list map cat mask_size size to_ndarray new_zeros device to numpy clip _pair frPyObjects bool astype merge tolist append slice_list range len append range isinstance len view size new_zeros expand batched_nms nms nms_thr sort min clone max_num zip append bbox_mapping_back cat append mean bbox_mapping_back zip Tensor isinstance mean average zip append array list _take_tensors _flatten_dense_tensors zip _unflatten_dense_tensors OrderedDict all_reduce copy_ div_ append type values all_reduce _allreduce_coalesced get_world_size div_ uint8 transpose size astype ascontiguousarray append array range list map new_full get deepcopy isinstance append build_dataset range len get isinstance ConcatDataset _concat_dataset build_from_cfg ClassBalancedDataset RepeatDataset DistributedSampler get_dist_info DistributedGroupSampler DataLoader seed Tensor ndarray isinstance isinstance all_reduce clone get_world_size div_ topk isinstance size t eq mul_ expand_as append sum max view abs size type_as pow permute append sum cat log abs e where float weight_reduce_loss new_full size squeeze expand size weight_reduce_loss binary_cross_entropy_with_logits _expand_binary_labels float squeeze arange type_as sigmoid pow weight_reduce_loss binary_cross_entropy_with_logits _sigmoid_focal_loss size weight_reduce_loss view pow eq size squeeze new_zeros sigmoid shape pow binary_cross_entropy_with_logits sum long float long cross_entropy new_full size squeeze expand clamp view zeros_like size min where abs max clamp min max decode pos_assigned_gt_inds loss_cls max list view append sum range cat detach size unique float reshape sort pow bbox_overlaps len view reshape size pow loss_bbox float sum abs where abs get_enum sum reduce_loss arange grid_sample isinf size where expand stack any device to split Sequential isinstance constant_init size view pop str plugin_layer copy Size tensor affine_grid normalize tensor view abs_img_point_to_rel_img_point rel_roi_point_to_abs_img_point denormalize squeeze unsqueeze grid_sample ndarray isinstance new_zeros Tensor to numpy is_cuda ndarray isinstance from_numpy cpu Tensor pop copy nms_op eval to max cat isinstance from_numpy cpu Tensor show join str defaultdict list replace items check_output strip get_compiler_version device_count __version__ get_compiling_cuda_version platform is_available range append get_logger record_event monotonic Event dict build_anchor_generator AnchorGenerator tensor grid_anchors base_anchors build_anchor_generator grid_anchors dict valid_flags is_available enumerate build_anchor_generator dict zip is_available grid_anchors base_anchors grid_anchors dict valid_flags build_head is_available enumerate base_anchors grid_anchors dict valid_flags build_head is_available enumerate FloatTensor assign LongTensor MaxIoUAssigner LongTensor FloatTensor assign MaxIoUAssigner Tensor FloatTensor assign LongTensor MaxIoUAssigner LongTensor FloatTensor assign MaxIoUAssigner empty LongTensor FloatTensor assign MaxIoUAssigner Tensor empty assign empty MaxIoUAssigner LongTensor assign PointAssigner FloatTensor LongTensor assign PointAssigner FloatTensor assign PointAssigner FloatTensor FloatTensor assign LongTensor ApproxMaxIoUAssigner FloatTensor assign LongTensor ApproxMaxIoUAssigner FloatTensor assign empty ApproxMaxIoUAssigner assign empty ApproxMaxIoUAssigner random LongTensor FloatTensor get_extra_property assign CenterRegionAssigner assign CenterRegionAssigner LongTensor FloatTensor LongTensor FloatTensor assign float CenterRegionAssigner LongTensor FloatTensor assign CenterRegionAssigner float long int getenv join dirname join list _get_config_directory model print glob build_detector build_optimizer train_cfg _check_roi_head roi_head test_cfg fromfile optimizer pop join get _get_config_directory print Compose astype float32 dict train_pipeline test_pipeline fromfile randint _check_mask_head mask_iou_head grid_points mask_head bbox_head bbox_roi_extractor mask_roi_extractor grid_roi_extractor _check_roi_extractor _check_bbox_head with_mask ModuleList isinstance get hasattr isinstance ModuleList zip get isinstance ModuleList zip ndarray FloatTensor float32 dict cast_tensor_type int32 array model ones ExampleModule is_available cuda model ones ExampleModule is_available cuda append randint range randint min BitmapMasks dummy_raw_bitmap_masks empty dummy_raw_bitmap_masks BitmapMasks array rescale dummy_raw_bitmap_masks BitmapMasks array resize dummy_raw_bitmap_masks BitmapMasks flip dummy_raw_bitmap_masks BitmapMasks pad dummy_raw_bitmap_masks BitmapMasks crop array dummy_raw_bitmap_masks BitmapMasks dummy_bboxes crop_and_resize randint dummy_raw_bitmap_masks BitmapMasks expand dummy_raw_bitmap_masks BitmapMasks areas dummy_raw_bitmap_masks BitmapMasks to_ndarray dummy_raw_bitmap_masks BitmapMasks to_tensor dummy_raw_bitmap_masks BitmapMasks dummy_raw_bitmap_masks BitmapMasks enumerate BitmapMasks PolygonMasks dummy_raw_polygon_masks uint8 rescale array PolygonMasks dummy_raw_polygon_masks uint8 PolygonMasks stack resize array dummy_raw_polygon_masks flip PolygonMasks dummy_raw_polygon_masks PolygonMasks crop array dummy_raw_polygon_masks pad PolygonMasks dummy_raw_polygon_masks dummy_bboxes crop_and_resize randint PolygonMasks dummy_raw_polygon_masks areas PolygonMasks dummy_raw_polygon_masks to_bitmap PolygonMasks dummy_raw_polygon_masks to_ndarray PolygonMasks dummy_raw_polygon_masks to_tensor PolygonMasks dummy_raw_polygon_masks PolygonMasks dummy_raw_polygon_masks PolygonMasks dummy_raw_polygon_masks enumerate get MagicMock CLASSES close NamedTemporaryFile dataset_class items list defaultdict MagicMock ConcatDataset values cumsum CustomDataset ceil set mean ClassBalancedDataset append randint max RepeatDataset len dict load build_from_cfg bundle load transform model dict eval test_pipeline build_detector fromfile build_from_cfg model_aug_test_template model_aug_test_template model_aug_test_template LongTensor FloatTensor RandomSampler assign MaxIoUAssigner sample Tensor FloatTensor RandomSampler assign MaxIoUAssigner sample empty long LongTensor FloatTensor RandomSampler assign MaxIoUAssigner sample empty insert roi_head dirname _get_detector_cfg LongTensor FloatTensor OHEMSampler _context_for_ohem assign MaxIoUAssigner sample Tensor LongTensor FloatTensor OHEMSampler _context_for_ohem assign MaxIoUAssigner sample Tensor empty LongTensor FloatTensor OHEMSampler _context_for_ohem assign MaxIoUAssigner sample Tensor empty random range MaxIoUAssigner LongTensor FloatTensor _context_for_ohem assign ScoreHLRSampler sample Tensor empty pop join deepcopy dict shape dirname resize_module imread build_from_cfg join deepcopy flip_module dict shape dirname imread build_from_cfg join crop_module dict shape dirname create_random_bboxes imread build_from_cfg join deepcopy crop_module reshape dict shape array dirname create_random_bboxes imread build_from_cfg mode join deepcopy dict shape dirname transform resize_module imread build_from_cfg join deepcopy dict shape array dirname transform imread build_from_cfg load dict normalize albu_transform build_from_cfg load deepcopy crop_module dict create_random_bboxes build_from_cfg load join deepcopy dict shape dirname test_pipeline transform imread build_from_cfg isinstance isinstance data hasattr zeros_like allclose isinstance block BasicBlock randn dict block Bottleneck randn randn ResLayer range layer len isinstance check_norm_state randn ResNet stem model is_block init_weights parameters getattr modules is_norm train range ResNetV1d dict BottleneckX block randn randn model ResNeXt is_block init_weights modules train model RegNet randn init_weights train dict block randn Bottle2neck randn model Res2Net is_block init_weights modules train model randn HourglassNet init_weights train fromfile join _get_config_directory Config deepcopy model _get_config_module train_cfg test_cfg pop _get_detector_cfg _demo_mm_inputs build_detector forward pop skip _get_detector_cfg _demo_mm_inputs build_detector forward cuda pop _parse_losses _get_detector_cfg _demo_mm_inputs build_detector forward pop _parse_losses backward _get_detector_cfg requires_grad_ _demo_mm_inputs build_detector forward pop _get_detector_cfg _demo_mm_inputs build_detector forward T RandomState LongTensor FloatTensor rand BitmapMasks append randint range clip Config FCOSHead dict forward loss Config sum AnchorHead dict forward loss Config sum FSAFHead dict is_available forward cuda loss Config sum dict cuda is_available forward GuidedAnchorHead loss Config loss _dummy_bbox_sampling forward rand get_targets dict BBoxHead sum bbox2roi print refine_bboxes _demodata_refine_boxes BBoxHead int random_boxes group_items astype from_numpy ensure_rng numpy randint empty long cat Config FCNMaskHead mask_iou_head _dummy_bbox_sampling forward rand get_targets dict MaskIoUHead randint sum loss cat build_sampler rand dict build_assigner assign sample range append dict Tensor build_loss long accuracy Accuracy Tensor empty long FPN isinstance num_outs modules fpn_model range Config sum PISARetinaHead dict forward loss Config sum PISASSDHead dict forward loss Config forward_train dict PISARoIHead sum dict tensor GenericRoIExtractor groie pool tensor CornerPool sum_cell SumCell randn ConcatCell concat_cell randn GlobalPoolingCell gp_cell randn randn interpolate _resize max_pool2d BaseMergeCell nms FloatTensor float64 astype float32 DoubleTensor array nms print astype float32 skip device_count to array range from_numpy nms_match zeros array range len FloatTensor float64 astype float32 DoubleTensor soft_nms array wrapper ref product randn backward Conv2d OrderedDict requires_grad_ eval manual_seed wrapper ref product randn backward min OrderedDict eval manual_seed ConvTranspose2d wrapper ref product randn MaxPool2d OrderedDict wrapper ref product randn backward OrderedDict eval manual_seed Linear list std print argmin mean array append argmax keys include_outliers enumerate arange backend max out show list title savefig legend gca append plot concatenate cla keys enumerate json_logs switch_backend print style xlabel set_xticks set_style array len add_argument add_parser add_argument add_parser add_plot_parser add_subparsers add_time_parser zip json_logs load_json_logs model fuse_module build_detector fromfile build_dataset get build_dataloader wrap_fp16_model synchronize perf_counter test eval enumerate load_checkpoint fuse_conv_bn MMDataParallel fromfile train update imshow_det_bboxes train ProgressBar retrieve_data_cfg skip_type len subplot plot insert xlabel close ylabel xlim shape ylim title vstack figure legend savefig zeros fill_between range len deepcopy evaluate COCOeval print createIndex accumulate getImgIds append getCatIds enumerate deepcopy evaluate COCOeval print makeplot COCO accumulate getImgIds recThrs loadRes dirname vstack getCatIds enumerate makedirs analyze_results ann result types ones size add from_numpy zeros from_numpy add load convert_conv_fc print len set OrderedDict dict save range convert_bn enumerate src convert dst depth Parameter eps reshape running_mean bias sqrt weight running_var named_children isinstance fuse_conv_bn Conv2d Identity save_checkpoint out forward_dummy hasattr tuple get_model_complexity_info is_available shape cuda options merge_from_dict load decode endswith save Popen in_file process_checkpoint out_file get_available_passes optimize apply passes modules save export_onnx_model printable_graph empty isinstance graph print replace add print replace add print int add split items list convert_reslayer convert_head startswith convert_stem zeros _print load list print_coco_results isinstance print mean zeros keys enumerate len load list isinstance print mean zeros keys enumerate len print get_coco_style_results get_voc_style_results load append replace enumerate task get_results filename str local_rank tmpdir launcher MMDistributedDataParallel format_only show get_dist_info format_results gpu_collect dump CLASSES init_dist single_gpu_test evaluate multi_gpu_test show_dir show_score_thr list evaluate COCOeval summarize is_str COCO accumulate getImgIds loadRes stats load eval_map CLASSES size img_norm_cfg size collect_results rstrip tensor broadcast list get_dist_info mkdtemp encode append range dump bytearray zip load join barrier extend rmtree mkdir_or_exist full set_random_seed coco_eval_with_return final_prints seed corruptions voc_eval_with_return final_prints_aggregate obj_from_dict workers_per_gpu insert iou_thr results2json deepcopy coco severities dict add_mutually_exclusive_group localtime abspath train_detector basename strftime get_root_logger work_dir append val resume_from info gpu_ids join collect_env mkdir_or_exist pipeline isinstance close NamedTemporaryFile reg_class_agnostic fromfile reshape size cat reshape reshape pop format replace search parse_config truncate_reg_channel reorder_cls_channel truncate_cls_channel num_classes append join print glob print track_progress track_parallel_progress int decode asarray basename area id dict dirname unique append imread toBbox pop dump labels dict append gt_dir list items img_dir cityscapes_path int parse findall text getroot append zeros array find join list print track_progress extend zip list_from_file isdir devkit_path cvt_annotations | # Learning-with-Noisy-Class-Labels-for-Instance-Segmentation The code for implementing the [Learning with Noisy Class Labels for Instance Segmentation](https://www.ecva.net/papers/eccv_2020/papers_ECCV/papers/123590035.pdf). ## 1. Introducton Instance segmentation has achieved siginificant progress in the presence of correctly annotated datasets. Yet, object classes in largescale datasets are sometimes ambiguous, which easily causes confusion. In addition, limited experience and knowledge of annotators can also lead to mislabeled object classes. To solve this issue, a novel method is proposed in this paper, which uses different losses describing different roles of noisy class labels to enhance the learning. Specifically, in instance segmentation, noisy class labels play different roles in the foregroundbackground sub-task and the foreground-instance sub-task. Hence, on the one hand, the noise-robust loss (e.g., symmetric loss) is used to prevent incorrect gradient guidance for the foreground-instance sub-task. On the other hand, standard cross entropy loss is used to fully exploit correct gradient guidance for the foreground-background sub-task.  The project is based on mmdetection v2.2.0. Main results in the paper are based on older mmdetection (v1.0rc0). More details will be released. ## 2. Main Results On Cityscapes dataset:  | 2,827 |
lood339/SCCvSD | ['camera calibration'] | ['Sports Camera Calibration via Synthetic Data'] | data/read_me.py python/deep/generate_train_data.py python/util/projective_camera.py python/deep/camera_dataset.py python/deep/siamese.py python/util/iou_util.py python/deep/network_train.py python/demo.py python/deep/contrastive_loss.py python/hog/generate_test_feature_hog.py python/util/rotation_util.py python/hog/generate_database_hog.py python/util/synthetic_util.py python/deep/test.py python/demo_uot.py python/deep/network_test.py ut CameraDataset ContrastiveLoss ut_contrastive_loss save_checkpoint ut BranchNetwork SiameseNetwork ut_homography_warp IouUtil ut_iou_on_template_uot_1 ut_template_to_image_homography_uot ut_generate_grassland_mask ut_iou_on_template_uot_2 ProjectiveCamera RotationUtil ut_generate_ptz_cameras ut_sample_positive_pair SyntheticUtil ut_generate_database_images ut_distance_transform ut_camera_to_edge_image format print Compose len shape Normalize loadmat range CameraDataset randn ones print squeeze where shape closs ContrastiveLoss zeros join save criterion randn ones squeeze BranchNetwork SiameseNetwork where siamese_network ContrastiveLoss zeros asarray imwrite inv get_homography homography_warp imread ProjectiveCamera format asarray print template_to_image_homography_uot ProjectiveCamera iou_on_template_uot asarray print format iou_on_template_uot asarray print format DIST_L2 uint8 threshold ones waitKey distanceTransform astype imshow homography_warp stack DIST_MASK_PRECISE imread loadmat THRESH_BINARY_INV list asarray print camera_to_edge_image loadmat keys list generate_ptz_cameras print waitKey shape imshow camera_to_edge_image loadmat keys range destroyAllWindows list asarray rotate_x_axis print squeeze waitKey rotate_y_axis pan_y_tilt_x imshow uniform rotate_z_axis Rodrigues camera_to_edge_image zeros loadmat keys sample_positive_pair list print generate_database_images savemat loadmat keys uint8 astype distance_transform waitKey imshow imread | # SCCvSD Sports Camera Calibration via Synthetic Data The original implemenation uses Matlab. This is a re-implementation. The two-GAN code: https://github.com/lood339/pytorch-two-GAN Link: https://arxiv.org/abs/1810.10658 Install required package via conda: conda install -c anaconda numpy conda install -c anaconda scipy conda install -c conda-forge pyflann conda install -c conda-forge opencv | 2,828 |
lood339/two_point_calib | ['camera calibration'] | ['A Two-point Method for PTZ Camera Calibration in Sports'] | python/two_point_calib_demo.py python/util.py pan_y_tilt_x focal_length_from_two_points ptz_from_two_point pan_tilt_from_principle_point print pow sqrt asarray pi asarray print matmul pi dot pan_y_tilt_x focal_length_from_two_points atan2 zeros zeros pi atan2 | # two_point_calib This is an implementation of "A Two-point Method for PTZ camera Calibration in Sports" (WACV2018) Dependences: 1. OpenCV 3.1 or later. 2. Eigen 3.2.6 or later. 3. flann 1.8.4 or later. 4. matio: https://github.com/tbeu/matio The code is tested on Xcode 6.4 on a Mac 10.10.5 system. But the code has minimum dependence on compile and system, so it should work well on linux and windows as well. File structure: matlab: synthetic example of the two-point calibration method. | 2,829 |
looooongChen/MRBrainS-Brain-Segmentation | ['brain segmentation'] | ['MixNet: Multi-modality Mix Network for Brain Segmentation'] | train.py estimator.py preprocess.py predict.py model.py get_evaluation_inputs_fn get_prediction_inputs_fn single_view_predict softmax IteratorInitializerHook resize_image train get_training_inputs_fn model_fn_base conv_block make_model init_block conv2d_same make_mixNet_mix resize_bilinear conv_batch_norm pp_block bottleneck make_mixNet_plain avg_pool make_mixNet_combi _translate _scale _elastic_transform _rotate_images translate_label_2013_test replace_label Dataset _resize merge_label uint8 make_model get_or_create_global_step SummarySaverHook minimize MomentumOptimizer get_collection float32 group UPDATE_OPS cast softmax image exponential_decay expand_dims argmax scalar merge print train_and_evaluate Estimator EvalSpec get_evaluation_inputs_fn shape get_training_inputs_fn TrainSpec len generate_ds print Estimator shape get_prediction_inputs_fn append array enumerate predict len sum expand_dims exp max shape resize_images float32 placeholder IteratorInitializerHook IteratorInitializerHook IteratorInitializerHook max_pooling2d conv2d_same conv_batch_norm conv2d_same relu range avg_pool resize_bilinear conv2d_same relu append expand_dims range append expand_dims range print resize_images uint8 astype float32 placeholder shape array resize_images uint8 concatenate print resize_image_with_crop_or_pad rint BILINEAR float32 placeholder astype shape int32 expand_dims array uint8 concatenate print rint astype float32 placeholder translate shape expand_dims array uint8 concatenate print rint astype float32 placeholder rotate shape expand_dims array print transform range append len replace_label | # MRBrainS2018-Brain-Segmentation MixNet: Multi-modality Mix Network for Brain Segmentation @inproceedings{LongMACCAIBrainLes, author = {Long Chen, Dorit Merhof}, title = {MixNet: Multi-modality Mix Network for Brain Segmentation}, booktitle = {MICCAI Brainlesion Workshop (BrainLes)}, year = {2018}, } ## links: [MICCAI BrainLes Workshop](http://www.brainlesion-workshop.org/) | 2,830 |
looooongChen/instance_segmentation_with_pixel_embeddings | ['cell segmentation', 'instance segmentation', 'semantic segmentation'] | ['Instance Segmentation of Biomedical Images with an Object-aware Embedding Learned with Local Constraints'] | utils/center.py Net.py prepare_U2OScell_tfrecords.py fn_head.py utils/tfrecords_convert.py check_tfrecords.py postprocessing.py utils/process.py fn_backbone.py utils/data_dep/evaluation.py utils/data_dep/visulize.py utils/tfrecord_type.py utils/evaluation.py fn_loss.py preprocess.py utils/tfrecord_parse.py predict.py main.py utils/data_dep/retrieval_dir.py utils/tfrecord_creation.py utils/img_io.py prepare_cvppp_tfrecords.py build_doubleHead build_dist_head build_embedding_head build_embedding_loss embedding_loss_single_example weight_fg build_dist_loss main LocalDisNet remove_noise get_seeds mask_from_seeds smooth_emb main extract_fn checkConti roi2origin mask2contour ROI main Example Evaluator GFG save_indexed_png read_indexed_png boundary_of_label_map remove_small relabel_map distance_map get_neighbor_by_distance create_tf_record convert_to_tf_example inject_fn_img open_sharded_output_tfrecords extract_fn_base extract_fn_local_dis int64_list_feature read_examples_list float_list_feature int64_feature bytes_feature bytes_list_feature Example Evaluator ls_files mask_color_img get_boundary_from_label_map visulize_mask count_nonzero equal greater cosine_distance unique_with_counts one_hot l2_normalize reshape size concat boolean_mask greater float32 reduce_sum cast tile unsorted_segment_sum gather abs zeros makedirs Evaluator test_res FLAGS norm convolve disk copy sum range squeeze peak_local_max norm all squeeze im_dilation mean array nonzero label mor_square regionprops max regionprops TFRecordDataset join res_dir make_one_shot_iterator get_next dataset_dir batch pad extract_fn_local_dis set_shape cast uint8 ones print findContours astype RETR_LIST dilate CHAIN_APPROX_NONE where pad boundingRect unique append count_nonzero roll show time T checkConti print roi2origin mask2contour imshow ROI zip append imread range circle getpalette array open fromarray uint8 squeeze astype putpalette save unique copy regionprops copy relabel_map uint8 uint16 not_equal ones astype copy erode dilate boundary_of_label_map DIST_L2 uint8 multiply distanceTransform astype copy DIST_MASK_PRECISE unique max _adjust_size getStructuringElement reshape logical_and copy MORPH_ELLIPSE unique zeros enumerate inject_fn_img uint16 get_neighbor_by_distance resize remove_small imencode Example bytes_feature imread format astype read_indexed_png int64_feature unique tobytes int uint8 print distance_map tostring len len tobytes imread imencode resize parse_single_example decode_png decode_raw reshape decode_png stack string extract_fn_base int32 parse_single_example FixedLenFeature join listdir splitext isfile uint8 gray2rgb isinstance multiply astype copy range mask_color_img uint8 multiply astype get_boundary_from_label_map uint8 not_equal ones copy dilation erosion | # Instance Segmentation with Pixel Embeddings [Institute of Imaging & Computer Vision, RWTH Aachen University](https://www.lfb.rwth-aachen.de/en/) This repository (InstSegv1) contains the implementation of instance segmentation approach described in the papers: - Long Chen, Martin Strauch and Dorit Merhof. Instance Segmentation of Biomedical Images with an Object-Aware Embedding Learned with Local Constraints \[[Paper](https://www.researchgate.net/publication/336396370_Instance_Segmentation_of_Biomedical_Images_with_an_Object-Aware_Embedding_Learned_with_Local_Constraints)\] International Conference on Medical Image Computing and Computer-Assisted Intervention (MICCAI) 2019. Please [cite the paper(s)](#how-to-cite) if you are using this code in your research. Check [instSeg](https://github.com/looooongChen/instSeg) for reconstructed code (tensorflow 2.x) and improved work. ## Overview: <p align="center"> | 2,831 |
lopezbec/COVID19_Tweets_Dataset | ['sentiment analysis', 'word embeddings', 'twitter sentiment analysis'] | ['BB_twtr at SemEval-2017 Task 4: Twitter Sentiment Analysis with CNNs and LSTMs'] | Tweets_ID_Filter_requests/Filter_Code_EXAMPLE.py is_english_and_usa_tweet save_tweet_to_filtered_file split | - <a href="#this-repo-only-contatins-the-data-and-statistics-for-2022.for-the-data-of" id="toc-this-repo-only-contatins-the-data-and-statistics-for-2022.for-the-data-of">This repo only contatins the data and statistics for 2022.For the data of:</a> - <a href="#please-visithttpsgithub.comlopezbeccovid19_tweets_dataset_2020" id="toc-please-visithttpsgithub.comlopezbeccovid19_tweets_dataset_2020">- 2020 please visit:<span>https://github.com/lopezbec/COVID19_Tweets_Dataset_2020</span></a> | 2,832 |
lopuhin/python-adagram | ['word sense induction'] | ['Breaking Sticks and Ambiguities with Adaptive Skip-gram'] | adagram/load_julia.py adagram/model.py adagram/utils.py setup.py adagram/stick_breaking.py adagram/__init__.py adagram/learn.py adagram/train.py adagram/softmax.py _words_reader inplace_train main Dictionary VectorModel softmax_path build_huffman_tree HierarchicalOutput HierarchicalSoftmaxNode convert_huffman_tree expected_pi mean_beta main statprofile rand_arr frequencies zeros float sum zeros list add_argument out_file ArgumentParser zip VectorModel parse_args Dictionary save is_root parent list heapify pop_initialize zip append heappush HierarchicalSoftmaxNode len append HierarchicalOutput range softmax_path max d mean_beta alpha zeros sum prototypes range basicConfig arg read format window train output build dict info input len | lopuhin/python-adagram | 2,833 |
lorenlugosch/conditional-computation-using-surprisal | ['speech recognition'] | ['Surprisal-Triggered Conditional Computation with Neural Networks'] | data.py models.py deterministic_experiments.py run_experiments.py main.py training.py Config PhonemeTokenizer read_config get_ASR_datasets ASRDataset CollateWavsASR Experiment Conv Controller CCModel count_params Experiment Trainer Config int read get join ConfigParser folder call mkdir float join ASRDataset read_csv base_path | # conditional-computation-using-surprisal This repo contains the experiment code for our paper, "[Surprisal-Triggered Conditional Computation with Neural Networks](https://arxiv.org/abs/2006.01659)". ## Requirements - PyTorch - torchaudio - ctcdecode - tqdm - The `autoregressive-models` repo (get [here](https://github.com/lorenlugosch/autoregressive-models), clone into a folder adjacent to this one, and rename to `autoregressive_models` (needed for import to work)) We used a single Tesla K80 GPU for our experiments. Training a single model takes about 1 hour on this GPU. Each experiment is run by training models with 5 random seeds, so a single experiment will require about 5 hours. ## Datasets | 2,834 |
lostkuma/GraphOfTweets | ['word embeddings'] | ['Graph-of-Tweets: A Graph Merging Approach to Sub-event Identification'] | tweet_config.py graph_config.py Graph GraphNode GraphEdge TopValuesMap TokenNode TweetGraph TweetEdge TweetNode | # GraphOfTweets Paper [Graph-of-Tweets: A Graph Merging Approach to Sub-event Identification](https://arxiv.org/abs/2101.03208) graph_config.py - token graph config tweet_config.py - tweet graph config maximal_clique_results - manually labeled final results demo_token_nodes.ipynb - a demo to retrieve merged token results demo_tweet_nodes.ipynb - a demo to retrieve tweet token results For data of the demos, download the reduced graphs from [Google Drive](https://drive.google.com/drive/folders/1MDLIXZee6cG3iiOqteyOMntKQAeQ0qmh?usp=sharing) | 2,835 |
lottery-ticket/rewinding-iclr20-public | ['network pruning'] | ['Comparing Rewinding and Fine-tuning in Neural Network Pruning'] | vision/tpu-src/models/hyperparameters/hyperparameters.py vision/gpu-src/official/datasets/movielens.py vision/tpu-src/models/common/tpu_profiler_hook.py vision/tpu-src/models/hyperparameters/__init__.py vision/gpu-src/official/utils/logs/hooks_helper_test.py vision/gpu-src/official/utils/misc/model_helpers.py gnmt/model/nmt/utils/misc_utils_test.py vision/gpu-src/official/utils/data/file_io.py vision/tpu-src/models/common/__init__.py vision/gpu-src/official/utils/accelerator/tpu_test.py gnmt/model/nmt/utils/evaluation_utils_test.py gnmt/model/nmt/utils/misc_utils.py vision/gpu-src/official/vgg/cifar10_main.py vision/gpu-src/official/utils/misc/model_helpers_test.py vision/gpu-src/official/utils/logs/hooks.py vision/gpu-src/official/utils/logs/logger.py gnmt/model/nmt/scripts/bleu.py gnmt/model/nmt/nmt.py vision/gpu-src/official/resnet/resnet_run_loop.py vision/tpu-src/models/official/resnet/lars_util.py vision/tpu-src/models/common/imagenet.py gnmt/model/nmt/lottery/amc_resnet50_dict.py vision/gpu-src/official/resnet/imagenet_preprocessing.py gnmt/model/nmt/model.py gnmt/model/nmt/gnmt_model.py vision/lottery/lottery/amc_resnet50_dict.py gnmt/model/nmt/utils/vocab_utils_test.py gnmt/model/nmt/lottery/prune_functions.py vision/gpu-src/official/utils/logs/metric_hook_test.py gnmt/model/nmt/attention_model.py vision/tpu-src/models/common/inference_warmup.py vision/gpu-src/official/utils/logs/hooks_test.py vision/gpu-src/official/utils/data/file_io_test.py vision/gpu-src/official/utils/logs/cloud_lib.py vision/plot/gen.py gnmt/model/nmt/estimator.py gnmt/model/nmt/attention_utils.py vision/gpu-src/official/resnet/cifar10_test.py gnmt/model/nmt/decoder.py gnmt/model/nmt/utils/iterator_utils.py vision/gpu-src/official/utils/accelerator/tpu.py vision/gpu-src/official/vgg/vgg_model.py vision/gpu-src/official/utils/flags/_base.py vision/gpu-src/official/vgg/cifar10_download_and_extract.py vision/tpu-src/models/official/resnet/benchmark/read_training_time.py vision/gpu-src/official/vgg/vgg_run_loop.py gnmt/model/nmt/utils/nmt_utils.py gnmt/model/nmt/lottery/l1_filter_pruning.py vision/lottery/lottery/l1_filter_pruning.py vision/lottery/lottery/lottery.py gnmt/model/nmt/distributed_iterator_utils.py gnmt/model/iterative_nvidia.py vision/gpu-src/official/utils/logs/cloud_lib_test.py vision/gpu-src/official/resnet/cifar10_main.py vision/tpu-src/models/official/resnet/resnet_model.py gnmt/model/run.py vision/tpu-src/models/official/resnet/benchmark/resnet_benchmark.py vision/gpu-src/official/utils/flags/flags_test.py vision/gpu-src/official/utils/misc/distribution_utils_test.py vision/gpu-src/official/utils/flags/_performance.py gnmt/model/nmt/utils/vocab_utils.py gnmt/model/nmt/async_checkpoint.py vision/gpu-src/official/utils/flags/_benchmark.py vision/gpu-src/official/resnet/imagenet_test.py vision/gpu-src/official/utils/flags/_misc.py gnmt/model/run_nvidia.py vision/lottery/setup.py vision/gpu-src/official/utils/logs/hooks_helper.py vision/gpu-src/official/utils/export/export.py gnmt/model/nmt/model_helper.py gnmt/model/nmt/utils/evaluation_utils.py vision/gpu-src/official/utils/flags/core.py vision/gpu-src/official/resnet/cifar10_download_and_extract.py vision/lottery/lottery/prune_functions.py vision/plot/common.py vision/gpu-src/official/utils/export/export_test.py vision/gpu-src/official/utils/flags/_device.py gnmt/model/nmt/utils/iterator_utils_test.py gnmt/model/nmt/lottery/lottery.py vision/tpu-src/models/official/resnet/resnet_main.py gnmt/model/nmt/beam_search_decoder.py vision/gpu-src/official/resnet/layer_test.py vision/gpu-src/official/utils/logs/logger_test.py vision/gpu-src/official/utils/logs/metric_hook.py vision/tpu-src/models/official/resnet/imagenet_input.py vision/tpu-src/models/hyperparameters/common_hparams_flags.py vision/gpu-src/official/utils/logs/mlperf_helper.py vision/tpu-src/models/hyperparameters/common_tpu_flags.py vision/tpu-src/models/official/resnet/resnet_preprocessing.py gnmt/model/iterative.py vision/gpu-src/official/resnet/resnet_model.py vision/gpu-src/official/utils/flags/_conventions.py vision/gpu-src/official/utils/misc/distribution_utils.py gnmt/model/nmt/low_level_runner.py main run_iterative main run_iterative _get_path finetune lottery reinit _create_initial_state_at_checkpoint lr_lottery lr_finetune main train run _get_path finetune lottery reinit _create_initial_state_at_checkpoint lr_lottery lr_finetune main train run AsyncCheckpointSaverHook create_attention_mechanism AttentionModel _bahdanau_score _maybe_mask_score _BaseMonotonicAttentionMechanism safe_cumprod _compute_attention _monotonic_probability_fn _prepare_memory _BaseAttentionMechanism BahdanauAttention AttentionWrapperState hardmax _luong_score AttentionWrapper LuongMonotonicAttention monotonic_attention LuongAttention AttentionMechanism BahdanauMonotonicAttention _check_maybe _get_scores BeamSearchDecoder BeamSearchDecoderOutput create_topk_unique get_attention_probs _beam_search_step _maybe_tensor_gather_helper _length_penalty tile_batch _tensor_gather_helper BeamSearchDecoderState _mask_probs create_make_unique _tile_batch attention_probs_from_attn_state top_k_with_unique Decoder dynamic_decode _create_zero_outputs _make_distributed_pipeline train_fn train_and_eval_with_low_level_api create_train_runner DistributedPipeline train_and_eval_fn train_fn train_and_eval_fn _get_tpu_run_config _get_tgt_sos_eos_id create_train_runner create_train_runner_and_build_graph get_sacrebleu create_eval_runner create_eval_runner_and_build_graph get_metric _convert_ids_to_strings eval_fn get_distribution_strategy make_model_fn get_metric_from_estimator make_input_fn train_and_eval_with_low_level_api GNMTModel gnmt_residual_fn GNMTAttentionMultiCell wrap_computation_in_while_loop device_for_host device_for_tpu_core get_resolver EvalLowLevelRunner get_host TrainLowLevelRunner BaseModel Model MaskedLayerNormLSTMCell _create_or_load_embed create_emb_for_encoder_and_decoder MaskedLSTMCell gradient_clip _cell_list _get_embed_device Dense MaskedNasCell TrainModel CellWrapper _create_pretrained_emb_from_txt get_initializer create_rnn_cell MaskedGRUCell ExtraArgs _single_cell run_main _add_argument add_arguments extend_hparams create_hparams main create_or_load_hparams is_mask_name CheckpointerHook weight_name_of_base_name hooks_from_flags get_hooks PruningHook get_lr_tensor bias_name_of_base_name add_flags weight_name_of_mask_name base_name_of_mask_name mask_name_of_base_name prune_to_global_x zprune_all_to_global_x _prune_resnet_generic get_prune_function_by_name zweight zprune_global_x prune_structured_generic prune_resnet20_structured_discovered prune_amc_generic prune_global_x prune_all_to_global_x _get_ngrams compute_bleu _clean _bleu evaluate EvaluationUtilsTest get_iterator get_infer_iterator IteratorUtilsTest check_tensorflow_version format_spm_text format_text bfloat16_var_getter print_out format_bpe_text print_hparams maybe_parse_standard_hparams MiscUtilsTest get_translation load_vocab load_embed_txt check_vocab tokens_to_bytes _string_to_bytes create_vocab_tables VocabUtilsTest _regularize_1m_dataset csv_to_joint_dataframe ratings_csv_to_dataframe _transform_csv _download_and_clean _regularize_20m_dataset main define_data_download_flags download integerize_genres main input_fn define_cifar_flags get_filenames Cifar10Model parse_record run_cifar get_synth_input_fn main preprocess_image cifar10_model_fn BaseTest _aspect_preserving_resize _decode_crop_and_flip _central_crop _smallest_size_at_least _mean_image_subtraction _resize_image preprocess_image BaseTest BaseTest _building_block_v2 _building_block_v1 batch_norm _bottleneck_block_v2 _bottleneck_block_v1 conv2d_fixed_padding Model fixed_padding block_layer override_flags_and_set_envars_for_gpu_thread_pool learning_rate_with_decay resnet_model_fn process_record_dataset define_resnet_flags get_synth_input_fn resnet_main image_bytes_serving_input_fn embedding_matmul construct_scalar_host_call TPUBaseTester write_to_buffer _GarbageCollector _serialize_shards iter_shard_dataframe write_to_temp_buffer _shard_dict_to_examples BaseTest fixed_core_count build_tensor_serving_input_receiver_fn ExportUtilsTest register_key_flags_in_core set_defaults parse_flags BaseTester define_flags define_base get_num_gpus define_benchmark define_device require_cloud_storage define_image get_tf_dtype get_loss_scale define_performance on_gcp CloudLibTest ExamplesPerSecondHook get_profiler_hook get_logging_tensor_hook get_train_hooks get_examples_per_second_hook get_logging_metric_hook BaseTest ExamplesPerSecondHookTest _collect_tensorflow_info _gather_run_info _parse_gpu_model BaseBenchmarkLogger _collect_run_params BenchmarkFileLogger config_benchmark_logger BenchmarkBigQueryLogger _collect_cpu_info _convert_to_json_dict _process_metric_to_json _collect_tensorflow_environment_variables get_benchmark_logger benchmark_context _collect_memory_info _collect_gpu_info _collect_test_environment BenchmarkBigQueryLoggerTest BenchmarkFileLoggerTest BaseBenchmarkLoggerTest BenchmarkLoggerTest LoggingMetricHook LoggingMetricHookTest Logger get_mlperf_log clear_system_caches parse_line unparse_line get_distribution_strategy per_device_batch_size GetDistributionStrategyTest PerDeviceBatchSizeTest past_stop_threshold apply_clean generate_synthetic_data SyntheticDataTest PastStopThresholdTest main input_fn define_cifar_flags get_filenames Cifar10Model parse_record run_cifar get_synth_input_fn main preprocess_image cifar10_model_fn Model override_flags_and_set_envars_for_gpu_thread_pool learning_rate_with_decay process_record_dataset vgg_model_fn define_vgg_flags get_synth_input_fn vgg_main image_bytes_serving_input_fn UploadCommand is_mask_name CheckpointerHook weight_name_of_base_name hooks_from_flags get_hooks PruningHook get_lr_tensor bias_name_of_base_name add_flags weight_name_of_mask_name base_name_of_mask_name mask_name_of_base_name prune_to_global_x zprune_all_to_global_x _prune_resnet_generic get_prune_function_by_name zweight zprune_global_x prune_structured_generic prune_resnet20_structured_discovered prune_amc_generic prune_global_x prune_all_to_global_x get_base_accuracy detexify fmt_of_method label_of_method get_accuracy_formatter order_of_method BigFixedLocator MidpointNormalize format_axes _format_times_density aggregate_trials comparison_plot get_density_formatter latexify long_label_of_method lth_plot inv_label_of_method epoch_for_epoch_plot ms_of_method color_of_method get_major_locator get_density_interpolation_formatter label_of_network get_retrain_interpolation_formatter flop_plot plot_resnet20_sparse_iterative_lth_force plot_resnet56_sparse_iterative_lth plot_resnet20_sparse_iterative_lth_force_all plot_resnet34_structured_A_lth do_plot_func plot_resnet56_sparse_iterative_lth_force_all plot_resnet110_sparse_iterative_lth plot_resnet56_sparse_iterative_epoch_for_epoch plot_resnet110_flops_best plot_resnet56_structured_A_epoch_for_epoch plot_resnet56_flops_best plot_resnet50_sparse_oneshot_lth plot_resnet56_sparse_oneshot_lth plot_resnet20_sparse_iterative_epoch_for_epoch plot_resnet50_sparse_oneshot_epoch_for_epoch plot_resnet110_structured_A_epoch_for_epoch plot_gnmt_sparse_iterative_lth_force plot_gnmt_sparse_iterative_lth_force_all plot_resnet50_sparse_iterative_lth_force plot_resnet50_flops_best plot_resnet110_structured_A_lth plot_resnet56_structured_B_epoch_for_epoch_core plot_resnet110_sparse_oneshot_epoch_for_epoch_core plot_gnmt_sparse_oneshot_lth plot_resnet56_sparse_oneshot_epoch_for_epoch plot_resnet50_sparse_iterative_lth_force_all plot_resnet110_sparse_iterative_lth_force_all plot_resnet50_sparse_iterative_lth plot_resnet110_sparse_oneshot_epoch_for_epoch plot_resnet56_structured_A_epoch_for_epoch_core plot_resnet20_flops_best plot_resnet56_sparse_oneshot_epoch_for_epoch_core plot_resnet110_sparse_iterative_lth_force plot_resnet110_structured_A_epoch_for_epoch_core plot_resnet110_sparse_iterative_epoch_for_epoch plot_resnet34_structured_A_epoch_for_epoch plot_gnmt_sparse_oneshot_epoch_for_epoch_core save_plot plot_resnet110_structured_B_epoch_for_epoch_core plot_resnet20_sparse_oneshot_epoch_for_epoch plot_resnet34_structured_B_epoch_for_epoch plot_gnmt_sparse_iterative_epoch_for_epoch plot_gnmt_sparse_iterative_lth plot_resnet56_structured_A_lth plot_resnet110_structured_B_epoch_for_epoch plot_resnet110_sparse_oneshot_lth plot_gnmt_sparse_oneshot_epoch_for_epoch main import_matplotlib plot_resnet50_sparse_oneshot_lth_core plot_resnet50_sparse_iterative_epoch_for_epoch plot_resnet56_sparse_iterative_lth_force plot_resnet20_sparse_iterative_lth plot_resnet56_sparse_oneshot_lth_core plot_resnet110_structured_B_lth plot_resnet20_sparse_oneshot_lth plot_gnmt_sparse_oneshot_lth_core plot_resnet56_structured_B_lth plot_resnet34_structured_A_epoch_for_epoch_core plot_resnet34_structured_B_lth plot_resnet56_structured_B_lth_core plot_resnet56_structured_B_epoch_for_epoch plot_resnet34_structured_B_epoch_for_epoch_core plot_resnet20_sparse_oneshot_epoch_for_epoch_core plot_resnet34_structured_A_lth_core plot_resnet50_sparse_oneshot_epoch_for_epoch_core create_readable_names_for_imagenet_labels write_warmup_requests _encode_image TPUProfilerHook define_common_hparams_flags define_common_tpu_flags _Hyperparameters load_from_input_flags get_hyperparameters load_from_hparams_overrides load_from_file ImageNetBigtableInput image_serving_input_fn ImageNetInput ImageNetTFExampleInput init_lars_optimizer poly_rate_schedule learning_rate_schedule get_lr_schedule _verify_non_empty_string main _select_tables_from_flags resnet_model_fn resnet_v1 resnet_v1_generator block_group conv2d_fixed_padding batch_norm_relu fixed_padding bottleneck_block residual_block dropblock distorted_bounding_box_crop _flip _at_least_x_are_equal _decode_and_center_crop preprocess_for_train _decode_and_random_crop preprocess_for_eval preprocess_image main main _get_path format check_call dirname float range retrain_epochs add_argument run_iterative trial base_dir version ArgumentParser parse_args method get join join print wait exit Popen join format print Exists ListDirectory Copy startswith append _get_path run _get_path join format _create_initial_state_at_checkpoint run _get_path join format _create_initial_state_at_checkpoint run _get_path join format _create_initial_state_at_checkpoint run _get_path join format _create_initial_state_at_checkpoint run _get_path join format run lottery finetune reinit lr_lottery iteration_count density lr_finetune train convert_to_tensor LuongAttention as_numpy_dtype BahdanauAttention convert_to_tensor sequence_mask map_structure dtype squeeze matmul expand_dims get_variable dtype rsqrt weight_name_of_base_name multiply square reduce_sum expand_dims mask_name_of_base_name get_variable convert_to_tensor safe_cumprod cumsum concat transpose scan clip_by_value cumprod zeros dtype sigmoid shape cast random_normal squeeze concat attention_mechanism matmul attention_layer expand_dims values convert_to_tensor concatenate reshape concat shape set_shape tile expand_dims ndims flatten int constant fill equal bitwise_and where expand_dims bitwise_or int32 tile ceil zeros float range bitcast log reduce_max where bitwise_and log ones ceil expand_dims range greater_equal tile fill float bitcast equal int constant is_nan int32 zeros dtype float32 cast create_make_unique create_topk_unique mod get_attention_probs concat to_int32 _tensor_gather_helper logical_not where div BeamSearchDecoderState set_shape map_structure to_int64 transpose accumulated_attention_probs gather_nd expand_dims range convert_to_tensor finished reduce_any one_hot log_softmax BeamSearchDecoderOutput lengths _mask_probs tile cond equal reshape log_probs logical_or reduce_all top_k_with_unique isinstance concat AttentionWrapperState reduce_mean attention_probs_from_attn_state append convert_to_tensor minimum ones_like where _length_penalty reduce_sum log expand_dims equal concat reduce_mean isinstance alignments convert_to_tensor gnmt_print set_shape constant_value one_hot reshape concat tile expand_dims _check_maybe isinstance TensorArray int initialize batch_size build_model gnmt_print num_examples_per_epoch DistributedPipeline initialize num_train_steps use_tpu_low_level_api _get_tpu_run_config AsyncCheckpointSaverHook build_model gnmt_print use_async_checkpoint make_model_fn TPUEstimator append train create_train_runner DistributedPipeline _get_tgt_sos_eos_id use_tpu batch_size create_eval_runner gnmt_print num_examples_per_epoch DistributedPipeline get_metric initialize list create_train_runner range predict INFER build_model make_model_fn RUN_STOP info make_input_fn int max_train_epochs train int _get_tpu_run_config batch_size gnmt_print TPUEstimator make_model_fn RUN_STOP info num_examples_per_epoch max_train_epochs train get_metric_from_estimator DistributedPipeline range int get_resolver choose_buckets batch_size use_synthetic_data format Exists Remove Copy run out_dir gnmt_print subword_option Summary use_borg print_out dirname append format test_year get_sacrebleu close FileWriter _convert_ids_to_strings MakeDirs info tgt_vocab_file join evaluate add_summary detokenizer_file INFER get_variable_value GLOBAL_STEP make_input_fn predict int master batch_size tpu_name TPUClusterResolver num_examples_per_epoch initialize build_model gnmt_print TRAIN create_train_runner make_input_fn ceil int examples_to_infer infer_batch_size initialize INFER build_model create_eval_runner make_input_fn num_gpus create_train_runner_and_build_graph Estimator make_input_fn TRAIN get_distribution_strategy int list use_tpu_low_level_api _get_tpu_run_config latest_checkpoint create_eval_runner_and_build_graph make_model_fn TPUEstimator out_dir _get_tgt_sos_eos_id predict get_global_step round TRAIN list hooks_from_flags TRAIN make_input_fn values assert_same_structure map_structure tpu_name master constant slice load_embed_txt load_vocab print_out array weight_name_of_base_name multiply mask_name_of_base_name _create_pretrained_emb_from_txt get_variable fixed_size_partitioner MaskedLayerNormLSTMCell ResidualWrapper MaskedLSTMCell print_out MaskedNasCell CellWrapper MaskedGRUCell __name__ append print_out single_cell_fn range _cell_list clip_by_global_norm register add_argument add_hparam setattr hasattr language_model embed_prefix vocab_prefix src share_vocab residual tgt Exists _add_argument num_decoder_layers gnmt_print num_embeddings_partitions check_vocab print_out out_dir num_encoder_layers print_hparams extend_hparams maybe_parse_standard_hparams seed jobid set_random_seed print_out hparams_path MakeDirs out_dir random_seed create_or_load_hparams int num_train_steps train_fn use_tpu_low_level_api run_main print out_dir checkpoints_iterator gnmt_print train_and_eval_with_low_level_api num_tpu_workers eval_fn RUN_STOP info create_hparams train_and_eval_fn DEFINE_float DEFINE_string CheckpointerHook get_prune_function_by_name PruningHook set append split map set int norm format zeros_like print reshape tuple argsort sum len percentile sum list format concatenate print map ravel shape zip append abs prod mean abs percentile sum list format concatenate print map ravel shape zip append abs prod percentile sum list format concatenate print map ravel shape zip abs prod percentile sum format print size ravel zip zeros abs percentile sum format print zweight ravel shape zip zeros abs prod float match group items tuple range Counter len _get_ngrams exp Counter zip float sum range len _bleu lstrip strip sub _clean zip append compute_bleu split constant EOS_CHAR_ID prefetch shard cache group_by_window map skip gnmt_print apply lookup filter cast int32 repeat zip batching_func constant EOS_CHAR_ID map gnmt_print lookup cast int32 batching_func cast float32 getter decode isinstance print write encode flush sorted list print_out keys values print_out encode append isinstance len format_spm_text format_text tolist format_bpe_text encode as_list uint8 decode_raw to_int32 concat reshape info fill join basename Exists load_vocab print_out len index_table_from_file dict join format urlretrieve st_size _regularize_1m_dataset print extractall mkdtemp ListDirectory stat Copy _regularize_20m_dataset MakeDirs info PY2 join _transform_csv DeleteRecursively join _transform_csv DeleteRecursively _download_and_clean float32 astype ratings_csv_to_dataframe merge apply DEFINE_enum DEFINE_string data_dir download dataset join urlretrieve extractall stat makedirs uint8 decode_raw reshape transpose float32 cast int32 preprocess_image per_image_standardization resize_image_with_crop_or_pad random_crop random_flip_left_right FixedLengthRecordDataset get_filenames learning_rate_with_decay reshape adopt_module_key_flags define_resnet_flags set_defaults image_bytes_as_serving_input fatal resnet_main sample_distorted_bounding_box random_flip_left_right decode_and_crop_jpeg extract_jpeg_shape stack unstack shape expand_dims minimum int32 cast float32 shape _smallest_size_at_least _aspect_preserving_resize _decode_crop_and_flip _central_crop _resize_image set_shape decode_jpeg pad format multiply conv2d fixed_padding get_variable conv2d_fixed_padding batch_norm projection_shortcut relu conv2d_fixed_padding projection_shortcut batch_norm relu conv2d_fixed_padding batch_norm projection_shortcut relu conv2d_fixed_padding projection_shortcut batch_norm relu block_fn range map_and_batch info shuffle override_threadpool apply repeat PrivateThreadPool prefetch placeholder map_fn num_gpus str cpu_count tf_gpu_thread_mode info model image add_n in_top_k learning_rate_fn _dense_grad_filter model_class get_collection identity get_lr_tensor apply_gradients cast get_or_create_global_step MomentumOptimizer group mean compute_gradients sparse_softmax_cross_entropy flag_values_dict float32 accuracy UPDATE_OPS scalar NewCheckpointReader build_tensor_serving_input_receiver_fn get_num_gpus apply_clean model_dir get_tf_dtype get_distribution_strategy list hooks Estimator lth_generate_predictions log_run_info lth_no_pruning export_savedmodel get_benchmark_logger use_synthetic_data image_bytes_as_serving_input predict max_train_steps export_dir lth_prediction_result_dir partial latest_checkpoint get_tensor get_train_hooks tf_gpu_thread_mode MakeDirs info all_reduce_alg ConfigProto pretrained_model_checkpoint_path evaluate override_flags_and_set_envars_for_gpu_thread_pool hooks_from_flags flag_values_dict min WarmStartSettings log_evaluation_result FLAGS train RunConfig DEFINE_boolean DEFINE_enum add_flags dict define_benchmark DEFINE_bool define_performance adopt_module_key_flags define_image define_base DEFINE_string reshape list keys get_or_create_global_step uuid4 join str mkstemp MakeDirs register int min linspace ceil range len items list reshape feature_map shape range list write map values format length cpu_count Remove warning MakeDirs info Pool cpu_count items list set_default parse_flags_with_usage unparse_flags define_image define_base define_benchmark define_performance DEFINE_boolean join DEFINE_list DEFINE_integer DEFINE_float append DEFINE_string list_local_devices DEFINE_enum DEFINE_string join format append DEFINE_string DEFINE_integer append DEFINE_enum DEFINE_enum DEFINE_string DEFINE_bool DEFINE_integer get get format lower warning append hook_name BaseBenchmarkLogger benchmark_log_dir BenchmarkBigQueryLogger BenchmarkFileLogger BigQueryUploader acquire config_benchmark_logger config_benchmark_logger on_finish _collect_tensorflow_info _collect_cpu_info _collect_tensorflow_environment_variables _collect_memory_info _collect_run_params _collect_gpu_info _collect_test_environment type warning _convert_to_json_dict cpu_count get_cpu_info physical_device_desc _parse_gpu_model list_local_devices len total available virtual_memory on_gcp partition split match strip format test_mlperf_log_pip_version call format format info map_structure model_dir format DeleteRecursively info define_vgg_flags vgg_main model image add_n in_top_k learning_rate_fn _dense_grad_filter model_class get_collection identity get_lr_tensor apply_gradients cast get_or_create_global_step MomentumOptimizer group mean compute_gradients sparse_softmax_cross_entropy flag_values_dict float32 accuracy UPDATE_OPS scalar NewCheckpointReader build_tensor_serving_input_receiver_fn get_num_gpus apply_clean model_dir get_tf_dtype get_distribution_strategy list hooks Estimator lth_generate_predictions log_run_info lth_no_pruning export_savedmodel get_benchmark_logger use_synthetic_data image_bytes_as_serving_input predict max_train_steps export_dir lth_prediction_result_dir partial latest_checkpoint get_tensor get_train_hooks tf_gpu_thread_mode MakeDirs info all_reduce_alg ConfigProto pretrained_model_checkpoint_path evaluate override_flags_and_set_envars_for_gpu_thread_pool hooks_from_flags flag_values_dict min WarmStartSettings log_evaluation_result FLAGS train RunConfig DEFINE_boolean DEFINE_enum add_flags dict define_benchmark DEFINE_bool define_performance adopt_module_key_flags define_image define_base DEFINE_string DEFINE_bool shape prod max min mean median std update update rcParamsDefault set_linewidth set_visible set_ticks_position set_color set_tick_params sorted format subplots errorbar plot set_title label_of_network set_ylim retrain_method set mean retrain_time index twinx agg sort_values fmt_ax values subplots grid capitalize set_minor_locator label_of_method set_major_formatter get_accuracy_formatter max show sorted set_major_locator list set_title NullLocator format_axes set_xlabel retrain_method get_density_formatter set_tight_layout scatter legend append sort_values range long_label_of_method format errorbar MaxNLocator set_xlim set get_major_locator test_acc set_xscale set_size_inches label_of_network set_ylabel figure get_legend_handles_labels array set_ylim len subplots grid capitalize set_major_formatter get_accuracy_formatter show set_major_locator list sorted set_title format_axes set_xlabel axvline retrain_method set_tight_layout scatter legend append sort_values range format errorbar MaxNLocator set_xlim set get_major_locator pop set_size_inches label_of_network index set_ylabel figure fill_between get_legend_handles_labels Patch array set_ylim len subplots arange capitalize get_data MultipleLocator label_of_method set_major_formatter max MidpointNormalize set_major_locator format_axes set_title set_xlabel colorbar imshow set_tight_layout density_data legend retrain_time_data range format attrgetter set_label plot network get_cmap get_density_interpolation_formatter enumerate label_of_network set_ylabel get_retrain_interpolation_formatter array len update chmod use mkdtemp rmtree register umask join str get_fignums close savefig figure makedirs lth_plot lth_plot lth_plot lth_plot lth_plot lth_plot lth_plot lth_plot lth_plot lth_plot lth_plot lth_plot lth_plot lth_plot lth_plot lth_plot lth_plot lth_plot lth_plot lth_plot lth_plot lth_plot lth_plot lth_plot lth_plot lth_plot lth_plot lth_plot lth_plot lth_plot lth_plot epoch_for_epoch_plot epoch_for_epoch_plot epoch_for_epoch_plot epoch_for_epoch_plot epoch_for_epoch_plot epoch_for_epoch_plot epoch_for_epoch_plot epoch_for_epoch_plot epoch_for_epoch_plot epoch_for_epoch_plot epoch_for_epoch_plot epoch_for_epoch_plot epoch_for_epoch_plot epoch_for_epoch_plot epoch_for_epoch_plot epoch_for_epoch_plot epoch_for_epoch_plot epoch_for_epoch_plot epoch_for_epoch_plot epoch_for_epoch_plot epoch_for_epoch_plot epoch_for_epoch_plot epoch_for_epoch_plot epoch_for_epoch_plot epoch_for_epoch_plot epoch_for_epoch_plot epoch_for_epoch_plot RESNET20 flop_plot RESNET50 flop_plot RESNET56 flop_plot RESNET110 flop_plot save_plot func functions format urlretrieve readlines len split fromarray BytesIO save join MkDir isinstance DEFINE_string DEFINE_bool DEFINE_integer DEFINE_string iteritems basename warn get_flag_value string_types isinstance parser type split _Hyperparameters placeholder map_fn constant get_or_create_global_step subtract maximum warn where polynomial_decay LARSOptimizer poly_rate_schedule floor where get_lr_schedule get_global_step one_hot isinstance reshape transpose init_lars_optimizer sqrt build_network CrossShardOptimizer learning_rate_schedule softmax_cross_entropy bigtable_eval_prefix bigtable_column_family bigtable_column_qualifier _verify_non_empty_string bigtable_table bigtable_train_prefix bigtable_instance TPUClusterResolver add_warmup_requests model_dir TPUEstimator bigtable_table _load_global_step_from_checkpoint_dir max _select_tables_from_flags hparams AsyncCheckpointSaverHook write_warmup_requests lth_no_pruning append predict bigtable_instance default_hparams_file latest_checkpoint export_saved_model get_hyperparameters TPUProfilerHook steps_per_eval time evaluate hooks_from_flags min model_name hparams_file RunConfig batch_normalization ones_initializer zeros_initializer relu as_list dtype format size min logical_and float32 reduce_sum shape cast random_uniform info meshgrid expand_dims reduce_min range conv2d_fixed_padding batch_norm_relu conv2d_fixed_padding dropblock batch_norm_relu block_fn range int32 cast equal distorted_bounding_box_crop _at_least_x_are_equal constant shape extract_jpeg_shape cond minimum float32 decode_and_crop_jpeg extract_jpeg_shape stack cast int32 random_flip_left_right convert_image_dtype reshape _flip _decode_and_random_crop convert_image_dtype _decode_and_center_crop reshape value tpu warmup_steps format wall_time step summary_iterator input_fn MkDir train_steps eval_batch_size sorted list str add sleep ImageNetInput mtime_nsec group set use_fast_lr ListDirectory match train_batch_size | # Comparing Rewinding and Fine-tuning in Neural Network Pruning This is the code and data for the paper [Comparing Rewinding and Fine-tuning in Neural Network Pruning](https://openreview.net/forum?id=S1gSj0NKvB). ``` @inproceedings{renda2020comparing, title={Comparing Rewinding and Fine-tuning in Neural Network Pruning}, author={Renda, Alex and Frankle, Jonathan and Carbin, Michael}, booktitle={International Conference on Learning Representations}, year={2020}, url={https://openreview.net/forum?id=S1gSj0NKvB} } | 2,836 |
louis2889184/gnn_few_shot_cifar100 | ['few shot learning', 'active learning'] | ['Few-Shot Learning with Graph Neural Networks'] | argument.py data.py trainer.py gnn.py utils.py main.py print_args parser self_DataLoader count_data self_Dataset Graph_conv_block GNN_module Adjacency_layer main EmbeddingCNN GNN gnnModel tensor2cuda myModel Trainer np2cuda create_logger mkdir add_argument ArgumentParser items list format print info list keys Trainer create_logger self_Dataset load_model sum model_root pretrain test mean mkdir info setattr todo log_root load join int load_dir pretrain_dir print get_few_data_list self_DataLoader print_args data_root get_full_data_list load_pretrain train len from_numpy cuda is_available is_available cuda join getLogger addHandler StreamHandler DEBUG setLevel INFO FileHandler | louis2889184/gnn_few_shot_cifar100 | 2,837 |
lourdescrivelli/plotmachines_sample | ['story generation'] | ['PlotMachines: Outline-Conditioned Generation with Dynamic Plot State Tracking'] | pm_preprocessing.py pm_pkl.py tfmclassifier debug_memory convert_keys_to_str fake_paragraph trim_body sorting clean_top_features model eval unsqueeze tensor sum cuda range len items list format print Counter ru_maxrss split sorted endswith strip append split sorting startswith append range len range len | # plotmachines_sample Testing Reproducibility of PlotMachines Paper (https://arxiv.org/abs/2004.14967) Custom preprocessing for the PlotMachines Paper . Original code can be found at: https://github.com/hrashkin/plotmachines ### What is different? #### Sample Database The original paper uses Wikiextractor. Currently, there seems to be a bug with this repository, so I was unable to reproduce the original data. Instead, I have used a sample plots and titles database provided by Wikiplots (https://github.com/markriedl/WikiPlots) Since there is no concept of paragraphs in the sample database, I added a custom function to arbitrary split the paragraphs into Introduction, Body and Conclusion. [pm_preprocessing.py] builds on the original code from [extract_outlines.py] so that it can work with the new database. The original [extract_outlines.py] can be found at : https://github.com/hrashkin/plotmachines/blob/master/src/preprocessing/extract_outlines.py | 2,838 |
lowresource-lang-eval/morphology_scripts | ['morphological analysis'] | ['LowResourceEval-2019: a shared task on morphological analysis for low-resource languages'] | generators/evenki_paradigm_generator.py converters/convert_unimorph.py converters/esm_utils.py analysis/__init__.py converters/language_utils.py evaluation/evaluation_ud.py converters/eaf_utils.py converters/ud_converter.py evaluation/evaluation_syn.py evaluation/stats_processor.py generators/__init__.py converters/count_stats.py evaluation/corpora_validation.py converters/evenki_lals_converter.py converters/split_file.py evaluation/evaluation_morph.py converters/esm_converter.py get_analysis get_fon_words_by_id get_translation_by_sentence is_eaf determinePOS get_annotation_value_from_element get_tokens_by_sentence get_text_data get_pos_by_id get_fons_by_id get_sentences get_root get_gloss_by_id get_element_id convert_file_conll normalize_token write_token_data get_features normalize_wordform convert_file_morpheme normalize_glosses normalize_tokens normalize_features convert_folder_morpheme normalize_morphemes write_all_tokens_data write_token_data_morpheme convert_folder_conll normalize_pos get_lemma main write_all_tokens_data_morpheme is_derivative write_comment_data get_sentence_borders get_event_number get_tokens_by_sentence get_text_data get_tier_data get_root is_esm get_tier convert_file_conll write_token_data read_feature_table get_features is_non_indicative_feature modify_features is_singular_feature encodePOS has_cyrillic convert_file_morpheme write_single_token_data normalize_gloss is_imperfective_feature normalize_tokens normalize_features convert_folder_morpheme write_all_tokens_data write_token_data_morpheme add_default_features convert_folder_conll add_default_features_verbal is_non_finite_feature is_non_nominative_case_feature generate_number get_lemma is_non_futurum_feature main guessPOS write_all_tokens_data_morpheme add_default_features_nominal is_non_singular_feature read_file_sentence_ids processPOS write_comment_data is_cyrillic is_adjective_gloss normalize_token is_c_conjunction_translation is_slip_unknown is_special_noun_stem is_proper_noun_translation is_slip is_adjective_translation normalize_gloss is_personal_pronoun has_prefix normalize_tokens make_replacements is_pronoun_translation is_proper_noun_gloss transliterate get_russian_pos_set contains is_special_verbal_form is_interjection_translation is_adverb_translation is_cyrillic_only main is_s_conjunction_translation is_code_switching is_similar is_noun_gloss is_numeric_translation is_determiner_translation is_derivative is_verb_gloss is_noun_negation is_adverb_gloss get_unimorph_features convert_pos convert_wordforms is_feature_bad_for_pos read_features_from_filename convert_corpus get_wordforms process_special_feature process_possesive add_obligatory_markers write_wordforms_to_file is_typo main is_multiword is_to_ignore main validate write_results check_morphs_and_tags evaluate compare_boundaries list_boundaries_and_tags input_files compare main initialize_evaluation main read_lines evaluate_syn compare_files_syn is_lemma_equal read_lines is_pos_equal evaluate_ud compare_files_ud main compare_features main count_corpus_stats check_conll_file get_translation_by_sentence get_annotation_value_from_element get_tokens_by_sentence dict get_sentences get_root append findall get_analysis get_fon_words_by_id get_annotation_value_from_element determinePOS dict append get_element_id get_element_id get_annotation_value_from_element get_fons_by_id get_gloss_by_id append get_element_id get_element_id get_pos_by_id parse text attrib print basename write get_text_data write_all_tokens_data write_comment_data enumerate write replace write_token_data str write_single_token_data normalize_token normalize_pos normalize_features normalize_glosses get_features normalize_wordform get_lemma normalize_morphemes is_derivative range len append split add list add_default_features endswith strip add read_feature_table set append sorted print basename write get_text_data write_all_tokens_data_morpheme enumerate write_token_data_morpheme normalize_token strip write range len read_file_sentence_ids convert_folder_morpheme print get_sentence_borders get_tier_data range append startswith get_tier dict get_event_number text get_tier add normalize_tokens generate_number len normalize_tokens basename write add normalize_features get_features append processPOS get_lemma str print is_slip_unknown modify_features append remove is_non_singular_feature is_singular_feature append append is_adjective_gloss is_c_conjunction_translation is_slip_unknown is_special_noun_stem is_proper_noun_translation is_slip is_adjective_translation normalize_gloss add is_personal_pronoun range is_pronoun_translation get_russian_pos_set is_special_verbal_form is_interjection_translation is_adverb_translation is_s_conjunction_translation is_code_switching is_noun_gloss is_numeric_translation is_determiner_translation is_verb_gloss is_noun_negation is_adverb_gloss len is_cyrillic dict dict join sorted list keys is_adverb_gloss startswith replace strip upper sub is_cyrillic_only normalize_token normalize_gloss range len make_replacements lower items list sub normalize_gloss normalize_gloss dict get convert_pos print is_feature_bad_for_pos set add process_special_feature startswith split process_possesive print add set split add_obligatory_markers sorted convert_wordforms set get_wordforms write_wordforms_to_file read_features_from_filename convert_corpus validate update join add split append len difference intersection len update check_morphs_and_tags compare_boundaries list_boundaries_and_tags update len strip write close split compare range open print OrderedDict write_results initialize_evaluation input_files evaluate print compare_files_syn min len distance zip float read_lines split evaluate_syn print compare_files_ud int print strip dict startswith append compare_features float read_lines split len split intersection set evaluate_ud dict set items list sorted print check_conll_file count_corpus_stats | lowresource-lang-eval/morphology_scripts | 2,839 |
lquirosd/P2PaLA | ['document layout analysis'] | ['Multi-Task Handwritten Document Layout Analysis'] | utils/get_inference_model.py P2PaLA.py data/transforms.py utils/show_mask.py data/imgprocess.py utils/optparse.py evalTools/page2page_eval.py utils/art.py utils/polyapprox.py nn_models/models.py setup.py utils/img_to_page.py data/dataset.py page_xml/xmlPAGE.py utils/misc.py evalTools/metrics.py main check_inputs tensor2img save_checkpoint create_version_file get_requirements git_commit git_branch build_py get_scripts _git_output git_is_dirty htrDataset build_baseline_offset htrDataProcess _processData symlink_force normalizeTensor affine normalizeArray randomFlip elastic toTensor build_transforms poly_intersect zone_map pixel_accuraccy poly_area freq_weighted_IU mean_accuraccy levenshtein jaccard_index matching_structure mean_IU area_bin per_class_accuraccy main compute_metrics buildDNet uSkipBlock on_dropout weights_init_normal off_dropout size_splits buildUnet zero_bias pageData make_maze main get_model main check_input_folder Arguments one_axis_delta poly_approx norm_trace points_to_str main ones size transpose numpy cuda cat join checkpoints format str save info tr_data te_data warning do_train tr_img_list do_val te_label_list prod_data prod_img_list cont_train check_input_folder format do_prod val_img_list tr_label_list val_data error val_label_list te_img_list prev_model do_test gt_xml_list tr_data pre_process setLevel do_val critical seed str nnD add_text addHandler on_dropout squeeze htrDataset Adam num_params load_state_dict do_prior do_prod do_off StreamHandler img_size manual_seed info lossD keys FileHandler enumerate join time error parameters label_list step getLogger zero_grad DataLoader save_checkpoint do_train tr_img_list max list nnG htrDataProcess apply to fix_class_imbalance g_loss w check_inputs save_prob_mat lossG INFO hyp_xml_list weights_init_normal epochs array warning DEBUG output_channels exit cont_train range detach state_dict use_gpu dump type set_default_tensor_type load use_gan prev_model Formatter img_list do_test split add_scalar do_class loss_lambda arguments off_dropout device log_file prior open checkpoints use_global_log FloatTensor compute_metrics work_dir build_transforms set_label_list cat setFormatter SummaryWriter parse format inf debug size close tr_label_list val_data set_img_list backward any makedirs strip devnull open join dirname join dump format imwrite isfile parse print build_baseline_mask close dirname build_mask resize imread array pageData open symlink int LineString parallel_offset astype affine normalizeTensor flip_img affine_trans elastic append randomFlip elastic_def toTensor PFT_EVENODD PT_SUBJECT Pyclipper PT_CLIP CT_INTERSECTION AddPath Execute show poly_intersect poly_area fillConvexPoly imshow zeros imread sum range enumerate len threshold get_zones dist where sorted list THRESH_OTSU shape append imread sum pageData parse format astype copy zip fill keys enumerate int uint8 print THRESH_BINARY fillConvexPoly isfile unravel_index zeros size unique zeros sum enumerate per_class_accuraccy eps size unique zeros sum enumerate jaccard_index jaccard_index unique minimum arange tuple size add array decode getLogger communicate freq_weighted_IU build_mask DEBUG setLevel Popen values list regions_colors addHandler len get_size OrderedDict mkstemp dirname mean_IU sum range pageData per_class_accuraccy update setFormatter pixel_accuraccy parse format debug StreamHandler set info zip float enumerate items sort mean_accuraccy Formatter zeros array split print size uniform_ data __name__ data constant __name__ __name__ __name__ randrange walk zip load join save get_model save_xml tuple strip basename RETR_EXTERNAL shape imread pageData glob findContours astype new_page zip uint8 items add_element CHAIN_APPROX_SIMPLE reshape extend dict glob join extend dirname eps inf argmin delta fill zeros range sum cumsum sqrt zeros next range enumerate show int subplots set_title ndim subplots_adjust sqrt imshow floor ceil argmax | P2PaLA ====== :exclamation::exclamation: P2PaLA is deprecated :exclamation::exclamation: [](https://www.python.org/) [](https://github.com/ambv/black) Page to [PAGE](http://www.primaresearch.org/tools/PAGELibraries) Layout Analysis (P2PaLA) is a toolkit for Document Layout Analysis based on Neural Networks. :boom: Try our new [DEMO](http://prhlt-carabela.prhlt.upv.es/tld/) for online baseline detection. :exclamation::exclamation: If you find this toolkit useful in your research, please cite: ``` @misc{p2pala2017, | 2,840 |
lrjconan/GRAN | ['graph generation'] | ['Efficient Graph Generation with Graph Recurrent Attention Networks'] | utils/data_parallel.py utils/train_helper.py utils/logger.py utils/dist_helper.py runner/__init__.py utils/arg_helper.py utils/setup.py run_exp.py runner/gran_runner.py utils/data_helper.py dataset/gran_data.py model/__init__.py dataset/__init__.py model/gran_mixture_bernoulli.py utils/vis_helper.py utils/eval_helper.py main GRANData GNN mixture_bernoulli_loss GRANMixtureBernoulli compute_edge_ratio get_graph GranRunner evaluate get_config parse_arguments mkdir edict2dict graph_load_batch pick_connected_component_new load_graph_list create_graphs preprocess_graph_list save_graph_list DataParallel _check_balance emd kernel_parallel_worker l2 gaussian_tv gaussian compute_mmd disc gaussian_emd kernel_parallel_unpacked compute_emd clean_graphs spectral_stats clustering_worker degree_worker is_lobster_graph degree_stats find_nearest_idx spectral_worker clustering_stats edge_list_reindexed orca orbit_stats_all eval_acc_lobster_graph motif_stats get_logger setup_logging data_to_gpu snapshot load_model EarlyStopper draw_graph_list draw_graph_list_separate log_level save_dir seed exit comment pprint parse_arguments run_id manual_seed_all format get_config config_file test info manual_seed setup_logging join print train view float log_softmax reshape repeat_interleave logsumexp expand mean stack device to sum scatter_add number_of_nodes from_numpy_matrix asmatrix spectral_stats clustering_stats orbit_stats_all degree_stats parse_args add_argument ArgumentParser load str join format dump edict2dict exp_dir getpid mkdir save_dir run_id edict resume_dir exp_name open items list isinstance makedirs connected_component_subgraphs max list sorted subgraph min to_dict_of_lists keys range connected_component_subgraphs list selfloop_edges pick_connected_component_new convert_node_labels_to_integers remove_edges_from max range len connected_component_subgraphs list selfloop_edges pick_connected_component_new convert_node_labels_to_integers remove_edges_from max range len selfloop_edges arange number_of_nodes subgraph max str list map append range add_edges_from format Graph astype remove_edges_from remove_nodes_from add_node join isolates print loadtxt graph_load_batch random_lobster RandomState grid_2d_graph format print mean number_of_edges append max range warn_imbalance hstack astype float max len norm emd hstack astype float max len norm hstack astype float max len hstack astype float sum max len argmin find_nearest_idx array shuffle append print compute_mmd now append range array degree_histogram len sum todense histogram eigvalsh print compute_mmd now spectral_worker append range len list histogram values list print compute_mmd now histogram append range values len dict nodes append edges str remove number_of_nodes check_output strip write close len edge_list_reindexed number_of_edges find array open number_of_nodes compute_mmd orca append sum number_of_nodes compute_mmd orca append sum array is_lobster_graph is_tree remove_nodes_from nodes len setFormatter basicConfig addHandler StreamHandler upper Formatter getattr setLevel load join dump edict2dict save save_dir edict open load load_state_dict spring_layout subplot draw_networkx_nodes spectral_layout switch_backend close tight_layout subplots_adjust savefig xticks draw_networkx_edges enumerate yticks spring_layout draw_networkx_nodes format spectral_layout switch_backend draw axis tight_layout close savefig draw_networkx_edges enumerate | # GRAN This is the official PyTorch implementation of [Efficient Graph Generation with Graph Recurrent Attention Networks](https://arxiv.org/abs/1910.00760) as described in the following NeurIPS 2019 paper: ``` @inproceedings{liao2019gran, title={Efficient Graph Generation with Graph Recurrent Attention Networks}, author={Liao, Renjie and Li, Yujia and Song, Yang and Wang, Shenlong and Nash, Charlie and Hamilton, William L. and Duvenaud, David and Urtasun, Raquel and Zemel, Richard}, booktitle={NeurIPS}, year={2019} } ``` | 2,841 |
lsw9021/MASS | ['imitation learning'] | ['Muscle-actuated Human Simulation and Control'] | python/Model.py python/main.py EpisodeBuffer ReplayBuffer PPO Plot MuscleBuffer MuscleNN SimulationNN weights_init show plot pause shape title clf ylim figure zeros sum range xavier_uniform_ weight __name__ zero_ | # MASS(Muscle-Actuated Skeletal System)  ## Abstract This code implements a basic simulation and control for full-body **Musculoskeletal** system. Skeletal movements are driven by the actuation of the muscles, coordinated by activation levels. Interfacing with python and pytorch, it is available to use Deep Reinforcement Learning(DRL) algorithm such as Proximal Policy Optimization(PPO). ## Publications Seunghwan Lee, Kyoungmin Lee, Moonseok Park, and Jehee Lee Scalable Muscle-actuated Human Simulation and Control, ACM Transactions on Graphics (SIGGRAPH 2019), Volume 37, Article 73. Project Page : http://mrl.snu.ac.kr/research/ProjectScalable/Page.htm Youtube : https://youtu.be/a3jfyJ9JVeM | 2,842 |
ltgoslo/diachronic_armed_conflicts | ['word embeddings'] | ['One-to-X analogical reasoning on word embeddings: a case for diachronic armed conflict prediction from news texts'] | multanalogies_diachronic.py transform_diachronic.py multanalogies_synchronic.py helpers.py ttest.py visualize estimate_sims jaccard load_embeddings tag_ud normalequation load_dataset get_vector learn_projection predict calc_accuracies T mat savetxt normalequation zeros vector_size range len pinv mat T eye load load_word2vec_format init_sims list sorted print set add zip read_csv T asarray mat squeeze dot T asarray most_similar mat squeeze dot lower content len intersection show Circle replace PCA close set add_artist add clf scatter savefig legend zip annotate tick_params fit_transform | # Diachronic Armed Conflicts Diachronic armed conflicts prediction with news texts and word embeddings Code and data for the paper: [*One-to-X analogical reasoning on word embeddings: a case for diachronic armed conflict prediction from news texts*](https://aclweb.org/anthology/papers/W/W19/W19-4724/) (in Proceedings of the 1st International Workshop on Computational Approaches to Historical Language Change, 2019) by Andrey Kutuzov, Erik Velldal and Lilja Øvrelid ## Embeddings models Word embeddings we trained can be found at the [NLPL Vectors repository](http://vectors.nlpl.eu/repository/): - [CBOW incremental embeddings for Gigaword (1995-2010)](http://vectors.nlpl.eu/repository/11/191.zip) - [CBOW incremental embeddings for News on the Web (2010-2017)](http://vectors.nlpl.eu/repository/11/192.zip) ## Running | 2,843 |
ltgoslo/norec_fine | ['sentiment analysis'] | ['A Fine-Grained Sentiment Dataset for Norwegian'] | convert_to_bio.py data_analysis.py restart_orphans get_bio_expression get_bio_holder to_bio get_bio_target create_bio_labels replace_with_labels add_to_dist int format zip split append enumerate int format zip split append enumerate int split zip append enumerate index enumerate enumerate restart_orphans get_bio_expression extend get_bio_holder get_bio_target replace_with_labels append create_bio_labels enumerate split zeros | # NoReC_fine This dataset is based largely on the original data described in the paper _A Fine-Grained Sentiment Dataset for Norwegian_ by L. Øvrelid, P. Mæhlum, J. Barnes, and E. Velldal, accepted at LREC 2020, [paper available](https://www.aclweb.org/anthology/2020.lrec-1.618). However, we have since added annotations for another 3476 sentences, increasing the overall size and scope of the dataset. ## Overview While the previously released dataset [NoReC_eval](https://github.com/ltgoslo/norec_eval) labeled sentences as to whether they are _evaluative_ or sentiment-bearing, NoReC_fine expands on these annotations by labeling _polar expressions_, _opinion holders_ and _opinion targets_. This data comprises roughly 11,000 sentences across more than 400 reviews and 10 different thematic categories (literature, products, restaurants, etc.), taken from a subset of the [Norwegian Review Corpus](https://github.com/ltgoslo/norec) (NoReC; [Velldal et al. 2018](http://www.lrec-conf.org/proceedings/lrec2018/pdf/851.pdf)). The data comes with a predefined train/dev/test split (inherited from NoReC), and some key statistics are summarized in the table below, including frequency counts and average token lengths. | Type | Train | Dev | Test | Total | | :-------- |-------:|-------:|-------: |-------: | | Sentences | 8634 | 1531 | 1272 | 11437 | | --- subjective | 4555 | 821 | 674 | 6050 | | --- multiple polarities | 660 | 120 | 91 | 871 | | --- avg. len | 16.7 | 16.9 | 17.2 | 16.8 | | 2,844 |
lthngan/Reformulating-Level-Sets-as-Deep-Recurrent-Neural-Network-Approach-to-Semantic-Segmentation | ['semantic segmentation'] | ['Reformulating Level Sets as Deep Recurrent Neural Network Approach to Semantic Segmentation'] | stage_bridge_layer_mod.py proposal_layer.py generate_data.py levelset_layer.py gru_layer.py mask_layer.py gen_phi sigmoid tanh GRULayer LevelSetLayer MaskLayer ProposalLayer StageBridgeLayer int arange disk dilation ceil zeros round max | lthngan/Reformulating-Level-Sets-as-Deep-Recurrent-Neural-Network-Approach-to-Semantic-Segmentation | 2,845 |
lturing/Tools | ['speech synthesis'] | ['Hierarchical Generative Modeling for Controllable Speech Synthesis'] | tools.py _is_chinese_char | # Tools - **[github 代理](https://hub.fastgit.org/)** --------------------------- - **[Audio Volume Manipulation](https://trac.ffmpeg.org/wiki/AudioVolume)** [issue](https://github.com/mozilla/common-voice/issues/336) --------------------------- - maven helloworld ``` mvn archetype:generate ``` ------------------- | 2,846 |
luanfujun/deep-photo-styletransfer | ['style transfer'] | ['Deep Photo Style Transfer'] | gen_all.py | # deep-photo-styletransfer Code and data for paper "[Deep Photo Style Transfer](https://arxiv.org/abs/1703.07511)" ## Disclaimer **This software is published for academic and non-commercial use only.** ## Setup This code is based on torch. It has been tested on Ubuntu 14.04 LTS. Dependencies: * [Torch](https://github.com/torch/torch7) (with [matio-ffi](https://github.com/soumith/matio-ffi.torch) and [loadcaffe](https://github.com/szagoruyko/loadcaffe)) * [Matlab](https://www.mathworks.com/) or [Octave](https://www.gnu.org/software/octave/) CUDA backend: | 2,847 |
lucashu1/land-cover | ['scene classification', 'semantic segmentation'] | ['SEN12MS -- A Curated Dataset of Georeferenced Multi-Spectral Sentinel-1/2 Imagery for Deep Learning and Data Fusion'] | one_time_scripts/count_landuse_zeros.py sen12ms_dataLoader.py datagen.py one_time_scripts/save_segmentation_patches_to_npy.py models.py one_time_scripts/save_classification_subpatches_to_npy.py land_cover_utils.py classify.py one_time_scripts/get_locations_for_every_scene.py evaluate_predictions.py train_fc_densenet_on_continent train_segmentation_model_on_scene_dirs train_fc_densenet_on_continent_cluster train_competition_unet train_fc_densenet_on_season get_train_val_scene_dirs get_competition_train_val_scene_dirs train_fc_densenets_per_cluster_in_continent predict_saved_models_on_each_scene predict_model_path_on_all_patches save_segmentation_predictions_on_scene_dir predict_model_path_on_in_cluster_patches train_competition_fc_densenet main predict_model_path_on_each_scene train_segmentation_model_on_patch_paths predict_saved_models predict_model_path_on_validation_set save_segmentation_predictions_on_patch_paths SegmentationDataGenerator color_aug scene_dir_to_season_scene get_segmentation_model_prediction_dirs get_segmentation_label_prediction_from_scene_patch get_scene_prediction_dirs_for_continent get_sorted_patch_ids_from_scene_dir get_scene_prediction_dirs_for_season get_train_val_season_scenes get_seasons_label_encoder json_keys_to_int get_subpatch_paths_for_scene_dir get_label_encoder get_segmentation_patch_paths_for_scene_dir combine_landuse_classes get_scene_dirs_for_continent get_subpatch_paths_for_scene_dirs make_history_json_serializable get_landuse_labels get_segmentation_patch_paths_for_scene_dirs scene_to_subpatches get_continents_label_encoder patch_to_subpatches patch_path_to_geo_info geo_info_to_patch_path get_scene_dirs_for_continent_season get_scene_dirs_for_season get_missing_landuse_classes_from_onehot_labels get_represented_landuse_classes_from_onehot_labels get_patch_paths_in_cluster get_all_patch_paths_from_df get_compiled_fc_densenet get_custom_loss get_callbacks get_compiled_resnet get_compiled_unet SEN12MSDataset Seasons S2Bands LCBands Sensor S1Bands get_country_from_lat_long get_latlng_country_continent_from_season_and_scene_id main get_subpatch_save_path get_s1_s2_landuse_dfc_save_path main seed int list tolist set len append any set join format imwrite print predict_generator reshape astype shape SegmentationDataGenerator zip get_segmentation_patch_paths_for_scene_dir argmax exists savez_compressed makedirs patch_path_to_geo_info join format print predict_generator reshape astype shape SegmentationDataGenerator dirname zip argmax savez_compressed makedirs join get_compiled_fc_densenet format print get_scene_dirs_for_continent_season load_weights get_compiled_unet save_segmentation_predictions_on_scene_dir int join get_compiled_fc_densenet print close get_patch_paths_in_cluster load_weights exists save_segmentation_predictions_on_patch_paths join get_compiled_fc_densenet print close load_weights save_segmentation_predictions_on_patch_paths exists get_all_patch_paths_from_df load join glob print predict_model_path_on_in_cluster_patches get_label_encoder predict_model_path_on_all_patches predict_model_path_on_each_scene join glob print get_label_encoder join get_compiled_fc_densenet print load_weights get_compiled_unet save_segmentation_predictions_on_scene_dir listdir get_train_val_scene_dirs get_compiled_fc_densenet print make_history_json_serializable get_callbacks fit_generator SegmentationDataGenerator history get_label_encoder get_train_val_scene_dirs get_competition_train_val_scene_dirs get_compiled_fc_densenet get_custom_loss print get_segmentation_patch_paths_for_scene_dirs make_history_json_serializable get_callbacks fit_generator SegmentationDataGenerator get_compiled_unet history get_label_encoder get_class_weights_balanced join format print train_segmentation_model_on_scene_dirs get_scene_dirs_for_season join get_scene_dirs_for_continent format print train_segmentation_model_on_scene_dirs load join format train_segmentation_model_on_patch_paths print get_patch_paths_in_cluster train_fc_densenet_on_continent_cluster range join format print extend train_segmentation_model_on_scene_dirs get_scene_dirs_for_season join format print extend train_segmentation_model_on_scene_dirs get_scene_dirs_for_season get train_fc_densenets_per_cluster_in_continent get_compiled_fc_densenet train_fc_densenet_on_continent predict_saved_models print train model_summary get_label_encoder ConfigProto config_path Session predict astype float32 join listdir int load join basename open listdir extend listdir extend sorted listdir load join format items list isinstance sorted list print set LabelEncoder array keys array LabelEncoder array LabelEncoder squeeze view_as_blocks concatenate patch_to_subpatches concatenate len extend append enumerate items list where reshape combine_landuse_classes mode inverse_transform argmax tolist set tolist get_represented_landuse_classes_from_onehot_labels set int split append geo_info_to_patch_path itertuples append geo_info_to_patch_path itertuples ModelCheckpoint EarlyStopping ReduceLROnPlateau Variable zeros classes_ len print output Model import_module classes_ resnet_v1 compile len print output Model classes_ DenseNetFCN compile len compile Unet len reverse get_country_from_lat_long get_s1s2lc_triplet join format replace SEN12MSDataset patch_to_subpatches get_scene_ids format get_subpatch_save_path get_landuse_labels get_patch_ids get_s1s2lc_triplet dirname save enumerate makedirs join format replace nanmin vstack combine_landuse_classes len nanmax astype get_s1_s2_landuse_dfc_save_path join zeros amax | # land-cover Code for "Lucas Hu, Caleb Robinson, and Bistra Dilkina. 2021. Model Generalization in Deep Learning Applications for Land Cover Mapping. In Fragile Earth ’21: KDD 2021 Workshop. ACM, New York, NY, USA, 9 pages." (https://arxiv.org/abs/2008.10351) ### Setup Instructions 1. `git clone` this repository 2. `cd` into root of this repository 3. `pip install -r requirements.txt` 4. `git clone https://github.com/kobiso/CBAM-keras` 5. `git clone https://github.com/titu1994/DenseNet` 6. Download and extract SEN12MS dataset: https://arxiv.org/abs/1906.07789 7. Edit dataset paths in `config.json` | 2,848 |
lucasmaystre/ChessAnalysis | ['time series'] | ['TrueSkill Through Time: Revisiting the History of Chess'] | visualization/viz.py plot_skills read_csv defaultdict list subplots set_title plot set_xlabel tab10 map cycle set_ylabel linspace legend zip fill_between array | # TrueSkill Through Time This is an attempt to build and use the TrueSkill Through Time codebase on a modern Linux system. The original code was released by Microsoft Research Cambridge. - [2008 blog post][1] - [2012 blog post][2] ## Quickstart On a recent version of Ubuntu (e.g., 16.04), do sudo apt-get install fsharp xbuild /p:Configuration=Release ChessAnalysis.fsproj | 2,849 |
lucasnfe/adl-piano-midi | ['speech recognition'] | ['Computer-Generated Music for Tabletop Role-Playing Games'] | src/start.py src/million_song/hdf5_getters.py src/artist.py src/split.py src/insert.py src/lakh/parse_piano.py src/metrics.py src/utils.py src/genre.py src/load.py src/million_song/__init__.py estimate_artist_genre adl_songs adl_load_dataset adl_songs_by_genre adl_stats unique_notes_ratio adl_split add_song load_song_info_database get_version_with_highest_unr clean_name get_midi_files has_two_hands parse_piano get_track_id get_end_of_fade_in get_segments_timbre get_artist_longitude get_release get_artist_7digitalid get_artist_familiarity get_artist_terms_freq get_segments_loudness_start get_analysis_sample_rate get_key_confidence get_artist_hotttnesss get_mode_confidence get_artist_playmeid get_key get_time_signature get_sections_start get_loudness get_start_of_fade_out get_sections_confidence get_audio_md5 get_title get_artist_mbtags get_beats_start get_energy get_segments_loudness_max get_artist_mbid get_tempo get_num_songs get_artist_mbtags_count get_year get_bars_confidence get_artist_terms get_danceability get_similar_artists get_segments_loudness_max_time get_artist_location get_segments_start get_duration get_release_7digitalid get_artist_terms_weight get_artist_name get_song_id get_song_hotttnesss get_segments_confidence get_mode get_artist_id get_bars_start get_tatums_start get_tatums_confidence get_track_7digitalid open_h5_file_read get_segments_pitches get_beats_confidence get_time_signature_confidence get_artist_latitude search Spotify append join walk get_midi_files append items list PrettyMIDI instruments set seed int list adl_songs_by_genre pop append randint sum keys range values len join walk join unique_notes_ratio join estimate_artist_genre copyfile mkdir makedirs append splitext print PrettyMIDI pitch instruments notes remove print PrettyMIDI instruments append decode decode | # ADL Piano MIDI The ADL Piano MIDI is a dataset of 11,086 piano pieces from different genres. This dataset is based on the [Lakh MIDI dataset](https://colinraffel.com/projects/lmd/), which is a collection on 45,129 unique MIDI files that have been matched to entries in the [Million Song Dataset](http://millionsongdataset.com/). Most pieces in the Lakh MIDI dataset have multiple instruments, so for each file we extracted only the tracks with instruments from the "Piano Family" (MIDI program numbers 1-8). This process generated a total of 9,021 unique piano MIDI files. Theses 9,021 files were them combined with other approximately 2,065 files scraped from publicly-available sources on the internet. All the files in the final collection were de-duped according to their MD5 checksum. We plan to keep adding piano pieces to this dataset. ## Citing this Dataset This dataset was presented in [this paper](https://arxiv.org/abs/2008.07009), so if you use it, please cite: | 2,850 |
lucasnfe/bardo-composer | ['speech recognition'] | ['Computer-Generated Music for Tabletop Role-Playing Games'] | composer/clf_dnd/clf_lstm.py composer/clf_dnd/clf_nbayes.py composer/gnt_utils.py composer/clf_dnd/clf_bert.py composer/gnt_midi.py composer/lm_adlmidi/training/schedulers.py composer/clf_vgmidi/clf_lstm.py composer/midi_encoder.py composer/lm_adlmidi/training/train.py composer/lm_adlmidi/training/load_data.py composer/generators/gnt_beam.py composer/clf_dnd/load_data.py composer/lm_adlmidi/__init__.py composer/lm_adlmidi/training/checkpoint.py composer/lm_adlmidi/lm_lstm.py composer/clf_vgmidi/load_data.py composer/clf_vgmidi/models.py composer/clf_vgmidi/clf_gpt2.py setup.py composer/generators/gnt_baseline.py preprocess_text classify_sentence_emotion classify_music_emotion concat_all_tokens sample_without_replacement compute_penalty compute_music_emotion_probability run_language_model get_rand_prefix_with_emotion discretize_emotion load_vgmidi_pieces_with_emotion load save_vocab load_dir text2midi clamp_pitch midi2text get_note_duration write parse_notes_from_midi parse_notes_from_text load_file clamp_velocity parse_total_duration_from_text build_dataset_bert build_dataset_lstm build_dataset_nbayes build_vocabulary convert_numbers parse_contexts remove_stopwords load_episodes remove_punctuation remove_accented_chars build_dataset load_episode train_clf_model build_clf_model train_clf_model build_clf_model build_dataset load_dataset GPT2Classifier GPT2LanguadeModel baseline BeamNode beam_search build_language_model SaveModelCallback _process_path _split_input_target build_tf_vocab midi2text_paths dataset_difference load_dataset build_dataset GPTSchedule calc_steps perplexity train_language_model generative_loss list split constant reshape concat int32 tile range encode expand_dims squeeze squeeze pad array classify_music_emotion array int categorical delete append array power array apply_along_axis reshape append all print append randint len load_vgmidi_pieces_with_emotion load_dir set isfile load_file split join set load_file walk enumerate split print PrettyMIDI midi2text splitext isfile str sorted items get_note_duration clamp_pitch parse_notes_from_midi append clamp_velocity range append notes instruments Instrument PrettyMIDI parse_notes_from_text append instrument_name_to_program int split append int Note split min max round min text2midi fluidsynth int32 abs max from_pretrained padded_batch shuffle from_generator encode build_dataset range append len padded_batch shuffle from_generator append build_dataset range len build_dataset fit_transform replace unidecode punctuation maketrans append num_to_word split append DictReader lower open join listdir load_episode splitext split set append join range len dict parse_contexts pop GPT2Classifier Checkpoint GPT2Config expect_partial ModelCheckpoint fit compile str Embedding Sequential add Dense LSTM max range DictReader join dirname append exists open padded_batch from_generator shuffle join append randint load_vgmidi_pieces_with_emotion parse_total_duration_from_text len concat get_top_gen_ps top_k forward log squeeze gather_nd compute_music_emotion_probability expand_dims sample_without_replacement softmax tile run_language_model parse_total_duration_from_text join get_top_gen_sequence constant print reshape BeamNode int32 Embedding Sequential add Dense LSTM max range append exists listdir splitext build_tf_vocab from_tensor_slices flat_map midi2text_paths AUTOTUNE prefetch from_tensor_slices map map_fn read_file batch split list KeyValueTensorInitializer StaticHashTable keys values generative_loss midi2text_paths read_file from_tensor_slices split GPTSchedule Adam SaveModelCallback compile fit | # Computer-Generated Music for Tabletop Role-Playing Games This repository contains the source code to reproduce the results of the [AIIDE'20](https://webdocs.cs.ualberta.ca/~santanad/aiide/) paper [Computer-Generated Music for Tabletop Role-Playing Games](https://arxiv.org/abs/2008.07009). This paper presents *Bardo Composer*, a system to generate background music for tabletop role-playing games. Bardo Composer uses a speech recognition system to translate player speech into text, which is classified according to a model of emotion. Bardo Composer then uses Stochastic Bi-Objective Beam Search, a variant of Stochastic Beam Search that we introduce in this paper, with a neural model to generate musical pieces conveying the desired emotion. ## Examples of Generated Pieces - [Piece 1](https://raw.githubusercontent.com/lucasnfe/bardo-composer/master/output/piece1_ag_sus.wav) - [Piece 2](https://raw.githubusercontent.com/lucasnfe/bardo-composer/master/output/piece2_ag_calm.wav) | 2,851 |
lucianacendon/simile | ['imitation learning'] | ['Smooth Imitation Learning for Online Sequence Prediction'] | train_simile.py Lib/simile_train.py Lib/utils.py test_simile.py Helpers/create_xml.py Lib/check_input.py Lib/parallel_tree_boosting.py Lib/autoregressor.py Lib/data_manipulator.py Lib/neuralnet.py Lib/graph_utils.py Lib/simile_predict.py Lib/policy.py test_simile train_simile Autoregressor check_test_input check_train_input SimileDataManipulator SimileGraphUtils NeuralNet XGBoost Policy SIMILE_PREDICT SIMILE_TRAIN normalize_test_data normalize_train_data save_training_parameters denormalize format_train_parameters format_test_parameters policy_rollout SIMILE_PREDICT plot_rollout_test print train SIMILE_TRAIN print exit makedirs load str int print exit open makedirs min shape zeros max range zeros range shape zeros range shape update save_training_parameters print exit open update print exit str dump open | # Smooth Imitation Learning for Online Sequence Prediction [SIMILE] This is my implementation of the Smooth Imitation Learning algorithm for Online Sequence Prediction ([Hoang M. Le et.al, 2016](https://arxiv.org/abs/1606.00968)). This algorithm allows one to train policies that are constrained to make smooth predictions in a continuous action space given sequential input from an exogenous environment and previous actions taken by the policy. <br> I previously used this algorithm to train a policy for automated video editing. When editing videos, it is important that the predictions are smooth in order to produce aesthetic videos. You can find more details about this project and results on my [project page](https://sites.google.com/view/smooth-imitation-learning/). <br> This implementation is intended to make training policies using the simile algorithm available to any application. ## Installation Clone the repository, create a virtual environment, then go to the base folder and run: ``` pip install -r requirements.txt ``` Once the command finishes running, you're ready to use the library. | 2,852 |
lucidrains/tab-transformer-pytorch | ['unsupervised pre training'] | ['TabTransformer: Tabular Data Modeling Using Contextual Embeddings'] | setup.py tab_transformer_pytorch/__init__.py tab_transformer_pytorch/tab_transformer_pytorch.py Transformer PreNorm Residual MLP FeedForward GEGLU TabTransformer Attention exists default | <img src="./tab.png" width="250px"></img> ## Tab Transformer Implementation of <a href="https://arxiv.org/abs/2012.06678">Tab Transformer</a>, attention network for tabular data, in Pytorch. This simple architecture came within a hair's breadth of GBDT's performance. ## Install ```bash $ pip install tab-transformer-pytorch ``` ## Usage ```python import torch | 2,853 |
luigicarratino/batch-bkb | ['gaussian processes'] | ['Near-linear Time Gaussian Process Optimization with Adaptive Batching and Resparsification', 'Gaussian Process Optimization with Adaptive Sketching: Scalable and No Regret'] | example_batch_bkb.py example_bkb.py utils.py bkb_lib.py Local_Batch_BKB BKB Batch_BKB FastMixinKernel diagonal_dot stable_invert_root isinstance diag dot zeros range max eps reshape logical_not shape sum isclose | # Batch-BKB: no-regret scalable GP optimization `batch-bkb` is the first Bayesian optimization (a.k.a. Gaussian process or bandit optimization) algorithm that is both provably no-regret and guaranteed to run in near-linear time time. This repository contains an implementation of the algorithm as described in the ICML 2020 paper ["Near-linear time Gaussian process optimization with adaptive batching and resparsification"](https://arxiv.org/abs/2002.09954) by [Calandriello Daniele](https://scholar.google.com/citations?user=R7c1UMMAAAAJ), [Luigi Carratino](https://luigicarratino.com/), [Alessandro Lazaric](https://scholar.google.com/citations?user=6JZ3R6wAAAAJ&hl=en), [Michal Valko](http://researchers.lille.inria.fr/~valko/hp/) and [Lorenzo Rosasco](https://rubrica.unige.it/personale/UkNHXVxs), This repository also contains an implementation of `bkb` as described in the COLT 2019 paper ["Gaussian Process Optimization with Adaptive Sketching: Scalable and No Regret"](https://arxiv.org/abs/1903.05594) by [Calandriello Daniele](https://scholar.google.com/citations?user=R7c1UMMAAAAJ), [Luigi Carratino](https://luigicarratino.com/), [Alessandro Lazaric](https://scholar.google.com/citations?user=6JZ3R6wAAAAJ&hl=en), [Michal Valko](http://researchers.lille.inria.fr/~valko/hp/) and [Lorenzo Rosasco](https://rubrica.unige.it/personale/UkNHXVxs) | 2,854 |
lukasruff/Classification-AD | ['anomaly detection'] | ['Rethinking Assumptions in Deep Anomaly Detection'] | src/networks/classifier_Net.py src/networks/cifar10_LeNet.py src/datasets/main.py src/base/torchvision_dataset.py src/base/base_dataset.py src/datasets/__init__.py src/networks/cbam.py src/datasets/imagenet22k.py src/datasets/array_dataset.py src/utils/__init__.py src/networks/main.py src/utils/visualization/plot_fun.py src/base/__init__.py src/base/base_net.py src/utils/diag.py src/classifier.py src/networks/imagenet_WideResNet.py src/datasets/imagenet1k.py src/base/base_trainer.py src/networks/mnist_LeNet.py src/optim/classifier_trainer.py src/networks/__init__.py src/datasets/cifar100.py src/datasets/mnist.py src/networks/toy_Net.py src/optim/__init__.py src/main.py src/datasets/emnist.py src/datasets/cifar10.py src/utils/config.py src/datasets/tinyimages.py src/networks/modules/focal_loss.py Classifier main BaseADDataset BaseNet BaseTrainer TorchvisionDataset Array_Dataset MyTensorDataset CIFAR10_Dataset MyCIFAR10 MyCIFAR100 CIFAR100_Dataset MyEMNIST EMNIST_Dataset ImageNet1K_Dataset MyImageNet1K ImageNet22K_Dataset MyImageNet22K load_dataset MyMNIST MNIST_Dataset TinyImages_Dataset TinyImages SpatialGate ChannelGate logsumexp_2d ChannelPool BasicConv CBAM Flatten CIFAR10_LeNet ClassifierNet conv3x3 BasicBlock ImageNet_WideResNet build_network MNIST_LeNet Toy_Net FocalLoss ClassifierTrainer Config plot_extreme_samples plot_line plot_dist plot_images_grid Config save_model getLogger save_results setLevel load_config seed basicConfig list load_model addHandler set_device load_dataset setFormatter RandomState Classifier save_config set_network copy test manual_seed info zip INFO FileHandler plot_dist set_num_threads Formatter train ImageNet1K_Dataset TinyImages_Dataset EMNIST_Dataset CIFAR10_Dataset ImageNet22K_Dataset CIFAR100_Dataset MNIST_Dataset size max log view ClassifierNet CIFAR10_LeNet Toy_Net ImageNet_WideResNet MNIST_LeNet tensor unsqueeze permute plot_images_grid make_grid transpose imshow set_visible title savefig clf gca numpy list set_palette set title clf set_style savefig legend DataFrame enumerate distplot yscale list isinstance xlabel grid extend ylabel set title lineplot set_style savefig legend clf DataFrame range enumerate len | # Rethinking Assumptions in Deep Anomaly Detection This repository provides the code for the methods and experiments presented in our ICML UDL 2021 workshop paper 'Rethinking Assumptions in Deep Anomaly Detection.' ## Citation and Contact You find a PDF of the paper on arXiv: [https://arxiv.org/abs/2006.00339](https://arxiv.org/abs/2006.00339). If you find our work useful, please cite: ``` @inproceedings{ruff2020rethinking, title = {Rethinking Assumptions in Deep Anomaly Detection}, author = {Ruff, Lukas and Vandermeulen, Robert A and Franks, Billy Joe and M{\"u}ller, Klaus-Robert and Kloft, Marius}, booktitle = {ICML 2021 Workshop on Uncertainty \& Robustness in Deep Learning}, | 2,855 |
lukasruff/Deep-SAD-PyTorch | ['outlier detection', 'anomaly detection', 'semi supervised anomaly detection'] | ['Deep Semi-Supervised Anomaly Detection'] | src/networks/cifar10_LeNet.py src/baseline_isoforest.py src/datasets/main.py src/base/torchvision_dataset.py src/baselines/kde.py src/baselines/ssad.py src/baseline_ssad.py src/base/base_dataset.py src/baselines/SemiDGM.py src/utils/misc.py src/baselines/shallow_ssad/ssad_convex.py src/datasets/__init__.py src/baseline_SemiDGM.py src/baseline_ocsvm.py src/baseline_kde.py src/utils/__init__.py src/baselines/ocsvm.py src/networks/main.py src/optim/ae_trainer.py src/datasets/odds.py src/base/__init__.py src/base/base_net.py src/datasets/fmnist.py src/utils/visualization/plot_images_grid.py src/optim/variational.py src/DeepSAD.py src/optim/DeepSAD_trainer.py src/base/odds_dataset.py src/base/base_trainer.py src/networks/mnist_LeNet.py src/networks/__init__.py src/networks/layers/standard.py src/datasets/preprocessing.py src/datasets/mnist.py src/optim/__init__.py src/optim/SemiDGM_trainer.py src/networks/layers/stochastic.py src/baselines/__init__.py src/networks/inference/distributions.py src/optim/vae_trainer.py src/main.py src/baselines/isoforest.py src/networks/dgm.py src/networks/fmnist_LeNet.py src/datasets/cifar10.py src/networks/vae.py src/baselines/shallow_ssad/__init__.py src/utils/config.py src/networks/mlp.py main main main main main DeepSAD main BaseADDataset BaseNet BaseTrainer ODDSDataset TorchvisionDataset IsoForest KDE OCSVM SemiDeepGenerativeModel SSAD ConvexSSAD CIFAR10_Dataset MyCIFAR10 FashionMNIST_Dataset MyFashionMNIST load_dataset MyMNIST MNIST_Dataset ODDSADDataset create_semisupervised_setting CIFAR10_LeNet CIFAR10_LeNet_Decoder CIFAR10_LeNet_Autoencoder DeepGenerativeModel StackedDeepGenerativeModel Classifier FashionMNIST_LeNet_Decoder FashionMNIST_LeNet_Autoencoder FashionMNIST_LeNet build_autoencoder build_network MLP_Decoder MLP_Autoencoder Linear_BN_leakyReLU MLP MNIST_LeNet_Autoencoder MNIST_LeNet MNIST_LeNet_Decoder Decoder VariationalAutoencoder Encoder log_standard_gaussian log_standard_categorical log_gaussian Standardize GaussianSample Stochastic AETrainer DeepSADTrainer SemiDeepGenerativeTrainer VAETrainer ImportanceWeightedSampler SVI Config log_sum_exp enumerate_discrete binary_cross_entropy plot_images_grid Config getLogger save_results load_ae unsqueeze IsoForest tensor setLevel load_config seed basicConfig list load_model addHandler transpose set_sharing_strategy load_dataset setFormatter save_config copy test manual_seed info zip INFO FileHandler plot_images_grid Formatter train KDE OCSVM save_model save_vae_results pretrain set_network SemiDeepGenerativeModel set_vae set_num_threads setseed SSAD DeepSAD save_ae_results ODDSADDataset FashionMNIST_Dataset CIFAR10_Dataset MNIST_Dataset int permutation tolist solve flatten array len CIFAR10_LeNet MLP DeepGenerativeModel StackedDeepGenerativeModel MNIST_LeNet FashionMNIST_LeNet VariationalAutoencoder MNIST_LeNet_Autoencoder FashionMNIST_LeNet_Autoencoder CIFAR10_LeNet_Autoencoder MLP_Autoencoder exp log pi ones_like softmax ImportanceWeightedSampler size device to is_cuda cat max make_grid transpose imshow set_visible title savefig clf gca numpy | # Deep SAD: A Method for Deep Semi-Supervised Anomaly Detection This repository provides a [PyTorch](https://pytorch.org/) implementation of the *Deep SAD* method presented in our ICLR 2020 paper ”Deep Semi-Supervised Anomaly Detection”. ## Citation and Contact You find a PDF of the Deep Semi-Supervised Anomaly Detection ICLR 2020 paper on arXiv [https://arxiv.org/abs/1906.02694](https://arxiv.org/abs/1906.02694). If you find our work useful, please also cite the paper: ``` @InProceedings{ruff2020deep, title = {Deep Semi-Supervised Anomaly Detection}, author = {Ruff, Lukas and Vandermeulen, Robert A. and G{\"o}rnitz, Nico and Binder, Alexander and M{\"u}ller, Emmanuel and M{\"u}ller, Klaus-Robert and Kloft, Marius}, | 2,856 |
lukecq1231/nats | ['document summarization'] | ['Distraction-Based Neural Networks for Document Summarization'] | scripts/replace_unk.py scripts/nats.py data/build_dictionary.py scripts/gen.py scripts/train_nats.py scripts/data_iterator.py main fopen TextIterator translate_model main build_sampler pred_probs gru_cond_layer param_init_gru param_init_gru_cond fflayer param_init_fflayer rmsprop sgd adam load_params init_params gen_sample adadelta zipp concatenate build_model gru_layer ortho_weight itemlist dropout_layer get_layer _p tanh norm_weight init_tparams unzip linear prepare_data train main list print OrderedDict argsort keys values enumerate endswith get RandomStreams build_sampler init_tparams _translate print load_params put init_params items Process _send_jobs _seqs2words _retrieve_jobs dict start Queue range _finish_processes items set_value OrderedDict items get_value binomial switch shape items print OrderedDict shape shared load items warn svd randn ortho_weight randn set_subtensor ndim zeros sum range astype zip append max enumerate len norm_weight astype norm_weight astype ortho_weight concatenate dot scan alloc norm_weight astype ortho_weight concatenate dot scan _step alloc OrderedDict norm_weight tanh RandomStreams set_subtensor categorical_crossentropy zeros_like concatenate reshape float32 dict shape flatten softmax shared matrix sum vector switch tanh function concatenate print reshape mean softmax alloc matrix argmax argmax entropy zip min astype len f_next copy flatten cosine array tile f_init append range max log enumerate f_log_probs print prepare_data set_trace isnan mean append list function sqr get_value float32 sqrt zip append shared values function function function build_sampler function pred_probs f_norm_g open basicConfig list set_value f_grad_shared set_trace TextIterator append shared load_params init_params f_update gen_sample range switch dump format zipp build_model debug grad copy mean sqrt pformat minimum items time init_tparams savez print unzip prepare_data float32 dict isnan array scalar len train | # Distraction-Based Neural Networks for Modeling Documents Source code for "Distraction-Based Neural Networks for Modeling Documents" runnable on GPU and CPU. If you use this code as part of any published research, please acknowledge the following paper. **"Distraction-Based Neural Networks for Modeling Documents"** Qian Chen, Xiaodan Zhu, Zhenhua Ling, Si Wei, Hui Jiang. *IJCAI (2016)* @InProceedings{Chen-Qian:2016:IJCAI, author = {Chen, Qian and Zhu, Xiaodan and Ling, Zhenhua and Wei, Si and Jiang, Hui}, title = {Distraction-Based Neural Networks for Modeling Documents}, booktitle = {Proceedings of the 25th International Joint Conference on Artificial Intelligence (IJCAI 2015)}, month = {July}, | 2,857 |
lulujianjie/person-reid-tiny-baseline | ['person re identification'] | ['Bag of Tricks and A Strong Baseline for Deep Person Re-identification'] | datasets/preprocessing.py utils/logger.py config/default.py utils/metrics.py model/__init__.py loss/triplet_loss.py solver/make_optimizer.py train.py model/backbones/resnet.py docs/conf.py datasets/Market1501.py loss/__init__.py tools/search_reranking_params.py loss/make_loss.py config/configs.py solver/lr_scheduler.py processor/processor.py model/make_model.py solver/__init__.py test.py datasets/sampler.py datasets/__init__.py loss/center_loss.py utils/meter.py utils/reranking.py datasets/make_dataloader.py config/__init__.py tools/get_vis_result.py loss/arcface.py loss/softmax_loss.py datasets/bases.py processor/__init__.py Config DefaultConfig ImageDataset BaseDataset BaseImageDataset read_image val_collate_fn train_collate_fn make_dataloader Market1501 GaussianMask RandomErasing RandomIdentitySampler ArcFace CenterLoss make_loss CrossEntropyLabelSmooth normalize euclidean_dist TripletLoss hard_example_mining make_model weights_init_classifier Backbone weights_init_kaiming ResNet conv3x3 BasicBlock Bottleneck do_inference do_train WarmupMultiStepLR make_optimizer visualizer setup_logger AverageMeter cosine_similarity R1_mAP eval_func euclidean_distance re_ranking convert tensor list zip list zip Market1501 format gallery SAMPLER print Compose query DATALOADER_NUM_WORKERS ImageDataset DataLoader num_train_pids train MARGIN print HARD_FACTOR CrossEntropyLabelSmooth TripletLoss CenterLoss expand_as t sqrt addmm_ expand data ne view size min squeeze expand t eq gather max affine bias kaiming_normal_ weight __name__ constant_ bias normal_ weight __name__ constant_ Backbone CHECKPOINT_PERIOD getLogger model batch_size MODEL_NAME zero_grad PROJECT_NAME DataParallel save OUTPUT_DIR R1_mAP EVAL_PERIOD device_count LOG_PERIOD to range state_dict update format mean eval avg mkdir info item enumerate compute join time backward print AverageMeter MAX_EPOCHS parameters reset loss_fn train step len getLogger PROJECT_NAME DataParallel save Q_FEATS R1_mAP device_count LOG_DIR PIDS to format IMG_PATH eval info enumerate compute join DIST_MAT print G_FEATS CAMIDS reset WEIGHT_DECAY_BIAS SGD named_parameters parameters BASE_LR BIAS_LR_FACTOR WEIGHT_DECAY asarray format imwrite COLOR_BGR2RGB print hstack zfill LOG_DIR resize range cvtColor setFormatter join getLogger addHandler StreamHandler Formatter DEBUG setLevel FileHandler t addmm_ expand norm arccos t numpy mm clip invert format asarray print cumsum astype float32 argsort shape mean int32 append sum range zeros_like float16 max exp transpose expand append sum range cat size astype mean unique addmm_ minimum t int32 zeros numpy len | # Tiny Person ReID Baseline Paper: "Bag of Tricks and A Strong Baseline for Deep Person Re-identification"[[pdf]](https://arxiv.org/abs/1903.07071) This project refers the official code [link](https://github.com/michuanhaohao/reid-strong-baseline) and can reproduce the results as good as it on Market1501 when the input size is set to 256x128. If you find this project useful, please cite the offical paper. ``` @inproceedings{luo2019bag, title={Bag of Tricks and A Strong Baseline for Deep Person Re-identification}, author={Luo, Hao and Gu, Youzhi and Liao, Xingyu and Lai, Shenqi and Jiang, Wei}, booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops}, year={2019} } | 2,858 |
lushleaf/Network-Pruning-Greedy-Forward-Selection | ['network pruning'] | ['Good Subnetworks Provably Exist: Pruning via Greedy Forward Selection'] | utils/utils.py lib/utils.py mobile2_prune.py utils/gradient_compression.py utils/bags_of_tricks.py mobile2_finetune.py models/mobilenet_v2.py lib/data.py validate train CrossEntropyLabelSmooth adjust_learning_rate save_checkpoint parse_args get_model eval_train prune_a_layer decide_candidate_set train test decide_candidate adjust_learning_rate save_checkpoint parse_args get_model net_prune get_dataset_ft get_split_dataset get_dataset prGreen TextLogger prPurple prLightPurple AverageMeter measure_layer_for_pruning accuracy least_square_sklearn get_output_folder progress_bar prYellow prCyan prLightGray to_numpy prRed to_tensor prBlack Mask conv_1x1_bn conv_3x3_bn tem_block InvertedResidual combine_layer tem_MobileNetV2 build_tem_block mobilenetv2 _make_divisible mb2_prune_ratio MobileNetV2_prescreen InvertedResidual_prescreen Block_prescreen MobileNetV2 cross_encropy_with_label_smoothing cross_entropy_for_onehot cross_encropy_with_mixup mixup_data label_smoothing flip_along_batch mixup_label FP16Compressor Lighting Grayscale Saturation Contrast Brightness Compose ColorJitter add_argument ArgumentParser load items list OrderedDict DataParallel load_state_dict to load_path MobileNetV2_prescreen MobileNetV2 update data time format criterion model backward print size AverageMeter zero_grad accuracy item step enumerate len eval AverageMeter time format print param_groups cos pi lr epochs join format replace print copyfile save isfullnetpruned list numpy shuffle set data to init_lsearch astype update_alpha float sum data eval_train format print decide_candidate_set layer_num astype accuracy switch_mode empty_all_eps decide_candidate set_alpha_to_init sum net prune_a_layer mb2_prune_ratio save append mask_list sum eval_train format save_path astype eval top1_tol enumerate join time isfullnetpruned print switch_mode n_epoch train eval net eval AverageMeter time float eval AverageMeter time n_epoch join list arange print Compose SubsetRandomSampler DataLoader ImageFolder CIFAR10 append range len join print Compose DataLoader ImageFolder CIFAR10 join list format print Compose shuffle index_sampler ImageFolder DataLoader Normalize CIFAR10 CIFAR100 range len topk size t eq mul_ expand_as append sum max is_available requires_grad_ float get_layer_type int get_layer_param in_channels numel out_channels groups LinearRegression fit int join format listdir makedirs int time join format_time write append range flush len print format print format print format print format print format print format print format print format int max conv2 int tem_block ReLU6 isinstance conv3 identity Conv2d append BatchNorm2d sum conv1 print get_model_complexity_info eval cpu MobileNetV2 long size unsqueeze zeros_like scatter_ label_smoothing label_smoothing mixup_label | # Learning Winning Subnetworks via Greedy Optimization Whether good subnetworks provably exist? How to find them efficiently? If network pruning can be provably better than direct training using gradient descent? We answer these problems positively by proposing a simple greedy selection approach for finding good subnetworks, which starts from an empty network and greedily adds important neurons from the large network. This differs from the existing methods based on backward elimination, which remove redundant neurons from the large network. ### Related Publication Mao Ye, Chengyue Gong<sup> * </sup>, Lizhen Nie<sup> * </sup>, Denny Zhou, Adam Klivans and Qiang Liu. [Good Subnetworks Provably Exists: Pruning via Greedy Forward Selection.](https://proceedings.icml.cc/static/paper_files/icml/2020/1781-Paper.pdf) *ICML 2020* Mao Ye<sup> * </sup>, Lemeng Wu<sup> * </sup> and Qiang Liu. Greedy Optimization Provably Wins the Lottery: Logarithmic Number of Winning Tickets is Enough. *NeurIPS 2020* <img src="fig/plot_add_del.png" width=800></img> Theoretically, applying the greedy selection strategy on sufficiently large pre-trained networks guarantees to find small subnetworks with lower loss than networks directly trained with gradient descent. Our results also apply to pruning randomly weighted networks. | 2,859 |
lushleaf/Structure-free-certified-NLP | ['text classification'] | ['SAFER: A Structure-free Approach for Certified Robustness to Adversarial Word Substitutions'] | train.py evaluation.py dataset_utils.py textcnn.py data_util.py data_process.py simple_accuracy AmazonProcessor pearson_and_spearman InputFeatures InputExample _truncate_seq_pair acc_and_f1 ImdbProcessor compute_metrics convert_examples_to_features DataProcessor get_vocabluary get_perturbation_set main process_with_all_but_not_top get_word_substitution_table get_wordembd WordSubstitude randomize_testset set_seed InputFeatures randomized_evaluate randomized_create_examples_from_folder calculate_tv_table InputExample main calculate_tv load_and_cache_examples Config Model set_seed evaluate load_and_cache_examples_randomized main train load_and_cache_examples join text_b InputFeatures convert_tokens_to_ids _truncate_seq_pair tokenize guid info append label float text_a enumerate len pop len simple_accuracy join dump close open load join word_tokenize list dump listdir isdir print endswith close tqdm range read_csv open flatten open list append sum range dump eig close mean sqrt keys load T print mat argsort dot cov zeros len where flatten open str list tolist append range dump close keys load T print tqdm dot argsort zeros len flatten open str list nodes append range add_edge dump Graph close keys add_node load T connected_components print tqdm dot argsort zeros len get_vocabluary get_perturbation_set similarity_threshold add_argument perturbation_constraint get_word_substitution_table data_path get_wordembd ArgumentParser embd_path process_with_all_but_not_top parse_args dataset seed manual_seed_all manual_seed join str read print data_dir sort write skip tqdm randomized_create_examples_from_folder calculate_tv_table num_random_sample save open listdir range makedirs endswith listdir pop join str format load max_seq_length similarity_threshold get_labels TensorDataset convert_examples_to_features save tensor exists get_tv tuple perturbation_constraint DataLoader numpy argmax max exists open str max_seq_length data_dir squeeze per_gpu_eval_batch_size skip compute_metrics append calculate_tv dump format similarity_threshold close eval zip listdir task_name load join read n_gpu pop result_dir print tqdm load_and_cache_examples makedirs load join str list dump print similarity_threshold data_dir len close perturbation_constraint set tqdm intersection keys open enable_attach from_pretrained WordSubstitude randomized_evaluate DataParallel DistributedDataParallel warning device eval_all_checkpoints setLevel open str basicConfig list set_seed data_dir set_device get_labels device_count Model load_state_dict append to WARN init_process_group close lower info fp16 wait_for_attach keys load randomize_testset join n_gpu model_name_or_path print barrier bool local_rank len gradient_accumulation_steps WordSubstitude model get_linear_schedule_with_warmup tuple clip_grad_norm_ zero_grad perturbation_constraint DataLoader max_grad_norm output_dir save max open str initialize list set_seed data_dir step load_and_cache_examples_randomized logging_steps master_params SummaryWriter format similarity_threshold close mean save_pretrained num_train_epochs info fp16 trange task_name per_gpu_train_batch_size max_steps enumerate load int items n_gpu join evaluate backward AdamW add_scalar makedirs tqdm parameters load_and_cache_examples train_batch_size len tuple DataLoader argmax max eval_batch_size squeeze per_gpu_eval_batch_size compute_metrics append update format eval info zip load_and_cache_examples join n_gpu makedirs tqdm numpy len pop join str format load text_b max_seq_length data_dir similarity_threshold print get_labels TensorDataset convert_examples_to_features save info tensor text_a exists data_dir info do_train output_dir save update save_pretrained train evaluate makedirs dict | # SAFER: A Structure-free Approach For Certified Robustness to Adversarial Word Substitutions (ACL 2020) We propose a certified robust method based on a new randomized smoothing technique, which constructs a stochastic ensemble by applying random word substitutions on the input sentences, and leverage the statistical properties of the ensemble to provably certify the robustness. Our method is simple and structure-free in that it only requires the black-box queries of the model outputs, and hence can be applied to any pre-trained models (such as BERT) and any types of models (world-level or subword-level). <img src="figs/framework_certnlp.png" width=1000></img> ## How to run --Download the word embedding file and save to root directory https://drive.google.com/file/d/1x65ixChKFlWHCecfm6rkZTGT6MlreAIO/view?usp=sharing --Download the dataset Imdb: https://ai.stanford.edu/~amaas/data/sentiment/ Amazon: https://www.kaggle.com/bittlingmayer/amazonreviews#train.ft.txt.bz2 --See run.sh for data processing, training and evaluation. | 2,860 |
luwr1022/listwise-view-ranking | ['image cropping'] | ['Listwise View Ranking for Image Cropping'] | create_gt_crops.py lib/model/roi_crop/modules/roi_crop.py lib/model/LVRN.py _init_path.py lib/utils/tools.py train.py lib/model/roi_align/modules/roi_align.py lib/datasets/dataset.py lib/model/roi_crop/functions/roi_crop.py lib/utils/config.py lib/model/roi_pooling/_ext/roi_pooling/__init__.py lib/model/roi_pooling/build.py lib/utils/annToView.py lib/utils/createImdbDataset.py lib/model/roi_crop/_ext/crop_resize/__init__.py lib/model/roi_pooling/modules/roi_pool.py lib/model/roi_crop/functions/crop_resize.py lib/model/roi_align/functions/roi_align.py lib/model/roi_crop/build.py lib/model/roi_align/build.py demo.py lib/model/RoI_operation.py eval.py lib/model/roi_align/_ext/roi_align/__init__.py lib/model/roi_pooling/functions/roi_pool.py lib/model/roi_crop/modules/gridgen.py lib/model/roi_crop/functions/gridgen.py lib/utils/generatePdefinedAnchors.py lib/model/roi_crop/_ext/roi_crop/__init__.py str2int load_model pytorch_transform overlap_ratio parse_args evaluate_single_image load_model pytorch_transform anchor2roi overlap_ratio evaluate_FLMS evaluate_FCDB parse_args evaluate_single_image evaluate_ICDB score_rank_loss save_model score_rank_focal_loss evaluate adjust_learning_rate parse_args add_path CPCDataset LVRN RoI_op RoIAlignFunction RoIAlign RoIAlignAvg RoIAlignMax _import_symbols RoICropFunction AffineGridGenFunction RoICropFunction DenseAffine3DGridGen_rotate CylinderGridGenV2 DenseAffine3DGridGen Depth3DGridGen_with_mask CylinderGridGen DenseAffineGridGen AffineGridGenV2 _AffineGridGen Depth3DGridGen _RoICrop _import_symbols _import_symbols RoIPoolFunction _RoIPooling _import_symbols mysort get_view _str2int create_train_lmdb create_test_lmdb bboxes_jaccard getSubCrop bbox_nms image_transform_fixed_size image_transform_scale del_and_create split add_argument ArgumentParser LVRN load_pretrain_parameters min max float transpose Compose repeat expand_dims array argmax int view model pytorch_transform BILINEAR astype resize zeros float numpy cuda zeros astype int height width anchor2roi open join read FCDB_datadir format print float now overlap_ratio loads evaluate_single_image abs join read str format print float overlap_ratio ICDB_datadir loads evaluate_single_image abs range FLMS_datadir join read format print float overlap_ratio loads evaluate_single_image abs range print lr_decay param_groups join save_model_root format save sum softmax mean pow softmax sum log argmax int model fixed_size overlap_ratio eval zeros train numpy cuda enumerate insert dir _wrap_function getattr append callable append int split sort _str2int dict split append float sum range len join str CPC save_data_root fixed_size padding print astype close del_and_create linspace float open join str save_data_root fixed_size padding print close del_and_create open append int max range ones logical_and bboxes_jaccard array range len minimum isinstance transpose maximum array height transpose BILINEAR width astype float32 repeat resize expand_dims array open height transpose BILINEAR width astype float32 repeat resize expand_dims array open rmtree exists makedirs | # Listwise-View-Ranking-Image-Cropping ### Material [Paper](https://arxiv.org/pdf/1905.05352.pdf), [Model(Google)](https://drive.google.com/open?id=1WVUsvR3MHhApCapyXUBIyslwG2yVOnxK), [Model(Baidu)](https://pan.baidu.com/s/1mLP2pzW3IUEPpVs13l579Q) ### Citation ``` @article{lu2019listwise, title={Listwise View Ranking for Image Cropping}, author={Lu, Weirui and Xing, Xiaofen and Cai, Bolun and Xu, Xiangmin}, journal={arXiv preprint arXiv:1905.05352}, year={2019} | 2,861 |
lvpengyuan/masktextspotter.caffe2 | ['scene text detection', 'text spotting', 'semantic segmentation'] | ['Mask TextSpotter: An End-to-End Trainable Neural Network for Spotting Text with Arbitrary Shapes'] | lanms/__init__.py lib/core/config.py lib/setup.py lib/roi_data/rpn.py lib/roi_data/keypoint_rcnn.py lib/utils/vis.py lib/modeling/generate_anchors.py lib/roi_data/retinanet.py lib/modeling/retinanet_heads.py tests/test_loader.py lib/modeling/detector.py lib/modeling/VGG_CNN_M_1024.py lib/modeling/optimizer.py lib/core/test.py lib/core/test_engine.py lib/utils/segms.py lib/modeling/name_compat.py lib/datasets/json_dataset_evaluator.py lib/utils/keypoints.py lib/modeling/text_mask_rcnn_heads.py tests/test_bbox_transform.py lib/datasets/json_dataset.py tools/infer.py lib/roi_data/data_utils.py lanms/__main__.py lib/utils/boxes.py lib/utils/c2.py tests/test_text_class.py tests/test_spatial_narrow_as_op.py lib/modeling/FPN.py lib/ops/generate_proposal_labels.py tools/train_net.py lib/datasets/cityscapes/tools/convert_cityscapes_to_coco.py tools/reval.py tools/visualize_results.py lib/utils/coordinator.py lib/modeling/keypoint_rcnn_heads.py lib/core/test_retinanet.py lib/datasets/dataset_catalog.py tools/pickle_caffe_blobs.py lib/modeling/rpn_heads.py lib/datasets/task_evaluation.py lib/datasets/roidb.py lib/roi_data/fast_rcnn.py lib/datasets/textdataset_catalog.py lib/utils/subprocess.py tests/test_zero_even_op.py tools/vis_log.py lib/datasets/voc_eval.py tools/infer_simple.py tests/test_proposal_target.py lib/modeling/model_builder.py tests/test_cfg.py tests/data_loader_benchmark.py lib/roi_data/minibatch.py lib/utils/timer.py lib/roi_data/mix_loader.py lib/utils/image.py tools/test_net.py lib/roi_data/mask_rcnn.py lib/modeling/ResNet.py tests/test_smooth_l1_loss_op.py lib/utils/env.py lib/datasets/text_dataset.py lib/datasets/roidb_text.py lib/core/rpn_generator.py lib/modeling/VGG16.py lib/ops/collect_and_distribute_fpn_rpn_proposals_rec.py lib/modeling/fast_rcnn_heads.py lib/utils/lr_policy.py lib/utils/logging.py lib/utils/colormap.py lib/datasets/voc_dataset_evaluator.py lib/ops/generate_proposals.py lib/datasets/cityscapes/tools/convert_coco_model_to_cityscapes.py lib/ops/collect_and_distribute_fpn_rpn_proposals.py lanms/.ycm_extra_conf.py lib/utils/io.py tools/convert_selective_search.py tests/test_batch_permutation_op.py lib/modeling/mask_rcnn_heads.py lib/utils/collections.py tools/generate_testdev_from_test.py lib/datasets/cityscapes_json_dataset_evaluator.py lib/utils/blob.py lib/roi_data/loader.py lib/modeling/rfcn_heads.py lib/utils/char_mask.py lib/utils/net.py lib/datasets/cityscapes/coco_to_cityscapes_id.py GetCompilationInfoForFile IsHeaderFile MakeRelativePathsInFlagsAbsolute FlagsForFile DirectoryOfThisScript merge_quadrangle_n9 merge_cfg_from_list _key_is_deprecated merge_cfg_from_file assert_and_infer_cfg _merge_a_into_b _key_is_renamed _raise_key_rename_error cache_cfg_urls merge_cfg_from_cfg _decode_cfg_value _check_and_coerce_cfg_value_type get_output_dir generate_rpn_on_dataset multi_gpu_generate_rpn_on_dataset generate_rpn_on_range im_proposals evaluate_proposal_file _get_image_blob get_roidb generate_proposals_on_roidb im_detect_all im_detect_mask_aug format_output box_results_with_nms_and_limit num2char char2num im_detect_keypoints_scale getstr_grid im_detect_keypoints_aspect_ratio shrink_rect_with_ratio _project_im_rois get_polygon box2poly im_detect_mask_hflip getstr segm_char_results im_detect_bbox_scale im_detect_bbox_aspect_ratio _get_image_blob im_detect_mask_scale dis2xyxy poly2box im_detect_bbox_hflip _get_rois_blob im_detect_bbox get_tight_rect im_conv_body_only segm_results shrink_single_box keypoint_results im_detect_keypoints im_detect_mask_aspect_ratio combine_heatmaps_size_dep seg2text im_detect_keypoints_hflip _get_blobs im_detect_bbox_aug im_detect_mask im_detect_keypoints_aug _add_multilevel_rois_for_test get_roidb_and_dataset empty_results multi_gpu_test_net_on_dataset initialize_model_from_cfg test_net_on_dataset test_net extend_results test_retinanet im_detections create_cell_anchors coco_evaluate write_coco_detection_results test_retinanet_on_dataset im_list_detections multi_gpu_test_retinanet_on_dataset evaluate_masks _merge_proposal_boxes_into_roidb _add_class_assignments _sort_proposals _filter_crowd_proposals JsonDataset add_proposals _coco_bbox_results_one_category _do_keypoint_eval _do_segmentation_eval evaluate_boxes _do_detection_eval _write_coco_keypoint_results_file _log_detection_eval_metrics evaluate_keypoints _coco_kp_results_one_category _write_coco_bbox_results_file _write_coco_segms_results_file evaluate_masks _coco_segms_results_one_category evaluate_box_proposals add_bbox_regression_targets extend_with_flipped_entries combined_roidb_for_training _compute_targets filter_for_training _compute_and_log_stats add_bbox_regression_targets extend_with_flipped_entries mix_roidbs_for_training combined_roidb_for_training flip_word flip_polygons _compute_targets filter_for_training _compute_and_log_stats evaluate_all _coco_eval_to_mask_results check_expected_results log_box_proposal_results _empty_keypoint_results _coco_eval_to_keypoint_results evaluate_boxes evaluate_keypoints _use_json_dataset_evaluator _voc_eval_to_box_results _empty_box_results _coco_eval_to_box_results _cs_eval_to_mask_results _use_cityscapes_evaluator _empty_box_proposal_results log_copy_paste_friendly_results evaluate_box_proposals _empty_mask_results evaluate_masks _use_voc_evaluator TextDataSet voc_info _get_voc_results_file_template _do_matlab_eval evaluate_boxes _write_voc_results_files _do_python_eval parse_rec voc_eval voc_ap cityscapes_to_coco_without_person_rider cityscapes_to_coco cityscapes_to_coco_with_rider cityscapes_to_coco_all_random parse_args convert_coco_stuff_mat convert_cityscapes_instance_only getLabelID remove_momentum load_and_convert_coco_model parse_args convert_coco_blob_to_cityscapes_blob convert_coco_blobs_to_cityscape_blobs DetectionModelHelper _get_lr_change_ratio add_fast_rcnn_outputs add_roi_2mlp_head add_fast_rcnn_losses add_fpn_ResNet101_conv5_body fpn_level_info_ResNet50_conv5 add_fpn_rpn_losses map_rois_to_fpn_levels add_fpn add_fpn_ResNet101_conv5_P2only_body add_multilevel_roi_blobs get_min_max_levels add_fpn_ResNet152_conv5_body add_fpn_rpn_outputs fpn_level_info_ResNet152_conv5 fpn_level_info_ResNet101_conv5 add_fpn_ResNet50_conv5_P2only_body add_topdown_lateral_module add_fpn_ResNet152_conv5_P2only_body add_fpn_ResNet50_conv5_body add_fpn_onto_conv_body generate_anchors _scale_enum _whctrs _ratio_enum _generate_anchors _mkanchors add_ResNet_roi_conv5_head_for_keypoints add_roi_pose_head_v1convX add_keypoint_losses add_keypoint_outputs mask_rcnn_fcn_head_v1upXconvs mask_rcnn_fcn_head_v1up4convs add_mask_rcnn_outputs mask_rcnn_fcn_head_v0upshare add_ResNet_roi_conv5_head_for_masks mask_rcnn_fcn_head_v1up mask_rcnn_fcn_head_v0up add_mask_rcnn_losses ResNet101_rfcn fast_rcnn ResNet50_faster_rcnn _narrow_to_fpn_roi_levels VGG_CNN_M_1024_fast_rcnn VGG16_faster_rcnn add_inference_inputs fpn_rpn_frozen_features ResNet101_fast_rcnn_frozen_features ResNet101_faster_rcnn create _add_roi_keypoint_head build_generic_retinanet_model mask_and_keypoint_rcnn _add_roi_mask_head fast_rcnn_frozen_features add_training_inputs get_func VGG_CNN_M_1024_rpn_frozen_features rfcn _add_fast_rcnn_head ResNet50_rpn_conv4 faster_rcnn VGG16_rpn ResNet50_rfcn fpn_rpn ResNet50_fast_rcnn retinanet ResNet101_rpn_conv4 rpn_frozen_features ResNet101_rpn_conv4_frozen_features VGG_CNN_M_1024_rpn ResNet50_rpn_conv4_frozen_features rpn generalized_rcnn keypoint_rcnn mask_rcnn_frozen_features ResNet101_fast_rcnn mask_rcnn VGG16_rpn_frozen_features keypoint_rcnn_frozen_features ResNet50_fast_rcnn_frozen_features VGG16_fast_rcnn build_generic_rfcn_model build_generic_detection_model get_new_name build_data_parallel_model _add_parameter_update_ops _add_allreduce_graph _build_forward_graph add_ResNet_convX_body add_shortcut bottleneck_transformation add_ResNet152_conv5_body add_residual_block add_ResNet101_conv5_body add_ResNet101_conv4_body add_ResNet50_conv5_body add_ResNet50_conv4_body add_stage add_ResNet_roi_conv5_head add_fpn_retinanet_losses get_retinanet_bias_init add_fpn_retinanet_outputs add_rfcn_outputs add_single_scale_rpn_outputs add_single_scale_rpn_losses add_generic_rpn_outputs mask_rcnn_fcn_head_v1upXconvs mask_rcnn_fcn_head_v1up4convs add_mask_rcnn_outputs mask_rcnn_fcn_head_v0upshare add_ResNet_roi_conv5_head_for_masks mask_rcnn_fcn_head_v1up mask_rcnn_fcn_head_v0up add_mask_rcnn_losses add_VGG16_conv5_body add_VGG16_roi_fc_head add_VGG_CNN_M_1024_conv5_body add_VGG_CNN_M_1024_roi_fc_head CollectAndDistributeFpnRpnProposalsOp collect distribute CollectAndDistributeFpnRpnProposalsRecOp collect distribute _filter_boxes GenerateProposalsOp GenerateProposalLabelsOp unmap compute_targets get_field_of_anchors get_fast_rcnn_blob_names _sample_rois_rec _sample_rois _compute_targets add_fast_rcnn_blobs add_fast_rcnn_blobs_rec _add_multilevel_rois _expand_bbox_targets finalize_keypoint_minibatch _within_box add_keypoint_rcnn_blobs RoIDataLoader _visu_char_map _visu_global_map add_mask_rcnn_blobs _expand_to_class_specific_mask_targets _visu_char_box add_charmask_rcnn_blobs _rect2quad _random_hue _random_brightness _rotate_segms _random_contrast _get_image_aug_blob _rotate_polygons _quad2rect _boxlist2quads _get_image_blob get_minibatch _quad2minrect get_minibatch_blob_names _clip_boxes _random_color _visualize_roidb _random_saturation _random_lighting_noise _resize_clip_char_boxes _clip_polygons _quad2boxlist _rotate_image get_retinanet_blob_names _get_retinanet_blobs add_retinanet_blobs get_rpn_blob_names add_rpn_blobs _get_rpn_blobs serialize ones prep_im_for_blob py_op_copy_blob im_list_to_blob deserialize get_loss_gradients zeros expand_boxes nms clip_xyxy_to_image bbox_transform unique_boxes clip_tiled_boxes aspect_ratio bbox_transform_inv boxes_area xywh_to_xyxy clip_boxes_to_image xyxy_to_xywh filter_small_boxes flip_boxes box_voting soft_nms expand_boxes_hw CpuScope import_contrib_ops const_fill gauss_fill import_custom_ops CudaDevice NamedCudaScope BlobReferenceList GpuNameScope UnscopeName SuffixNet import_detectron_ops CudaScope AttrDict colormap Coordinator coordinated_put coordinated_get exit_on_error get_caffe2_dir get_custom_ops_lib get_runtime_dir get_py_bin_ext get_detectron_ops_lib set_up_matplotlib import_nccl_ops aspect_ratio_rel aspect_ratio_abs save_object cache_url _get_reference_md5sum _get_file_md5sum assert_cache_file_is_ok download_url _progress_bar get_keypoints nms_oks flip_keypoints keypoints_to_heatmap_labels scores_to_probs flip_heatmaps get_person_class_index heatmaps_to_keypoints compute_oks SmoothedValue setup_logger send_email log_json_stats setup_logging lr_func_step lr_func_steps_with_lrs get_lr_at_iter lr_func_steps_with_decay get_lr_func get_step_index initialize_gpu_0_from_weights_file initialize_from_weights_file average_multi_gpu_blob print_net configure_bbox_reg_weights broadcast_parameters save_model_to_weights_file sum_multi_gpu_blob polys_to_mask_wrt_box_rec mask_to_bbox rle_mask_voting polys_to_mask flip_segms rle_mask_nms polys_to_boxes rle_masks_to_boxes _shrink_poly _shrink_rect polys_to_mask_wrt_box process_in_parallel log_subprocess_output Timer vis_class convert_from_cls_format vis_keypoints get_class_string kp_connections vis_one_image vis_one_image_opencv vis_mask vis_bbox main parse_args loader_loop BatchPermutationOpTest TestBboxTransform random_boxes TestCfg get_roidb_blobs get_roidb_sample_data run_net create_loader_and_network TestRoIDataLoader get_net SmoothL1LossTest SpatialNarrowAsOpTest random_color parse_args vis_roidb main ZeroEvenOpTest parse_args convert main parse_args check_args get_rpn_box_proposals main parse_args pickle_weights remove_spatial_bn_layers load_and_convert_caffe_model add_missing_biases remove_layers_without_parameters normalize_resnet_name normalize_shape parse_args parse_args do_reval main parse_args train_model setup_model_for_training create_model test_model TrainingStats optimize_memory add_model_training_inputs dump_proto_files main parse_args vis parse_args vis_log parse_log smooth main plot_log parse_args parse_line append join startswith IsHeaderFile compiler_flags_ exists compiler_flags_ GetCompilationInfoForFile compiler_working_dir_ MakeRelativePathsInFlagsAbsolute DirectoryOfThisScript nms_impl array copy cache_cfg_urls cache_url DOWNLOAD_CACHE tuple WEIGHTS join TYPE NAME OUTPUT_DIR makedirs _merge_a_into_b _merge_a_into_b _key_is_deprecated zip _key_is_renamed _raise_key_rename_error _decode_cfg_value _check_and_coerce_cfg_value_type split deepcopy _key_is_deprecated list items isinstance _key_is_renamed _raise_key_rename_error _decode_cfg_value _check_and_coerce_cfg_value_type format warn isinstance literal_eval isinstance str list ndarray isinstance tuple type array DATASET toc format multi_gpu_generate_rpn_on_dataset info generate_rpn_on_range average_time len tic get_roidb Timer get_output_dir JsonDataset join dump save_object format process_in_parallel get_runtime_dir get_py_bin_ext dict abspath info join create format CreateNet dump info initialize_from_weights_file add_inference_inputs tuple save_object TYPE WEIGHTS dict abspath get_roidb generate_proposals_on_roidb net get_output_dir str format info average_time timedelta Timer imread range len FeedBlob ScopedName list items concatenate name squeeze astype float32 RPN_MAX_LEVEL _get_image_blob RunNet RPN_MIN_LEVEL FetchBlobs DATASET len JsonDataset join save_object log_box_proposal_results get_roidb evaluate_box_proposals MAX_SIZE min astype float32 shape resize append im_list_to_blob float max approxPolyDP threshold polylines where box_results_with_nms_and_limit WEIGHTS im_detect_mask_aug format_output vstack save resize CHAIN_APPROX_NONE getstr_grid OUTPUT_POLYGON RETR_TREE list defaultdict str COLOR_BGR2RGB transpose morphologyEx map MORPH_RECT tic append minAreaRect range findContours astype MORPH_CLOSE copy polygon ENABLED mkdir im_detect_bbox dilate GaussianBlur get_tight_rect toc join uint8 print getStructuringElement boxPoints reshape convert float32 THRESH_BINARY im_detect_bbox_aug erode convexHull contourArea im_detect_mask zeros arcLength array cvtColor makedirs OUTPUT_POLYGON join str write close save enumerate open FeedBlob ScopedName name _get_image_blob RunNet CLS_AGNOSTIC_BBOX_REG list name squeeze shape BBOX_REG_WEIGHTS bbox_transform clip_tiled_boxes FetchBlob unique tile FeedBlob ScopedName items FASTER_RCNN reshape _get_blobs dot _add_multilevel_rois_for_test RunNet array BBOX_REG H_FLIP add_preds_t MAX_SIZE SCALE_H_FLIP mean im_detect_bbox_scale im_detect_bbox_aspect_ratio im_detect_bbox_hflip vstack ASPECT_RATIO_H_FLIP im_detect_bbox SCALES ASPECT_RATIOS flip_boxes im_detect_bbox im_detect_bbox SCALES im_detect_bbox_hflip MAX_SIZE aspect_ratio_rel im_detect_bbox_hflip aspect_ratio im_detect_bbox FeedBlob ScopedName list items name reshape squeeze transpose float32 RunNet MULTILEVEL_ROIS zeros _add_multilevel_rois_for_test RESOLUTION_H RESOLUTION_W im_conv_body_only H_FLIP exp amax im_detect_mask_hflip MAX_SIZE im_detect_mask_aspect_ratio SCALE_H_FLIP mean ASPECT_RATIO_H_FLIP im_detect_mask im_detect_mask_scale SCALES ASPECT_RATIOS append flip_boxes im_conv_body_only im_detect_mask im_conv_body_only MAX_SIZE im_detect_mask_hflip im_detect_mask SCALES aspect_ratio_rel im_detect_mask_hflip im_conv_body_only im_detect_mask FeedBlob ScopedName list items name squeeze float32 expand_dims MULTILEVEL_ROIS zeros _add_multilevel_rois_for_test RunNet HEATMAP_SIZE im_conv_body_only H_FLIP im_detect_keypoints SCALE_SIZE_DEP MAX_SIZE heur_f combine_heatmaps_size_dep im_detect_keypoints_hflip SCALE_H_FLIP mean add_heatmaps_t ASPECT_RATIOS ASPECT_RATIO_H_FLIP SCALES im_detect_keypoints_scale amax im_detect_keypoints_aspect_ratio flip_boxes flip_heatmaps im_conv_body_only im_detect_keypoints im_conv_body_only im_detect_keypoints MAX_SIZE im_detect_keypoints_hflip SCALES im_conv_body_only im_detect_keypoints aspect_ratio_rel aspect_ratio im_detect_keypoints_hflip zeros_like heur_f boxes_area zip append range nms NUM_CLASSES hstack astype float32 ENABLED vstack NMS VOTE_TH box_voting soft_nms range max NUM_CLASSES min astype maximum RESOLUTION_W int32 resize append zeros RESOLUTION_H array range expand_boxes_hw threshold zeros_like fillPoly num2char vstack argmax shrink_rect_with_ratio nms sorted transpose MORPH_RECT append range dis2xyxy hstack astype enumerate shrink_single_box getStructuringElement reshape float32 THRESH_BINARY erode int32 merge_quadrangle_n9 len uint8 argmax astype seg2text reshape where reshape reshape print lower exit ord print exit chr ord threshold num2char boundingRect argmax RETR_TREE sorted shape append sum range findContours astype mean uint8 drawContours CHAIN_APPROX_SIMPLE reshape THRESH_BINARY len sorted list append list range len getstr append RESOLUTION_H range RESOLUTION_W nms_oks NMS_OKS NUM_CLASSES get_person_class_index heatmaps_to_keypoints prep_im_for_blob PIXEL_MEANS SCALES _project_im_rois hstack zeros float abs astype ROI_MAX_LEVEL add_multilevel_roi_blobs map_rois_to_fpn_levels ROI_MIN_LEVEL _get_rois_blob array _get_image_blob DATASET toc format info average_time TextDataSet tic Timer test_net get_output_dir join dump save_object format NUM_CLASSES process_in_parallel get_runtime_dir get_py_bin_ext dict abspath info range defaultdict get_roidb_and_dataset FASTER_RCNN NUM_CLASSES empty_results initialize_model_from_cfg imread enumerate get_output_dir len create CreateNet initialize_from_weights_file conv_body_net KEYPOINTS_ON TYPE MASK_ON mask_net WEIGHTS add_inference_inputs net keypoint_net DATASET FASTER_RCNN TextDataSet get_roidb len range len generate_anchors SCALES_PER_OCTAVE ANCHOR_SCALE zeros float ASPECT_RATIOS range len ravel vstack ASPECT_RATIOS nms list defaultdict SOFTMAX name transpose shape _get_image_blob append range format clip_tiled_boxes astype NMS fill FetchBlobs FeedBlob ScopedName items reshape NUM_CLASSES min float32 SCALES_PER_OCTAVE extend argsort zeros PRE_NMS_TOP_N RunNet len Timer format create_cell_anchors average_time info imread range len DATASET tuple TYPE WEIGHTS abspath add_inference_inputs save_object create CreateNet im_list_detections dump format info net join initialize_from_weights_file dict get_roidb get_output_dir JsonDataset join process_in_parallel extend get_runtime_dir get_py_bin_ext DATASET join save_object format test_retinanet write_coco_detection_results NUM_TEST_IMAGES coco_evaluate len _coco_eval_to_box_results dict abspath info get_roidb multi_gpu_test_retinanet_on_dataset get_output_dir JsonDataset str evaluate COCOeval summarize COCO accumulate loadRes join format zip name astype extend abspath info float array join name ON_CLUSTER mkdir get_roidb info main enumerate _merge_proposal_boxes_into_roidb _add_class_assignments _filter_crowd_proposals append range len dtype toarray csr_matrix astype bbox_overlaps zeros argmax max append enumerate iou toarray csr_matrix xyxy_to_xywh len max argmax toarray argsort remove _do_segmentation_eval _write_coco_segms_results_file format extend classes info abspath _coco_segms_results_one_category enumerate sort astype extend getImgIds float enumerate str join save_object format evaluate COCOeval _log_detection_eval_metrics COCO accumulate loadRes info join remove name _do_detection_eval _write_coco_bbox_results_file _coco_bbox_results_one_category format extend classes info abspath enumerate sort astype extend getImgIds xyxy_to_xywh float enumerate str join save_object format evaluate COCOeval _log_detection_eval_metrics COCO accumulate loadRes info _get_thr_ind format summarize mean classes info enumerate sum arange zeros_like sort min astype hstack mean bbox_overlaps zeros float argmax max range enumerate join remove _do_keypoint_eval name _write_coco_keypoint_results_file format extend _coco_kp_results_one_category classes info abspath enumerate len sort astype extend getImgIds append float range enumerate len join save_object format evaluate COCOeval summarize sort COCO accumulate getImgIds loadRes info add_bbox_regression_targets isinstance extend filter_for_training info _compute_and_log_stats len items list flip_keypoints flip_segms keypoint_flip_map copy extend append keypoints format info len _compute_targets astype bbox_transform_inv BBOX_REG_WEIGHTS zeros argmax bbox_overlaps format arange classes info rjust zeros sum max enumerate len add_bbox_regression_targets _compute_and_log_stats isinstance len copy flip_polygons update KEYPOINTS_ON evaluate_boxes MASK_ON evaluate_keypoints info evaluate_masks _voc_eval_to_box_results _coco_eval_to_box_results _use_cityscapes_evaluator warn info _use_json_dataset_evaluator _use_voc_evaluator _coco_eval_to_mask_results _cs_eval_to_mask_results _use_cityscapes_evaluator _use_json_dataset_evaluator _coco_eval_to_keypoint_results info items list format _empty_box_proposal_results items list format keys ljust info max join list format items info keys join format error EXPECTED_RESULTS send_email EXPECTED_RESULTS_EMAIL info abs stats _empty_box_results stats _empty_mask_results _empty_keypoint_results stats _write_voc_results_files _do_matlab_eval copy _do_python_eval format get_roidb info append classes enumerate voc_info join save_object format voc_info mean mkdir classes info voc_eval enumerate join format voc_info info call ROOT_DIR join int parse findall text append find arange concatenate size maximum sum max range parse_rec cumsum argmax max sum range eps format astype mkdir info float enumerate minimum join maximum voc_ap argsort zeros bool array len add_argument exit ArgumentParser print_help print join len load join print endswith len zip append walk open items list format print shape convert_func convert_coco_blob_to_cityscapes_blob int list reshape astype float32 mean shape std range endswith list keys remove_momentum convert_coco_blobs_to_cityscape_blobs max FC num_classes Softmax SoftmaxWithLoss AddLosses AddMetrics SmoothL1Loss Accuracy get_loss_gradients RoIFeatureTransform Relu ROI_XFORM_RESOLUTION MLP_HEAD_DIM FC conv_body_func add_fpn fpn_level_info_func str format blobs insert MaxPool dims Relu get_min_max_levels Conv DIM add_topdown_lateral_module range len Sum Conv UpsampleNearest ROI_MAX_LEVEL min RPN_MIN_LEVEL RPN_MAX_LEVEL ROI_MIN_LEVEL max str RPN_ASPECT_RATIOS generate_anchors Relu ConvShared Conv Sigmoid RPN_MAX_LEVEL GenerateProposals RPN_MIN_LEVEL range len update str AddLosses SigmoidCrossEntropyLoss SmoothL1Loss RPN_MAX_LEVEL SpatialNarrowAs get_loss_gradients RPN_MIN_LEVEL range boxes_area sqrt log2 ROI_CANONICAL_LEVEL ROI_CANONICAL_SCALE floor clip concatenate astype vstack int32 zeros empty range vstack _ratio_enum array hstack sqrt _whctrs round _mkanchors _whctrs _mkanchors UP_SCALE NUM_KEYPOINTS Relu DECONV_DIM Conv ConvTranspose USE_DECONV_OUTPUT USE_DECONV BilinearInterpolation StopGradient SoftmaxWithLoss AddLosses Reshape Mul get_loss_gradients RoIFeatureTransform add_stage DILATION str RoIFeatureTransform NUM_STACKED_CONVS Relu Conv CONV_HEAD_KERNEL range CONV_HEAD_DIM USE_FC_OUTPUT UPSAMPLE_RATIO Conv Sigmoid RESOLUTION FC BilinearInterpolation SigmoidCrossEntropyLoss get_loss_gradients AddLosses str RoIFeatureTransform DIM_REDUCED Relu Conv ConvTranspose DILATION range DIM_REDUCED SampleAs add_ResNet_roi_conv5_head_for_masks Relu ConvTranspose train ConvTranspose DIM_REDUCED add_ResNet_roi_conv5_head_for_masks Relu int RoIFeatureTransform ROI_XFORM_RESOLUTION DILATION add_stage DetectionModelHelper join format get_new_name warn import_module split build_data_parallel_model ROI_MAX_LEVEL ROI_MIN_LEVEL add_fast_rcnn_outputs add_roi_box_head_func train add_fast_rcnn_losses deepcopy add_mask_rcnn_outputs op add_roi_mask_head_func SuffixNet net Proto add_mask_rcnn_losses len deepcopy add_roi_keypoint_head_func op add_keypoint_outputs SuffixNet net add_keypoint_losses Proto len build_data_parallel_model build_data_parallel_model NUM_GPUS op extend RoIDataLoader range get_minibatch_blob_names MixRoIDataLoader len MASK_ON Proto create_input_blobs_for_net KEYPOINTS_ON warn warn warn warn warn warn warn warn warn warn warn warn _add_parameter_update_ops NUM_GPUS AddGradientOperators _add_allreduce_graph train range _build_forward_graph NUM_GPUS range int NUM_GPUS TrainableParams len format add_residual_block range StopGradient MaxPool Relu Conv add_stage RES5_DILATION WIDTH_PER_GROUP AffineChannel NUM_GROUPS int RoIFeatureTransform ROI_XFORM_RESOLUTION AveragePool WIDTH_PER_GROUP add_stage NUM_GROUPS Sum add_shortcut Conv ConvAffineDeformable Relu ConvAffine SOFTMAX num_classes SCALES_PER_OCTAVE PRIOR_PROB vstack zeros ASPECT_RATIOS log len SOFTMAX format SHARE_CLS_BBOX_TOWER NUM_CONVS GroupSpatialSoftmax Relu SCALES_PER_OCTAVE ConvShared Conv Sigmoid RPN_MAX_LEVEL get_retinanet_bias_init append ASPECT_RATIOS RPN_MIN_LEVEL range enumerate len update SoftmaxFocalLoss format AddLosses AddMetrics SigmoidFocalLoss RPN_MAX_LEVEL get_loss_gradients append range RPN_MIN_LEVEL SelectSmoothL1Loss PSRoIPool num_classes Softmax Reshape PS_GRID_SIZE Relu Conv AveragePool add_fpn_rpn_losses add_single_scale_rpn_outputs FASTER_RCNN CollectAndDistributeFpnRpnProposalsRec add_fpn_rpn_outputs add_single_scale_rpn_losses FPN_ON train generate_anchors Alias FASTER_RCNN Relu Conv Sigmoid GenerateProposalLabels GenerateProposals train AddLosses SigmoidCrossEntropyLoss SmoothL1Loss SpatialNarrowAs get_loss_gradients Softmax Transpose Reshape SpatialSoftmaxWithLoss Conv MaxPool Relu StopGradient RoIFeatureTransform FC Relu StopGradient MaxPool LRN Relu Conv RoIFeatureTransform FC Relu RPN_POST_NMS_TOP_N concatenate squeeze RPN_MAX_LEVEL RPN_MIN_LEVEL ROI_MAX_LEVEL map_rois_to_fpn_levels concatenate reshape astype py_op_copy_blob argsort shape int32 ROI_MIN_LEVEL empty range enumerate str generate_anchors int arange COARSEST_STRIDE meshgrid reshape MAX_SIZE transpose FieldOfAnchors ceil float ravel fill empty ROI_MAX_LEVEL KEYPOINTS_ON MASK_ON ROI_MIN_LEVEL range items list concatenate _sample_rois KEYPOINTS_ON _add_multilevel_rois append finalize_keypoint_minibatch enumerate items list _sample_rois_rec concatenate _add_multilevel_rois append enumerate minimum int FG_FRACTION BATCH_SIZE_PER_IM KEYPOINTS_ON ones size _compute_targets hstack MASK_ON add_charmask_rcnn_blobs choice dict add_keypoint_rcnn_blobs _expand_bbox_targets append round array minimum int FG_FRACTION BATCH_SIZE_PER_IM ones size _compute_targets hstack add_charmask_rcnn_blobs choice dict _expand_bbox_targets append round array int CLS_AGNOSTIC_BBOX_REG NUM_CLASSES shape zeros ROI_MAX_LEVEL KEYPOINTS_ON MASK_ON ROI_MIN_LEVEL _distribute_rois_over_fpn_levels minimum ones keypoints_to_heatmap_labels size reshape hstack astype choice _within_box int32 range len FG_FRACTION BATCH_SIZE_PER_IM IMS_PER_BATCH NUM_KEYPOINTS MIN_KEYPOINT_COUNT_FOR_VALID_MINIBATCH sum array logical_and _expand_to_class_specific_mask_targets ones reshape hstack astype float32 copy CLS_SPECIFIC_MASK polys_to_boxes array zeros RESOLUTION argmax bbox_overlaps range polys_to_mask_wrt_box where polys_to_boxes save argmax open polys_to_mask_wrt_box_rec RESOLUTION_W ones IS_E2E array range _visu_global_map hstack astype copy choice RESOLUTION_H _visu_char_map Draw _visu_char_box reshape MASK_BATCH_SIZE_PER_IM float32 rectangle zeros bbox_overlaps int RESOLUTION range fromarray astype save fromarray astype save fromarray int Draw ones astype rectangle save range RETINANET_ON RPN_ON RPN_ON add_fast_rcnn_blobs_rec _get_image_aug_blob _get_image_blob add_retinanet_blobs RETINANET_ON add_rpn_blobs randint imread range len _random_hue _random_brightness _random_contrast aug prep_im_for_blob PIXEL_MEANS append im_list_to_blob imread range MAX_SIZE astype copy float _random_saturation _random_lighting_noise randint _rotate_image len minimum maximum minimum maximum minimum round maximum int max warpAffine min _rotate_segms copy _quadlist2minrect getRotationMatrix2D shape uniform rotate_delta rotate_prob IMAGE zeros _quad2minrect array _rotate_polygons Polygon print rotate _boxlist2quads append _quad2boxlist int Polygon print rotate append range enumerate len saturation_upper saturation_prob saturation_lower IMAGE hue_delta hue_prob IMAGE lighting_noise_prob IMAGE contrast_lower contrast_upper uniform IMAGE contrast_prob brightness_delta uniform brightness_prob IMAGE append range zeros array enumerate fromarray list Draw input print rectangle save polygon _random_color array range randint RPN_MAX_LEVEL format RPN_MIN_LEVEL range ANCHOR_SCALE log2 round ASPECT_RATIOS list _get_retinanet_blobs aspect octave append range format get_field_of_anchors concatenate astype stride float enumerate int items CLASS_SPECIFIC_BBOX SCALES_PER_OCTAVE float32 array len arange where argmax transpose shape array append format debug unmap stride fill empty enumerate int reshape NUM_CLASSES compute_targets dict zeros bbox_overlaps field_size len RPN_MAX_LEVEL RPN_MIN_LEVEL range serialize _get_rpn_blobs field_of_anchors round ASPECT_RATIOS RPN_MIN_LEVEL RPN_ASPECT_RATIOS list RPN_MAX_LEVEL append range get_field_of_anchors concatenate SIZES STRIDE enumerate items zeros array num_cell_anchors arange argmax RPN_FG_FRACTION transpose shape append sum format debug unmap choice RPN_STRADDLE_THRESH fill empty int compute_targets dict RPN_BATCH_SIZE_PER_IM zeros bbox_overlaps field_size len int COARSEST_STRIDE transpose FPN_ON ceil zeros float max range len min astype float32 shape resize append float max dtype list INT32 reshape shape init str ConstantFill dot array unique ndarray maximum isinstance ndarray isinstance minimum maximum minimum maximum minimum maximum minimum dtype exp BBOX_XFORM_CLIP astype shape zeros transpose log zeros shape zeros shape copy copy max exp copy range average mean vstack float sum bbox_overlaps log len float32 uint8 ascontiguousarray import_nccl_ops get_detectron_ops_lib InitOpsLibrary InitOpsLibrary get_custom_ops_lib BlobReferenceList extend Clone BlobReference isinstance CudaDevice CPU DeviceOption reshape astype float32 put use exit find_module dirname abspath join get_caffe2_dir join dirname split int round resize sqrt resize abspath format replace assert_cache_file_is_ok download_url dirname info exists makedirs _get_reference_md5sum _get_file_md5sum int format write float round flush int urlopen strip md5 strip items list index copy where get_keypoints list items index copy int NUM_KEYPOINTS transpose scores_to_probs len maximum copy resize ceil zeros argmax range INFERENCE_MIN_SIZE astype float32 logical_and floor int32 zeros range HEATMAP_SIZE sum exp max range mean compute_oks append exp spacing sum array format dumps info sendmail SMTP MIMEText as_string stdout setFormatter getLogger addHandler strftime StreamHandler Formatter info FileHandler basicConfig getLogger WARM_UP_METHOD WARM_UP_FACTOR WARM_UP_ITERS get_step_index get_step_index STEPS enumerate LR_POLICY broadcast_parameters initialize_gpu_0_from_weights_file load list format Blobs OrderedDict configure_bbox_reg_weights params info keys str dump format save_object debug Blobs dict FetchBlob params UnscopeName abspath info TrainableParams startswith params _do_broadcast NUM_GPUS range str format ndarray isinstance Name name op shape FetchBlob UnscopeName info input type range len warning pformat info append _flip_rle frPyObjects sum array decode decode maximum append frPyObjects sum array max int ones fillPoly reshape min astype maximum copy where size int32 fill zeros float array range _shrink_rect min zeros max range len iou min astype maximum average shape array int32 append zeros sum max range len iou transpose maximum argsort append len len get_bounds zeros sum enumerate min max norm min range arctan2 load join list format array_split str log_subprocess_output isinstance NUM_GPUS close copy info append PIPE range Popen open join wait close info len range concatenate drawContours LINE_AA findContours astype float32 copy nonzero CHAIN_APPROX_NONE RETR_CCOMP putText rectangle getTextSize FONT_HERSHEY_SIMPLEX rectangle minimum get_keypoints line tuple copy kp_connections index get_cmap range circle len decode vis_class isinstance convert_from_cls_format vis_keypoints get_class_string argsort vis_bbox vis_mask colormap decode axis get_class_string CHAIN_APPROX_NONE colormap basename ones len imshow shape savefig setp Axes range get_keypoints format plot findContours convert_from_cls_format close kp_connections copy add_axes autoscale get_cmap RETR_CCOMP minimum join set_size_inches isinstance Polygon text reshape add_patch argsort figure Rectangle makedirs toc format print average_time tic Timer get_next_minibatch range getLogger qsize loader_loop RoIDataLoader Proto str locals register_sigint_handler num_batches x_factor get_output_names sleep PROPOSAL_FILES globals range shutdown DATASETS format runctx RunNetOnce NUM_GPUS profiler Net start minibatch_queue_size info time combined_roidb_for_training sleep_time len randn stack str getLogger NUM_GPUS get_output_names Net info range Proto append randint range register_sigint_handler get_roidb_sample_data start RoIDataLoader get_net CUDA DeviceOption format RunNetOnce randint random_color FLIP_LEFT_RIGHT list Draw text transpose rectangle save polygon range open mix_roidbs_for_training USE_CHARANNS vis_roidb input toc join format basename print tic splitext Timer append range len merge_cfg_from_file rpn_cfg assert_and_infer_cfg initialize_model_from_cfg rpn_pkl load models_to_run dump merge_cfg_from_file vis_one_image assert_and_infer_cfg im_file get_coco_dataset output_dir merge_cfg_from_cfg ResetWorkspace initialize_model_from_cfg imread get_rpn_box_proposals models_to_run list basename defaultdict iglob average_time im_or_folder cfg enumerate join items isdir weights image_ext str print sorted keys layer zeros BlobProto extend data asarray _remove_layers extend _create_tensor sqrt shape zip pop list format name print reversed range layer len tuple dim layer blobs read NetParameter remove_spatial_bn_layers TranslateModel Merge extend add_missing_biases remove_layers_without_parameters ParseFromString normalize_shape load evaluate_all _merge_a_into_b merge_cfg_from_cfg log_copy_paste_friendly_results JsonDataset parent_func PRECOMPUTED_PROPOSALS RETINANET_ON child_func RPN_ONLY seed GlobalInit merge_cfg_from_list cfg_file train_model multi_gpu_testing RNG_SEED test_model pformat opts parse_args setLevel INFO setup_logging IterToc getLogger MAX_ITER LogIterStats ResetIterTimer critical setup_model_for_training name UpdateIterStats UpdateWorkspaceLr save_model_to_weights_file shutdown range format create_model NUM_GPUS setup_logger print_net SNAPSHOT_ITERS IterTic int join exit_on_error TrainingStats isnan RunNet iter_total_loss join int format create MEMONGER RunNetOnce getLogger param_init_net TYPE optimize_memory WEIGHTS AUTO_RESUME info findall listdir exists get_output_dir format share_grad_blobs NUM_GPUS set range net values CreateNet format register_sigint_handler initialize_gpu_0_from_weights_file getLogger WEIGHTS start add_model_training_inputs dump_proto_files broadcast_parameters info abspath net DATASETS format getLogger mix_roidbs_for_training combined_roidb_for_training add_training_inputs USE_CHARANNS info PROPOSAL_FILES len ResetWorkspace main join format print vis_one_image get_roidb JsonDataset imread enumerate len float split int strip readlines append parse_line ones convolve plot xlabel axis ylabel smooth title savefig figure parse_log join plot_log mkdir src_dir vis_log log_file | # Mask TextSpotter ### A Pytorch implementation of Mask TextSpotter along with its extension can be find [here](https://github.com/MhLiao/MaskTextSpotter) ### Introduction This is the official implementation of Mask TextSpotter. Mask TextSpotter is an End-to-End Trainable Neural Network for Spotting Text with Arbitrary Shapes For more details, please refer to our [paper](https://arxiv.org/abs/1807.02242). ### Citing the paper Please cite the paper in your publications if it helps your research: @inproceedings{LyuLYWB18, author = {Pengyuan Lyu and | 2,862 |
lwgkzl/MedDG | ['response generation'] | ['MedDG: A Large-scale Medical Consultation Dataset for Building Medical Dialogue System'] | MedDG/topic_predict/bert.py MedDG/topic_predict/DataRead.py MedDG/generation/seq2seq.py MedDG/generation/hred.py MedDG/topic_predict/baseline_five_classf.py MedDG/generation/moban.py MedDG/generation/CY_DataReadandMetric.py MedDG/topic_predict/baseline.py MedDG/topic_predict/bert_add_graph.py my_sequence_cross_entropy_with_logits get_xingzhi get_tong_pinglv get_youyin get_other_sym get_fan KD_Metric F1 Distinct2 get_location get_time MyAverage Seq2SeqDatasetReader Distinct1 NLTK_BLEU get_tong SimpleSeq2Seq find_similary_key find_similary_key_subset SimpleSeq2Seq MyModel TextClassificationTxtReader MyModel TextClassificationTxtReader MyModel TextClassificationTxtReader MyModel TextClassificationTxtReader MacroF span span span view tuple size log scatter_ shape float sum long range len list len keys split len shuffle split | # MedDG This is the code for the following paper: [MedDG: A Large-scale Medical Consultation Dataset for Building Medical Dialogue System](https://arxiv.org/pdf/2010.07497) *Wenge Liu, Jianheng Tang, Jinghui Qin, Lin Xu, Zhen Li, Xiaodan Liang; Arxiv* ### Requirement pip install allenlp==0.9 ### Usage For the task of topic prediction (e.g. run the LSTM baseline): ```shell cd topic_predict | 2,863 |
lxh3/aa-stocks | ['classification'] | ['Canonical Sectors and Evolution of Firms in the US Stock Markets'] | archetypal_analysis.py make_figures.py plot_functions.py fit_functions.py make_tables.py main.py FurthestSum Supdate Cupdate archanalysis_fixed_C archanalysis str_template_head center_normalize_removemm center_normalize run_aa_flows gaus local_load str_template_body dolinearregression create_sankey_json run_aa main single_tetrahedron single_tetrahedron_st make_figures company_pies singular_values flows noisy_flows fama_french normalized_log_returns cumulative_log_returns tetrahedron_array_st C tetrahedron_array V sector_pies unweighted_price_index W top_three_sector_comps ninth_sector_comps top_two_sector_comps make_table_data plot_eve hex2rbg_ary plot_flows rgb2hex_ary rgb triplet define_colors argmax T arange abs dot shape sqrt append zeros sum max FurthestSum T arange inf ones Supdate Cupdate dot zeros sum len T arange dot shape float sum T arange dot shape float sum diag T arange inf Supdate dot sum mean svd T std mean svd T std center_normalize_removemm str center_normalize print getcwd archanalysis range makedirs argmax str normal center_normalize asarray T arange print copy dot local_load shape archanalysis read_pickle zeros DataFrame values enumerate str T asarray int archanalysis_fixed_C reversed dot local_load read_pickle define_colors append sum range len copy FFRF dot sub lstsq sum values make_figures run_aa_flows print verbose read_pickle create_sankey_json make_table_data run_aa ioff svd T asarray list combinations plot close dot local_load scatter savefig zip array StringIO svd T asarray subplots list plot combinations set_axis_off ndenumerate close subplots_adjust dot local_load scatter savefig delaxes zip array ioff svd T asarray axis close dot local_load scatter savefig clf Rectangle legend append range array StringIO len svd T asarray subplots list plot combinations set_axis_off ndenumerate close subplots_adjust dot local_load scatter savefig delaxes zip array subplot asarray reshape pie close GridSpec local_load title savefig figure read_pickle range str T asarray subplot archanalysis_fixed_C pie close GridSpec local_load title savefig figure define_colors append range len subplots cumsum tick_params xticks yticks subplot exp savefig range StringIO asarray plot close tick_left xlim ioff tick_bottom subplots_adjust local_load zeros subplots tick_params xticks yticks subplot ylim savefig range StringIO asarray plot close tick_left xlim load ioff tick_bottom subplots_adjust dot local_load ioff subplot tick_bottom asarray subplots tick_left plot close range subplots_adjust local_load ylim savefig tick_params xlim xticks StringIO yticks subplot plot_eve T close subplots_adjust local_load ylim savefig figure xlim xticks range yticks svd T subplot plot_eve close subplots_adjust mean ylim savefig read_pickle figure xlim xticks std range yticks subplot plot_eve close subplots_adjust local_load savefig figure xlim xticks range columns close plot_flows local_load savefig read_pickle range len columns close plot_flows local_load savefig read_pickle range len ioff svd T arange randn close mean shape hist savefig read_pickle range std StringIO values subplots axis DataFrame read_table scatter savefig dolinearregression append range asarray replace close float enumerate center_normalize_removemm T index argsort read_pickle len single_tetrahedron single_tetrahedron_st company_pies singular_values flows getcwd noisy_flows fama_french normalized_log_returns cumulative_log_returns tetrahedron_array_st C tetrahedron_array V sector_pies unweighted_price_index W makedirs list where Counter local_load read_pickle elements append zeros range len from_tuples list tolist local_load read_pickle zip round array from_tuples list tolist local_load read_pickle zip round array append rgb append triplet dot hex2rbg_ary rgb2hex_ary arange bar ylim xlim sum len subplot asarray arange plot ylim figure fill_between xlim xticks range yticks | **Companion Code for:**
# Canonical sectors and evolution of firms
# in the US stock markets
**Citation:**
> Lorien X. Hayden, Ricky Chachra, Alexander A. Alemi,
> Paul H. Ginsparg & James P. Sethna (2018)
> Canonical sectors and evolution of firms in the US stock markets,
| 2,864 |
lyn1874/region_based_active_learning | ['medical image segmentation', 'active learning', 'semantic segmentation'] | ['On uncertainty estimation in active learning for image segmentation'] | models/acquistion_full_image.py models/inference.py eval_calibration/calibration_lib.py data_utils/glanddata.py optimization/loss_region_specific.py models/acquisition_region.py Test.py select_images.py eval_calibration/calc_calibration_score.py select_regions.py Train_Active_Full_Im.py data_utils/prepare_data.py models/resnet_v2.py visualize_calibration_score.py eval_calibration/get_acquisition_stat.py models/resnet_utils.py Train_Active_Region_Im.py models/layer_utils.py data_utils/update_data.py selection selection running_test_for_all_acquisition_steps save_image_to_mat running_test_for_single_acquisition_step test train_full running_train_use_all_data running_initial_model running_loop_active_learning_full_image train run_loop_active_learning_region ax_global_get postprocess_data compare_score show_uncertainty_distribution get_region_uncert calc_uncertainty load_score compare_acq_at_certain_point_line give_args give_figure_4_and_e1 compare_acq_at_certain_point_barplot remove_outlier sort_uncertainty give_score_path give_count_accu get_uncertainty_group get_overall_compare_based_on_score give_figure_5 give_first_figure str2bool remove give_figure_e2 template_conf_plot give_acquired_full_image_uncertainty extract_edge extract_benign_malignant transfer_data_to_dict get_filename_test_list transfer_data_to_dict_test read_gland_training_data read_gland_test_data get_filename_train_list extract_diff_data prepare_pool_data padding_training_data prepare_train_data prepare_test_data padding_zeros collect_test_data prepare_skin_data save_im aug_train_data generate_batch prepare_the_new_uncertain_input give_init_train_and_val_data update_training_data calculate_aggre_pixel aggregate_stat transfer_numeric_index_back_to_imindex calc_calibration_value collect_pool_data_multi_acquisition_step get_group_region get_time _give_calibration_histogram give_calibration_histogram collect_region_uncertainty get_group_full _region_uncertainty collect_pool_data calc_uncertainty compute_accuracies_at_confidences expected_calibration_error get_quantile_bins accuracy_top_k _filter_top_k soften_probabilities _validate_probabilities expected_calibration_error_multiclass nll bin_predictions_and_accuracies bin_centers_of_mass brier_scores _check_rank_nonempty get_multiclass_predictions_and_correctness brier_decomp_npy collect_number_acquired_pixels_region generate_binary_mask return_pseudo_label extract_edge select_patches_in_image_area select_most_uncertain_patch calculate_score_for_patch get_bald_heatmap get_entropy_heatmap transfer_strid_rowcol_backto_nostride_rowcol get_uncert_heatmap extract_bald_index extract_informative_index extract_entropy_index extract_uncertainty_index ResNet_V2_DMNN get_deconv_layer_weight conv_layer_renew deconv_layer_renew Block conv2d_same subsample resnet_arg_scope stack_blocks_dense resnet_v2_50 resnet_v2_200 resnet_v2_101 resnet_v2_block resnet_v2_152 bottleneck resnet_v2 calc_auc_score _add_loss_summaries calc_f1_score Loss tf_f1score train_op_batchnorm tf_auc_score zeros astype makedirs join zip test makedirs join print test zip makedirs load join remove prepare_test_data squeeze where savemat append range padding_training_data join train_full join train_full load join remove argmax print argmin astype choice set shape train_full selection save append zeros listdir max range join astype zeros array makedirs save argmax max update_training_data ones argmin ceil append sum range set listdir give_init_train_and_val_data load join remove prepare_the_new_uncertain_input print SPR_Region_Im reshape zeros train join array makedirs isinstance add_argument ArgumentParser tick_params add_subplot set_color enumerate compare_score grid add_subplot read_excel tick_params values columns twinx savefig append plot concatenate set_xlim mean zip enumerate int min figure zeros set_ylim compare_acq_at_certain_point_line ax_global_get set_yticks NullFormatter add_subplot set_xlabel subplots_adjust set_xticks set_ylabel figure set_major_formatter legend savefig enumerate len compare_acq_at_certain_point_barplot ax_global_get set_yticks NullFormatter add_subplot set_xlabel subplots_adjust set_xticks set_ylabel figure set_major_formatter legend savefig enumerate len enumerate ax_global_get grid show_uncertainty_distribution add_subplot set_major_formatter tick_params get_region_uncert set_fontsize set_title set_xlabel savefig legend range plot concatenate mean sqrt distplot set_yticks NullFormatter subplots_adjust set_ylabel set_xticks figure template_conf_plot give_acquired_full_image_uncertainty fill_between std len ones zeros min cumsum zeros remove_outlier range enumerate load_score postprocess_data grid add_subplot mean figure template_conf_plot legend ticklabel_format std range len fill_between plot remove range savgol_filter mean array compare_score enumerate append concatenate plot get_overall_compare_based_on_score grid add_subplot figure ticklabel_format zip append range get_overall_compare_based_on_score set_xticklabels grid add_subplot bar set_xticks figure zip append max range set_ylim sum max log digitize where histogram argmax array equal calc_uncertainty load reshape squeeze min append max calc_uncertainty reshape transpose add_subplot figure legend distplot grid add_subplot figure range distplot load add_subplot figure append distplot range len print listdir print listdir int print zip append imread int print zip append imread reshape disk astype dilation shape append hypot sobel int endswith open append split defaultdict extract_edge print extract_benign_malignant read_gland_training_data isfile append save range get_filename_train_list defaultdict extract_edge print extract_benign_malignant repeat get_filename_test_list save isfile append read_gland_test_data range enumerate extract_diff_data list concatenate delete where item range extract_diff_data list concatenate delete where item range padding_training_data load extract_diff_data arange concatenate ones sort delete argsort item expand_dims array print item append append padding_zeros range reshape shape pad append zip random_crop uint8 resize_image_with_crop_or_pad concat less_equal astype float32 reduce_sum rotate int64 cast random_uniform cond zip concatenate print item resize append padding_training_data arange add_subplot choice imshow savefig figure collect_test_data enumerate len print prepare_train_data ones astype shape zeros padding_training_data append zip concatenate arange concatenate print astype delete append range calc_calibration_value sorted listdir calc_calibration_value load int sum cumsum print unique save open zeros listdir range append len arange astype delete shape zeros range len prepare_pool_data collect_pool_data load int transfer_numeric_index_back_to_imindex print save append array int plot reshape len astype add_subplot mean sqrt _give_calibration_histogram savefig figure save append collect_test_data fill_between std makedirs load concatenate reshape flatten bin_predictions_and_accuracies bin_centers_of_mass append get_multiclass_predictions_and_correctness int str print _region_uncertainty range load calc_uncertainty print makedirs min save open max split print sorted copy makedirs load join time concatenate print reshape squeeze astype shape expected_calibration_error_multiclass nll brier_scores append collect_test_data array brier_decomp_npy print time digitize isinstance size where histogram _validate_probabilities _check_rank_nonempty array digitize where sum bin_predictions_and_accuracies bin_centers_of_mass _filter_top_k arange argpartition shape zeros expand_dims _filter_top_k _validate_probabilities _check_rank_nonempty argmax equal flatten get_multiclass_predictions_and_correctness sum mean zeros argmax max equal enumerate reshape sum softmax sum sklearn_cm mean shape softmax expand_dims argmax max log ones_like percentile T _filter_top_k astype int32 linspace max iteritems join sorted int prepare_the_new_uncertain_input ones SPR_Region_Im reshape print range save zeros sum give_init_train_and_val_data update_training_data makedirs return_pseudo_label print squeeze calculate_score_for_patch get_bald_heatmap get_entropy_heatmap append array range enumerate get_uncert_heatmap generate_binary_mask print reshape astype select_patches_in_image_area argsort shape unique append transfer_strid_rowcol_backto_nostride_rowcol array range print astype extract_edge expand_dims zeros zeros range zeros convolve range astype where sum log sum percentile sum print reshape where zeros argmax range percentile print reshape where range zeros sum log percentile print reshape where zeros sum range extract_bald_index print extract_entropy_index extract_uncertainty_index argsort random_brightness conv_layer_renew deconv_layer_renew constant_initializer ceil zeros abs range pad f1_score reshape float32 py_func reshape roc_curve auc float32 py_func argmax not_equal reshape boolean_mask logical_and sparse_softmax_cross_entropy_with_logits reduce_sum reduce_mean add_to_collection cast int32 add_n cond range equal get_collection ExponentialMovingAverage apply get_collection UPDATE_OPS ExponentialMovingAverage exponential_decay scalar | ### On uncertainty estimation in active learning for image segmentation <br /> This repository provides the implementation for our paper [**On uncertainty estimation in active learning for image segmentation** (Bo Li, Tommy Sonne Alstrøm)](https://arxiv.org/abs/2007.06364). We experimentally show that the region based active learning strategy can lead to higher segmentation accuracy and better calibrated model much faster than full image acquisition:  #### Installation and preparation 1. Clone and enter this repo: ```bash git clone https://lab.compute.dtu.dk/papers/on-uncertainty-estimation-in-active-learning.git cd on-uncertainty-estimation-in-active-learning chmod +x requirement.sh chmod +x produce_figure.sh | 2,865 |
lyprince/sdtw_pytorch | ['time series', 'dynamic time warping'] | ['Soft-DTW: a Differentiable Loss Function for Time-Series'] | sdtw.py sakoe_chiba_band softmin jacobean_product_squared_euclidean MatrixDiagonalIndexIterator SoftDTWLoss SoftDTWLossFunction tuple to list zip | # stdw_pytorch Implementation of soft dynamic time warping in pytorch Here is my implementation of the Soft Dynamic Time Warping loss function described in https://arxiv.org/abs/1703.01541. Currently I have only a 'naive' implementation without extending the fast cython implementation in https://github.com/mblondel/soft-dtw to incorporate a batch dimension. If I continue to use this in my line of research I may implement a cython / CUDA version to increase speed. ####### See: https://github.com/Maghoumi/pytorch-softdtw-cuda for a ***much*** better implementation ####### | 2,866 |
lyuchenyang/Document-level-Sentiment-Analysis-with-User-and-Product-Context | ['sentiment analysis'] | ['Improving Document-Level Sentiment Analysis with User and Product Context'] | pargs.py utils.py modeling.py run_document_level_sa.py SecondPretrainedBert IncrementalContextBert FocalLoss IncrementalContextRoberta Arguments set_seed evaluate second_train main train get_label_distribution Lang remove_chars eval_to_file load_data seed manual_seed_all manual_seed tuple tqdm RandomSampler eval DataLoader gradient_accumulation_steps model get_linear_schedule_with_warmup tuple clip_grad_norm_ zero_grad DataLoader max_grad_norm list set_seed view logging_steps FocalLoss is_incremental CrossEntropyLoss cat SummaryWriter format close mean num_train_epochs info trange enumerate int items evaluate backward AdamW add_scalar loss_fct print dumps RandomSampler tqdm parameters label_list is_focal_loss step train_batch_size len tuple DataLoader argmax eval_batch_size squeeze append SequentialSampler cat update format eval eval_to_file info zip print makedirs tqdm eval_out_file numpy train_batch_size len from_pretrained do_eval incremental batch_size do_shrink model_size weight_decay ArgumentParser device do_train output_dir save eval_all_checkpoints setLevel seed str list set_seed max_seq_length embedding_matrix parse_known_args model_type WARN is_incremental to update inner_size second_train lower save_pretrained num_train_epochs attention_heads info task_name join learning_rate is_second_training warmup_steps evaluate model_name_or_path add_argument makedirs dict label_list load_data is_focal_loss train epochs len mean_squared_error recall_score precision_score f1_score accuracy_score replace load Lang dump tqdm model_type TensorDataset isfile append tensor open | # Improving Document-level Sentiment Analysis with User and Product Context This is the repo for <strong> COLING 2020 </strong> paper titled "<em> Improving Document-level Sentiment Analysis with User and Product Context </em>". ## 1. Installation Firstly you need to install all required libraries: ```angular2 pip install -r requirements.txt ``` ## 2. Download datasets Then download datasets from this url: [dataset](https://drive.google.com/file/d/1Bdt_jw-kiZCt7vJyfXe1hYmPKMinbtFu/view?usp=sharing). Then unzip the downloaded zip file and move all dataset files to "data/document-level-sa-dataset/". | 2,867 |
lzmisscc/emoran | ['scene text recognition'] | ['A Multi-Object Rectified Attention Network for Scene Text Recognition'] | stn/mnist_train.py demo.py models/moran.py tools/dataset.py stn/grid_sample.py debug.py models/morn.py stn/tps_grid_gen.py test.py stn/mnist_model_summuy.py models/asrn_res.py tools/utils.py stn/mnist_model.py stn/data_loader.py main.py models/fracPickup.py bijiao demo val trainBatch ResNet BidirectionalLSTM ASRN AttentionCell Attention Residual_block fracPickup MORAN MORN get_test_loader get_train_loader grid_sample CNN STNClsNet ClsNet UnBoundedGridLocNet BoundedGridLocNet get_model CNN STNClsNet CNN2 ClsNet UnBoundedGridLocNet BoundedGridLocNet get_model stn train test TPSGridGen compute_partial_repr lmdbDataset randomSequentialSampler resizeNormalize averager loadData strLabelConverterForAttention data max decode view LongTensor Variable loadData print convert MORAN transformer IntTensor encode cuda print lower zip data decode DataLoader max view add iter append encode next range cat BidirDecoder averager loadData size MORAN zip float criterion print min len criterion backward loadData MORAN zero_grad step encode next cat BidirDecoder Variable fill_ print ClsNet STNClsNet data format state_dict model backward print nll_loss dataset zero_grad save step cuda enumerate len format model print write eval fsync dataset cuda flush len masked_fill_ size log view copy_ | # MORAN: A Multi-Object Rectified Attention Network for Scene Text Recognition  | <center>Python 2.7</center> | <center>Python 3.6</center> | | :---: | :---: | | <center>[](https://travis-ci.org/Canjie-Luo/MORAN_v2)</center> | <center>[](https://travis-ci.org/Canjie-Luo/MORAN_v2)</center> | MORAN is a network with rectification mechanism for general scene text recognition. The paper (accepted to appear in Pattern Recognition, 2019) in [arXiv](https://arxiv.org/abs/1901.03003), [final](https://www.sciencedirect.com/science/article/pii/S0031320319300263) version is available now. [Here is a brief introduction in Chinese.](https://mp.weixin.qq.com/s/XbT_t_9C__KdyCCw8CGDVA)  ## Recent Update - 2019.03.21 Fix a bug about Fractional Pickup. | 2,868 |
lzx551402/contextdesc | ['geometric matching'] | ['ContextDesc: Local Descriptor Augmentation with Cross-Modality Context'] | models/inference_model.py datasets/yfcc.py datasets/oxford.py datasets/eth.py models/geodesc_model.py datasets/imw2020.py datasets/imw2019.py models/__init__.py utils/evaluator.py evaluations_geodesc.py models/loc_model.py utils/spatial_transformer.py evaluations_rootsift.py models/base_model.py models/cnn_wrapper/network.py models/cnn_wrapper/augdesc.py models/cnn_wrapper/descnet.py image_matching.py datasets/aachen.py models/reg_model.py models/cnn_wrapper/resnet.py utils/common.py datasets/__init__.py utils/tf.py models/aug_model.py utils/hseq_utils.py hseq_eval.py evaluations.py datasets/base_dataset.py utils/opencvhelper.py models/rootsift_model.py extract_reg_feat extract_aug_feat format_data main extract_loc_feat main extract_loc_feat main extract_loc_feat matcher prepare_reg_feat hseq_eval main loader extractor load_imgs extract_augmented_features extract_regional_features main extract_local_features Aachen BaseDataset dict_update Eth Imw2019 Imw2020 write_feature_repo Oxford Yfcc _module_to_class get_dataset AugModel BaseModel dict_update GeodescModel inference LocModel RegModel RootsiftModel get_model _module_to_class LightContextNormalization VisualContext DiffPoolContextNormalization MatchabilityPrediction DenseGeoDesc GeoDesc caffe_like_padding layer Network ResNet50 Notify ClassProperty Evaluator HSeqData HSeqUtils MatcherWrapper SiftWrapper _meshgrid transformer_crop transformer locate_pts batch_transformer load_frozen_model recoverer update decode File close ProgressBar data_length run_test_data get_test_set create_dataset next update decode concatenate File close ProgressBar data_length run_test_data get_test_set stack create_dataset next update decode File close ProgressBar data_length run_test_data get_test_set create_dataset next update ProgressBar data_length get_test_set next extract_reg_feat format_data extract_aug_feat mkdir extract_loc_feat format_data append get_data seq_num range put get COLOR_RGB2GRAY put task_done expand_dims cvtColor run get basename print get_gt_matches get_inlier_matches append feature_matcher range len update join close ProgressBar run_test_data seqs save append imread range enumerate len prepare_reg_feat print Evaluator HSeqUtils inference ConfigProto stats mark_flags_as_required hseq_eval append imread run_test_data close append enumerate norm concatenate close run_test_data stack append enumerate run_test_data close append enumerate show load_imgs join uint8 loc_model concatenate draw_matches get_matches extract_augmented_features MatcherWrapper astype imshow extract_regional_features xticks extract_local_features reg_model yticks get items isinstance Mapping pack ones astype float32 stack format __import__ DenseGeoDesc get_output l2_normalize reshape concat squeeze float32 placeholder batch_normalization get_output_by_name cast add_n append moments GeoDesc format __import__ pad print exit exists import_meta_graph restore Saver global_variables | # ContextDesc implementation

TensorFlow implementation of ContextDesc for CVPR'19 paper (oral) ["ContextDesc: Local Descriptor Augmentation with Cross-Modality Context"](https://arxiv.org/abs/1904.04084), by Zixin Luo, Tianwei Shen, Lei Zhou, Jiahui Zhang, Yao Yao, Shiwei Li, Tian Fang and Long Quan.
This paper focuses on augmenting off-the-shelf local feature descriptors with two types of context: the visual context from high-level image representation, and geometric context from keypoint distribution. If you find this project useful, please cite:
```
@article{luo2019contextdesc,
| 2,869 |
mChataign/DupireNN | ['experimental design'] | ['Deep Local Volatility'] | BS/Bisect.py BS/BS.py BS/BSImplVol.py BS/newton.py bisect bsformula bsimpvol newton append random exp pdf sqrt cdf float log bisect newton append f_prime f random | # DupireNN Authors: Chataigner, Cousin, Crepey, Dixon, and Gueye. If this code is used for research purposes, please cite as: M. Chataigner, A. Cousin, S. Crepey, M.F. Dixon, and D. Gueye, [Beyond Surrogate Modeling: Learning the Local Volatility Via Shape Constraints](http://mypages.iit.edu/~mdixon7/preprints/local_vol.pdf), working paper, 2020. M. Chataigner, S. Crepey and M. Dixon, [Deep Local Volatility](https://www.mdpi.com/2227-9091/8/3/82), Risks 8(3), 82, Special Issue on Machine Learning in Finance, Eds. Thorsten Schmidt, 2020. # Overview Notebook dupireNN.ipynb implements neural network local volatility with the Dupire formula. Due to GitHub size limitations (25mb max per file), outputs from our notebook have been deleted. Only the code remains in this notebook. A second notebook MCBacktests.ipynb calibrates implied volatilities with methodology developped by Gatheral, J., & Jacquier, A. (2014) in "Arbitrage-free SVI volatility surfaces". SSVI calibration is inspired from Matlab code Philipp Rindler (2020). Gatherals and Jacquier's Arbitrage-Free SVI Volatility Surfaces (https://www.mathworks.com/matlabcentral/fileexchange/49962-gatherals-and-jacquier-s-arbitrage-free-svi-volatility-surfaces), MATLAB Central File Exchange. Retrieved June 22, 2020. | 2,870 |
machine-intelligence-laboratory/DDI-100 | ['optical character recognition'] | ['DDI-100: Dataset for Text Detection and Recognition'] | scripts/generator.py scripts/utils.py scripts/visualization.py scripts/examples.py test_mask test_doc test_str test_char Generator combine_masks get_image_from_box draw_word_boxes show_dataset random_show resize Generator get_doc waitKey imshow draw_word_boxes line print Generator waitKey imshow get_string resize get_char Generator print waitKey imshow resize Generator get_doc waitKey imshow combine_masks resize polylines int zip sqrt getPerspectiveTransform append warpPerspective zeros shape resize get_doc waitKey copy imshow draw_word_boxes Generator random_show | # DDI-100 dataset In order to facilitate a new document recognition research, we introduce a Distorted Document Images dataset (DDI-100).<br> To create the dataset we collected 6658 unique document pages, and extended it by applying different types of distortions and geometric transformations.<br> In total, DDI-100 contains 99870 document images together with text masks, stamp masks, text and character locations in terms of bounding boxes. Direct link and detailed description is in [dataset directory](https://github.com/machine-intelligence-laboratory/DDI-100/tree/master/dataset) In [scripts directory](https://github.com/machine-intelligence-laboratory/DDI-100/tree/master/scripts) you can find some python scripts with usefull functions and classes for working with dataset. Preprint can be found here: https://arxiv.org/abs/1912.11658 | 2,871 |
maciej3031/comixify | ['style transfer'] | ['Comixify: Transform video into a comics'] | frontend/admin.py settings/wsgi.py comic_layout/apps.py ComixGAN/model.py api/serializers.py get_yt_comix_media_urls.py style_transfer/tests.py api/tests.py keyframes_rl/models.py neural_image_assessment/model.py style_transfer/apps.py keyframes/tests.py style_transfer/style_transfer.py settings/settings.py manage.py keyframes/apps.py api/apps.py CartoonGAN/network/Transformer.py api/migrations/0002_add_additional_info_to_Comic.py keyframes/admin.py frontend/views.py utils.py comic_layout/admin.py api/views.py keyframes/keyframes.py api/exceptions.py api/models.py keyframes/kts/__init__.py frontend/tests.py api/urls.py popularity/models.py api/migrations/0001_initial.py keyframes/utils.py frontend/urls.py style_transfer/admin.py comic_layout/tests.py api/admin.py api/migrations/0003_add_timestamp.py comic_layout/comic_layout.py frontend/apps.py settings/urls.py frontend/models.py jj profile Timer ComicAdmin VideoAdmin ApiConfig TooLargeFile FileExtensionError Video Comic YouTubeDownloadSerializer VideoSerializer ComixifyFromYoutube Comixify Migration Migration Migration Transformer InstanceNormalization ComicLayoutConfig LayoutGenerator ComixGAN FrontendConfig index KeyframesConfig KeyFramesExtractor UtilsTestCase KeyframesTestCase batch cpd_auto calc_scatters cpd_nonlin DSN NeuralImageAssessment PopularityPredictor StyleTransferConfig StyleTransfer FileField DateTimeField PositiveIntegerField URLField DateTimeField ForeignKey FileField IntegerField FileField IntegerField URLField min range len list T cumsum reshape astype zeros diag int inf calc_scatters print ones reshape min argmin copy shape zeros max range int arange argmin min zeros float max log cpd_nonlin | Repository with code for the "Comixify: Transform video into a comics" paper, that can be found here: https://arxiv.org/abs/1812.03473 In this paper, we propose a solution to transform a video into a comics. We approach this task using a neural style algorithm based on Generative Adversarial Networks (GANs). Several recent works in the field of Neural Style Transfer showed that producing an image in the style of another image is feasible. In this paper, we build up on these works and extend the existing set of style transfer use cases with a working application of video comixification. To that end, we train an end-to-end solution that transforms input video into a comics in two stages. In the first stage, we propose a state-of-the-art keyframes extraction algorithm that selects a subset of frames from the video to provide the most comprehensive video context and we filter those frames using image aesthetic estimation engine. In | 2,872 |
macleginn/exploring-clmd-divergences | ['cross lingual transfer'] | ['Fine-Grained Analysis of Cross-Linguistic Syntactic Divergences'] | src/count_dorrs_divergences.py src/compute_confusion_matrices.py get_confusion_matries_for_corpus get_path prettify_confusion_matrix conll2graph get_confusion_matrices get_percentage_cm get_dorr_divergence_counts append splitlines startswith split get add set put Queue append items list join defaultdict execute get_path conll2graph map strip_subcategory combs loads append DataFrame range strip_direction len sorted insert apply append range to_csv prettify_confusion_matrix get_confusion_matrices get_percentage_cm items combinations execute conll2graph Counter loads append range len | # An aligned subset of the Parallel Universal Dependencies This repository contains word-alignment annotations for several language pairs with PUD corpora. At the moment, English–French, English–Russian, English–Chinese, English–Japanese, English–Korean, and English-Arabic are available. The analysis of the morphosyntactic divergences in these language pairs was reported in ```bibtex @inproceedings{nikolaevetal2020clmd, title="Fine-Grained Analysis of Cross-Linguistic Syntactic Divergences", author="Nikolaev, Dmitry and Arviv, Ofir and Karidi, Taelin and Kenneth, Neta and Mitnik, Veronika and Saeboe, Lilja Maria and Abend, Omri", | 2,873 |
madcpt/pretrained-embeddings-toolkit | ['word embeddings'] | ['From Paraphrase Database to Compositional Paraphrase Model and Back'] | Embeddings/PretrainedEmbeddings.py Embeddings/SL999.py PretrainedEmbeddings read_params read_file dump_params get_embeddings append tqdm split print print tqdm len list KazumaCharEmbedding print tqdm append keys emb | # Pretrained-Embedding-ToolKit Toolkit for processing pretrained-embeddings. Currently support: - 'FastText' - 'Glove' - 'KazumaChar' - 'SL999' ## FastTextEmbedding ## GloveEmbedding ## KazumaCharEmbedding | 2,874 |
madkn/HistogramLoss | ['stochastic optimization'] | ['Learning Deep Embeddings with Histogram Loss'] | caffe-master/python/caffe/test/test_coord_map.py caffe-master/python/caffe/io.py caffe-master/python/caffe/test/test_net_spec.py caffe-master/python/caffe/classifier.py caffe-master/python/caffe/coord_map.py caffe-master/scripts/cpp_lint.py caffe-master/examples/web_demo/app.py caffe-master/python/caffe/test/test_python_layer.py python_layers/distribution_loss_layer.py caffe-master/python/caffe/detector.py caffe-master/python/caffe/test/test_io.py caffe-master/examples/pycaffe/layers/pyloss.py caffe-master/python/caffe/__init__.py caffe-master/python/classify.py caffe-master/python/caffe/test/test_python_layer_with_param_str.py caffe-master/tools/extra/resize_and_crop_images.py caffe-master/python/caffe/test/test_layer_type_list.py validation/ranking.py caffe-master/python/draw_net.py caffe-master/python/caffe/draw.py caffe-master/scripts/copy_notebook.py caffe-master/src/caffe/test/test_data/generate_sample_data.py caffe-master/python/detect.py caffe-master/examples/web_demo/exifutil.py caffe-master/python/caffe/pycaffe.py caffe-master/scripts/download_model_binary.py caffe-master/tools/extra/parse_log.py python_layers/label_shuffling_layer.py caffe-master/examples/pycaffe/caffenet.py caffe-master/python/caffe/test/test_solver.py caffe-master/examples/finetune_flickr_style/assemble_data.py caffe-master/python/caffe/test/test_net.py caffe-master/examples/pycaffe/tools.py caffe-master/tools/extra/summarize.py validation/data_preprocessing.py caffe-master/python/caffe/net_spec.py caffe-master/tools/extra/extract_seconds.py caffe-master/examples/pycaffe/layers/pascal_multilabel_datalayers.py download_image make_net max_pool caffenet conv_relu fc_relu CaffeSolver SimpleTransformer 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 coord_map UndefinedMapException conv_params coord_map_from_to AxisMismatchException inverse crop_params compose crop 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 array_to_datum resize_image arraylist_to_blobprotovector_str 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_outputs _Net_forward_backward_all _Net_blob_loss_weights _Net_batch _Net_get_id_name _Net_inputs TestCoordMap coord_net_spec TestBlobProtoToArray TestArrayToDatum TestLayerTypeList TestLevels TestStages simple_net_file TestNet TestAllInOne lenet TestNetSpec silent_net anon_lenet exception_net_file parameter_net_file SimpleLayer phase_net_file TestPythonLayer ParameterLayer PhaseLayer 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 LabelShufflingLayer initialSetup parseRecord prepareImage transpose_for_storage break_the_image prepareDataset transpose_for_show ranking getPlace 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 iteritems 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 TRAIN draw_net_to_file TEST get params array get params array crop_params conv_params pop collect_bottoms add fn coord_map compose coord_map_from_to items DESCRIPTOR batch_size str num_output get_pooling_types_dict add_edge get_edge_label Dot exclude get_layer_label add_node values choose_color_by_layertype Edge Node bottom append type layer include 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 NetParameter _to_proto extend Counter OrderedDict values iteritems hasattr isinstance extend add getattr setattr OrderedDict _blobs _blob_names zip OrderedDict _blob_loss_weights _blob_names zip OrderedDict list keys list keys iteritems layers index set outputs _forward len iteritems _backward layers inputs index set len iteritems asarray extend copy next _batch itervalues forward len iteritems izip_longest asarray backward extend copy next _batch itervalues zip forward len ascontiguousarray concatenate itervalues zeros next range len data Pooling pool Convolution NetSpec Deconvolution conv Input 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 xrange len FindEndOfExpressionInLine xrange len FindStartOfExpressionInLine error min search I xrange 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 xrange NumLines Match raw_lines 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 xrange find CheckComment Match 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 xrange find Match 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 itervalues append M rstrip replace CheckCStyleCast error _GetTextInside CheckIncludeLine search group lstrip startswith Match ResetSection Search split rfind error group ReverseCloseExpression lstrip xrange findall Match Search ReplaceAll error Match Search endswith replace setdefault group search CleanseComments open FilesBelongToSameModule error search copy sub xrange NumLines FullName keys 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 NumLines RemoveMultiLineComments CheckForCopyright ResetNolintSuppressions CheckForHeaderGuard xrange CheckCompletedBlocks CheckForIncludeWhatYouUse 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 label FromString datum_to_array dict open list transpose_for_storage min extend copy max range break_the_image has_key resize prepareImage dict xrange append keys len xrange len cdist dict getPlace xrange zeros array len | # Histogram Loss This repository contains code for paper "Learning Deep Embeddings with Histogram Loss" (NIPS2016) ## Citing this work @inproceedings{UstinovaNIPS16, Author = {Evgeniya Ustinova and Victor Lempitsky}, Title = {Learning Deep Embeddings with Histogram Loss}, Booktitle = {Neural Information Processing Systems}, Year = {2016} } Pytorch implementation: https://github.com/valerystrizh/pytorch-histogram-loss \ | 2,875 |
madkn/MultiregionBilinearCNN-ReId | ['person re identification'] | ['Multiregion Bilinear Convolutional Neural Networks for Person Re-Identification'] | caffe-bilinear/python/caffe/detector.py caffe-bilinear/scripts/download_model_binary.py caffe-bilinear/scripts/split_caffe_proto.py caffe-bilinear/python/caffe/io.py caffe-bilinear/examples/pycaffe/layers/pascal_multilabel_datalayers.py caffe-bilinear/examples/web_demo/app.py caffe-bilinear/src/caffe/test/test_data/generate_sample_data.py caffe-bilinear/tools/extra/parse_log.py caffe-bilinear/python/train.py caffe-bilinear/examples/pycaffe/tools.py caffe-bilinear/python/caffe/test/test_python_layer.py caffe-bilinear/python/caffe/test/test_layer_type_list.py caffe-bilinear/python/caffe/draw.py caffe-bilinear/python/caffe/pycaffe.py caffe-bilinear/scripts/copy_notebook.py caffe-bilinear/python/caffe/test/test_io.py caffe-bilinear/examples/pycaffe/caffenet.py caffe-bilinear/tools/extra/resize_and_crop_images.py caffe-bilinear/python/caffe/net_spec.py caffe-bilinear/python/caffe/coord_map.py caffe-bilinear/python/detect.py caffe-bilinear/python/caffe/test/test_python_layer_with_param_str.py caffe-bilinear/python/classify.py caffe-bilinear/python/caffe/__init__.py caffe-bilinear/python/caffe/test/test_solver.py caffe-bilinear/python/caffe/test/test_coord_map.py caffe-bilinear/python/caffe/test/test_net.py caffe-bilinear/examples/pycaffe/layers/pyloss.py caffe-bilinear/scripts/cpp_lint.py caffe-bilinear/python/caffe/classifier.py caffe-bilinear/python/draw_net.py caffe-bilinear/tools/extra/summarize.py caffe-bilinear/tools/extra/extract_seconds.py caffe-bilinear/examples/web_demo/exifutil.py caffe-bilinear/python/caffe/test/test_net_spec.py caffe-bilinear/examples/finetune_flickr_style/assemble_data.py download_image make_net max_pool caffenet conv_relu fc_relu CaffeSolver SimpleTransformer 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 train solve time Classifier coord_map UndefinedMapException conv_params coord_map_from_to AxisMismatchException inverse crop_params compose crop 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 array_to_datum resize_image arraylist_to_blobprotovector_str 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_outputs _Net_forward_backward_all _Net_blob_loss_weights _Net_batch _Net_get_id_name _Net_inputs _Net_layer_dict TestCoordMap coord_net_spec TestBlobProtoToArray TestArrayToDatum TestLayerTypeList TestLevels TestStages simple_net_file TestNet TestAllInOne lenet TestNetSpec silent_net anon_lenet exception_net_file parameter_net_file SimpleLayer phase_net_file TestPythonLayer ParameterLayer PhaseLayer 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 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 iteritems 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 TRAIN draw_net_to_file TEST Process str join init_log start append new_uid range log len before_backward layers display add_callback after_backward after_forward Timer append before_forward range len max_iter restore time set_solver_count set_solver_rank add_callback set_device set_multiprocess SGDSolver after_backward set_mode_gpu layer_wise_reduce step bcast NCCL len get params array get params array crop_params conv_params pop collect_bottoms add fn coord_map compose coord_map_from_to items DESCRIPTOR batch_size str num_output get_pooling_types_dict add_edge get_edge_label Dot exclude get_layer_label add_node values choose_color_by_layertype Edge Node bottom append type layer include 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 NetParameter _to_proto extend Counter OrderedDict values iteritems hasattr isinstance extend add getattr setattr OrderedDict _blobs _blob_names zip OrderedDict _blob_loss_weights _blob_names zip OrderedDict layers _layer_names zip OrderedDict list keys list keys iteritems layers index set outputs _forward len iteritems _backward layers inputs index set len iteritems asarray extend copy next _batch itervalues forward len iteritems izip_longest asarray backward extend copy next _batch itervalues zip forward len ascontiguousarray concatenate itervalues zeros next range len data Pooling pool Convolution NetSpec Deconvolution conv Input 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 xrange len FindEndOfExpressionInLine xrange len FindStartOfExpressionInLine error min search I xrange 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 xrange NumLines Match raw_lines 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 xrange find CheckComment Match 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 xrange find Match 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 itervalues append M rstrip replace CheckCStyleCast error _GetTextInside CheckIncludeLine search group lstrip startswith Match ResetSection Search split rfind error group ReverseCloseExpression lstrip xrange findall Match Search ReplaceAll error Match Search endswith replace setdefault group search CleanseComments open FilesBelongToSameModule error search copy sub xrange NumLines FullName keys 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 NumLines RemoveMultiLineComments CheckForCopyright ResetNolintSuppressions CheckForHeaderGuard xrange CheckCompletedBlocks CheckForIncludeWhatYouUse 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 | # MultiregionBilinearCNN-ReId This is the caffe code and pre-trained models used for the paper "Multi-region Bilinear Convolutional Neural Networks for Person Re-Identification". ## Citation @inproceedings{ustinova2017, Author = {E. Ustinova, Y. Ganin, V. Lempitsky}, Booktitle = {(AVSS 2017) 2017 14th IEEE International Conference on Advanced Video and Signal based Surveillance}, Title = {Multi-region Bilinear Convolutional Neural Networks for Person Re-Identification}, Year = {2017} } | 2,876 |
maguirre1/deepLAI | ['semantic segmentation'] | ['A deep learning classifier for local ancestry inference'] | data/admixture-sim/label_convert_naive.py data/reference-panel/vcf_to_numpy.py data/reference-panel/make_labels.py model/segnet.py data/CRF/create_pooled_data_for_CRF.py model/params.py results/evaluate_rfmix.py model/generator.py model/train.py results/evaluate.py model/train_CRF.py get_args evaluate_raw_model_accuracy create_CRF_data load_recprobs load_input_data average_windows main easy_open DataLoader naive_admixing DataGenerator segnet get_args load_dev_set plot_info main train filter_ac load_train_set get_args define_model evaluate_raw_model_accuracy evaluate_crf_accuracy load_data main get_args expand_rfmix_windows load_data main evaluate_model load str arange print mean zeros range print str range genfromtxt print astype shape range int list str print dict append argmax range parse_args add_argument ArgumentParser str dump get_args print evaluate_raw_model_accuracy load_recprobs create_CRF_data load_input_data average_windows open range len list arange hstack astype choice vstack append enumerate int concatenate reversed append Input range load str print loadtxt min shuffle max str arange print min choice max genfromtxt load_dev_set save_weights exists Adam savetxt filter_ac sum load_train_set format fit_generator load_weights summary compile segnet print EarlyStopping system CSVLogger ModelCheckpoint array fit subplot use plot title savefig figure legend plot_info exit train out load str print append range open CRF len str print range predict len define_model evaluate_crf_accuracy load_data fit exists read_table print DataFrame astype range to_string str print DataFrame astype confusion_matrix divide close flatten writelines sum diag open expand_rfmix_windows vars array evaluate_model | # A deep learning classifier for Local Ancestry Inference (LAI) This is the project repository for ["A deep learning classifier for local ancestry inference"](https://arxiv.org/abs/2011.02081). Here, you will find descriptions of our reference panel, baseline model (RFMix), and deep learning classifier (SegNet) -- respectively, in the `data`, `baseline`, and `model` subdirectories. Additional information on evaluation, including results from a hyperparameter optimization and full test set benchmark, can be found in the `results` foder. Questions about this project can be addressed here on the repository, or sent to Matthew Aguirre (magu) and Alexander Ioannidis (ioannid) -- respective addresses (at stanford dot edu). | 2,877 |
mahdihosseini/AdaS | ['stochastic optimization'] | ['Adam: A Method for Stochastic Optimization', 'Exploiting Explainable Metrics for Augmented SGD'] | src/rmsgd/components.py src/rmsgd/metrics.py setup.py src/rmsgd/__init__.py src/rmsgd/rmsgd.py src/rmsgd/matrix_factorization.py LRMetrics LayerMetrics ConvLayerMetrics LayerType phi0 EVBMF phi1 tau EVBsigma2 Metrics RMSGD svd T int min shape sqrt stack minimize_scalar sum max x divide tau sum log len | # RMSGD: Augmented SGD Optimizer Official PyTorch implementation of the **RMSGD** optimizer from: > [**Exploiting Explainable Metrics for Augmented SGD**](https://arxiv.org/abs/2203.16723) > Mahdi S. Hosseini, Mathieu Tuli, Konstantinos N. Plataniotis > *Accepted in IEEE/CVF Conference on Computer Vision and Pattern Recognition ([CVPR2022](https://cvpr2022.thecvf.com/))* > --- We propose new explainability metrics that measure the redundant information in a network's layers and exploit this information to augment the Stochastic Gradient Descent (SGD) optimizer by adaptively adjusting the learning rate in each layer. We call this new optimizer **RMSGD**. RMSGD is fast, performs better than existing sota, and generalizes well across experimental configurations. ## Contents This repository + branch contains the standalone optimizer, which is pip installable. Equally, you could copy the contents of [src/rmsgd](src/rmsgd) into your local repository and use the optimizer as is. | 2,878 |
mahmoodlab/TOAD | ['whole slide images'] | ['Deep Learning-based Computational Pathology Predicts Origins for Cancers of Unknown Primary'] | utils/eval_utils_mtl_concat.py models/model_toad.py utils/utils.py utils/file_utils.py main_mtl_concat.py utils/core_utils_mtl_concat.py datasets/dataset_mtl_concat.py eval_mtl_concat.py create_splits.py models/resnet_custom.py main seed_torch Generic_WSI_MTL_Dataset Generic_MIL_MTL_Dataset Generic_Split save_splits TOAD_fc_mtl_concat Attn_Net_Gated load_pretrained_weights resnet50_baseline ResNet_Baseline Bottleneck_Baseline validate train_loop Accuracy_Logger EarlyStopping summary train initiate_model eval accuracy summary save_pkl load_pkl initialize_weights SubsetSequentialSampler nth make_weights_for_balanced_classes_split get_simple_loader collate_MIL_mtl_concat calculate_error print_network get_split_loader get_optim generate_split seed join seed_torch format arange k_start append print k_end k to_csv save_pkl mkdir results_dir train DataFrame return_splits len seed str manual_seed_all manual_seed concat tolist astype to_csv repeat DataFrame load_pretrained_weights ResNet_Baseline load_url load_state_dict validate n_classes save TOAD_fc_mtl_concat get_split_loader str early_stopping save_splits relocate load_state_dict get_summary results_dir CrossEntropyLoss range state_dict SummaryWriter format max_epochs train_loop close log_data mkdir get_optim load join add_scalar print EarlyStopping summary print_network len model Accuracy_Logger zero_grad device log get_summary to range format size calculate_error item enumerate backward print loss_fn train step add_scalar Accuracy_Logger device roc_auc_score early_stopping len get_summary append range format label_binarize eval float print roc_curve nanmean zeros calc_auc array early_stop add_scalar update Accuracy_Logger eval roc_auc_score calculate_error item device zeros to numpy log enumerate len load print relocate eval load_state_dict print_network TOAD_fc_mtl_concat initiate_model summary print get_simple_loader n_classes ravel argmax DataFrame from_numpy append range micro_average format label_binarize float auc print roc_curve accuracy nanmean array dump close open load close open LongTensor cat DataLoader int arange make_weights_for_balanced_classes_split choice DataLoader len parameters filter Adam SGD print parameters requires_grad numel seed setdiff1d arange astype extend choice intersect1d ceil range len item int getlabel float range len isinstance modules zero_ xavier_normal_ weight Linear | mahmoodlab/TOAD | 2,879 |
mahmoudnabil/ASTD | ['sentiment analysis'] | ['ASTD: Arabic Sentiment Tweets Dataset'] | python/AraTweet.py python/Definations.py python/twitter_experiments.py python/Utilities.py plot ReadLexicon1 ReadLexicon show_most_informative_features Train_And_Predict MySelectPercentile unique_rows Evaluate_Result str sorted get_feature_names write sub zip open int sorted concatenate print fit zip round range len print size average unique append float sum concatenate print array range predict fit get_position set_xticklabels xlabel set_position draw add_subplot ylabel title figure legend xticks range len view ascontiguousarray unique readlines sub range len readlines sub range len | ASTD: Arabic Sentiment Tweets Dataset =============================================== This dataset contains over 10k Arabic sentiment tweets classified into four classes subjective positive, subjective negative, subjective mixed, and objective. Two sets of baseline sentiment analysis experiments are supported with the dataset. Contents: --------- - README.md: this file - data/ - Tweets.txt: a tab separated file containing the "cleaned up" tweets. It contains over 10k tweet. The format is: | 2,880 |
mahnazkoupaee/WikiHow-Dataset | ['text summarization'] | ['WikiHow: A Large Scale Text Summarization Dataset'] | process.py | # WikiHow-Dataset WikiHow: A Large Scale Text Summarization Dataset WikiHow is a new large-scale dataset using the online WikiHow (http://www.wikihow.com/) knowledge base <sup>[*](#footnote1)</sup>. The dataset is introduced in https://arxiv.org/abs/1810.09305. Please refer to the paper for more information regarding the dataset and its properties. Each article consists of multiple paragraphs and each paragraph starts with a sentence summarizing it. By merging the paragraphs to form the article and the paragraph outlines to form the summary, the resulting version of the dataset contains more than 200,000 long-sequence pairs. There are two separate data files containing the articles and their summaries: The wikihowAll.csv file consisting of the concatenation of all paragraphs as the articles and the bold lines as the reference summaries.: |Part|Description| |-------|-------------| |Title|the title of the article as it appears on the WikiHow knowledge base| |Headline|the concatenation of all the bold lines (the summary sentences) of all the paragraphs to serve as the reference summary| | 2,881 |
mahossam/Explain2Attack | ['text classification', 'adversarial attack'] | ['Explain2Attack: Text Adversarial Attacks via Cross-Domain Interpretability'] | BERT/run_classifier.py BERT/run_classifier_snli.py BERT/run_classifier_Yelp.py l2x/explain.py BERT/modeling.py BERT/run_classifier_IMDB.py BERT/run_classifier_Fake.py InferSent/models.py attack_classification.py BERT/optimization.py dataloader.py BERT/file_utils.py BERT/tokenization.py l2x/l2x_utils.py BERT/run_classifier_AG.py utils/__init__.py l2x/bert/l2x_Dataset_BERT.py playground.py l2x/bert/file_utils.py l2x/bert/l2x_tokenization.py BERT/__init__.py modules.py train_classifier.py BERT/run_classifier_MR.py BERT/run_classifier_mnli.py criteria.py l2x/l2x_dataloader.py BERT/extract_features.py save_all_labels InputFeatures NLIDataset_BERT USE remove_padding_if_any save_sent_viz_file attack save_all_predictionas_probs_and_labels NLI_infer_BERT main pick_most_similar_words_batch random_attack log_current_results get_stopwords pos_filter get_v_tense check_pos get_pos main change_tense get_sent_list read_MPQA cv_split read_TREC cv_split2 pad_or_trim load_embedding_txt read_CR read_SST create_batches_x read_SUBJ create_one_batch create_batches clean_str load_embedding load_embedding_npz create_one_batch_x read_MR read_corpus EmbeddingLayer CNN_Text deep_iter something train_model eval_model save_data Model main read_examples InputFeatures InputExample _truncate_seq_pair convert_examples_to_features main 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 prune_linear_layer BertPooler gelu BertPreTrainedModel BertForMultipleChoice BertConfig ReverseLayerF BertLayer GELU BertForTokenClassification BertModel BertForNextSentencePrediction BertIntermediate BertForSequenceClassification BertForPreTraining swish BertLMPredictionHead load_tf_weights_in_bert BertForSequenceClassification_MT BertSelfOutput _LRSchedule BertAdam WarmupCosineWithWarmupRestartsSchedule WarmupCosineSchedule WarmupCosineWithHardRestartsSchedule RAdam WarmupConstantSchedule WarmupLinearSchedule BertAdamax ConstantLR SnliProcessor MRProcessor AGProcessor InputFeatures MrpcProcessor ColaProcessor accuracy MnliProcessor InputExample IMDBProcessor _truncate_seq_pair FakeProcessor convert_examples_to_features clean_str main YelpProcessor DataProcessor BasicTokenizer WordpieceTokenizer load_vocab whitespace_tokenize convert_to_unicode _is_whitespace _is_control BertTokenizer _is_punctuation NLINet InferSent BGRUlastEncoder LSTMEncoder GRUEncoder InnerAttentionMILAEncoder InnerAttentionNAACLEncoder ClassificationNet BLSTMprojEncoder ConvNetEncoder InnerAttentionYANGEncoder construct_gumbel_selector load_data_bert_explain TileWrapper save_scores load_data_CNN_LSTM post_process_trim_then_pad_right Sample_Concrete load_data_bert create_original_model L2X generate_original_preds Concatenate read_MPQA read_SUBJ create_batches create_one_batch cv_split2 load_embedding load_embedding_npz read_corpus load_embedding_txt read_SST create_batches_x create_one_batch_x cv_split shuffle_csv_corpus_and_save read_TREC pad_or_trim read_CR clean_str read_MR calculate_acc create_dataset_from_score get_selected_words save_sent_viz_file str_to_bool export_to_Jin_paper_format_bert 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 _truncate_seq_pair convert_examples_to_features Dataset_BERT BasicTokenizer WordpieceTokenizer load_vocab whitespace_tokenize convert_to_unicode _is_whitespace _is_control BertTokenizer _is_punctuation str_to_bool append array enumerate unsqueeze get_pos l2x_word_ranking argmax attack_max_seq_length cuda max list predictor squeeze pos_filter append str_to_bool set pick_most_similar_words_batch pop jin_word_ranking reverse_syn_order min numpy array len unsqueeze get_pos argmax attack_max_seq_length cuda max predictor squeeze pos_filter append range sample pick_most_similar_words_batch pop int min numpy array len append list attack_data_path get_stopwords USE_cache_path r_pos USE text_pred l2x_k_words ArgumentParser output_dir save attack_max_seq_length exists cuda open run str list max log_current_results random_attack outdir_postfix len l2x_test_data_path strftime load_state_dict attack NLI_infer_BERT parse_args append r_path counter_fitting_cos_sim_path read_corpus vocab update format close set zip l2x_train_data_path flush perturb_ratio load join int save_all_labels T norm enumerate n print target_model add_argument write target_model_path dot tqdm total save_sent_viz_file array makedirs join format print target_model min write mean array save output_dir max flush join output_dir EntitySubstitution save array join squeeze numpy save argmax attack_max_seq_length join save set pos_tag zip pos_tag zip lemmatize format set_trace shuffle zip enumerate pos_filter set_trace get_v_tense check_pos get_pos split change_tense range get_sent_list sub shuffle list range len seed join list len shuffle range read_corpus seed join list len shuffle range read_corpus seed join list len shuffle range read_corpus seed join list len shuffle range read_corpus seed join list len shuffle range read_corpus seed join list len shuffle range read_corpus int list shuffle range len pad_or_trim LongTensor len pad_or_trim LongTensor len sorted list format len write shuffle append range flush create_one_batch sorted list shuffle create_one_batch_x append range len load endswith print sleep eval train format eval_model criterion model backward print state_dict zero_grad write item zip save train step CrossEntropyLoss flush len batch_size create_batches dataset max_epoch Adam dirname max_length save_path word2id train_model parameters filter join text_b InputFeatures convert_tokens_to_ids _truncate_seq_pair tokenize info append unique_id text_a enumerate len pop len from_pretrained arange DataParallel DistributedDataParallel DataLoader device tensor read_examples DistributedSampler device_count TensorDataset convert_examples_to_features to SequentialSampler input_file init_process_group size eval info bert_model bool local_rank 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 decode join list url_to_filename filter startswith listdir head makedirs set list size len contiguous copy_ device to detach load_variable join int format zip print transpose fullmatch from_numpy any getattr list_variables abspath append split guid argmax BertAdam seed manual_seed_all param_groups get_world_size mean BertConfig manual_seed learning_rate BertForSequenceClassification step enable_attach zero_grad do_train eval_batch_size DDP max_seq_length get_labels FusedAdam do_resume lower trange accuracy get_dev_examples train gradient_accumulation_steps get_train_examples model tuple FP16_Optimizer data_dir set_device half warmup_linear state_dict fp16 wait_for_attach named_parameters numpy train_batch_size num_train_epochs warmup_proportion backward RandomSampler OrderedDict strip split category category startswith startswith category ord isinstance PY3 PY2 source_max_seq_length list tokenizer target_data_path convert_examples_to_features read_corpus vocab test_data_path post_process_trim_then_pad_right Dataset_BERT set target_max_seq_length mkdir keys train_data_path print target_model_path dict array len vocab post_process_trim_then_pad_right len tokenizer Dataset_BERT target_model_path dict target_max_seq_length array target_data_path convert_examples_to_features source_max_seq_length keys read_corpus word_embeddings_path create_batches source_max_seq_length list target_data_path load_embedding read_corpus test_data_path format post_process_trim_then_pad_right set target_max_seq_length create_batches_x mkdir keys train_data_path print write dict array len Embedding Sequential add Dense Conv1D Activation GlobalMaxPooling1D compile Dropout join calculate_acc format print outdir load_data_bert load_weights save create_original_model ModelCheckpoint argmax predict fit Embedding emb_layer outdir k_words save str load_data_explain Model train_pred_labels predict format val_pred_labels load_weights compile load join time print reshape target_model save_fname_explain_id load_data ModelCheckpoint fit join create_dataset_from_score outdir save_sent_viz_file save list replace shuffle range len enumerate enumerate zeros astype join outdir get_selected_words save append array enumerate list copy print | # Explain2Attack Implementation for the paper: ["Explain2Attack: Text Adversarial Attacks via Cross-Domain Interpretability"](https://arxiv.org/abs/2010.06812), In 25th International Conference on Pattern Recognition (ICPR 2020). ## Prerequisites: * Pytorch >= 0.4 * Tensorflow >= 1.0 * Numpy * Python >= 3.6 ## How to use * Run the following code to install the **esim** package: ``` | 2,882 |
mailong25/wav2letter | ['speech recognition'] | ['wav2letter++: The Fastest Open-source Speech Recognition System'] | recipes/models/seq2seq_tds/librispeech/prepare.py recipes/models/lexicon_free/utilities/compute_upper_ppl_kenlm.py bindings/python/examples/criterion_example.py bindings/python/wav2letter/criterion_torch.py recipes/models/conv_glu/librispeech/prepare.py recipes/models/lexicon_free/utilities/utils.py recipes/timit/data/utils.py recipes/data/wsj/prepare.py recipes/models/utilities/prepare_librispeech_official_lm.py bindings/python/wav2letter/decoder.py recipes/models/lexicon_free/utilities/compute_upper_ppl_convlm.py bindings/python/wav2letter/__init__.py recipes/models/utilities/convlm_serializer/save_pytorch_model.py bindings/python/wav2letter/feature.py bindings/python/examples/feature_example.py recipes/data/librispeech/utils.py recipes/models/conv_glu/wsj/prepare.py recipes/models/lexicon_free/librispeech/prepare.py bindings/python/wav2letter/common.py tutorials/1-librispeech_clean/prepare_data.py recipes/models/lexicon_free/utilities/compute_lower_ppl_kenlm.py recipes/data/wsj/utils.py bindings/python/examples/decoder_example.py bindings/python/setup.py recipes/data/librispeech/prepare.py bindings/python/wav2letter/criterion.py recipes/models/lexicon_free/utilities/compute_lower_ppl_convlm.py tutorials/1-librispeech_clean/prepare_lm.py recipes/models/lexicon_free/utilities/convlm_utils.py recipes/models/lexicon_free/wsj/prepare.py recipes/timit/data/prepare_data.py CMakeExtension CMakeBuild check_negative_env_flag check_env_flag load_emissions load_tn load_transitions assert_near read_struct load_data ASGLoss get_data_ptr_as_bytes run_direction run_backward run_get_workspace_size FCCFunction create_workspace run_forward check_tensor FACFunction get_cuda_stream_as_bytes parse_speakers_gender read_list transcript_to_list find_transcript_files ndx_to_samples convert_to_flac preprocess_word find_transcripts get_spelling compute_word_logprob compute_words_model_pdf_mass compute_ppl_lower_limit compute_denominator compute_word_logprob compute_words_model_pdf_mass compute_ppl_lower_limit compute_denominator compute_ppl_upper_limit_char_convlm compute_ppl_upper_limit_word_convlm compute_upper_limit_ppl_for_kenlm load_char_model_14B compute_new_state load_word_model decodeInputText load_char_model_20B build_token_index_correspondence convert_words_to_letters_asg_rep2 transform_asg_back prepare_vocabs_convlm transform_asg prepare_vocabs compare remap_words_with_same_spelling get_spelling convert save_model copytoflac write_sample findtranscriptfiles join abspath cuda_stream Size fn cpu_impl getattr device run_direction run_direction device run_get_workspace_size endswith join walk append dirname lower sub replace dict join walk setdefault sort join Transformer format remove duration strip system build set_output_format sub replace cuda max argsort sum compute_word_logprob compute_words_model_pdf_mass exp print strip set add append enumerate len list State BaseScore str append power State array BeginSentenceWrite BaseScore transform_asg_back split State exp format print cuda enumerate exp format print cuda enumerate dict items list load compute_new_state eval load_state_dict cuda load compute_new_state eval load_state_dict cuda load compute_new_state eval load_state_dict cuda append dict items list sorted defaultdict dict load Transformer set_output_format build copytoflac join replace endswith join walk append | # wav2letter++ [](https://circleci.com/gh/facebookresearch/wav2letter) wav2letter++ is a fast, open source speech processing toolkit from the Speech team at Facebook AI Research built to facilitate research in end-to-end models for speech recognition. It is written entirely in C++ and uses the [ArrayFire](https://github.com/arrayfire/arrayfire) tensor library and the [flashlight](https://github.com/facebookresearch/flashlight) machine learning library for maximum efficiency. Our approach is detailed in this [arXiv paper](https://arxiv.org/abs/1812.07625). This repository also contains pre-trained models and implementations for various ASR results including: - [Likhomanenko et al. (2019): Who Needs Words? Lexicon-free Speech Recognition](recipes/models/lexicon_free/README.md) - [Hannun et al. (2019): Sequence-to-Sequence Speech Recognition with Time-Depth Separable Convolutions](recipes/models/seq2seq_tds/README.md) The previous iteration of wav2letter (written in Lua) can be found in the [`wav2letter-lua`](https://github.com/facebookresearch/wav2letter/tree/wav2letter-lua) branch. ## Building wav2letter++ See [Building Instructions](docs/installation.md) for details. ## Full documentation | 2,883 |
majumderb/sanskrit-ocr | ['optical character recognition', 'text summarization'] | ['Upcycle Your OCR: Reusing OCRs for Post-OCR Text Correction in Romanised Sanskrit', 'Incorporating Copying Mechanism in Sequence-to-Sequence Learning'] | nmt/nmt/utils/standard_hparams_utils.py nmt/nmt/utils/iterator_utils_test.py nmt/nmt/copynet.py nmt/nmt/utils/vocab_utils_test.py nmt/nmt/inference.py nmt/nmt/utils/vocab_utils.py nmt/nmt/nmt_test.py nmt/nmt/model_helper.py nmt/nmt/gnmt_model.py nmt/nmt/utils/evaluation_utils.py nmt/nmt/model.py nmt/nmt/inference_test.py copynet.py nmt/nmt/model_test.py nmt/nmt/utils/misc_utils_test.py nmt/nmt/train.py nmt/nmt/utils/iterator_utils.py nmt/nmt/scripts/bleu.py nmt/nmt/attention_model.py nmt/nmt/nmt.py nmt/nmt/utils/evaluation_utils_test.py nmt/nmt/utils/common_test_utils.py nmt/nmt/scripts/rouge.py nmt/nmt/utils/misc_utils.py nmt/nmt/utils/nmt_utils.py CopyNetWrapperState CopyNetWrapper create_attention_mechanism AttentionModel _create_attention_images_summary CopyNetWrapperState CopyNetWrapper GNMTModel gnmt_residual_fn GNMTAttentionMultiCell single_worker_inference _decode_inference_indices multi_worker_inference load_data inference InferenceTest BaseModel Model _create_or_load_embed gradient_clip create_train_model load_model create_emb_for_encoder_and_decoder get_device_str create_infer_model compute_perplexity _get_embed_device create_or_load_model TrainModel _cell_list avg_checkpoints get_initializer create_rnn_cell _create_pretrained_emb_from_txt InferModel EvalModel create_eval_model ExtraArgs _single_cell ModelTest create_or_load_hparams run_main ensure_compatible_hparams add_arguments extend_hparams main create_hparams NMTTest _update_flags run_avg_external_eval run_external_eval before_train run_sample_decode init_stats run_internal_eval update_stats process_stats _format_results _internal_eval _external_eval print_step_info train _get_best_results run_full_eval _sample_decode _get_ngrams compute_bleu _len_lcs _get_ngrams rouge rouge_l_summary_level rouge_n _recon_lcs _split_into_words _lcs rouge_l_sentence_level _union_lcs _f_p_r_lcs _get_word_ngrams create_test_hparams create_test_iterator _clean evaluate _word_accuracy _accuracy _rouge _bleu _moses_bleu EvaluationUtilsTest get_iterator BatchedInput get_infer_iterator IteratorUtilsTest debug_tensor check_tensorflow_version format_spm_text format_text print_time print_hparams get_config_proto print_out load_hparams format_bpe_text add_summary safe_exp maybe_parse_standard_hparams save_hparams MiscUtilsTest get_translation decode_and_evaluate create_standard_hparams check_vocab load_embed_txt load_vocab create_vocab_tables VocabUtilsTest LuongAttention BahdanauAttention expand_dims stack image transpose assert_same_structure map_structure time print_out print_time single_worker_inference multi_worker_inference GNMTModel Model create_infer_model AttentionModel inference_indices load_data int min load_data len src_vocab_file tgt_vocab_file Graph src_vocab_file tgt_vocab_file Graph Graph tgt_vocab_file src_vocab_file constant slice load_embed_txt load_vocab print_out array _create_pretrained_emb_from_txt fixed_size_partitioner BasicLSTMCell print_out DeviceWrapper DropoutWrapper NASCell LayerNormBasicLSTMCell GRUCell ResidualWrapper __name__ append print_out single_cell_fn range _cell_list clip_by_global_norm scalar global_norm append time restore tables_initializer print_out run join dtype get_checkpoint_state load_checkpoint get_tensor print_out MakeDirs list_variables zeros time load_model latest_checkpoint tables_initializer print_out eval global_variables_initializer run safe_exp eval time print_time register add_argument Exists avg_ckpts out_dir num_decoder_layers embed_prefix num_encoder_layers dev_prefix tgt print_out train_prefix residual copynet tgt_vocab_size MakeDirs add_hparam join src vocab_prefix metrics print check_vocab share_vocab test_prefix list setattr print_out add_hparam maybe_parse_standard_hparams values override_loaded_hparams metrics ensure_compatible_hparams extend_hparams getattr load_hparams print_hparams maybe_parse_standard_hparams save_hparams ckpt subword_option seed inference_input_file print_out hparams_path inference_list latest_checkpoint inference_output_file MakeDirs random_seed inference_ref_file create_or_load_hparams train_fn jobid inference_fn evaluate metrics num_workers out_dir inference train create_hparams run_main join get_temp_dir batch_size_placeholder src_placeholder iterator _sample_decode _internal_eval iterator iterator _external_eval run_external_eval avg_ckpts num_keep_ckpts avg_checkpoints run_avg_external_eval run_external_eval metrics _format_results run_sample_decode run_internal_eval test_prefix print_out safe_exp print_out time initializer batch_size epoch_step init_stats print_out run num_train_steps avg_ckpts GNMTModel save Session create_train_model steps_per_stats print_time GFile get_config_proto init_stats run_internal_eval update_stats Model create_infer_model print_out add_summary getattr print_step_info run_full_eval log_device_placement before_train close FileWriter process_stats steps_per_external_eval _get_best_results run_avg_external_eval join time run_external_eval metrics graph run_sample_decode load_data AttentionModel out_dir create_eval_model append metrics add_summary compute_perplexity initializer run decode initializer len print_out add_summary randint get_translation run join setattr initializer metrics print_out getattr save out_dir add_summary decode_and_evaluate save_hparams run tuple range Counter len _get_ngrams exp Counter zip float sum range len add set _split_into_words _lcs dict max range tuple _lcs intersection _get_word_ngrams len _len_lcs _split_into_words len _recon_lcs set _split_into_words union len _split_into_words len mean list map zip create_standard_hparams constant index_table_from_tensor from_tensor_slices index_to_string_table_from_tensor _accuracy _rouge _word_accuracy _bleu lstrip strip sub _clean zip append compute_bleu split rouge check_output search group call float constant make_initializable_iterator map get_next lookup cast int32 batching_func constant make_initializable_iterator prefetch shard group_by_window shuffle skip apply get_next lookup filter cast int32 zip batching_func exp print flush decode isinstance print write encode flush sorted list print_out keys values join print_out Exists Exists print_out join print_out name Summary ConfigProto encode append isinstance len time print_out evaluate format_spm_text format_text tolist format_bpe_text encode join basename Exists load_vocab print_out len index_table_from_file dict | # Post-OCR Text Correction in Romanised Sanskrit This repository contains the data, the codes (implemented in tensorflow) and the supplementary material for the CoNLL 2018 paper ["***Upcycle* Your OCR: Reusing OCRs for Post-OCR Text Correction in Romanised Sanskrit**"](http://aclweb.org/anthology/K18-1034) ## Data nmt/nmt_data contains the data files. 1. Training files (train_BPE.src and train_BPE.trg) contain the BPE encoded input strings which were the output of the OCR system. 2. Testing files (test_BPE.src and test_BPE.trg) contain the BPE encoded input strings for testing. These strings are taken from *Gita* and *Sahasranama* manuscripts. 3. Validation files (valid_BPE.src and valid_BPE.trg) contain the BPE encoded strings for validation. 4. Vocabulary file vocab_BPE.src contains the shared vocabulary obtained after BPE. This vocab file can contain specific tokens which are only to be copied. In our experiement, we used the complete shared vocabulary as tokens which need to be copied and/or generated. ## Commands **Test while training -** | 2,884 |
malidib/Craters_MaskRCNN | ['instance segmentation', 'semantic segmentation'] | ['Automated crater shape retrieval using weakly-supervised deep learning'] | inference_pub.py rgb_clahe_justl InferenceConfig MainConfig createCLAHE COLOR_BGR2LAB cvtColor | # Craters_MaskRCNN The python files are the inference code for the MaskRCNN-based craters identifier of Ali-Dib et al. 2020 (Icarus) used in this paper: https://arxiv.org/abs/1906.08826 The model weights, and some DEM examples, can be found here: https://www.dropbox.com/s/d0r100189oi9k8z/weights_and_examples.tar.gz You need to download and untar the compressed file into the same directory and the python files. AliDib_Catalogue.csv is the catalogue of Lunar craters predicted by the model for our test set (-180 to -60 Long). | 2,885 |
mamrehn/interactive_image_segmentation_evaluation | ['interactive segmentation', 'semantic segmentation'] | ['A Semi-Automated Usability Evaluation Framework for Interactive Image Segmentation Systems'] | evaluation/prepare_data/extract_features_from_log.py evaluation/prepare_data/extract_log_per_user.py evaluation/cython/setup_gnu.py evaluation/prepare_data/metrics.py evaluation/questionnaires/questionnaire_eval.py evaluation/prepare_data/grow_cut.py evaluation/03_train_model.py evaluation/prepare_data/image_tools.py evaluation/01_download_your_study_data.py evaluation/prepare_data/tools.py evaluation/cython/setup_win.py evaluation/02_prepare_data.py start_https_server.py create_self_signed_certificate send_webapp_project_root_file init_server authenticate check_auth request_page requires_auth download_user_study_data main seeds_to_metrics filter_null_data increase_nice_value_of_computation get_questionnaire_dummy_data _make_dict_hashable impute_and_scale hash_ get_data feature_select predict_log_data add_metric median_div_median extract_features_per_user mean_ mean_div capitalize_ get_data median_div mean_div_mean add_metric_per_metric median_ traverse_plot_data_structure visitor_func_list_seed_locations visitor_func_overall_time visitor_func_collect_all_seeds_per_time_instance normalize_data visitor_func_template visitor_func_data_set_identifier visitor_func_count_undos traverse_data_structure extract_log_per_user traverse_extracted_data_structure visitor_func_plot_metrics_and_undos_per_test grow_cut ImageTools Metrics MetricEnums update_dict_recursively save_json_cache dict_generator normalize_data load_json_cache load_ground_truth_data load_json_data get_sus_score normalize_attrakdiff_ratings evaluate_sus_questionnaire_data_per_user evaluate_attrakdiff_questionnaire_data_per_user generate_dummy_questionnaire_data get_attrakdiff_score set_serial_number dump_privatekey get_subject sign Path FILETYPE_PEM PKey dump_publickey generate_key gmtime_adj_notAfter set_issuer X509 set_pubkey mkdir dump_certificate gmtime_adj_notBefore write_bytes gethostname joinpath print format Flask urlretrieve with_suffix debug error system unlink joinpath rename info with_name is_file append items list items list line uint16 zeros_like append print astype get_outcome grow_cut Metrics with_name exists set_multiple_inputs enumerate tuple load_json_cache load_ground_truth_data str list sorted filter_null_data save_json_cache map interp_line normalize_data append load_json_data get dict_generator zip info items int join extract_features_per_user sort extend seeds_to_metrics extract_log_per_user bresenham_line_interpolation_indices array os_nice hash generate_dummy_questionnaire_data evaluate_attrakdiff_questionnaire_data_per_user evaluate_sus_questionnaire_data_per_user get_questionnaire_dummy_data sorted list info zip keys len int size zeros SimpleImputer info transform fit_transform fit warn get_data asfortranarray Path GradientBoostingRegressor DataFrame seed str impute_and_scale tolist ceil predict KFold update dump concatenate debug ascontiguousarray mkdir info is_file enumerate pop int load set_option min PCA extend tqdm joinpath split transform ravel fit capitalize_ lower endswith loads iterdir split get deepcopy list items all update add_metric set get_data mean isnan nan append median add_metric_per_metric sum array len items list defaultdict func items list defaultdict isinstance func func get get append int list sorted all items append replace uint16 save_json_cache zeros_like debug append tuple astype perf_counter copy map grow_cut get_outcome load_json_cache Metrics set_multiple_inputs update int list items iter next keys save_json_cache normalize_data traverse_data_structure traverse_extracted_data_structure load_ground_truth_data load_json_data format zeros_like view print astype int8 copy empty_like growcut_cython warn amin amax items list isinstance get deepcopy list items isinstance mkdir joinpath Path joinpath mkdir joinpath Path str sorted uint8 debug astype joinpath Path append imread update_dict_recursively values tolist mean atleast_2d items sorted atleast_2d squeeze dict array atleast_2d namedtuple mean normalize_attrakdiff_ratings append array array | # Interactive Image Segmentation Evaluation [](https://gitter.im/interactive_image_segmentation_evaluation/community) This repository provides a JavaScript and Python implementation of our Usability Evaluation Framework for Interactive Image Segmentation Systems. ## User Interface (WebApp) HTML5 interactive image segmentation application for user interaction log collection. [→ WebApp](webapp)  > Click here for an interactive [demo](https://mamrehn.github.io/interactive_image_segmentation_evaluation/webapp/index.html). | 2,886 |
mandarin4452/StyleTune | ['style transfer'] | ['Deep Photo Style Transfer'] | app.py transfer.py style index transfer_home transfer info progress closure VGG postp GramMSELoss GramMatrix print secure_filename save filename str postpa postpb vgg sum zero_grad backward | # StyleTune Deep photo style transfer in web! By upload user image and choosing one of the styles, result shown on result page. > Referenced : [Deep Photo Style Transfer](https://arxiv.org/abs/1703.07511,"Deepphoto") | 2,887 |
mandarjoshi90/pair2vec | ['word embeddings', 'common sense reasoning'] | ['pair2vec: Compositional Word-Pair Embeddings for Cross-Sentence Inference'] | embeddings/bats_analysis.py endtasks/squad2_eval.py embeddings/representation.py embeddings/preprocess.py endtasks/bidaf_pair2vec.py embeddings/train.py embeddings/util.py endtasks/modules.py embeddings/matrix_data.py embeddings/indexed_field.py endtasks/squad2_reader.py endtasks/squad_predictor.py endtasks/esim_pair2vec.py embeddings/cooccurance.py endtasks/util.py embeddings/metrics.py embeddings/model.py embeddings/vocab.py get_scores vocab_pair_embeddings mask_out_analogy_words read_pairs pairs_to_analogies get_accuracy create_dataset DistributionalModel eval_on_bats_interpolate predict_relations get_cooccurance read_vocab_from_file RawField Field read unigram_type_sampling batched_unigram_type_sampling shuffled_sampling read_dev read_data _LazyInstances create_vocab smoothed_sampling sample_compositional create_dataset uniform_type_sampling dev_data TripletIterator get_mask masked_index_fill mrr positive_predictions_for get_type_file Pair2Vec MLP save_vocab get_vocab read_filtered_pairs read_vocab_from_file read_counts keep_wordpair_by_mult save read_vocab main LSTMContextualizer SpanRepresentation StatsLogger save EvaluationStatistics prepare_env main train get_lr rescale_gradients Config get_args load_model pretrained_embeddings get_config pretrained_embeddings_or_xavier resume_from print_config save_checkpoint masked_softmax makedirs Vectors FastText SubwordVocab GloVe Vocab _default_unk_index CharNGram BidafPair2Vec ESIMPair2Vec VariationalDropout compute_f1 normalize_answer metric_max_over_ground_truths make_eval_dict make_precision_recall_eval find_all_best_thresh plot_pr_curve run_precision_recall_analysis histogram_na_prob find_best_thresh make_qid_to_has_ans compute_exact get_raw_scores get_tokens apply_no_ans_threshold main parse_args merge_eval make_reading_comprehension_instance NoAnswerSquad2Reader Squad2Predictor get_encoder_input get_mask get_pair_embeddings get_pair2vec get_pair2vec_word_embeddings print sorted filter walk normalize represent_arguments data view Variable size expand represent_arguments append shuffle sort tolist zip float enumerate zip copy tile enumerate vocab_pair_embeddings size squeeze expand normalize represent_arguments mask_out_analogy_words pairs_to_analogies linspace DistributionalModel cuda arg_vocab seed sorted defaultdict ones read_pairs get_pair2vec append range walk eval get_scores float keys join print tqdm filter numpy len print format Vocab len defaultdict sorted read_vocab_from_file items arange astype choice take unique power sum randint take multinomial take numpy from_numpy append batched_unigram_type_sampling range reshape sample_fn shuffle join getattr triplet_dir Vocab load format info isfile load format info num_neg_samples read_dev _LazyInstances compositional_rels num_sampled_relations getattr vocab Field create_vocab getattr dev_batch_size create_dataset train_batch_size TripletIterator len get_mask size sort sigmoid append numpy range index_fill_ sum data masked_index_fill byte ones size scatter_ zeros float range load concatenate len items float sum values items defaultdict float sum values join int format get_vocab read_filtered_pairs print read_counts set save docopt len uniform save_vocab read_vocab_from_file Vocab isfile read_vocab items sorted sort Counter append str tuple array seed join setFormatter manual_seed_all save_path addHandler Formatter manual_seed is_available FileHandler vocab SummaryWriter read_data resume_snapshot close Pair2Vec SGD resume_from parameters filter getattr export_scalars_to_json train cuda prepare_env param_groups model zero_grad ReduceLROnPlateau save_checkpoint EvaluationStatistics dev_iterator log train_iterator grad_norm epochs get_lr range rescale_gradients update format save_path epoch_log eval info enumerate time StatsLogger backward step makedirs clip_grad_norm join remove format save_path glob state_dict sum softmax load format print load_state_dict isfile load format isfile load_state_dict info join remove format save_path glob average save dump_to_file data pretrained_embeddings xavier_normal copy_ _read_pretrained_embedding_file embedding_dim Config parse_file print convert parse_args add_argument ArgumentParser add_argument exit ArgumentParser print_help bool Counter get_tokens sum values len print max items float len xlabel ylabel ylim title savefig clf fill_between xlim step sorted plot_pr_curve append float enumerate sum make_precision_recall_eval merge_eval makedirs join ones_like xlabel ylabel title hist savefig clf float len sorted sum enumerate find_best_thresh make_eval_dict na_prob_file find_all_best_thresh na_prob_thresh run_precision_recall_analysis histogram_na_prob dumps apply_no_ans_threshold get_raw_scores out_image_dir out_file make_qid_to_has_ans merge_eval update list set TextField ListField MetadataField embedder vocab load_model get_config create_vocab Pair2Vec parameters Field len view size view | # pair2vec: Compositional Word-Pair Embeddings for Cross-Sentence Inference ## Introduction This repository contains the code for replicating results from * [pair2vec: Compositional Word-Pair Embeddings for Cross-Sentence Inference](https://arxiv.org/abs/1810.08854) * [Mandar Joshi](https://homes.cs.washington.edu/~mandar90/), [Eunsol Choi](https://homes.cs.washington.edu/~eunsol), [Omer Levy](https://levyomer.wordpress.com/), [Dan Weld](https://www.cs.washington.edu/people/faculty/weld), and [Luke Zettlemoyer](https://www.cs.washington.edu/people/faculty/lsz) ## Getting Started * Install python3 requirements: `pip install -r requirements.txt` ## Using pretrained pair2vec embeddings * Download pretrained pair2vec: `./download_pair2vec.sh` * If you want to reproduce results from the paper on QA/NLI, please use the following: | 2,888 |
mangye16/DDAG | ['person re identification'] | ['Dynamic Dual-Attentive Aggregation Learning for Visible-Infrared Person Re-Identification'] | train_ddag.py model_main.py data_manager.py test_ddag.py attention.py utils.py resnet.py eval_metrics.py data_loader.py loss.py SpecialSpmmFunction SpecialSpmm GraphAttentionLayer SpGraphAttentionLayer IWPA Normalize TestData SYSUData TestDataOld load_data RegDBData process_gallery_sysu process_test_regdb process_query_sysu eval_regdb eval_sysu KLLoss pdist_torch BiTripletLoss TripletLoss BDTRLoss OriTripletLoss pdist_np FeatureBlock ClassBlock visible_module thermal_module embed_net base_resnet weights_init_classifier Normalize weights_init_kaiming ResNet resnet50 Bottleneck resnet152 conv3x3 remove_fc resnet34 resnet18 BasicBlock resnet101 extract_query_feat extract_gall_feat train adjust_learning_rate test set_seed set_requires_grad GenIdx IdentitySampler AverageMeter GenCamIdx ExtractCam load_data Logger mkdir_if_missing join sorted isdir extend append seed join sorted isdir choice append format invert format asarray print cumsum astype float32 where argsort shape mean int32 append sum max range invert format asarray print cumsum astype float32 where argsort shape mean int32 append sum max range t sqrt addmm_ expand T matmul data zeros_ normal_ kaiming_normal_ __name__ data bias zeros_ normal_ __name__ items list startswith load_url ResNet remove_fc load_state_dict load_url ResNet remove_fc load_state_dict load_url ResNet remove_fc load_state_dict load_url ResNet remove_fc load_state_dict load_url ResNet remove_fc load_state_dict time format print eval zeros time format print eval zeros param_groups lr range len criterion2 zero_grad div adjust_learning_rate max cuda cat criterion1 update format nll_loss size avg item float net enumerate time backward Variable print add_scalar AverageMeter index_select pow eye step len eval_regdb time format eval_sysu print transpose matmul eval zeros add_scalar append range unique len int unique append range len append int range len makedirs seed manual_seed parameters | # DDAG Pytorch Code of DDAG for Visible-Infrared Person Re-Identification in ECCV 2020. [PDF](https://arxiv.org/pdf/2007.09314.pdf) A Huawei MindSpore implementation of our DDAG method is [HERE](https://gitee.com/mindspore/models/tree/master/research/cv/DDAG). Thanks to Zhiwei Zhang [email protected]. ## Highlight The goal of this work is to learn a robust and discriminative cross-modality representation for visible-infrarerd person re-identification. - Intra-modality Weighted-Part Aggregation (IWPA): It learns discriminative part-aggregated features by mining the contextual part relation. - Cross-modality Graph Structured Attention (CGSA): It enhances the feature by incorporating the neighborhood information across two modalities. ### Results on the SYSU-MM01 Dataset Method |Datasets | Rank@1 | mAP | mINP | |------| -------- | ----- | ----- | ----- | | 2,889 |
manitadayon/tsBNgen | ['time series'] | ['tsBNgen: A Python Library to Generate Time Series Data from an Arbitrary Dynamic Bayesian Network Structure'] | setup.py tsBNgen/__init__.py tsBNgen/tsBNgen.py tsBNgen |      ## If you would like to buy me a coffee <a href="https://www.buymeacoffee.com/manietadayon" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a> **tsBNgen: A Python Library to Generate Time Series Data Based on an Arbitrary Bayesian Network Structure** [Description](#Description) [Citation](#Citaton) [Features](#Features) [Instruction](#Instruction) [License](#License) | 2,890 |
mansigoel/TVQA | ['video question answering'] | ['TVQA: Localized, Compositional Video Question Answering'] | tvqa_dataset.py model/__init__.py model/config.py model/tvqa_abc.py tvqa_dataset2.py utils.py model/utils.py test.py tvqa_bert_dataset.py main.py preprocessing.py model/tvqa_abc2.py model/mlp.py tvqa_fusion_dataset.py model/bidaf.py model/rnn.py config.py model/tvqa_bert_abc.py __init__.py TestOptions BaseOptions merge_list_dicts convert_ts find_nearest load_srt add_located tokenize_qa get_vidname2cnt_per_show get_located_sub_text add_srt clean_str interval2frame get_vidname2cnt_all tokenize_srt process_qa test get_acc_from_qid_dicts pad_collate Batch preprocess_inputs TVQADataset load_pickle merge_two_dicts save_json_pretty mkdirp save_json read_json_lines load_json files_exist save_pickle BidafAttn TestOptions BaseOptions MLP RNNEncoder mean_along_time max_along_time ABC load_pickle merge_two_dicts save_json_pretty mkdirp save_json read_json_lines load_json files_exist save_pickle update range copy len glob join tqdm len join merge_list_dicts print get_vidname2cnt_per_show save_json append exists sub join milliseconds seconds replace print glob text len tqdm save_json append minutes range exists open max asarray floor clip print tqdm clean_str append keys print keys tqdm deepcopy join print tqdm range len argmin join asarray find_nearest extend append range len deepcopy convert_ts print tqdm get_located_sub_text interval2frame range len add_located tokenize_qa save_json add_srt read_json_lines get_vidname2cnt_all max_vcpt_l merge_two_dicts model set_grad_enabled tolist preprocess_inputs tqdm enumerate DataLoader eval max_vid_l set_mode max_sub_l mode asarray float sum keys len get_batch LongTensor pad_sequences zip append pad_video_sequences enumerate clamp size min extend getattr to makedirs update copy | # TVQA PyTorch code accompanies the [TVQA dataset paper](https://arxiv.org/abs/1809.01696), in EMNLP 2018 ### Dataset TVQA is a large-scale video QA dataset based on 6 popular TV shows (*Friends*, *The Big Bang Theory*, *How I Met Your Mother*, *House M.D.*, *Grey's Anatomy*, *Castle*). It consists of 152.5K QA pairs from 21.8K video clips, spanning over 460 hours of video. The questions are designed to be compositional, requiring systems to jointly localize relevant moments within a clip, comprehend subtitles-based dialogue, and recognize relevant visual concepts. - QA example | 2,891 |
mantoone/ml-agents | ['unity'] | ['Unity: A General Platform for Intelligent Agents'] | ml-agents/mlagents/envs/communicator_objects/environment_parameters_proto_pb2.py ml-agents/tests/trainers/test_trainer_controller.py ml-agents/mlagents/trainers/buffer.py ml-agents/mlagents/envs/communicator_objects/unity_rl_initialization_input_pb2.py ml-agents/mlagents/envs/communicator_objects/brain_parameters_proto_pb2.py ml-agents/tests/envs/test_envs.py ml-agents/mlagents/envs/communicator_objects/__init__.py ml-agents/mlagents/envs/rpc_communicator.py ml-agents/mlagents/trainers/ppo/__init__.py gym-unity/gym_unity/envs/__init__.py ml-agents/mlagents/envs/communicator_objects/agent_action_proto_pb2.py ml-agents/mlagents/trainers/learn.py gym-unity/gym_unity/envs/unity_env.py ml-agents/mlagents/trainers/bc/trainer.py ml-agents/mlagents/trainers/policy.py ml-agents/mlagents/envs/communicator_objects/unity_rl_initialization_output_pb2.py ml-agents/tests/trainers/test_curriculum.py ml-agents/mlagents/trainers/meta_curriculum.py ml-agents/mlagents/trainers/curriculum.py ml-agents/mlagents/trainers/ppo/models.py ml-agents/mlagents/envs/communicator_objects/space_type_proto_pb2.py ml-agents/mlagents/envs/communicator_objects/unity_output_pb2.py ml-agents/mlagents/envs/communicator_objects/unity_input_pb2.py gym-unity/gym_unity/__init__.py ml-agents/mlagents/trainers/ppo/policy.py ml-agents/mlagents/envs/communicator_objects/engine_configuration_proto_pb2.py ml-agents/mlagents/envs/communicator_objects/brain_type_proto_pb2.py ml-agents/mlagents/envs/socket_communicator.py gym-unity/setup.py ml-agents/mlagents/trainers/trainer_controller.py ml-agents/mlagents/envs/communicator_objects/agent_info_proto_pb2.py ml-agents/mlagents/envs/communicator_objects/unity_to_external_pb2_grpc.py ml-agents/tests/trainers/test_ppo.py ml-agents/mlagents/envs/brain.py ml-agents/mlagents/trainers/bc/policy.py ml-agents/tests/trainers/test_bc.py ml-agents/tests/mock_communicator.py ml-agents/mlagents/envs/communicator_objects/unity_message_pb2.py ml-agents/mlagents/trainers/models.py ml-agents/mlagents/trainers/__init__.py ml-agents/mlagents/envs/communicator_objects/resolution_proto_pb2.py ml-agents/mlagents/envs/communicator_objects/unity_to_external_pb2.py ml-agents/mlagents/envs/communicator_objects/unity_rl_input_pb2.py ml-agents/tests/trainers/test_buffer.py ml-agents/mlagents/trainers/trainer.py ml-agents/mlagents/envs/communicator.py ml-agents/setup.py ml-agents/mlagents/envs/communicator_objects/unity_rl_output_pb2.py ml-agents/mlagents/envs/__init__.py ml-agents/mlagents/trainers/bc/__init__.py gym-unity/tests/test_gym.py ml-agents/mlagents/envs/exception.py ml-agents/mlagents/envs/environment.py ml-agents/mlagents/trainers/bc/models.py ml-agents/mlagents/envs/communicator_objects/command_proto_pb2.py ml-agents/mlagents/trainers/exception.py ml-agents/tests/trainers/test_meta_curriculum.py ml-agents/mlagents/trainers/ppo/trainer.py ml-agents/mlagents/envs/communicator_objects/header_pb2.py UnityGymException UnityEnv test_gym_wrapper test_multi_agent BrainInfo BrainParameters Communicator UnityEnvironment UnityException UnityTimeOutException UnityEnvironmentException UnityActionException RpcCommunicator UnityToExternalServicerImplementation SocketCommunicator UnityToExternalServicer UnityToExternalStub add_UnityToExternalServicer_to_server BufferException Buffer Curriculum CurriculumError MetaCurriculumError TrainerError main run_training MetaCurriculum LearningModel Policy UnityPolicyException UnityTrainerException Trainer TrainerController BehavioralCloningModel BCPolicy BehavioralCloningTrainer PPOModel PPOPolicy PPOTrainer get_gae discount_rewards MockCommunicator test_initialization test_reset test_close test_step test_handles_bad_filename test_dc_bc_model test_cc_bc_model test_visual_cc_bc_model test_bc_policy_evaluate dummy_config test_visual_dc_bc_model assert_array test_buffer location default_reset_parameters test_init_curriculum_bad_curriculum_raises_error test_init_curriculum_happy_path test_increment_lesson test_get_config test_init_meta_curriculum_happy_path test_increment_lessons_with_reward_buff_sizes default_reset_parameters MetaCurriculumTest test_increment_lessons measure_vals reward_buff_sizes test_set_all_curriculums_to_lesson_num test_get_config test_set_lesson_nums test_init_meta_curriculum_bad_curriculum_folder_raises_error more_reset_parameters test_rl_functions test_ppo_model_dc_vector_curio test_ppo_model_dc_vector_rnn test_ppo_model_cc_vector_rnn test_ppo_policy_evaluate test_ppo_model_cc_visual dummy_config test_ppo_model_dc_vector test_ppo_model_dc_visual test_ppo_model_cc_visual_curio test_ppo_model_dc_visual_curio test_ppo_model_cc_vector_curio test_ppo_model_cc_vector test_initialization test_initialize_trainers dummy_bc_config dummy_bad_config dummy_config dummy_start test_load_config sample step MockCommunicator UnityEnv step MockCommunicator UnityEnv method_handlers_generic_handler add_generic_rpc_handlers start_learning int str TrainerController int Process getLogger print start info append randint docopt range list zeros_like size reversed range asarray tolist discount_rewards UnityEnvironment close MockCommunicator UnityEnvironment close MockCommunicator reset str local_done print agents step close reset MockCommunicator UnityEnvironment len UnityEnvironment close MockCommunicator reset_default_graph close reset_default_graph reset_default_graph reset_default_graph reset_default_graph flatten list range len get_batch Buffer assert_array append_update_buffer make_mini_batch append reset_agent array range Curriculum Curriculum Curriculum MetaCurriculum assert_has_calls MetaCurriculumTest increment_lessons assert_called_with MetaCurriculumTest increment_lessons assert_called_with assert_not_called MetaCurriculumTest set_all_curriculums_to_lesson_num MetaCurriculumTest dict update MetaCurriculumTest reset_default_graph reset_default_graph reset_default_graph reset_default_graph reset_default_graph reset_default_graph reset_default_graph reset_default_graph reset_default_graph reset_default_graph reset_default_graph assert_array_almost_equal array discount_rewards TrainerController | <img src="docs/images/unity-wide.png" align="middle" width="3000"/> <img src="docs/images/image-banner.png" align="middle" width="3000"/> # Unity ML-Agents Toolkit (Beta) **The Unity Machine Learning Agents Toolkit** (ML-Agents) is an open-source Unity plugin that enables games and simulations to serve as environments for training intelligent agents. Agents can be trained using reinforcement learning, imitation learning, neuroevolution, or other machine learning methods through a simple-to-use Python API. We also provide implementations (based on TensorFlow) of state-of-the-art algorithms to enable game developers and hobbyists to easily train intelligent agents for 2D, 3D and VR/AR games. These trained agents can be | 2,892 |
manuelruder/fast-artistic-videos | ['style transfer'] | ['A Neural Algorithm of Artistic Style', 'Artistic style transfer for videos and spherical images'] | video_dataset/make_video_dataset.py video_dataset/make_flow_list.py add_data read_flow endswith put exists split append range Thread format shuffle start Queue listdir enumerate join uint8 print float32 num_workers sequence_length create_dataset len | # fast-artistic-videos This is the source code for fast video style transfer described in **[Artistic style transfer for videos and spherical images](https://lmb.informatik.uni-freiburg.de/Publications/2018/RDB18/)** <br> Manuel Ruder, Alexey Dosovitskiy, [Thomas Brox](https://lmb.informatik.uni-freiburg.de/people/brox/) <br> The paper builds on [A Neural Algorithm of Artistic Style](https://arxiv.org/abs/1508.06576) | 2,893 |
manyunya/bitcoin-rnn | ['learning to execute'] | ['Learning to Execute'] | priv2pub.py mk-privaddr-pair.py gru-addr2priv.py CharacterTable colors seed2hpriv encode HMAC | # bitcoin-rnn A impementation of training a LSTM network to associate public bitcoin addresses, with private keys. [ Note, inversion and non-inversion are highly suggested also wif and non-wif data, see mk-prvadd-pair.py, for examples of generating training data. This public example is only for understanding concepts, true production requires huge training sets, and various alternate representations of bitcoin address abstraction. Reference for theory of this concept to the following paper. Input may optionally be inverted, shown to increase performance in many tasks in: "Learning to Execute" http://arxiv.org/abs/1410.4615 and "Sequence to Sequence Learning with Neural Networks" http://papers.nips.cc/paper/5346-sequence-to-sequence-learning-with-neural-networks.pdf | 2,894 |
marangamax/keras-style-transfer | ['style transfer'] | ['A Neural Algorithm of Artistic Style'] | src/loss.py src/run.py src/evaluator.py src/preprocessing.py eval_loss_and_grads Evaluator gram_matrix content_loss total_variation_loss StyleTransferLoss style_loss adjust_color postprocess_and_save preprocess load_image parse_args run reshape astype f_outputs dot transpose batch_flatten permute_dimensions gram_matrix sum square square load_image expand_dims asarray resize fromarray reshape astype save function gradients flatten compute_loss placeholder uniform fmin_l_bfgs_b append range VGG16 format concatenate Evaluator preprocess StyleTransferLoss combination_image postprocess_and_save time isinstance print loss add_argument ArgumentParser | Neural Style Transfer --------------- "In fine art, especially painting, humans have mastered the skill to create unique visual experiences through composing a complex interplay between the content and style of an image." This repository contains a command-line tool for performing neural style transfer between any content and style image of choice, letting a machine do the composing instead of a human. Neural style transfer is quite a well-known concept amongst machine learning researchers by now and has also been revealed to the public by various companies that attempt to monetize on this new creative dimension. Unfortunately, I observed there isn't much in between research and the existing applications that is useable by the wider public. There are some really cool possibilities using this technology, so I thought that this should be changed. It follows that I created this so the artists, creative visionaries, and those simply looking to pimp their selfies can also try it out.. and feel like hackers at the same. Installation Procedure --------------- | 2,895 |
marcopodda/grapher | ['graph generation'] | ['Edge-based sequential graph generation with recurrent neural networks'] | utils/graphs.py config/base.py dataset/dataset.py baselines/simple.py utils/misc.py baselines/graphrnn/data.py dataset/generators.py utils/mmd.py dataset/graph.py manage.py baselines/gru/data.py analysis/collect.py utils/constants.py baselines/graphrnn/model.py utils/analysis.py baselines/gru/trainer.py utils/evaluation.py config/config.py learner/trainer.py experiment/eval.py learner/model.py dataset/manager.py baselines/graphrnn/train.py analysis/plots.py dataset/utils.py baselines/graphrnn/run.py config/__init__.py experiment/evaluator.py baselines/gru/model.py utils/data.py analysis/__init__.py experiment/experiment.py utils/training.py utils/serializer.py experiment/__init__.py dataset/__init__.py main collate_dataset_result parse_log collate_metric collate_results collate_dataset_row compute_mean collate_order_row collate_order_dataset_result draw_ladder_graph draw_molecular_graph plot_kde plot_samples plot_loss draw_standard_graph draw_tree_graph load_qual_samples collate_experiments load_test_set calculate_nspdk patch_graphs load_result run_baseline train_optimizationbased sample optimizer_brute loss emd_distance encode_adj_flexible Graph_sequence_sampler_pytorch decode_adj decode_adj_full encode_adj_full bfs_seq decode_adj_flexible encode_adj sample_sigmoid_supervised sample_tensor GRU_plain binary_cross_entropy_weight gumbel_sigmoid sample_sigmoid sample_sigmoid_supervised_simple gumbel_softmax run_graphrnn load_model get_graph train_rnn_epoch test_rnn_epoch sample train GRUDataCollator GRUDataset Loss decode_adj Model GRUTrainer BaseConfigWithSerializer BaseConfig ConfigError Config get_config_class GraphRNNConfig GRUConfig BaselineConfig get_config_class GraphDataCollator GraphDataset load_citeseer ego_graph_generator ladder_graph_generator community_graph_generator bfs_order dfs_order GraphList encode_graph Ladders Trees get_dataset_class Community TUData load_dataset SyntheticData Ego DatasetManager read_data novelty dup betweenness_worker degree_dist clustering_dist clustering_worker random_sample degree_worker patch clean_graph orbit_worker pad betweenness_dist uniqueness orbit_dist OrderEvaluator EvaluatorBase Evaluator calc_num_nodes get_exp_class ERExperiment OrderExperiment BaseExperiment Experiment load_experiment BAExperiment GRUExperiment GraphRNNExperiment BaselineExperiment Loss RNN Model Trainer metrics_by_dataset process_result mean_rank mean_ranks metric_by_dataset pad_right reverse_argsort to_sorted_tensor pad_left betweenness_histogram novelty betweenness_worker normalize_counts clean_graph clustering_worker nspdk degree_worker edge_list_reindexed orbit_worker orca clustering_histogram uniqueness kl_divergence degree_histogram orbit_count_histogram max_connected_comp graph_to_file last_in_folder to_hms maybe_makedir to_latex_row to_latex_table load_result kernel_compute emd gaussian compute_mmd gaussian_emd load_csv load_pickle load_yaml save_csv load_dict save_dict save_numpy save_json load_json save_yaml load_numpy save_pickle is_duplicate get_scheduler get_device get_optimizer get_exp_class evaluate Evaluator exp_class OrderEvaluator train docopt ev_class append range len append range len load exists collate_metric append range load dict compute_mean append collate_dataset_result T join print tolist load dict compute_mean append join T print tolist collate_order_dataset_result update set_xticklabels set_yticklabels set_xlabel tight_layout collate_results set_ylabel savefig displot set_titles enumerate FacetGrid parse_log map tight_layout lineplot savefig set_titles add_legend spring_layout draw_networkx draw_networkx draw_networkx graphviz_layout draw_standard_graph subplots set_title draw_function load_real_samples tight_layout clean_ax set_ylabel savefig load_generated_samples range enumerate len str convert_node_labels_to_integers degree nodes append enumerate load iterdir sorted list append patch_graphs load_yaml load graphlist patch_graphs append save_yaml calculate_nspdk load_result load_qual_samples load_test_set emd hstack astype float max len int list barabasi_albert_graph rint histogram emd_distance fast_gnp_random_graph sum array degree_histogram values arange P Parallel optimizer_brute num_nodes zip int list rint barabasi_albert_graph choice edges append fast_gnp_random_graph keys enumerate format print max_nodes train_optimizationbased len dict get pop bfs_successors zeros max range tril T zeros max range tril tril append amin range len T len zeros range tril zeros range amin tril zeros T range amax arange binary_cross_entropy ones size repeat Variable ones size rand float Variable size rand softmax neg_ Variable size rand sigmoid log to size sigmoid any float range data all Variable size rand sigmoid any float range Variable size rand sigmoid any float range update format load_model print WeightedRandomSampler max_num_node DataLoader train max_prev_node Graph_sequence_sampler_pytorch to load_state_dict get_device from_numpy_matrix asmatrix data zero_grad binary_cross_entropy_weight max view tolist bincount to sum range cat pack_padded_sequence size rnn enumerate backward sort extend output sigmoid train step array init_hidden len int min output max_num_node decode_adj eval sample_sigmoid cat numpy max_prev_node get_graph append to range long init_hidden rnn list format state_dict print Adam MultiStepLR parameters train_rnn_epoch get_device save epochs len test_rnn_epoch get_device tolist append len get BytesIO Graph Path content load_citeseer selfloop_edges number_of_nodes max_connected_comp convert_node_labels_to_integers shuffle remove_edges_from append range ego_graph add_edge list combinations selfloop_edges max_connected_comp convert_node_labels_to_integers edges remove_edges_from append randint range remove_edge disjoint_union_all range extend dict dfs_successors get pop dict get pop bfs_successors list dfs_order sorted max_connected_comp min shuffle nodes choice edges bfs_order relabel_nodes get_config_class from_file get_dataset_class root dataset_class array zeros P Parallel clustering list dict histogram values P Parallel orca sum P Parallel list betweenness_centrality dict histogram values P Parallel len choice max_connected_comp selfloop_edges relabel_nodes remove_edges_from P Parallel P Parallel Path Path load get_exp_class append process_result load_result append metric_by_dataset append get_scores array append mean_rank array isinstance isinstance dict degree from_iterable list P Parallel from_iterable list P Parallel from_iterable list P Parallel dict nodes append edges str remove number_of_nodes name check_output strip write close len edge_list_reindexed number_of_edges find array open number_of_nodes P Parallel convert_node_labels_to_integers enumerate min max histogram betweenness_histogram normalize_counts nspdk clustering_histogram degree_histogram orbit_count_histogram Graph append any array append any array enumerate connected_components max convert_node_labels_to_integers selfloop_edges remove_edges_from makedirs print join to_latex_row zip len astype float max len emd norm preprocess vectorize max kernel_compute dump open dump open savetxt to_csv dump open Path isinstance scheduler_class getattr getattr optimizer_class | ## Grapher Code for the paper: D. Bacciu, A. Micheli, M. Podda. "Edge-based sequential graph generation with recurrent neural networks". Neurocomputing, Volume 416, pages 177-189, ISSN 0925-2312. doi:10.1016/j.neucom.2019.11.112. (2020) | 2,896 |
marcozullich/pruned_layer_similarity | ['network pruning'] | ['Similarity of Neural Networks with Gradients'] | tests/test_preprocessing.py layer_sim/preprocessing.py layer_sim/utils.py layer_sim/pruning/LF_mask.py layer_sim/networks.py layer_sim/datasets.py layer_sim/pruning/IMP.py tests/test_train.py tests/test_networks.py layer_sim/train.py tests/test_lf_mask.py layer_sim/nn_comparison.py MNIST SVHN CIFAR10 CNN VGG_SVHN LeNet5 Flatten _centering nbs cka svd_decomposition svd_reduction reshape_4d_tensor AverageMeter anneal_lr train_net accuracy_at_k test_net n_dataloader imp_lrr apply_mask _build_pruning_mask lf_mask_global mask_prop_params TestLFMask TestVGGSVHN TestCNNLeNet testSVD TestTrain DataLoader Compose DataLoader Compose DataLoader Compose _centering _centering eig sqrt mean svd svd_decomposition cumsum sum len size topk eq T expand_as print param_groups data clip_grad_norm_ zero_grad save apply_mask load_state_dict performance to range update size anneal_lr item float net load isinstance criterion backward print AverageMeter parameters train step data update print size AverageMeter eval performance to size enumerate len join format print apply_mask train_net lf_mask_global isfile save range test_net makedirs int concatenate sort delete where floor odict _build_pruning_mask isinstance state_dict items exec device eval split state_dict sum | # Investigating Similarity Metrics for Convolutional Neural Networks in the Case of Unstructured Pruning This repository hosts the source code for the paper titled "Investigating Similarity Metrics for Convolutional Neural Networks in the Case of Unstructured Pruning" (*preprint not available yet*) by Alessio Ansuini, Eric Medvet, Felice Andrea Pellegrino, and Marco Zullich. Currently, the paper is undergoing a review process by Springer for the selection in an LNCS Series Book. The paper is itself an extension of a previous publication of ours, ["On the Simlarity between Hidden Layers of Pruned and Unpruned Convolutional Neural Networks"](https://www.insticc.org/Primoris/Resources/PaperPdf.ashx?idPaper=89603). In this repository, we provide a minimal library (written in Python) for the sake of reproducibility of the experiments contained in both the papers above. The Jupiter notebook [MNIST_demo](notebooks/MNIST_demo.ipynb) provides an example of usage of this library on the popular MNIST dataset. Note that this notebook is merely an explanation of usage of the `layer_sim` library and doesn't focus on the performance of the provided NNs nor on the accurate analysis of the resulting similarities: we run it on MNIST so that everyone may reproduce the results in a small enough amount of time on a medium-sized machine without a CUDA-capable GPU. ## Installation tips You need Python 3.6+ to run this library 1. Clone with `git clone https://github.com/marcozullich/pruned_layer_similarity.git` 2. Install missing packages with `pip install -r requirements.txt` | 2,897 |
marineLM/linear_predictor_missing | ['generalization bounds'] | ['Linear predictor on linearly-generated data with missing values: non consistency and solutions'] | python/ground_truth.py python/learning_curves.py python/plot_MLP_scaling_n.py python/plot_curves.py python/launch_experiment.py python/plot_boxplots.py python/script_helper.py python/plot_MLP_scaling_q.py python/estimators.py EMLR MICELR ConstantImputedLR ExpandedLR ConstantImputedMLPR bayes_rate generate_data_mixture generate_data_selfmasked_proba generate_toy_params_mixture bayes_rate_r2 BayesPredictor generate_toy_params_selfmasked_proba bayes_rate_monte_carlo get_results run_one run display_boxplots display_curves display_scaling_n display_scaling_q add_MLP_method choose_filename randn floor round log chisquare uniform append sum range concatenate shuffle mean empty enumerate int T check_random_state dot repeat zeros diag int T ppf check_random_state arange isinstance randn chisquare dot sqrt uniform repeat diag putmask check_random_state multivariate_normal randn hstack choice dot vstack nan empty array range enumerate len items putmask check_random_state multivariate_normal randn hstack dot binomial vstack nan cdf empty enumerate generate_data_mixture next BayesPredictor range atleast_2d inv zfill dot float range bayes_rate atleast_2d outer dot zeros range print mean shape train_test_split method predict fit pop items ResultItem print extend copy shape run_one generate_data to_csv choice append DataFrame range axhspan axis xticks yticks set_title axvline ylabel savefig legend format replace close tight_layout boxplot xlim enumerate xlabel set_style figure subplots grid Line2D set_visible axhline max set_xlabel ylim savefig legend sort_values format replace close tight_layout set upper lineplot xlim min set_ylabel get_legend_handles_labels format subplots replace text set_xlabel set_xlim grid close subplots_adjust add_artist lineplot set_ylabel savefig unique legend get_legend_handles_labels set_ylim enumerate format subplots set_title set_xlabel grid close tight_layout lineplot set_ylabel savefig r2 unique legend format format | This repository contains the code to reproduce the experiments in our paper: *Linear predictor on linearly-generated data with missing values: non consistency and solutions*. The file **environment_lpm.yml** indicates the packages required to run the code as well as the versions that were used. The file **ground_truth.py** contains the parameter generation, data generation and Bayes rate functions. The file **estimators.py** contains all the classes of estimators used. The file **learning_curves.py** contains the code which runs the experiments. The file **launch_experiment** takes `mixture1`, `mixture3`, or `selfmasked_proba` as argument. For example `python launch_experiment.py mixture1` launches the simulations for mixture1. Change this file if you want to change the values of the parameters tested for the simulations. Upon completion of this script, a csv file is saved that records the performances obtained. The file **plot_curves**, **plot_MLP_scaling_n**, **plot_MLP_scaling_q**, **plot_boxplots** contain the code used to plot the figures based on the csv file obtained. **plot_curves** plots the learning curves. | 2,898 |
marionbartl/gender-bias-BERT | ['word embeddings'] | ["Unmasking Contextual Stereotypes: Measuring and Mitigating BERT's Gender Bias", 'Unmasking Contextual Stereotypes: Measuring and Mitigating BERT’s Gender Bias'] | code/convert_jobs_to_json.py code/main.py code/bias_utils/utils.py code/corpus_creation.py code/convert_EEC.py parse_arguments make_german_row make_prof_df make_english_row parse_arguments fine_tune input_pipeline flat_accuracy statistics prob_with_prior tokenize_to_id mask_tokens model_evaluation attention_mask_creator format_time parse_args add_argument ArgumentParser format replace capitalize append split join format replace append split append make_german_row DataFrame make_english_row model get_linear_schedule_with_warmup clip_grad_norm_ zero_grad format_time mask_tokens append to range format enumerate time backward AdamW print parameters train step len pad_token_id mask_token convert_tokens_to_ids clone randint shape masked_fill_ eq tensor bool full len append format ttest_rel describe print len wilcoxon sqrt sub shapiro encode append pad_sequences tokenize_to_id tensor attention_mask_creator item cpu log append enumerate int input_pipeline format Sent_TAM print to prob_with_prior pow log2 DataLoader TensorDataset eval Sentence ceil SequentialSampler Sent_TM max enumerate flatten int round | # Gender bias in BERT This repository holds the code for my master thesis entitled "The Association of Gender Bias with BERT - Measuring, Mitigating and Cross-lingual portability", written at the University of Groningen and the University of Malta and supervised by Prof. Malvina Nissim and Prof. Albert Gatt. The thesis work was published under the title "Unmasking Contextual Stereotypes: Measuring and Mitigating BERT's Gender Bias" as part of the 2nd Workshop on Gender Bias in Natural Language Processing at COLING 2020. ArXiv preprint: https://arxiv.org/abs/2010.14534 ``` @inproceedings{bartl2020unmasking, title={Unmasking Contextual Stereotypes: Measuring and Mitigating BERT's Gender Bias}, author={Bartl, Marion and Nissim, Malvina and Gatt, Albert}, editor={Costa-jussà, Marta R. and Hardmeier, Christian and Webster, Kellie and Radford, Will}, booktitle={Proceedings of the Second Workshop on Gender Bias in Natural Language Processing}, year={2020} } | 2,899 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.