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
|
---|---|---|---|---|---|
IS2AI/ISSAI_SAIDA_Kazakh_ASR | ['speech recognition'] | ['A Crowdsourced Open-Source Kazakh Speech Corpus and Initial Speech Recognition Baseline'] | asr1/local/data_prep.py get_args prepare_data read_meta get_text main get_duration join argv print add_argument ArgumentParser parse_args read_csv join sort join get_args isfile print prepare_data read_meta dataset_dir train_file test_file dev_file | # ISSAI_SAIDA_Kazakh_ASR This repository provides the recipe for the paper [A Crowdsourced Open-Source Kazakh Speech Corpus and Initial Speech Recognition Baseline](https://arxiv.org/abs/2009.10334). ## Setup and Requirements Our code builds upon [ESPnet](https://github.com/espnet/espnet), and requires prior installation of the framework. Please follow the [installation guide](https://espnet.github.io/espnet/installation.html) and put the ksc folder inside `espnet/egs/` directory. After succesfull installation of ESPnet & Kaldi, go to `ISSAI_SAIDA_Kazakh_ASR/asr1` folder and create links to the dependencies: ``` ln -s ../../../tools/kaldi/egs/wsj/s5/steps steps ln -s ../../../tools/kaldi/egs/wsj/s5/utils utils ``` The directory for running the experiments (`ISSAI_SAIDA_Kazakh_ASR/<exp-name`) can be created by running the following script: | 500 |
IShengFang/Self-Contained_Stylization | ['style transfer'] | ['Self-Contained Stylization via Steganography for Reverse and Serial Style Transfer'] | two-stage/dataset.py two-stage/utils.py end-to-end/model.py end-to-end/utils.py end-to-end/train.py two-stage/train.py two-stage/model.py two-stage/test.py end-to-end/test.py end-to-end/dataset.py test_transform FlatFolderDataset train_transform InfiniteSamplerWrapper InfiniteSampler encrypted_decoding inverse_AdaIN SelfContained_Style_Transfer Encrypt_Decoder VGG calc_mean_std calc_content_loss Plain_Decoder adaptive_instance_normalization Feature_extractor Decrypter calc_style_loss main argumnet check_output_subdir_exist test_transform argument Trainer check_and_make_dir FlatFolderDatasetPair test_transform FlatFolderDataset train_transform InfiniteSamplerWrapper InfiniteSampler VGG_Encoder SelfContained_Style_Transfer Decoder VGG Message_Encoder Message_Decoder main argumnet check_output_subdir_exist test_transform StyleTransferStageTrainer SteganographyStageTrainer argument check_and_make_dir CenterCrop Compose ToTensor Resize append seed permutation Sequential ReflectionPad2d Conv2d Upsample ReLU Sequential ReflectionPad2d Conv2d Upsample ReLU Sequential MaxPool2d ReflectionPad2d Conv2d ReLU Sequential MaxPool2d ReflectionPad2d Conv2d ReLU BatchNorm2d var size view calc_mean_std size expand calc_mean_std size expand size decoder cat expand calc_mean_std MSELoss MSELoss parse_args add_argument ArgumentParser join mkdir reverse_style_transfer load_model SelfContained_Style_Transfer test_transform print argumnet strip serial_style_tansfer eval unsqueeze check_output_subdir_exist output_dir cpu save_image cuda style_transfer parse_args add_argument ArgumentParser join print mkdir abspath split Sequential ReflectionPad2d Conv2d ReLU UpsamplingNearest2d message_encoder message_decoder serial_style_tansfer_w_msg img_size vgg AdaIN_decoder | # Self-Contained Stylization via Steganography for Reverse and Serial Style Transfer [[arxiv]](https://arxiv.org/pdf/1812.03910.pdf)[[WACV2020]](https://openaccess.thecvf.com/content_WACV_2020/html/Chen_Self-Contained_Stylization_via_Steganography_for_Reverse_and_Serial_Style_Transfer_WACV_2020_paper.html)[[poster]](./poster.pdf)[[project page]](https://ishengfang.github.io/Self-Contained_Stylization/) This is the source code of our WACV2020 paper "Self-Contained Stylization via Steganographyfor Reverse and Serial Style Transfer".  ## Abstract Style transfer has been widely applied to give real-world images a new artistic look. However, given a stylized image, the attempts to use typical style transfer methods for de-stylization or transferring it again into another style usually lead to artifacts or undesired results. We realize that these issues are originated from the content inconsistency between the original image and its stylized output. Therefore, in this paper we advance to keep the content information of the input image during the process of style transfer by the power of steganography, with two approaches proposed: a two-stage model and an end-to-end model. We conduct extensive experiments to successfully verify the capacity of our models, in which both of them are able to not only generate stylized images of quality comparable with the ones produced by typical style transfer methods, but also effectively eliminate the artifacts introduced in reconstructing original input from a stylized image as well as performing multiple times of style transfer in series. ## Results   ## Requirements | 501 |
ISosnovik/nn4topopt | ['semantic segmentation'] | ['Neural networks for topology optimization'] | sampler_utils.py data_utils.py conv_model.py prepare_data.py training.py build minibatch_generator random_d4_transform DatasetIterator uniform_sampler poisson_sampler parse_sampler train_model Model Input concatenate swapaxes start minibatch_generator get GeneratorEnqueuer print float lower split join Session format minimize merge_all square float32 placeholder FileWriter AdamOptimizer reduce_mean cast Saver log_loss round equal scalar | # Neural Networks for Topology Optimization This is the code for the paper **I. Sosnovik, I. Oseledets "Neural Networks for Topology Optimization"**. [[link](https://www.degruyter.com/view/j/rnam.2019.34.issue-4/rnam-2019-0018/rnam-2019-0018.xml)][[pdf](https://arxiv.org/pdf/1709.09578.pdf)] *In this research, we propose a deep learning based approach for speeding up the topology optimization methods. The problem we seek to solve is the layout problem. The main novelty of this work is to state the problem as an image segmentation task. We leverage the power of deep learning methods as the efficient pixel-wise image labeling technique to perform the topology optimization. We introduce the convolutional encoder-decoder architecture and the overall approach of solving the above-described problem with high performance.*  ## Preparations We use [TOP dataset](https://github.com/ISosnovik/top) to train the model. In order to work with dataset easier, we aggregate the files into one `.h5` dataset. ```bash python prepare_data.py --source SOURCE_FOLDER --dataset-path WHERE_TO_SAVE | 502 |
ISosnovik/top | ['semantic segmentation'] | ['Neural networks for topology optimization'] | code/generate_data.py code/sampler.py main optimize random_nodes random_config numiter update_desvars_oc fea sens_analysis filter_sens_sigmund desvars append range set_top_params join format optimize str Topology flush print mkdir savez_compressed full ravel arange choice normal random_nodes copy poisson | [simp]: http://www.mae.ufl.edu/nkim/egm6365/Solutions/ch10.pdf [topy]:https://github.com/williamhunter/topy [url_yandex]:https://yadi.sk/d/1EE7UdYJChIkQQ  # TOP: Topology Optimization Process Dataset used in "*Neural Networks for Topology Optimization*" [[link](https://www.degruyter.com/view/j/rnam.2019.34.issue-4/rnam-2019-0018/rnam-2019-0018.xml)][[pdf](https://arxiv.org/pdf/1709.09578.pdf)][[code](https://github.com/ISosnovik/nn4topopt)] **Download (~3 Gb)** [Yandex Drive][url_yandex] The dataset of topology optimization process. It contains the precise solutions of 10,000 randomly stated problems. Each object is a tensor of shape `(100, 40, 40)`: 100 iterations, `40×40` grid. ## How it is generated | 503 |
ITSEG-MQ/Adv-attack-and-defense-on-driving-model | ['autonomous driving'] | ['An Analysis of Adversarial Attacks and Defenses on Autonomous Driving Models'] | train.py viewer.py fgsm_attack.py optimization_universal_attack.py experiment.py data.py optimization_attack.py resource_test.py adv_training.py advGAN/advGAN_Uni.py advGAN_attack.py distillation.py feature_squeezing.py advGAN/models.py advGAN/advGAN.py attack_test.py model.py advGAN_Attack test_on_gen exp fgsm_attack_ fgsm_attack_test advGAN_uni_test optimized_uni_test exp1_fig advGAN_test generate_image optimized_attack_test Preprocess AdvDataset RandRotateView ConcatDataset ToTensor RandBrightness RandFlip UdacityDataset RandRotation Rescale Identity experiment_3 advGAN_ex opt_uni_ex experiment_1 fgsm_ex experiment_2 advGAN_uni_ex ex2_fun ex3_gen_adv ex2_draw opt_ex attack_detection median_filter_np cal_detection_rate plot_figure reduce_bit_pt reduce_bit fgsm_attack fgsm_attack_fun Vgg16 BaseCNN Nvidia weight_init build_vgg16 optimized_attack proj_lp is_adversary_ universal_attack is_adversary generate_noise fgsm_test optu_test fn_timer opt_test weights_init AdvGAN_Attack weights_init AdvGAN_Uni_Attack Uan_generator Generator ResnetBlock Discriminator load AdvGAN_Uni_Attack print AdvGAN_Attack train eval load_state_dict device to load Vgg16 advGAN_ex opt_uni_ex print Compose opt_ex BaseCNN Nvidia eval DataLoader load_state_dict fgsm_ex UdacityDataset advGAN_uni_ex to values len DataLoader UdacityDataset original_net abs values FloatTensor BaseCNN load_state_dict build_vgg16 to Compose advGAN_uni_generator eval type net enumerate load print clamp advGAN_generator Nvidia fgsm_attack_ data model FloatTensor backward abs clone zero_grad fgsm_attack numpy to type mse_loss range model unsqueeze device xticks clip yticks show subplot FloatTensor transpose BaseCNN fgsm_attack imshow load_state_dict to imresize tight_layout advGAN_uni_generator eval item optimized_attack type load print clamp draw advGAN_generator subplot set_text imresize draw tight_layout imshow figure array clip generate_image FloatTensor fgsm_attack to type generate_image FloatTensor abs item optimized_attack to type generate_image model FloatTensor clamp abs advGAN_generator numpy to type generate_image model clamp numpy to abs generate_image model clamp numpy to abs save_noise_seed DataLoader save UdacityDataset device Vgg16 list opt_uni_ex BaseCNN load_state_dict advGAN_uni_ex append to range generate_noise state_dict advGAN_Attack Compose opt_ex choice set eval fgsm_ex load int advGAN_ex print Subset difference Nvidia len load Vgg16 print BaseCNN Nvidia eval ex2_fun load_state_dict device append to list bar figure range len DataLoader UdacityDataset str list FloatTensor squeeze from_numpy load_state_dict iter append to range concatenate Compose choice mean type test_net load int print advGAN_generator numpy array len fgsm_attack_test concatenate print squeeze close array enumerate concatenate print close unsqueeze array enumerate optimized_attack_test load optimized_uni_test concatenate print size squeeze close tile to array enumerate load concatenate print squeeze close eval load_state_dict advGAN_test to array enumerate load advGAN_uni_test concatenate print size advGAN_generator squeeze close eval load_state_dict tile to array enumerate advGAN_uni_test DataLoader unsqueeze advGAN_test save UdacityDataset device optimized_uni_test str Vgg16 FloatTensor BaseCNN load_state_dict append to range optimized_attack_test fgsm_attack_test concatenate Compose close advGAN_uni_generator eval type enumerate load join print Nvidia len pow rint pow round load FloatTensor median_filter_np clamp transpose advGAN_generator print advGAN_uni_generator fgsm_attack eval unsqueeze type load_state_dict optimized_attack to numpy net enumerate show remove plot add_subplot ylabel tight_layout figure read_excel xticks attack_detection DataLoader UdacityDataset device Vgg16 list BaseCNN load_state_dict to range Compose choice set eval load int print Subset difference Nvidia len clamp sign data model backward clamp zero_grad clone numpy fgsm_attack_fun to abs mse_loss range Sequential parameters Dropout ReLU BatchNorm1d vgg16 Linear fill_ isinstance out_channels Conv2d normal_ sqrt zero_ BatchNorm2d zeros_like backward clamp target_model zero_grad Adam mean pow item to step mse_loss range minimum norm min sign flatten numpy abs FloatTensor print clamp proj_lp DataLoader is_adversary optimized_attack to type enumerate len item predict numpy universal_attack fgsm_attack optimized_attack clamp transpose model data normal_ __name__ constant_ | # Adv-attack-and-defense-on-driving-model **This code is for the paper [An Analysis of Adversarial Attacks and Defenses on Autonomous Driving Models](https://arxiv.org/abs/2002.02175)** [](https://doi.org/10.5281/zenodo.3580012) [Here](https://youtu.be/jyT1mYVi6XA) is an attack demo video of `opt_uni` and `advGAN` on `Epoch` model. <!-- Results on CNN/DailyMail (20/8/2019): <table class="tg"> <tr> <th class="tg-0pky">Models</th> <th class="tg-0pky">ROUGE-1</th> <th class="tg-0pky">ROUGE-2</th> <th class="tg-0pky">ROUGE-L</th> | 504 |
IVRL/DEU | ['denoising'] | ['Deep Gaussian Denoiser Epistemic Uncertainty and Decoupled Dual-Attention Fusion'] | Denoise_Fusion/.ipynb_checkpoints/train-checkpoint.py Denoise_Fusion/utils.py Denoise_Fusion/.ipynb_checkpoints/Dataset-checkpoint.py Denoise_Fusion/.ipynb_checkpoints/Network-checkpoint.py Denoise_Fusion/.ipynb_checkpoints/test-checkpoint.py Denoise_Fusion/Network.py Denoise_Fusion/train.py Denoise_Fusion/.ipynb_checkpoints/utils-checkpoint.py Denoise_Fusion/RIDmodel/common.py Denoise_Fusion/Dataset.py Denoise_Fusion/test.py Denoise_Fusion/RIDmodel/.ipynb_checkpoints/common-checkpoint.py Denoise_Fusion/RIDmodel/ops.py dataset_patch_prepare mydataset prepare_dataloader ensemble_dataset_process normalization Im2Patch Block make_model ResidualBlock ResBlock Ensemble_fusion RIDNET DnCNN weights_init_kaiming BNReLUConv Channel_attention Spatial_attention CALayer SE_Block DnCNN_RL MemoryBlock MemNet main main train_spa_data is_image_file simple_ensemble DCT_transform augment_mode_choose train_ensemble inverse_aug uint2single get_dct_mask add_white_gaussian_noise read_clean_img ensemble_evaluate IDCT_transform data_aug_denoise single2tensor4 ssim_ini batch_PSNR create_varying_noise batch_SSIM psnr_ini DCT_mask tensor2uint dataset_patch_prepare mydataset prepare_dataloader ensemble_dataset_process normalization Im2Patch Block make_model ResidualBlock ResBlock Ensemble_fusion RIDNET DnCNN weights_init_kaiming BNReLUConv Channel_attention Spatial_attention CALayer SE_Block DnCNN_RL MemoryBlock MemNet main main train_spa_data is_image_file simple_ensemble DCT_transform augment_mode_choose train_ensemble inverse_aug uint2single get_dct_mask add_white_gaussian_noise read_clean_img ensemble_evaluate IDCT_transform data_aug_denoise single2tensor4 ssim_ini batch_PSNR create_varying_noise batch_SSIM psnr_ini DCT_mask tensor2uint ResBlock MeanShift Upsampler default_conv BasicBlock BasicBlockSig Merge_Run_dual Merge_Run ResidualBlock EResidualBlock init_weights MeanShift UpsampleBlock _UpsampleBlock BasicBlock ResBlock MeanShift Upsampler default_conv BasicBlock zeros range float32 shape zeros range float32 reshape reshape transpose append Im2Patch array range reshape transpose repeat mydataset dataset_patch_prepare ensemble_dataset_process DataLoader normalization data clamp_ kaiming_normal_ __name__ constant_ simple_ensemble denoise_net test_path noise_std_values cuda str MSELoss load_state_dict range read_clean_img prepare_dataloader noise_mode mean eval data_aug_denoise load join manipulation_mode print ensemble_method len train_ensemble prepare_dataloader print Adam MSELoss apply parameters array append psnr_ini cuda range len train_spa_data open dump close train_path makedirs is_image_file glob sort IMREAD_COLOR expand_dims IMREAD_GRAYSCALE resize append imread array range len transpose transpose numpy normal create_varying_noise normal zeros range dct idct copy shape get_dct_mask meshgrid sqrt linspace ones RIDNET cuda DnCNN_RL seed augment_mode_choose shape uint2single load_state_dict range MemNet add_white_gaussian_noise eval single2tensor4 enumerate load join Variable clamp reshape zeros array len range range isnan set_trace range isnan set_trace range dct copy shape zeros range idct copy shape zeros range mean normalization range append len transpose cuda clip model model zero_grad save cuda StepLR set_postfix range state_dict update format eval item enumerate join criterion backward print train step | # DEU Denoiser Epistemic Uncertainty | 505 |
IanSullivan/DeepFakeTorch | ['face swapping'] | ['DeepFaceLab: Integrated, flexible and extensible face-swapping framework'] | train.py Iter.py img_rotate.py video_writer.py writes_images.py faceswap.py face_detect.py SSIM.py model.py natural_keys calculateDelaunayTriangles readPoints swap_faces rectContains get_landmarks atof applyAffineTransform warpTriangle extract_face rotate Iterator ResBlock Upscale AutoEncoder Discriminator Downscale UnFlatten Flatten create_window gaussian _ssim SSIM ssim dis_loss gen_loss train_step write_images transfer float32 warpAffine getAffineTransform Subdiv2D insert tuple getTriangleList append range len float32 fillConvexPoly boundingRect int32 applyAffineTransform append zeros range detector float calculateDelaunayTriangles zeros tolist float32 copy fillConvexPoly get_landmarks shape boundingRect int32 convexHull append warpTriangle quit array range len fromarray int tolist rotate detect abs array int norm predictor warpAffine COLOR_BGR2GRAY arctan2 COLOR_BGR2RGB astype rad2deg getRotationMatrix2D resize append float array detector cvtColor enumerate Tensor Variable contiguous unsqueeze pow conv2d create_window size type_as get_device cuda is_cuda mean backward model zero_grad gen_loss dis_loss discriminator step detach eval to unsqueeze model format transfer cpu save_image makedirs | # Deep Fakes PyTorch ### Installation You will need to install cmake first (required for dlib, which is used for face alignment). You will also need to download shape_predictor_68_face_landmarks.dat for dlib, put it in the main folder ```shell conda create --name torchfakes activate torchfakes git clone https://github.com/IanSullivan/DeepFakeTorch.git cd DeepFakeTorch pip install -r requirements.txt | 506 |
IdanAzuri/pytorch_fewshot_with_deep_photo | ['style transfer'] | ['Deep Photo Style Transfer'] | image_preprocessing.py gan/module.py gan/__init__.py gan/utils.py neural_style.py closed_form_matting.py utils.py pipeline.py main.py data_loader.py model.py compute_laplacian getlaplacian1 get_loader get_all_masks image_to_tensor image_loader get_masks plt_images masks_loader is_nonzero tensor_to_image masks_to_tensor extract_masks resize_masks main Model AugmentedStyleLoss Normalization StyleLoss gram_matrix ContentLoss get_style_model_and_losses run_style_transfer get_input_optimizer send_message_to_slack Generator Discriminator load_saved_model TensorBoard denorm save_checkpoint get_sorted_path find_latest GAN broadcast_to list csr_matrix transpose identity matmul shape sum diags range grey_erosion int T reshape inv repeat zeros ravel array tocoo reshape transpose from_numpy shape MNIST use_augmentation RandomRotation Compose DataLoader RandomHorizontalFlip SVHN append append array open get_all_masks get_masks resize_masks masks_to_tensor unsqueeze Compose open show subplot tight_layout tensor_to_image imshow title figure batch_size Model get_loader model_builder model_func t size mm view deepcopy children format isinstance AvgPool2d AugmentedStyleLoss Sequential len MaxPool2d add_module Conv2d ReLU ContentLoss BatchNorm2d to range append detach Adam compute_laplacian tensor_to_image clamp_ get_style_model_and_losses step get_input_optimizer basename print webhook_url post abspath load find_latest print load_state_dict get_sorted_path remove print save get_sorted_path range len join basename dirname append walk | # PyTorch-deep-photo-styletransfer PyTorch implementation of "Deep Photo Style Transfer": https://arxiv.org/abs/1703.07511 [](https://github.com/ambv/black) ## Other Implementations [Lua + Matlab](https://github.com/luanfujun/deep-photo-styletransfer) [Tensorflow](https://github.com/LouieYang/deep-photo-styletransfer-tf) ## Credit `closed_form_matting.py` is borrowed from [Closed-Form Matting](https://github.com/MarcoForte/closed-form-matting). `neural_style.py` is a modification of [Neural Transfer with PyTorch](https://pytorch.org/tutorials/advanced/neural_style_tutorial.html). | 507 |
IevaKazlauskaite/monotonic_flow | ['gaussian processes', 'time series'] | ['Monotonic Gaussian Process Flow'] | utils.py Kernel real_variable positive_variable mu_sigma_tilde init_triangular EulerMaruyama create_squared_exp_kernel vec_to_tri log_det_from_chol create_matern32_kernel kl_divergence Variable Variable cast log scatter_nd list constant zip int list zip zeros array triangular_solve tensor_diag ones reshape concat transpose matmul shape tile cholesky eye covar_matrix triangular_solve tensor_diag_part matmul reduce_sum log_det_from_chol trace cast eye log | ## Monotonic Gaussian Process Flow Source code accompanying "Monotonic Gaussian Process Flow" (2020). I Ustyuzhaninov*, I. Kazlauskaite*, C.H. Ek, N.D.F. Campbell. To appear in the proceedings of The 23rd International Conference on Artificial Intelligence and Statistics (AISTATS) https://arxiv.org/abs/1905.12930 | 508 |
IlchaeJung/RT-MDNet | ['visual tracking'] | ['Real-Time MDNet'] | modules/prepro_data_imagenet.py modules/utils.py modules/bbreg.py modules/roi_align/modules/roi_align.py tracker.py modules/roi_align/build.py modules/roi_align/_ext/roi_align/__init__.py modules/model.py modules/roi_align/functions/roi_align.py Run.py train_mrcnn.py options.py modules/data_prov.py modules/img_cropper.py modules/prepro_data.py modules/sample_generator.py modules/pretrain_options.py BBRegressor RegionDataset RegionExtractor LRN append_params MDNet Accuracy BinaryLoss Precision gen_samples SampleGenerator crop_image samples2maskroi overlap_ratio RoIAlignDenseAdaFunction RoIAlignFunction RoIAlignAdaFunction RoIAlign RoIAlignDenseAdaMax RoIAlignMax RoIAlignAvg RoIAlignAdaMax _import_symbols BatchNorm2d children isinstance iteritems generator concatenate ones overlap_ratio prod len minimum clip maximum int max imresize ones min shape array maximum copy dir _wrap_function getattr append callable | ## RT-MDNet: Real-Time Multi-Domain Convolutional Neural Network Tracker Created by [Ilchae Jung](http://cvlab.postech.ac.kr/~chey0313), [Jeany Son](http://cvlab.postech.ac.kr/~jeany), [Mooyeol Baek](http://cvlab.postech.ac.kr/~mooyeol), and [Bohyung Han](http://cvlab.snu.ac.kr/~bhhan) ### Introduction RT-MDNet is the real-time extension of [MDNet](http://cvlab.postech.ac.kr/research/mdnet/) and is the state-of-the-art real-time tracker. Detailed description of the system is provided by our [project page](http://cvlab.postech.ac.kr/~chey0313/real_time_mdnet/) and [paper](https://arxiv.org/pdf/1808.08834.pdf) ### Citation If you're using this code in a publication, please cite our paper. @InProceedings{rtmdnet, author = {Jung, Ilchae and Son, Jeany and Baek, Mooyeol and Han, Bohyung}, title = {Real-Time MDNet}, | 509 |
IliasZadik/double_orthogonal_ml | ['causal inference'] | ['Orthogonal Machine Learning: Power and Limitations'] | main_estimation.py plot_multi_instance.py plot_dumps_single_instance.py monte_carlo_single_instance.py monte_carlo_single_instance_with_seed.py all_together all_together_cross_fitting main experiment main experiment main main multiply flatten mean sum predict fit len flatten KFold mean zeros predict fit dot Lasso flatten sigma_q ArgumentParser output_dir log seed subplot support_size uniform title savefig parse_args range dump format n_samples plot_estimates n_dim tight_layout choice sqrt n_experiments join print add_argument dot hist figure zeros array input_dir exists legend append plot mean load suptitle xlabel std makedirs glob zip enumerate fill_between | # Introduction Code associated with paper: <a href="https://arxiv.org/abs/1711.00342">Orthogonal Machine Learning: Power and Limitations</a>, Mackey, Syrgkanis, Zadik, ICML 2018 # File descriptions * `main_estimation.py` : contains the implementation of all the proposed second order orthogonal methods and all the benchmark first order orthogonal estimation methods for the partially linear model * `monte_carlo_single_instance_with_seed.py` and `monte_carlo_single_instance.py` : almost identical files that generate data from the partially linear model DGP and based on input parameters, and run the proposed second order orthogonal method and all the benchmarks and save the results in joblib dumps. The only difference is in the naming convention of the result files. The first is used in the generation of the plots with multiple instances and the second in the generation of the plots with a single instance and as we sweep over parameters. * `plot_dumps_multi_instance.py` and `plot_dumps_single_instance.py` : plot the figures in the paper from the corresponding dumpes in the files above. * `single_instance_parameter_sweep.sh` : shell script that runs a single instance as the parameters of the DGP vary and creates all the related plots * `multi_instance.sh` : shell script that runs multiple instances of the DGP for a fixed set of parameters and generated the related plots # Re-creating the Figures in the Paper To recreate the figures in the paper run the following script: | 510 |
IllIIIllll/where-is-wally | ['semantic segmentation'] | ['The One Hundred Layers Tiramisu: Fully Convolutional DenseNets for Semantic Segmentation'] | train.py data/__init__.py utils/__init__.py data/make_targets.py data/create_subimages.py data/generator.py utils/params.py predict.py data/preprocess.py utils/tiramisu.py prediction_mask combine_panels split_panels img_resize wally_predict reshape_pred main main extract_224_sub_image find_box gen_sample_weight BatchIndices segm_generator seg_gen_mix get_img_num make_target decode_bndbox grab_xml_file get_img_num load_image load_target transition_dn up_path dropout relu down_path relu_bn conv transition_up dense_block create_tiramisu conv_relu_bn shape append shape range append shape range concatenate fromarray concatenate size new astype alpha_composite convert stack img_resize split_panels predict model imgs ArgumentParser save Input str strftime Model load_image parse_args size load_weights wally_predict create_tiramisu compile enumerate join prediction_mask add_argument now output makedirs wally_sub_imgs wally_sub_trgs seg_gen_mix trgs fit int sum unique argmax max ones int sum __next__ segm_generator get_img_num append BeautifulSoup find_all shape img_to_array zeros open append conv_relu_bn range concatenate append transition_dn enumerate dense_block as_list concatenate dense_block enumerate transition_up concatenate as_list list up_path isinstance down_path reversed conv | # where-is-wally 월리를 찾아라  # Tree ``` . ├── where-is-wally/ │ ├── data/ │ │ ├── imgs/ │ │ │ ├── bnd_box/ : 학습 이미지에서의 월리 위치 정보 | 511 |
IlyaGusev/gazeta | ['text summarization'] | ['Dataset for Automatic Summarization of Russian News'] | parser/parsers/middlewares.py parser/parsers/spiders/base.py parser/parsers/items.py parser/parsers/spiders/gazeta.py parser/parsers/settings.py parser/parsers/spiders/__init__.py parser/parsers/pipelines.py Document ParsersSpiderMiddleware ParsersDownloaderMiddleware ParsersPipeline NewsSpiderConfig NewsSpider GazetaSpider Field NewsSpiderConfig | # Gazeta dataset Paper: [Dataset for Automatic Summarization of Russian News](https://arxiv.org/abs/2006.11063) ## Download ### Dropbox: * v1, Full dataset: [gazeta_jsonl.tar.gz](https://www.dropbox.com/s/cmpfvzxdknkeal4/gazeta_jsonl.tar.gz) * v1, Train: [gazeta_train.jsonl](https://www.dropbox.com/s/43l702z5a5i2w8j/gazeta_train.jsonl) * v1, Validation: [gazeta_val.jsonl](https://www.dropbox.com/s/k2egt3sug0hb185/gazeta_val.jsonl) * v1, Test: [gazeta_test.jsonl](https://www.dropbox.com/s/3gki5n5djs9w0v6/gazeta_test.jsonl) * v1, Spacy analyses: [gazeta_v1_spacy.tar.gz](https://www.dropbox.com/s/al9dkg8herpspls/gazeta_v1_spacy.tar.gz) * v1, Raw version without any cleaning (not recommended): [gazeta_raw.txt](https://www.dropbox.com/s/4fxj5wmt7tjr5f2/gazeta_raw.txt) | 512 |
Inria-Chile/risotto | ['information retrieval'] | ['CORD-19: The COVID-19 Open Research Dataset'] | streamlit_apps/zero_shot.py scripts/build.py scripts/build_papers_artifacts.py streamlit_apps/nli/nli.py setup.py scripts/preprocess.py scripts/build_papers_embeddings.py read_requirements main main main main get_papers_embeddings get_papers get_model get_papers get_papers_entailments readlines exit notebook2script print download_cord19_dataset build_papers_artifact build_papers_embeddings build_artifacts max min mean load_papers_artifact std log | # 🍚 Risotto > Research Intelligent Support and Organization TOol against COVID-19  [](https://colab.research.google.com/github/Inria-Chile/risotto)  [](http://inria.cl)  [](https://cecill.info/licences.en.html) ## About Risotto The research effort prompted by [COVID-19](https://en.wikipedia.org/wiki/Coronavirus_disease_2019) is generating a massive amount of results. These results are mainly reported as research papers. These papers are being disseminated academic journals and conferences, and open-access pre-prints repositories like [medRxiv](https://www.medrxiv.org/), [arXiv](https://arxiv.org), [bioRxiv](https://www.biorxiv.org/), etc. In parallel, many publishing houses have opened access to their publication catalogs with current and previous publications related to coronaviruses. | 513 |
Institute-for-Artificial-Intelligence/Sparse-Interpretable-Word-Embeddings-For-Medical-Domain | ['word embeddings'] | ['Evaluating Sparse Interpretable Word Embeddings for Biomedical Domain'] | eval/intrinsic/evaluate_wordSim.py sparse_embedding/gridserach_Glove/SPINE/code/model/main.py sparse_embedding/gridserach_SG/SPINE/code/evaluation/extrinsic_downstream/TREC/classify.py sparse_embedding/gridserach_SG/SPINE/code/evaluation/extrinsic_downstream/newsgroups/classify.py preprocessing/combine.py sparse_embedding/gridserach_SG/SPINE/code/evaluation/intrinsic/evaluate_wordSim.py sparse_embedding/gridserach_Glove/SPINE/code/evaluation/extrinsic_downstream/np_bracketing/get_data.py sparse_embedding/gridserach_Glove/SPINE/code/evaluation/extrinsic_downstream/TREC/classify.py sparse_embedding/gridserach_SG/SPINE/code/evaluation/extrinsic_downstream/TREC/create_data.py sparse_embedding/gridserach_Glove/SPINE/code/evaluation/extrinsic_downstream/np_bracketing/classify_bracketing.py sparse_embedding/gridserach_Glove/SPINE/code/evaluation/extrinsic_downstream/TREC/create_data.py sparse_embedding/gridserach_SG/SPINE/code/model/model.py preprocessing/pre_processing.py sparse_embedding/gridserach_Glove/SPINE/code/model/model.py sparse_embedding/gridserach_SG/SPINE/code/evaluation/extrinsic_downstream/np_bracketing/get_data.py sparse_embedding/gridserach_SG/SPINE/code/model/utils.py sparse_embedding/gridserach_SG/SPINE/code/model/main.py sparse_embedding/gridserach_Glove/SPINE/code/evaluation/visualization/visualize_online.py eval/extrinsic_evaluation/extrinsic_eval_classfier.py preprocessing/mytokenizer.py sparse_embedding/gridserach_Glove/SPINE/code/evaluation/extrinsic_downstream/newsgroups/get_newsgroup_data.py sparse_embedding/gridserach_Glove/SPINE/code/model/utils.py eval/extrinsic_evaluation/extrinsic_evaluation.py preprocessing/extract.py eval/intrinsic/intrinsic_eva.py sparse_embedding/gridserach_SG/SPINE/code/evaluation/extrinsic_downstream/newsgroups/get_newsgroup_data.py sparse_embedding/gridserach_Glove/SPINE/code/evaluation/extrinsic_downstream/newsgroups/classify.py sparse_embedding/gridserach_Glove/SPINE/code/evaluation/intrinsic/evaluate_wordSim.py sparse_embedding/gridserach_SG/SPINE/code/evaluation/extrinsic_downstream/np_bracketing/classify_bracketing.py sparse_embedding/gridserach_SG/SPINE/code/evaluation/visualization/visualize_online.py eval/utilities.py eval/extrinsic_evaluation/extrinsic_evaluation_n.py topk_dim normalize plot_heatmap topkwords sorted_by sparsity_ratio Interpretability_dim dist_pos loadVectors getFeats label_encode loadVectors getFeats label_encode loadVectors getFeats label_encode evaluate loadData loadTestData getSimilarityScoreForWords getSimilarity target_function find_text run find extract_text target_f writeListOfList2File remove_url removePunctuation sent2file find_text segment_text loadVectors getFeats trainAndTest getOneHot main get_everything get_Xy loadVectors getFeats trainAndTest getOneHot main loadVectors getFeats trainAndTest getOneHot main get_label read_lines get_Xy evaluate loadData loadTestData getSimilarityScoreForWords getSimilarity load_vectors find_top_participating_dimensions load_top_dimensions main Solver SPINEModel get_noise_features compute_sparsity DataHandler dump_vectors loadVectors getFeats trainAndTest getOneHot main get_everything get_Xy loadVectors getFeats trainAndTest getOneHot main loadVectors getFeats trainAndTest getOneHot main get_label read_lines get_Xy evaluate loadData loadTestData getSimilarityScoreForWords getSimilarity load_vectors find_top_participating_dimensions load_top_dimensions main Solver SPINEModel get_noise_features compute_sparsity DataHandler dump_vectors mean T subplots_adjust sorted_by figure heatmap vectors var eps norm T append plot suptitle print figure legend zeros ravel append append vectors norm reshape keys len print readlines split array len zeros LabelEncoder readlines array readlines print loadData loadTestData spearmanr array len endswith listdir append parse_pubmed_paragraph append join fnmatch walk extract_text lower punctuation set TreebankWordTokenizer sent2file system zeros enumerate score fit load int loadVectors print shape trainAndTest append array open word_tokenize lower append range len int dump fetch_20newsgroups print get_Xy open len array extend max print get_label print time sorted print readlines close tqdm split open enumerate append len append print range len print append str getWordsList dump_vectors info vars train getSpineEmbeddings Solver parse_args count_nonzero size str print len write close shape range open make_blobs | # Sparse-Interpretable-Word-Embeddings-For-Medical-Domain Evaluating Sparse Interpretable Word Embeddings For Medical Domain | 514 |
InstituteForIndustrialEconomics/trac2 | ['text classification'] | ['BERT of all trades, master of some'] | trac_dataloader.py run_classification.py merge_predictions.py set_seed evaluate MultiHeadClassification main train load_and_cache_examples simple_accuracy TracProcessor pearson_and_spearman InputFeatures InputExample _truncate_seq_pair acc_and_f1 compute_metrics convert_examples_to_features seed manual_seed_all manual_seed gradient_accumulation_steps model get_linear_schedule_with_warmup tuple clip_grad_norm_ zero_grad DataLoader DataParallel DistributedDataParallel max_grad_norm output_dir save max exists initialize set_seed logging_steps load_state_dict master_params state_dict SummaryWriter format close mean save_pretrained num_train_epochs info fp16 trange per_gpu_train_batch_size max_steps enumerate load join int n_gpu items evaluate model_name_or_path AdamW backward add_scalar print makedirs dumps tqdm parameters step train_batch_size len do_eval tuple DataLoader DataParallel output_dir folder_list argmax max eval_batch_size squeeze per_gpu_eval_batch_size compute_metrics append SequentialSampler update format eval info zip load_and_cache_examples join n_gpu makedirs tqdm numpy len pop join str format load max_seq_length data_dir barrier get_labels TensorDataset convert_examples_to_features save info folder_list tensor get_examples enable_attach from_pretrained do_eval warning ArgumentParser device do_train output_dir save eval_all_checkpoints setLevel basicConfig list set_seed set_device get_labels parse_args to WARN update init_process_group lower save_pretrained info fp16 wait_for_attach task_name train join n_gpu evaluate model_name_or_path print add_argument makedirs barrier dict bool load_and_cache_examples local_rank len get items join format text InputFeatures encode_plus label_b dict guid info append label float tokenize enumerate label_a len pop len simple_accuracy f1_score | # trac2 Our solution for TRAC-2 Shared task | Task | Rank |F1 | |------|------|---| |BEN-A | 4 |0.771624071| |BEN-B | 2 |0.929702403| |ENG-A | 3 |0.756837473| |ENG-B | 1 |0.871585052| |HIN-A | 4 |0.776096096| |HIN-B | 4 |0.838065913| | 515 |
IntelVCL/Intseg | ['interactive segmentation'] | ['Deep Interactive Object Selection'] | our_func_cvpr18.py IntSeg_GUI.py IntSeg_Train.py main Example lrelu get_weight_bias identity_initializer nm prepare_data build build_vgg19 build_net lrelu get_weight_bias our_func identity_initializer nm build compIoU build_vgg19 build_net Tk mainloop Example Variable reshape size constant get_weight_bias reuse_variables loadmat build_net build_vgg19 concat conv2d range sum imwrite Saver Session run restore ones placeholder build shape initialize_all_variables imread expand_dims concatenate get_checkpoint_state distance_transform_edt minimum deepcopy uint8 float32 maximum model_checkpoint_path int32 circle makedirs | IntelVCL/Intseg | 516 |
Irene323/GFTE | ['information retrieval'] | ['GFTE: Graph-based Financial Table Extraction'] | GFTE-pos+text+img/model2.py GFTE-pos+text/train1.py GFTE-pos+text/model1.py GFTE-pos/train0.py GFTE-pos+text+img/train2.py GFTE-pos+text+img-test/model3.py GFTE-pos+text/dataset1.py GFTE-pos+text+img-test/dataset3.py utils.py GFTE-pos/model0.py GFTE-pos/dataset0.py GFTE-pos+text+img-test/train3.py GFTE-pos+text+img/dataset2.py averager loadData prettyPrint weight_init assureRatio strLabelConverter oneHot ScitsrDataset Net val trainBatch weights_init ScitsrDataset encode_text TbNet val trainBatch weights_init ScitsrDataset encode_text TbNet val trainBatch weights_init ScitsrDataset encode_text TbNet val trainBatch weights_init max fill_ size scatter_ long range copy_ str format print size type main size UpsamplingBilinear2d data constant_ ConvTranspose3d BatchNorm3d Conv3d normal_ BatchNorm1d xavier_normal_ GRUCell GRU BatchNorm2d ConvTranspose1d LSTMCell Conv1d ConvTranspose2d Linear isinstance orthogonal_ Conv2d parameters LSTM normal_ __name__ fill_ max sum criterion print averager min range add parameters eval DataLoader numpy iter float next cuda net len criterion backward step zero_grad next cuda net append min range len | # GFTE ## Introduction A GCN-based table structure recognition method, which integrates position feature, text feature and image feature together. ## Implementation Details In different folders, we offer the evolvement of GFTE, which gradually concatenate diverse kinds of feature. ## Citation Please cite the paper if you found the resources useful. ``` @article{GFTE, title={GFTE: Graph-based Financial Table Extraction}, | 517 |
IreneMahhy/no_frills_hoi_det-mod | ['human object interaction detection'] | ['No-Frills Human-Object Interaction Detection: Factorization, Layout Encodings, and Training Techniques'] | exp/hoi_classifier/data/write_faster_rcnn_hico_feats_to_hdf5.py data/vcoco_cfg.py data/vcoco/vcoco_json.py utils/io.py exp/hoi_classifier/data/box_features.py data/hico/split_ids.py exp/hoi_classifier/data/assign_pose_to_human_candidates.py data/hico/hoi_cls_count.py data/vcoco/vcoco_to_json.py exp/hoi_classifier/vis/top_boxes_per_hoi.py exp/hoi_classifier/vis/faster_rcnn_aps.py exp/hoi_classifier/data/hoi_candidates.py exp/hoi_classifier/data/label_hoi_candidates.py exp/hoi_classifier/models/verb_given_object_appearance.py utils/losses.py utils/constants.py exp/hoi_classifier/data/cache_box_features.py exp/run_template.py exp/data_eval/compute_map_vcoco.py exp/data_eval/compute_map.py exp/data_eval/sample_complexity_analysis.py exp/detect_coco_objects/select_confident_boxes.py data/hico/hico_constants.py exp/detect_coco_objects/prepare_data_for_faster_rcnn.py exp/hoi_classifier/data/write_faster_rcnn_vcoco_feats_to_hdf5.py exp/hoi_classifier/vis/vis_object_aps_per_interaction.py exp/hoi_classifier/models/verb_given_human_appearance.py exp/hoi_classifier/data/features_dataset.py exp/detect_coco_objects/evaluate_boxes.py exp/hoi_classifier/eval.py exp/hoi_classifier/train.py utils/model.py data/coco_classes.py utils/bbox_utils.py data/vcoco/vcoco_constants.py exp/hoi_classifier/vis/vis_human_pose.py utils/pytorch_layers.py exp/hoi_classifier/models/verb_given_human_pose.py data/vcoco/hoi_cls_count_vcoco.py exp/detect_coco_objects/run.py exp/hoi_classifier/models/scatter_verbs_to_hois.py exp/hoi_classifier/vis/vis_interaction_aps_per_object.py exp/hoi_classifier/models/verb_given_boxes_and_object_label.py utils/argparse_utils.py exp/experimenter.py exp/hoi_classifier/data/pose_features.py utils/html_writer.py data/vcoco/split_ids_vcoco.py exp/hoi_classifier/data/cache_pose_features.py exp/hoi_classifier/run.py utils/collections.py exp/hoi_classifier/models/hoi_classifier_model.py data/hico/mat_to_json.py HicoConstants bin_hoi_ids main ConvertMat2Json main split bin_hoi_ids main main split VcocoConstants clip_xyxy_to_image VCOCOeval voc_ap get_overlap Convert2Json list_exps exp_do_something compute_ap eval_hoi compute_pr compute_normalized_pr load_gt_dets match_hoi main main main compute_mAP evaluate_boxes box_recall evaluate_boxes_and_labels box_label_recall prepare_data exp_detect_coco_objects_in_hico exp_select_and_evaluate_confident_boxes_in_vcoco _exp_select_and_evaluate_confident_boxes exp_detect_coco_objects_in_vcoco exp_select_and_evaluate_confident_boxes_in_hico _exp_detect_coco_objects select_det_ids select_dets select main eval_model _exp_cache_box_feats exp_cache_pose_feats_vcoco _exp_gen_and_label_hoi_cand exp_train_vcoco exp_train_hico exp_assign_pose_to_human_cand_hico exp_cache_box_feats_hico exp_top_boxes_per_hoi_hico exp_cache_pose_feats_hico exp_cache_box_feats_vcoco _exp_top_boxes_per_hoi _exp_cache_pose_feats exp_eval_hico exp_gen_and_label_hoi_cand_vcoco exp_gen_and_label_hoi_cand_hico exp_assign_pose_to_human_cand_vcoco _exp_train exp_eval_vcoco _exp_assign_pose_to_human_cand _exp_eval exp_top_boxes_per_hoi_vcoco train_model main eval_model assign_pose count_keypoints_in_box main get_pose_box BoxFeatures main compute_box_feats main FeatureConstantsHico FeatureConstantsVcoco Features HoiCandidatesGenerator generate load_gt_dets assign match_hoi PoseFeatures main main HoiClassifier HoiClassifierConstants ScatterVerbsToHois ScatterVerbsToHoisConstants VerbGivenBoxesAndObjectLabel VerbGivenBoxesAndObjectLabelConstants VerbGivenHumanAppearance VerbGivenHumanAppearanceConstants VerbGivenHumanPose VerbGivenHumanPoseConstants VerbGivenObjectAppearance VerbGivenObjectAppearanceConstants create_html get_gt_boxes get_gt_hois select_best_boxes_across_dataset main vis_keypts main main main str_to_bool manage_required_args vis_sub_obj_bboxes compute_area_batch join_bboxes_by_line add_bbox compute_iou compute_area compute_iou_batch vis_human_keypts vis_bboxes vis_bbox AttrDict ExpConstants Constants save_constants HtmlWriter load_pickle_object load_json_object read dump_json_object load_mat_object dump_pickle_object deserialize_object write load_yaml_object mkdir_if_not_exists dumps_json_object JsonSerializableClass serialize_object WritableToFile NumpyAwareJSONEncoder FocalLoss Model MLP adjust_learning_rate get_activation Identity create_mlp append items load_json_object join anno_list_json dump_json_object proc_dir HicoConstants tqdm bin_hoi_ids int sample set append len items print len split VcocoConstants enumerate minimum maximum minimum maximum concatenate size maximum sum range print parse_args exp print compute_iou enumerate isnan any max arange cumsum array nan cumsum sum array nan compute_ap join compute_pr print File match_hoi save append print join load_json_object append starmap load_gt_dets num_processes mkdir_if_not_exists close set out_dir append parse_args Pool do_eval anno_vcoco_test File pred_hoi_dets_hdf5 VCOCOeval anno_list_test sorted compute_mAP bin_to_hoi_ids_json keys enumerate compute_iou len zip enumerate compute_iou len join load_json_object anno_list_json dump_json_object concatenate print File tolist iou_thresh tqdm exp_dir append box_recall keys enumerate hoi_list_json join load_json_object anno_list_json dump_json_object concatenate print File tolist iou_thresh box_label_recall tqdm exp_dir append keys enumerate join load_json_object anno_list_json dump_json_object proc_dir print mkdir_if_not_exists dict exp_dir images_dir to_json enumerate len prepare_data _exp_detect_coco_objects ExpConstants HicoConstants _exp_detect_coco_objects VcocoConstants ExpConstants select ExpConstants _exp_select_and_evaluate_confident_boxes HicoConstants VcocoConstants ExpConstants _exp_select_and_evaluate_confident_boxes arange min compute_area append array range background_score_thresh select_det_ids max_humans max_objects_per_class object_score_thresh concatenate max_background human_score_thresh append zeros array enumerate load join load_json_object anno_list_json print faster_rcnn_boxes File mkdir_if_not_exists select_dets close tqdm exp_dir create_dataset to_json create_group argmax max SequentialSampler create_group VCOCO_NUM_ACTION_CLASSES concatenate hstack close VCOCO_NUM_TARGET_OBJECT_TYPES eval stack join T print reshape File tqdm exp_dir hoi_classifier create_dataset zeros numpy len load model_pth Features eval_model Model load_state_dict cuda join getcwd HicoConstants _exp_gen_and_label_hoi_cand ExpConstants join VcocoConstants getcwd _exp_gen_and_label_hoi_cand ExpConstants join print subset manage_required_args gen_hoi_cand exp_dir assign generate parse_args label_hoi_cand _exp_cache_box_feats ExpConstants HicoConstants _exp_cache_box_feats VcocoConstants ExpConstants join subset manage_required_args exp_dir main parse_args _exp_assign_pose_to_human_cand ExpConstants HicoConstants _exp_assign_pose_to_human_cand VcocoConstants ExpConstants join proc_dir subset manage_required_args exp_dir main parse_args _exp_cache_pose_feats ExpConstants HicoConstants _exp_cache_pose_feats VcocoConstants ExpConstants join subset manage_required_args exp_dir main parse_args join FeatureConstantsHico getcwd _exp_train join _exp_train getcwd FeatureConstantsVcoco join verb_given_boxes_and_object_label verb_given_object_appearance Constants rcnn_det_prob manage_required_args exp_dir HoiClassifierConstants verb_given_human_pose imgs_per_batch verb_given_appearance main parse_args ExpConstants verb_given_human_appearance join FeatureConstantsHico getcwd _exp_eval join getcwd FeatureConstantsVcoco _exp_eval join verb_given_boxes_and_object_label isinstance verb_given_object_appearance Constants model_num rcnn_det_prob manage_required_args exp_dir model_dir HoiClassifierConstants verb_given_human_pose verb_given_appearance main parse_args ExpConstants verb_given_human_appearance join FeatureConstantsHico getcwd _exp_top_boxes_per_hoi join getcwd FeatureConstantsVcoco _exp_top_boxes_per_hoi join verb_given_boxes_and_object_label verb_given_object_appearance getcwd Constants model_num rcnn_det_prob manage_required_args exp_dir model_dir HoiClassifierConstants verb_given_human_pose verb_given_appearance main parse_args ExpConstants verb_given_human_appearance zero_grad model_dir save exp_name FloatTensor Adam chain sum range state_dict format eval_model log_value item BCELoss num_epochs enumerate join criterion backward Variable print RandomSampler parameters hoi_classifier train step criterion FloatTensor Variable size RandomSampler manual_seed float BCELoss train_model configure log_dir exp_dir model_dir save_constants to_txt amin array amax zeros enumerate compute_iou compute_area str int split_ids_json assign_pose hoi_cand_hdf5 num_keypoints human_pose_dir create_dataset range create_group compute_features BoxFeatures array tile compute_box_feats zeros PoseFeatures rpn_id_to_pose_h5py_to_npy compute_pose_feats array tile human_cands_pose_hdf5 load_json_object join create_group split_ids_json print File mkdir_if_not_exists close tqdm exp_dir save_constants create_dataset selected_dets_hdf5 HoiCandidatesGenerator predict enumerate set hoi_list_json join load_json_object anno_list_json split_ids_json print load_gt_dets File mkdir_if_not_exists hoi_cand_hdf5 close match_hoi tqdm exp_dir save_constants create_dataset zeros range faster_rcnn_boxes zeros concatenate enumerate len vis_human_keypts tile sorted reshape get_gt_boxes zfill tqdm append zeros num_to_vis keys range vis_sub_obj_bboxes join deepcopy add_element mkdir_if_not_exists close zfill get_gt_hois HtmlWriter tqdm tile imread keys imsave enumerate vis_keypts hoi_list_json create_html human_pose_feats_hdf5 select_best_boxes_across_dataset pred_hoi_dets_h5py images_dir vis_human_keypts human_pose_feats_h5py add hoi_cand_h5py imread imsave enumerate reshape Box plot getcwd Scatter Layout join sorted print exit set getattr choices append help polygon polygon_perimeter set_color min max compute_area zeros logical_and minimum compute_area_batch stack maximum min copy set_color polygon polygon_perimeter max range copy vis_bbox min copy line_aa max range circle vis_bboxes join_bboxes_by_line zip line_aa circle range copy print join to_json items decompress read loads compress write dumps encode compress write dumps dumps mkdir exists makedirs get_activation MLP param_groups | # No-Frills Human-Object Interaction Detection: Factorization, Layout Encodings, and Training Techniques By [Tanmay Gupta](http://tanmaygupta.info), [Alexander Schwing](http://alexander-schwing.de), and [Derek Hoiem](http://dhoiem.cs.illinois.edu) <p align="center"> <img src="imgs/teaser_wide.png"> </p> # Content - [Overview](#overview) - [Requirements](#requirements) - [Setup](#setup) - [Download the HICO-Det dataset](#download-the-hico-det-dataset) | 518 |
IreneMahhy/no_frills_hoi_det-mod-master | ['human object interaction detection'] | ['No-Frills Human-Object Interaction Detection: Factorization, Layout Encodings, and Training Techniques'] | exp/hoi_classifier/data/write_faster_rcnn_hico_feats_to_hdf5.py data/vcoco_cfg.py data/vcoco/vcoco_json.py utils/io.py exp/hoi_classifier/data/box_features.py data/hico/split_ids.py exp/hoi_classifier/data/assign_pose_to_human_candidates.py data/hico/hoi_cls_count.py data/vcoco/vcoco_to_json.py exp/hoi_classifier/vis/top_boxes_per_hoi.py exp/hoi_classifier/vis/faster_rcnn_aps.py exp/hoi_classifier/data/hoi_candidates.py exp/hoi_classifier/data/label_hoi_candidates.py exp/hoi_classifier/models/verb_given_object_appearance.py utils/losses.py utils/constants.py exp/hoi_classifier/data/cache_box_features.py exp/run_template.py data/vcoco/confusion_matrix.py exp/data_eval/compute_map.py exp/data_eval/compute_map_vcoco.py exp/data_eval/hico_error_analysis.py exp/data_eval/sample_complexity_analysis.py exp/detect_coco_objects/select_confident_boxes.py data/hico/hico_constants.py exp/detect_coco_objects/prepare_data_for_faster_rcnn.py exp/hoi_classifier/data/write_faster_rcnn_vcoco_feats_to_hdf5.py exp/hoi_classifier/vis/vis_object_aps_per_interaction.py exp/hoi_classifier/models/verb_given_human_appearance.py exp/hoi_classifier/data/features_dataset.py exp/detect_coco_objects/evaluate_boxes.py exp/hoi_classifier/eval.py exp/hoi_classifier/train.py utils/model.py data/coco_classes.py utils/bbox_utils.py data/vcoco/vcoco_constants.py exp/hoi_classifier/vis/vis_human_pose.py utils/pytorch_layers.py exp/hoi_classifier/models/verb_given_human_pose.py data/vcoco/hoi_cls_count_vcoco.py exp/detect_coco_objects/run.py exp/hoi_classifier/models/scatter_verbs_to_hois.py exp/hoi_classifier/vis/vis_interaction_aps_per_object.py exp/hoi_classifier/models/verb_given_boxes_and_object_label.py utils/argparse_utils.py exp/experimenter.py exp/hoi_classifier/data/pose_features.py utils/html_writer.py data/vcoco/split_ids_vcoco.py exp/hoi_classifier/data/cache_pose_features.py exp/hoi_classifier/run.py utils/collections.py exp/hoi_classifier/models/hoi_classifier_model.py data/hico/mat_to_json.py apply_prior apply_prior_for_candidates HicoConstants bin_hoi_ids main ConvertMat2Json main split create_confusion_matrix bin_hoi_ids main main split VcocoConstants clip_xyxy_to_image VCOCOeval voc_ap get_overlap Convert2Json list_exps exp_do_something compute_ap eval_hoi compute_pr compute_normalized_pr load_gt_dets match_hoi main main compute_ap eval_hoi compute_pr compute_normalized_pr load_gt_dets match_hoi main main compute_mAP evaluate_boxes box_recall evaluate_boxes_and_labels box_label_recall prepare_data exp_detect_coco_objects_in_hico exp_select_and_evaluate_confident_boxes_in_vcoco _exp_select_and_evaluate_confident_boxes exp_detect_coco_objects_in_vcoco exp_select_and_evaluate_confident_boxes_in_hico _exp_detect_coco_objects select_det_ids select_dets select main eval_model _exp_cache_box_feats exp_cache_pose_feats_vcoco _exp_gen_and_label_hoi_cand exp_train_vcoco exp_train_hico exp_assign_pose_to_human_cand_hico exp_cache_box_feats_hico exp_top_boxes_per_hoi_hico exp_cache_pose_feats_hico exp_cache_box_feats_vcoco _exp_top_boxes_per_hoi _exp_cache_pose_feats exp_eval_hico exp_gen_and_label_hoi_cand_vcoco exp_gen_and_label_hoi_cand_hico exp_assign_pose_to_human_cand_vcoco _exp_train exp_eval_vcoco _exp_assign_pose_to_human_cand _exp_eval exp_top_boxes_per_hoi_vcoco train_model main eval_model assign_pose count_keypoints_in_box main get_pose_box BoxFeatures main compute_box_feats main FeatureConstantsHico FeatureConstantsVcoco Features HoiCandidatesGenerator generate load_gt_dets assign match_hoi PoseFeatures main main HoiClassifier HoiClassifierConstants ScatterVerbsToHois ScatterVerbsToHoisConstants VerbGivenBoxesAndObjectLabel VerbGivenBoxesAndObjectLabelConstants VerbGivenHumanAppearance VerbGivenHumanAppearanceConstants VerbGivenHumanPose VerbGivenHumanPoseConstants VerbGivenObjectAppearance VerbGivenObjectAppearanceConstants create_html get_gt_boxes get_gt_hois select_best_boxes_across_dataset main vis_keypts main main main str_to_bool manage_required_args vis_sub_obj_bboxes compute_area_batch join_bboxes_by_line add_bbox compute_iou compute_area compute_iou_batch vis_human_keypts vis_bboxes vis_bbox AttrDict ExpConstants Constants save_constants HtmlWriter load_pickle_object load_json_object read dump_json_object load_mat_object dump_pickle_object deserialize_object write load_yaml_object mkdir_if_not_exists dumps_json_object JsonSerializableClass serialize_object WritableToFile NumpyAwareJSONEncoder FocalLoss Model MLP adjust_learning_rate get_activation Identity create_mlp append items load_json_object join anno_list_json dump_json_object proc_dir HicoConstants tqdm bin_hoi_ids int sample set append len items print len split arange xlabel float yticks ylabel mean imshow savefig zeros expand_dims xticks array diag enumerate len VcocoConstants enumerate minimum maximum minimum maximum concatenate size maximum sum range print parse_args exp print compute_iou enumerate isnan any max arange cumsum array nan cumsum sum array nan compute_ap join compute_pr print File match_hoi save append enumerate print join load_json_object append starmap load_gt_dets num_processes mkdir_if_not_exists close set out_dir append parse_args Pool do_eval anno_vcoco_test File pred_hoi_dets_hdf5 VCOCOeval anno_list_test append int min sum array len range format int zeros sorted compute_mAP bin_to_hoi_ids_json keys enumerate compute_iou len zip enumerate compute_iou len join load_json_object anno_list_json dump_json_object concatenate print File tolist iou_thresh tqdm exp_dir append box_recall keys enumerate hoi_list_json join load_json_object anno_list_json dump_json_object concatenate print File tolist iou_thresh box_label_recall tqdm exp_dir append keys enumerate join load_json_object anno_list_json dump_json_object proc_dir print mkdir_if_not_exists dict exp_dir images_dir to_json enumerate len prepare_data _exp_detect_coco_objects ExpConstants HicoConstants _exp_detect_coco_objects VcocoConstants ExpConstants select ExpConstants _exp_select_and_evaluate_confident_boxes HicoConstants VcocoConstants ExpConstants _exp_select_and_evaluate_confident_boxes arange min compute_area append array range background_score_thresh select_det_ids max_humans max_objects_per_class object_score_thresh concatenate max_background human_score_thresh append zeros array enumerate load join load_json_object anno_list_json print faster_rcnn_boxes File mkdir_if_not_exists select_dets close tqdm exp_dir create_dataset to_json create_group argmax max SequentialSampler create_group VCOCO_NUM_ACTION_CLASSES concatenate hstack close VCOCO_NUM_TARGET_OBJECT_TYPES eval stack join T print reshape File tqdm exp_dir hoi_classifier create_dataset zeros numpy load model_pth Features eval_model Model load_state_dict cuda join getcwd HicoConstants _exp_gen_and_label_hoi_cand ExpConstants join VcocoConstants getcwd _exp_gen_and_label_hoi_cand ExpConstants join print subset manage_required_args gen_hoi_cand exp_dir assign generate parse_args label_hoi_cand _exp_cache_box_feats ExpConstants HicoConstants _exp_cache_box_feats VcocoConstants ExpConstants join subset manage_required_args exp_dir main parse_args _exp_assign_pose_to_human_cand ExpConstants HicoConstants _exp_assign_pose_to_human_cand VcocoConstants ExpConstants join proc_dir subset manage_required_args exp_dir main parse_args _exp_cache_pose_feats ExpConstants HicoConstants _exp_cache_pose_feats VcocoConstants ExpConstants join subset manage_required_args exp_dir main parse_args join FeatureConstantsHico getcwd _exp_train join _exp_train getcwd FeatureConstantsVcoco join verb_given_boxes_and_object_label verb_given_object_appearance Constants rcnn_det_prob manage_required_args exp_dir HoiClassifierConstants verb_given_human_pose imgs_per_batch verb_given_appearance main parse_args ExpConstants verb_given_human_appearance join FeatureConstantsHico getcwd _exp_eval join getcwd FeatureConstantsVcoco _exp_eval join verb_given_boxes_and_object_label isinstance verb_given_object_appearance Constants model_num rcnn_det_prob manage_required_args exp_dir model_dir HoiClassifierConstants verb_given_human_pose verb_given_appearance main parse_args ExpConstants verb_given_human_appearance join FeatureConstantsHico getcwd _exp_top_boxes_per_hoi join getcwd FeatureConstantsVcoco _exp_top_boxes_per_hoi join verb_given_boxes_and_object_label verb_given_object_appearance getcwd Constants model_num rcnn_det_prob manage_required_args exp_dir model_dir HoiClassifierConstants verb_given_human_pose verb_given_appearance main parse_args ExpConstants verb_given_human_appearance zero_grad model_dir save cuda exp_name FloatTensor Adam chain sum range state_dict format eval_model log_value item BCELoss num_epochs enumerate join criterion backward Variable print RandomSampler parameters hoi_classifier train step criterion FloatTensor Variable size RandomSampler manual_seed float BCELoss train_model configure log_dir exp_dir model_dir save_constants to_txt amin array amax zeros enumerate compute_iou compute_area str split_ids_json assign_pose hoi_cand_hdf5 num_keypoints human_pose_dir create_dataset create_group compute_features BoxFeatures array tile compute_box_feats PoseFeatures rpn_id_to_pose_h5py_to_npy compute_pose_feats array tile human_cands_pose_hdf5 load_json_object join create_group split_ids_json print File mkdir_if_not_exists close tqdm exp_dir save_constants create_dataset selected_dets_hdf5 HoiCandidatesGenerator full predict enumerate set hoi_list_json join load_json_object anno_list_json split_ids_json print load_gt_dets File mkdir_if_not_exists hoi_cand_hdf5 close match_hoi tqdm exp_dir save_constants create_dataset zeros range faster_rcnn_boxes zeros concatenate enumerate len vis_human_keypts tile T sorted concatenate size get_gt_boxes where tqdm append zeros num_to_vis keys range vis_sub_obj_bboxes join deepcopy add_element mkdir_if_not_exists close zfill get_gt_hois HtmlWriter tqdm tile imread keys imsave enumerate hoi_list_json create_html human_pose_feats_hdf5 select_best_boxes_across_dataset pred_hoi_dets_h5py images_dir vis_human_keypts human_pose_feats_h5py add hoi_cand_h5py imread imsave enumerate reshape Box plot getcwd Scatter Layout join sorted print exit set getattr choices append help polygon polygon_perimeter set_color min max compute_area zeros logical_and minimum compute_area_batch stack maximum min copy set_color polygon polygon_perimeter max range copy vis_bbox min copy line_aa max range circle vis_bboxes join_bboxes_by_line zip line_aa circle range copy print join to_json items decompress read loads compress write dumps encode compress write dumps dumps mkdir exists makedirs get_activation MLP param_groups | # No-Frills Human-Object Interaction Detection: Factorization, Layout Encodings, and Training Techniques By [Tanmay Gupta](http://tanmaygupta.info), [Alexander Schwing](http://alexander-schwing.de), and [Derek Hoiem](http://dhoiem.cs.illinois.edu) <p align="center"> <img src="imgs/teaser_wide.png"> </p> # Content - [Overview](#overview) - [Requirements](#requirements) - [Setup](#setup) - [Download the HICO-Det dataset](#download-the-hico-det-dataset) | 519 |
IreneZihuiLi/TopicAttentionMedicalAD | ['few shot learning'] | ['A Neural Topic-Attention Model for Medical Term Abbreviation Disambiguation'] | src/cnn_pytorch_copy.py src/models/selfAttention_lda_elmo_cnn.py src/mr_loader.py src/models/CNNClassifier.py src/models/CNN.py src/configuration.py src/models/selfAttention_lda_elmo.py src/models/LSTMClassifier.py src/main_pytorch_dbg.py src/cnn_pytorch_5fold.py src/models/selfAttention_lda.py src/models/RCNN.py src/main_pytorch_elmo_topic.py src/fc.py src/models/LSTM_Attn.py src/models/selfAttention_lda_elmo_gsm.py src/mr_loader_copy.py src/models/RCNN_elmo.py src/Config.py src/get_gsm.py src/main_pytorch_elmo.py src/models/CNN_with_glove.py src/mr_loader_w2v.py src/models/mr_loader.py src/main_ana.py src/cnn_pytorch.py src/main_pytorch_nothing.py src/main_pytorch.py src/models/selfAttention.py src/mr_loader_ana.py src/models/selfAttention_lda_elmo_cnn_glove.py src/mr_loader_over.py evaluate TCNNConfig test TextCNN get_time_dif train evaluate TCNNConfig test TextCNN get_time_dif train evaluate TCNNConfig test TextCNN get_time_dif train Config Config Net get_time_dif test train evaluate get_time_dif test train evaluate get_time_dif test train evaluate get_time_dif test train evaluate get_time_dif test train evaluate get_time_dif test train evaluate open_file process_text_tokenize read_vocab_glove process_text clean_str read_vocab read_test Corpus build_vocab open_file process_text_tokenize read_vocab_glove process_text clean_str read_vocab read_test Corpus build_vocab open_file process_text_tokenize read_vocab_glove process_text clean_str read_vocab read_test Corpus build_vocab open_file process_text_tokenize read_vocab_glove process_text clean_str read_vocab read_test Corpus build_vocab open_file process_text_tokenize read_vocab_glove process_text clean_str read_vocab read_test Corpus build_vocab CNNClassifier CNNClassifier CNNClassifier LSTMClassifier AttentionModel open_file process_text_tokenize read_vocab_glove process_text clean_str read_vocab read_test Corpus build_vocab RCNN RCNN_elmo SelfAttention load_lda SelfAttention load_lda SelfAttention load_lda SelfAttention load_lda SelfAttention load_lda SelfAttention time data model tolist extend eval DataLoader sum loss len x_train_ids model zero_grad DataLoader test_path vocab_size save cuda seq_length num_classes Adam x_test_ids TensorDataset Corpus CrossEntropyLoss state_dict range format LongTensor abbre words test file_path num_epochs time model_file criterion backward print evaluate y_test parameters y_train TextCNN get_time_dif step len load data time model print tolist extend confusion_matrix DataLoader load_state_dict f1_score accuracy_score x_test x_train x_train_text x_test_text SelfAttention CNNClassifier LSTMClassifier RCNN AttentionModel precision_recall_fscore_support lower replace join list print write extend Counter zip most_common split list len dict zip range split list print dict zip range values len clean_str len clean_str split replace print len read_excel append range open | # A Topic-Attention Model for Medical Term Abbreviation Disambiguation This repo is the implementation of [A Neural Topic-Attention Model for Medical Term Abbreviation Disambiguation](https://arxiv.org/abs/1910.14076). A workshop paper at Machine Learning for Health(ML4H) at NeurIPS 2019. Check the sample data and source code. If you find this repo helpful, please cite using: ``` @article{li2019neural, author = {Irene Li, Michihiro Yasunaga, Muhammed Yavuz Nuzumlalı, Cesar Caraballo, Shiwani Mahajan, Harlan Krumholz, Dragomir Radev }, title = {A Neural Topic-Attention Model for Medical Term Abbreviation Disambiguation}, journal={arXiv preprint arXiv:1910.14076}, year = {2019} | 520 |
Irynei/SafeAugmentation | ['data augmentation'] | ['Safe Augmentation: Learning Task-Specific Transformations from Data'] | utils/util.py model/architectures/vgg_32x32.py base/base_trainer.py train.py trainer/__init__.py augmentations/__init__.py logger/logger.py model/loss.py augmentations/augmentation.py trainer/trainer.py test.py model/architectures/densenet_32x32.py data_loaders/data_loader.py logger/__init__.py model/metric.py data_loaders/__init__.py model/architectures/__init__.py model/model.py base/__init__.py base/base_dataset.py base/base_data_loader.py main main get_medium_augmentations get_light_augmentations get_strong_augmentations AutoAugmentDataset BaseDataLoader BaseTrainer SVHNDataLoader get_dataloader_instance CIFAR10DataLoader TinyImageNetDataLoader Logger get_loss_function jaccard_similarity f_beta ham_loss accuracy get_metric_functions get_model_instance my_densenet121 Transition DenseNet Bottleneck densenet169_32x32 densenet121_32x32 densenet161_32x32 MyDensenet densenet201_32x32 VGG16_32x32 Trainer download_and_unzip create_val_folder EarlyStopping log_model_summary ensure_dir get_model_instance get_loss_function get_metric_functions test Trainer get_test_loader log_model_summary Logger get_dataloader_instance get_validation_loader train dataloader getattr loss append getattr model makedirs format parameters filter info sum join urlretrieve isfile info makedirs join items readlines close makedirs rename open exists split | # [Safe Augmentation: Learning Task-Specific Transformations from Data](https://arxiv.org/abs/1907.12896) The repository demonstrates our approach for learning safe augmentations that do not shift the data distribution. | 521 |
Isminoula/TextNormSeq2Seq | ['lexical normalization'] | ['Adapting Sequence to Sequence models for Text Normalization in Social Media'] | lib/metric/loss.py lib/data/DataLoader.py lib/metric/utils.py lib/model/__init__.py lib/model/model_factory.py lib/model/model.py lib/train/evaluator.py lib/data/constants.py lib/__init__.py lib/metric/__init__.py lib/train/__init__.py lib/metric/metrics.py lib/train/optim.py lib/data/Tweet.py lib/data/Dict.py main.py lib/train/trainer.py lib/data/Dataset.py parameters.py lib/data/__init__.py main train_char_model change_args DataLoader read_file create_data create_datasets Dataset Dict Tweet Preprocessor weighted_xent_loss sequence_mask f1 compute_numcorrects clean_self_toks clean_sentence handle_tags handle_numbers to_words compute_single char_to_words compute_batch handle_unk copy_unks LuongAttnDecoderRNN Seq2Seq EncoderRNN create_optim create_model build_model Evaluator Optim Trainer batch_size Trainer save_dir opt create_data end_epoch format create_model traindata Evaluator create_datasets raw_input start_epoch eval info deepcopy join print testdata train batch_size Trainer change_args save_dir opt basicConfig create_data end_epoch exit parse_args format create_model traindata Evaluator create_datasets raw_input start_epoch eval info interactive join print testdata train seed manual_seed_all basicConfig SELF share_embeddings set_device self_tok warning manual_seed save_dir cuda gpu makedirs source_vocab DataLoader target_vocab create_data traindata valsplit testdata read_file append Tweet shuffle view log_softmax size float sum max Variable size expand cuda expand_as long is_cuda join PAD_WORD min zip append range len filter min zip append range len min any zip append range len batch_size max cuda view tolist append range cat vocab format LongTensor to_words info zip copy_unks Variable writerow min translate t len min zip append range len min zip append range len append clean_sentence append split partial map zip log_softmax create_optim LuongAttnDecoderRNN Seq2Seq EncoderRNN parameters filter load format build_model batch_size load_state_dict info sum cuda | # TextNormalization with Seq2Seq This is code repo for our AAAI ICWSM 2019 paper "Adapting Sequence to Sequence models for Text Normalization in Social Media", where we explore several Seq2Seq variations for normalizing social media text. If you find this code, models or results useful, please cite us using the following bibTex: ``` @inproceedings{lourentzou2019adapting, title={Adapting Sequence to Sequence models for Text Normalization in Social Media}, author={Lourentzou, Ismini and Manghnani, Kabir and Zhai, ChengXiang}, booktitle={International Conference on Web and Social Media}, year={2019}, | 522 |
IssacCyj/Adversarial-Occlussion-aware-Face-Detection | ['face detection'] | ['Adversarial Occlusion-aware Face Detection'] | layer.py | # Adversarial-Occlussion-aware-Face-Detection Implementation of the BTAS 2018 oral paper Adversarial Occlusion-aware Face Detection (https://arxiv.org/abs/1709.05188). Code is wriiten in Caffe with layer interface in python.  | 523 |
IssamLaradji/GP_DRF | ['gaussian processes'] | ['Efficient Deep Gaussian Process Models for Variable-Sized Input'] | models/GP.py models/DRF.py DRF_example.py GP_example.py models/GP_Var.py GP_Var_example.py models/utils.py var2numpy Cholesky rbf KL_diagLog KL_diagSqrt log_determinent numpy2var bmm exp view size transpose expand expand_as mm pow exp view size dot mv inverse log_determinent sum diag | # Efficient Deep Gaussian Process Models for Variable-Sized Inputs - IJCNN 2019 [[Paper](https://arxiv.org/abs/1905.06982)] ## Overview Our proposed method combines Gaussian Processes with deep random feature expansion. This repository combines Gaussian processes (GP), deep random feature (DRF) model, and our GP-DRF model. ## Requirements - Pytorch version 0.4 or higher. ## Running the methods You can run each example as follows. - For Gaussian processes, ``` | 524 |
IzPerfect/CT_Image_Segmentation | ['semantic segmentation'] | ['TernausNet: U-Net with VGG11 Encoder Pre-Trained on ImageNet for Image Segmentation'] | models/CAE.py data_utils.py models/UNet.py models/TernausNet.py data_std plot_dice plot_loss plot_acc dice_coef CAE TernausNet UNet flatten sum mean std plot xlabel ylabel title history figure legend plot xlabel ylabel title history figure legend plot xlabel ylabel title history figure legend | CT Lung Images Segmentation === 1. CT lung images segmentation implementation using [U-Net : Convolutional Networks for Biomedical Image Segmentation](https://lmb.informatik.uni-freiburg.de/people/ronneber/u-net/).  2. CT lung images segmentation implementation using [TernausNet](https://arxiv.org/pdf/1801.05746.pdf).  Overview --- | 525 |
JEM-Mosig/blog-garnelo_neural_2018 | ['gaussian processes'] | ['Conditional Neural Processes'] | neuralprocesses/np/decoder.py neuralprocesses/np/mlp.py neuralprocesses/utils/gp.py neuralprocesses/tests/test_aux.py neuralprocesses/utils/data_processes.py neuralprocesses/np/aggregator.py neuralprocesses/utils/plotting.py neuralprocesses/tests/test_gp.py neuralprocesses/tests/test_decoder.py neuralprocesses/np/cnp.py neuralprocesses/utils/tf_utils.py neuralprocesses/tests/test_mlp.py neuralprocesses/tests/test_encoder.py neuralprocesses/np/encoder.py MeanAggregator ConditionalNeuralProcess MLPDecoder DeterministicMLPEncoder MultiLayerPerceptron DataProviderTEST MLPDecoderTEST DeterministicMLPEncoderTEST GaussianProcessTEST GPKernelsTEST MultiLayerPerceptronTEST MNISTProcess squared_exponential_kernel GaussianProcess _option_value list_plot Color tf_sort_by_col define_scope double_wrap show list arange plot xlabel transpose min axis ylabel copy scatter _option_value fill_between max range len __name__ | THIS IS WORK IN PROGRESS # blog-garnelo_neural_2018 This Python package constitutes a toolbox for neural processes, based on tensorflow. * Garnelo et al., _Neural Processes_, [arXiv:1807.01622 [cs, stat]](http://arxiv.org/abs/1807.01622) (2018) * Garnelo et al., _Conditional Neural Processes_, [arXiv:1807.01613 [cs, stat]](http://arxiv.org/abs/1807.01613) (2018) | 526 |
JHL-HUST/SI-NI-FGSM | ['adversarial attack'] | ['Nesterov Accelerated Gradient and Scale Invariance for Adversarial Attacks'] | nets/overfeat_test.py nets/inception_v3.py mi_fgsm.py nets/vgg.py nets/inception_v4.py nets/inception_v2.py simple_eval.py nets/inception_resnet_v2_test.py nets/lenet.py nets/inception_v1.py nets/mobilenet_v1_test.py nets/resnet_utils.py ni_fgsm_ens.py nets/inception_resnet_v2.py nets/resnet_v2_test.py nets/cifarnet.py nets/alexnet.py nets/inception_v4_test.py nets/inception.py nets/overfeat.py nets/inception_utils.py nets/vgg_test.py nets/inception_v1_test.py ni_fgsm.py nets/resnet_v1_test.py nets/resnet_v2.py nets/inception_v2_test.py nets/nets_factory_test.py nets/alexnet_test.py nets/inception_v3_test.py nets/resnet_v1.py si_ni_fgsm.py nets/mobilenet_v1.py si_mi_fgsm.py nets/nets_factory.py image_augmentation save_images input_diversity graph check_or_create_dir load_images load_labels gkern image_rotation main stop image_augmentation save_images input_diversity graph check_or_create_dir load_images load_labels gkern image_rotation main stop image_augmentation save_images input_diversity graph check_or_create_dir load_images load_labels gkern image_rotation main stop load_images load_labels image_augmentation save_images input_diversity graph check_or_create_dir load_images load_labels gkern image_rotation main stop image_augmentation save_images input_diversity graph check_or_create_dir load_images load_labels gkern image_rotation main stop alexnet_v2 alexnet_v2_arg_scope AlexnetV2Test cifarnet_arg_scope cifarnet inception_resnet_v2_arg_scope inception_resnet_v2 inception_resnet_v2_base block8 block35 block17 InceptionTest inception_arg_scope inception_v1_base inception_v1 InceptionV1Test inception_v2_base _reduced_kernel_size_for_small_input inception_v2 InceptionV2Test inception_v3 _reduced_kernel_size_for_small_input inception_v3_base InceptionV3Test inception_v4 block_reduction_b inception_v4_base block_inception_b block_inception_c block_reduction_a block_inception_a InceptionTest lenet lenet_arg_scope mobilenet_v1_arg_scope mobilenet_v1 _reduced_kernel_size_for_small_input mobilenet_v1_base wrapped_partial get_network_fn NetworksTest overfeat overfeat_arg_scope OverFeatTest Block conv2d_same subsample resnet_arg_scope stack_blocks_dense resnet_v1_152 resnet_v1_101 bottleneck resnet_v1_200 resnet_v1_50 resnet_v1 resnet_v1_block ResnetUtilsTest ResnetCompleteNetworkTest create_test_input resnet_v2_50 resnet_v2_200 resnet_v2_101 resnet_v2_block resnet_v2_152 bottleneck resnet_v2 ResnetUtilsTest ResnetCompleteNetworkTest create_test_input vgg_16 vgg_arg_scope vgg_a vgg_19 VGG16Test VGGATest VGG19Test outer sum linspace pdf join basename Glob append zeros enumerate makedirs one_hot abs num_iter momentum sign add int64 reduce_mean cast clip_by_value max_epsilon argmax equal softmax_cross_entropy num_iter fill concat truncated_normal resize_images image_width image_resize pad set_shape random_uniform cond max_epsilon check_or_create_dir set_verbosity output_dir load_labels INFO read_csv batch_norm as_list prediction_fn as_list partial update_wrapper l2_regularizer truncated_normal_initializer hasattr default_image_size pad | # SI-NI-FGSM This repository contains code to reproduce results from the paper: **Nesterov Acceralated Gradient and Scale Invariance for Adversarial Attacks (ICLR2020)** openreview report: [https://openreview.net/forum?id=SJlHwkBYDH](https://openreview.net/forum?id=SJlHwkBYDH) ## REQUIREMENTS - Python 3.6.5 - Tensorflow 1.12.0 - Numpy 1.15.4 - cv2 3.4.2 - scipy 1.1.0 | 527 |
JJN123/Fall-Detection | ['anomaly detection'] | ['DeepFall -- Non-invasive Fall Detection with Deep Spatio-Temporal Convolutional Autoencoders'] | h5py_init.py cae_main_test.py dstcae_c3d_main_test.py util.py data_management.py seq_exp.py h5py_init_old.py h5py_init_main.py cae_main_train.py multi_AEmodel.py dae_main_train.py clstm_ae_main_train.py ae_exp.py dae_main_test.py clstm_ae_main_test.py img_exp.py opencvinpaint.py models.py dstcae_c3d_main_train.py AEExp init_cae_exp init_dae_exp load_data create_windowed_arr_per_vid init_windowed_arr create_windowed_arr get_fall_indeces flip_windowed_arr init_videos create_img_data_set init_vid sort_frames init_data_by_class get_dir_lists find_start_index_disc get_fall_indeces flip_windowed_arr init_videos create_img_data_set init_vid sort_frames init_data_by_class get_dir_lists ImgExp CLSTM_AE CAE_deconv DSTCAE_UpSampling DAE DSTCAE_C3D dummy_3d CAE DSTCAE_Deconv save_features get_stats_for_all_vids create_all_pds gather_and_save_feautres gather_test_features get_stats_for_vid fill_depth_im fill_SDU_Fall fill_SDU_NonFall SeqExp threshold get_output restore_Fall_vid plot_MSE_per_sample_conv gather_auc_avg_per_tol plot_ROC_AUC_tol animate_fall_detect_Spresent plot_ROC_AUC plot_MSE_per_sample play_frames generate_vid_keys MSE get_cross_window_stats join_mean_std make_cross_window_matrix agg_window create_windowed_labels get_thresholds_helper CAE AEExp AEExp DAE print format init_videos zip print reshape shape create_windowed_arr zeros sum keys values len int floor zeros array len print format init_videos init_data_by_class print format glob format print File exit close isfile get_dir_lists init_videos_helper basename print get_fall_indeces create_img_data_set dirname zeros create_group len print format read_csv print sorted replace zip glob reshape print astype __len__ mean shape sort_frames resize zeros imread range format print exit create_img_data_set array len print reshape shape prod zeros flip range len array range len int basename replace glob find_start_index_disc sort_frames dirname len l1 Model Input compile l1 l2 Model Input compile Model Input compile Model Input compile format Model Input compile Model Input compile Model Input compile Model Input compile pop format img_height print init_videos to_csv mean dset generate_vid_keys round init_data_by_class model_name DataFrame std img_width makedirs get_output print reshape get_MSE create_windowed_arr append ravel len print get_thresholds get_stats_for_all_vids load_train_data str format to_csv append DataFrame range save_features init_data print reshape get_features shape model_name gather_test_features append prod range len format img_height print reshape dset shape generate_vid_keys vstack prod img_width len inpaint threshold imwrite concatenate print destroyAllWindows waitKey INPAINT_NS imshow amin imread amax THRESH_BINARY_INV basename imwrite replace isdir print glob rmtree sort_frames mkdir fill_depth_im len basename imwrite replace isdir print glob rmtree mkdir fill_depth_im len reshape range copy len show format plot xlabel ylabel ylim title figure legend xlim threshold print roc_curve confusion_matrix geometric_mean_score precision_recall_curve plot_ROC_AUC auc show plot print mean shape MSE legend show arange plot print calc_mse_conv mean zeros len namedWindow ones reshape waitKey resizeWindow imshow zeros WINDOW_NORMAL range destroyAllWindows len print format plot xlabel ylabel ylim title legend xlim zeros NAN range len print nanmean nanstd append array range len print mean get_cross_window_stats make_cross_window_matrix std concatenate percentile subplots add_subplot axis GridSpec axhline save set_title set_xlabel imshow ArtistAnimation legend append range plot close tight_layout reshape set_yticks set_xticks set_ylabel argwhere stop len format ones reshape flatten shape range len get_output format array append zeros create_windowed_labels range int floor zeros sum array len | # DeepFall: 3D Spatio-Temporal Autoencoders for Fall-Detection from Privacy Protecting Cameras This code is developed by Jacob Nogas while working at IATSL (http://iatsl.org/) as a UofT PEY intern under the supervision of Dr. Shehroz Khan, Scientist, KITE-Toronto Rehab, University Health Network, Canada. *(We cannot provide support for programming issues, thanks for your understanding)*. We formulated the fall detection problem as an anomaly detection problem because falls occur rarely and there may be insufficient data to train supervised classifiers. To handle privacy concerns, this work focus on detecting falls from thermal and depth cameras. Falls are detected by training a deep spatio-temporal autoencoder to minimize the recontruction error of activities of daily living video frames. It was hypothesizes that the reconstruction error for unseen falls should be higher, as shown in example GIFs below: <a href="https://imgflip.com/gif/2gb012"><img src="https://i.imgflip.com/2gb012.gif" title="made at imgflip.com"/></a> <a href="https://imgflip.com/gif/2fxxpd"><img src="https://i.imgflip.com/2fxxpd.gif" title="made at imgflip.com"/></a> <a href="https://imgflip.com/gif/2fxzt3"><img src="https://i.imgflip.com/2fxzt3.gif" title="made at imgflip.com"/></a> **Code Usage:** The code base is split into two main subsets {model}\_main\_{train} {model}\_main\_{test} which will execute training, or testing, respectively, with model {model}. | 528 |
JLrumberger/SpatialEmbeddingLoss | ['instance segmentation', 'semantic segmentation', 'autonomous driving'] | ['Instance Segmentation by Jointly Optimizing Spatial Embeddings and Clustering Bandwidth'] | embedding_loss_complete.py lovasz_grad flatten_binary_scores lovasz_hinge_flat joint_loss_single lovasz_hinge constr_phi_2D seed_loss_single map_lovasz exp split stop_gradient multiply transpose matmul reduce_sum constr_phi_2D rank cast expand_dims one_hot unique_with_counts size phi square map_fn stack norm reshape float32 int32 one_hot reshape size squeeze reduce_max square shape reduce_mean rank cast int32 unique stop_gradient lovasz_hinge split cumsum concat reduce_sum lovasz_hinge_flat reduce_mean map_fn equal cond reshape boolean_mask not_equal | # Spatial Embedding Loss Tensorflow implementation of the Loss from ['Instance Segmentation by Jointly Optimizing Spatial Embeddings and Clustering Bandwidth' by Neven et al.](http://openaccess.thecvf.com/content_CVPR_2019/papers/Neven_Instance_Segmentation_by_Jointly_Optimizing_Spatial_Embeddings_and_Clustering_Bandwidth_CVPR_2019_paper.pdf) This implementation uses the configuration with a 2-dimensional sigma and offset vectors pointing at the center of an instance in the embedding space, not in the image space. The loss takes in the embeddings (instead of the offset vectors), which can be calculated as follows: ```python shape = tf.shape(offset) # 2 x h x w res = [tf.range(shape[1]), tf.range(shape[2])] dim_list = tf.meshgrid(*res, indexing='ij') mesh = tf.stack(dim_list, axis=0) # 2 x h x w # fill meshgrid with values between [0,1] | 529 |
JULIELab/EmoMap | ['sentiment analysis'] | ['Representation Mapping: A Novel Approach to Generate High-Quality Multi-Lingual Emotion Lexicons'] | lrec18/experiments/inter_study_reliability.py coling18/main/multilingual/experiment.py coling18/framework/reference_methods/sentprop.py coling18/framework/util.py coling18/main/monolingual/experiment.py lrec18/experiments/resource_construction.py coling18/framework/representations/embedding.py lrec18/experiments/experiments.py lrec18/experiments/explore_english_lex.py coling18/framework/models.py coling18/main/lexicon_creation/experiment.py coling18/analysis/shr/analysis.py coling18/main/multilingual/analysis.py lrec18/experiments/check_scales.py lrec18/experiments/significance_tests.py coling18/analysis/corpus_statistics/count.py coling18/framework/reference_methods/li.py lrec18/experiments/protocol.py coling18/main/lexicon_creation/analysis.py lrec18/experiments/prepare_data.py coling18/main/ablation/experiment.py coling18/framework/reference_methods/aicyber.py lrec18/experiments/constants.py coling18/framework/reference_methods/densifier.py coling18/framework/constants.py coling18/main/monolingual/analysis_average.py coling18/framework/reference_methods/methods.py coling18/main/ablation/plot.py coling18/framework/prepare_data.py coling18/main/monolingual/analysis_individual.py coling18/framework/reference_methods/embedding_transformer.py coling18/main/data.py coling18/analysis/isr/analysis.py coling18/main/ablation/analysis.py coling18/framework/reference_methods/turney.py spearman_brown_adjustment undo_spearman_brown pearson SKlearn_Mapping_Model Evaluator Model Word_Model Mapping_Model load_yu16 get_german_bawl load_warriner13 load_davidson14 load_stadthagen17 load_eilola10 load_guasch15 get_spanish_redondo load_redondo07 load_moors13 load_ferre16 load_montefinese14 get_spanish_ferre load_soares12 get_english_anew load_imbir16 load_wierzba15 load_briesemeister11 load_engelthaler17 get_polish_nawl load_hinojosa16 get_spanish_stadthagen load_yu16_ialp_train_test load_sianipar16 load_riegel15 load_stadthagen16 get_polish_imbir load_vo09 get_spanish_hinojosa load_kanske10 get_facebook_fasttext_common_crawl load_palogiannidi16 load_yao16 get_facebook_fasttext_wikipedia load_anew10 get_french load_monnier14 load_ric13 get_german_schmidtke load_anew99 get_english_warriner get_google_sgns load_stevenson07 load_schmidtke14 leaky_relu absolute_error_loss rmse_loss Batch_Gen drop_duplicates average_results_df Random_Batch_Gen eucledian_loss split_df feature_extraction train_test_split squared_error_loss no_zeros_formatter average_subdirs compute_isr eval Random_Replace_Batch_Gen err_print get_average_result_from_df scale_predictions_to_seeds save_tsv get_columns_if_existing load_tsv cosine_loss Serial_Batch_Gen k_folds_split combine_features_labels scaleInRange rmse MLP_Ensemble Densifier Batch_Gen combinations get_model apply_embedding_transformation orthogonalize SimpleSGD Orthogonal OthogonalRegularizer DatasetMinibatchIterator Multi_Target_Regressor dummy similarity_matrix turney sentprop_JH get_seed_emotion_matrix_JH get_seed_emotion_matrix_SB run_iterative_vanilla __bestgen_single_word bestgen __turney_single_word sentprop_SB transition_matrix Bootstrapper Bootstrapper Embedding Setting GET_EMBEDDINGS top_k_entries reduce_margin get_model monolingual crosslingual experiment3_all_vs_1_language experiment2_crosslingual __formatter__ model_collection experiment_3_exploration experiment1_monolingual formatter correlation_matrix descriptive_statistics top_k_entries reduce_margin replace_rulers compute_inter_study_reliability FORMATTER compute_isr load_warriner13 load_guasch15 get_english load_redondo07 load_moors13 load_ferre16 load_montefinese14 load_soares12 get_german load_imbir16 load_wierzba15 load_briesemeister11 get_polish load_hinojosa16 load_sianipar16 load_riegel15 load_stadthagen16 get_spanish load_kanske10 load_anew scaleInRange load_stevenson07 load_schmidtke14 general_statistics experiment_3 resource_construction experiment_1 significance_tests experiment_2 create_ratings count_additional_entries ttest ztest significance_tests_for_experiment_1 significance_tests_for_experiment_3 size_of_gold_data significance_tests_for_experiment_2 FORMATTER correlation_test spearman_brown_adjustment undo_spearman_brown pearson SKlearn_Mapping_Model Evaluator Model Word_Model Mapping_Model load_yu16 get_german_bawl load_warriner13 load_davidson14 load_stadthagen17 load_eilola10 load_guasch15 get_spanish_redondo load_redondo07 load_moors13 load_ferre16 load_montefinese14 get_spanish_ferre load_soares12 get_english_anew load_imbir16 load_wierzba15 load_briesemeister11 load_engelthaler17 get_polish_nawl load_hinojosa16 get_spanish_stadthagen load_yu16_ialp_train_test load_sianipar16 load_riegel15 load_stadthagen16 get_polish_imbir load_vo09 get_spanish_hinojosa load_kanske10 get_facebook_fasttext_common_crawl load_palogiannidi16 load_yao16 get_facebook_fasttext_wikipedia load_anew10 get_french load_monnier14 load_ric13 get_german_schmidtke load_anew99 get_english_warriner get_google_sgns load_stevenson07 load_schmidtke14 leaky_relu absolute_error_loss rmse_loss Batch_Gen drop_duplicates average_results_df Random_Batch_Gen eucledian_loss split_df feature_extraction train_test_split squared_error_loss no_zeros_formatter average_subdirs compute_isr eval Random_Replace_Batch_Gen err_print get_average_result_from_df scale_predictions_to_seeds save_tsv get_columns_if_existing load_tsv cosine_loss Serial_Batch_Gen k_folds_split combine_features_labels scaleInRange rmse MLP_Ensemble Densifier Batch_Gen combinations get_model apply_embedding_transformation orthogonalize SimpleSGD Orthogonal OthogonalRegularizer DatasetMinibatchIterator Multi_Target_Regressor dummy similarity_matrix turney sentprop_JH get_seed_emotion_matrix_JH get_seed_emotion_matrix_SB run_iterative_vanilla __bestgen_single_word bestgen __turney_single_word sentprop_SB transition_matrix Bootstrapper Embedding Setting GET_EMBEDDINGS top_k_entries reduce_margin get_model monolingual crosslingual experiment3_all_vs_1_language experiment2_crosslingual __formatter__ model_collection experiment_3_exploration experiment1_monolingual formatter correlation_matrix descriptive_statistics top_k_entries reduce_margin replace_rulers compute_inter_study_reliability FORMATTER compute_isr load_warriner13 load_guasch15 get_english load_redondo07 load_moors13 load_ferre16 load_montefinese14 load_soares12 get_german load_imbir16 load_wierzba15 load_briesemeister11 get_polish load_hinojosa16 load_sianipar16 load_riegel15 load_stadthagen16 get_spanish load_kanske10 load_anew scaleInRange load_stevenson07 load_schmidtke14 general_statistics experiment_3 resource_construction experiment_1 significance_tests experiment_2 create_ratings count_additional_entries ttest ztest significance_tests_for_experiment_1 significance_tests_for_experiment_3 size_of_gold_data significance_tests_for_experiment_2 FORMATTER correlation_test mean std anew10 set_index read_csv drop_duplicates set_index anew99 read_csv stevenson07 set_index read_excel warriner13 set_index read_csv redondo07 set_index read_excel ferre16 set_index read_excel scaleInRange riegel15 set_index read_excel wierzba15 set_index read_excel imbir16 set_index read_excel schmidtke14 set_index lower read_excel drop_duplicates drop_duplicates set_index read_excel briesemeister11 join set_index hinojosa16a hinojosa16b read_excel set_index stadthagen16 read_csv set_index stadthagen17 read_csv join set_index lower read_csv StringIO set_index scaleInRange read_csv vo09 guasch15 set_index read_excel set_index moors13 read_excel montefinese14 set_index read_excel soares12 set_index read_excel sianipar16 drop_duplicates set_index read_excel set_index yu16 read_csv __format__ yu16 read_csv copy strip DataFrame set_index set_index monnier14 read_excel ric13 rename read_excel set_index read_csv davidson14 columns eilola10 set_index scaleInRange read_excel set_index engelthaler17 read_csv set_index palogiannidi16 scaleInRange read_csv join concat drop_duplicates load_ferre16 join set_index lower load_briesemeister11 load_schmidtke14 drop_duplicates list scaleInRange min max zeros range represent len multiply norm divide reduce_sum concat set_index list metric combine_features_labels split enumerate KFold mean std set_index rename read_csv join round makedirs print int array shuffle len save_tsv items remove list load_tsv print mean append listdir makedirs list Series index set eval intersection len range len svd add_output add_input Graph Lambda add_shared_node Dense compile add_node vstack max values set_weights show list ylim load_lexicon get_weights DatasetMinibatchIterator range orthogonalize shuffle set sample xlim enumerate items text min figure get_model emotionLexicon __bestgen_single_word get_vocabulary_index add sort words append array range len emotionLexicon get_vocabulary_index __turney_single_word add words array str print ones abs dot array iw get_seed_emotion_matrix_SB sum transition_matrix ones range len A similarity_matrix print wordnet_similarity_matrix dot diag issparse T todense arccos fill_diagonal apply_along_axis pi dot clip run_random_walk get_seed_emotion_matrix_JH get_vocabulary add emotionLexicon transition_matrix enumerate append list array zip dot update_seeds array range list to_latex replace print to_csv index apply rename DataFrame head create_lexicon format save_tsv save_tsv format print concat len lexicon_creation get_model DataFrame fit to_latex print model_collection round cross_validate DataFrame to_latex print model_collection eval round DataFrame fit combinations list experiment3_all_vs_1_language print extend sort_values to_csv mean round append DataFrame range to_latex print model_collection eval round append DataFrame fit replace std to_latex print min to_csv mean round median DataFrame max replace_rulers join to_latex tril_indices load_warriner13 replace insert print astype to_csv round nan DataFrame array split values combinations sorted to_string print astype sort_values to_csv round DataFrame compute_isr set_index anew read_csv read_csv size_of_gold_data compute_inter_study_reliability experiment1_monolingual experiment2_crosslingual experiment3_all_vs_1_language experiment_3_exploration significance_tests_for_experiment_1 significance_tests_for_experiment_3 significance_tests_for_experiment_2 print count_additional_entries get_german get_spanish shape create_ratings append get_english get_polish model_collection round to_csv fit difference index set cdf sqrt float cdf sqrt float cdf sqrt float log print DataFrame to_csv to_string ttest print min to_csv round DataFrame read_csv to_string list print min to_csv index round split DataFrame read_csv correlation_test to_string list print min to_csv index round DataFrame read_csv correlation_test | # Emotion Representation Mapping [](https://zenodo.org/badge/latestdoi/121131257) This repository comprises code, experimental results and language resources associated with our [LREC 2018](http://www.lrec-conf.org/proceedings/lrec2018/summaries/402.html) and [COLING 2018](https://www.researchgate.net/publication/325794428_Emotion_Representation_Mapping_for_Automatic_Lexicon_Construction_Mostly_Performs_on_Human_Level) papers on converting between different emotion representation formats. ## Introduction Emotion lexicons (data sets which describe the emotions which are associated with individual words) are an important resource in sentiment analysis. However, there are many different ways how affective states can be described, for example in terms of Basic Emotions are Valence-Arousal-Dominance. Having many of these so-called **emotion representation formats** brings up problems regarding comparability and inter-operability of different kinds of language resources (data sets as well as software tools). In order to address these problems, we propose a simple yet effective technique to convert between different emotion formats so that, for example, an emotion lexicons which uses Basic Emotions can be translated into a Valence-Arousal-Dominance encoding, and the other way the round. We call this task **emotion representation mapping**. We evaluate our approach on a highly multilingual collection of data sets and find that it is about as reliable as human annotation. Based on these results we automatically create new emotion lexicons for a wide range of languages ## Emotion Lexicons The latest version of our automatically generated emotion lexicons cover a total of 13 languages. Most of them describe the words in terms of five basic emotions categories (joy, anger, sadness, fear and disgust) on a numerical 5-point scale. They complement existing emotion lexicons which only describes the respective words according to another *emotion representation format* (Valence-Arousal or Valence-Arousal-Domaninance). The size of the generated emotion lexicons ranges up to 13k words. Details of our acquisition methodology are given in our COLING 2018 paper. Our results show, that these data sets, although automatically constructed, are virtually as reliable as manually annotated data. The indivual lexicons are listed below: * [English](https://github.com/JULIELab/EmoMap/blob/master/coling18/main/lexicon_creation/lexicons/Warriner_BE.tsv) * [Spanish](https://github.com/JULIELab/EmoMap/blob/master/coling18/main/lexicon_creation/lexicons/Stadthagen_Dominance.tsv) * [German](https://github.com/JULIELab/EmoMap/blob/master/coling18/main/lexicon_creation/lexicons/Vo_BE.tsv) | 530 |
JYWa/MATCHA | ['stochastic optimization'] | ['Decentralized Stochastic Optimization and Gossip Algorithms with Compressed Communication'] | models/resnet.py models/wrn.py util.py train_mpi.py models/vggnet.py models/__init__.py compressors.py models/MLP.py comm_helpers.py communicator.py graph_manager.py decenCommunicator centralizedCommunicator ChocoCommunicator Communicator communicate unflatten_tensors flatten_tensors get_top_k GraphProcessor FixedProcessor MatchaProcessor sync_allreduce update_learning_rate run Recorder partition_dataset select_graph AverageMeter comp_accuracy test select_model Partition DataPartitioner MNIST_MLP conv_init ResNet Bottleneck cfg conv3x3 BasicBlock cfg conv_init VGG conv3x3 conv_init conv3x3 wide_basic Wide_ResNet cat append view_as numel set_ communication_op zip unflatten_tensors flatten_tensors int topk view nelement abs max data time synchronize Allreduce barrier shape parameters numpy cpu float empty cuda FixedProcessor model communicate zero_grad SGD save_to_file dataset cuda seed sync_allreduce partition_dataset compress select_graph randomSeed select_model graphid MatchaProcessor ceil update_learning_rate range budget update epoch size add_new comp_accuracy test bs decenCommunicator avg manual_seed item float ChocoCommunicator enumerate Recorder time consensus_lr criterion backward print AverageMeter parameters reset matcha train step len param_groups lr join datasetRoot use print Compose DataLoader ImageFolder Normalize CIFAR10 EMNIST CIFAR100 DataPartitioner MNIST_MLP Wide_ResNet ResNet VGG resnet18 update model size AverageMeter comp_accuracy eval enumerate constant bias xavier_uniform weight __name__ | # MATCHA: Communication-Efficient Decentralized SGD Code to reproduce the experiments reported in this paper: > Jianyu Wang, Anit Kumar Sahu, Zhouyi Yang, Gauri Joshi, Soummya Kar, "[MATCHA: Speeding Up Decentralized SGD via Matching Decomposition Sampling](https://arxiv.org/abs/1905.09435)," arxiv preprint 2019. A short version has been abridged in [FL-NeurIPS'19](http://federated-learning.org/fl-neurips-2019/) and received the Distinguished Student Paper Award. This repo contains the implementations of MATCHA and [D-PSGD](https://papers.nips.cc/paper/7117-can-decentralized-algorithms-outperform-centralized-algorithms-a-case-study-for-decentralized-parallel-stochastic-gradient-descent.pdf) for any arbitrary node topologies. You can also use it to develop other decentralized training methods. Please cite this paper if you use this code for your research/projects. ## Dependencies and Setup The code runs on Python 3.5 with PyTorch 1.0.0 and torchvision 0.2.1. The peer-to-peer communication among workers is achieved by [MPI4Py](https://mpi4py.readthedocs.io/en/stable/) sendrecv function. ## Training examples Here is an example on how to use MATCHA to train a neural network. | 531 |
Jacobi93/Reward-penalty-Dice-loss | ['medical image segmentation', 'semantic segmentation'] | ['Learning Non-Unique Segmentation with Reward-Penalty Dice Loss'] | data_processing.py train_dice_wce.py model3d/architectures.py model3d/unet.py model3d/metrics.py test_region.py train_rpdice.py mirror_in_xyz random_rotation_3d build_heatmap jaccard_and_dice rp_dice build_heatmap main main no_pooling create_localization_module create_up_sampling_module basic_unet isensee2017_model create_context_module vnet weighted_binary_crossentropy dynamic_weighted_dice dynamic_weighted_dice_loss rp_dice_loss dice_coefficient_loss dice_coefficient label_wise_dice_coefficient rp_dice get_label_dice_coefficient_function compute_level_output_shape get_up_convolution create_convolution_block unet_model_3d shape range zeros rotate zeros concatenate range shape range flatten sum flatten abs sum delete ReduceLROnPlateau exists ModelCheckpoint load_model random_rotation_3d shape expand_dims format mirror_in_xyz unique compile load print reshape EarlyStopping tqdm CSVLogger basic_unet summary zeros array fit build_heatmap range list concatenate insert reversed create_localization_module Model create_context_module create_convolution_block create_up_sampling_module append Input range list concatenate insert create_localization_module Model create_context_module create_convolution_block create_up_sampling_module append Input range list concatenate insert create_localization_module Model create_context_module create_convolution_block create_up_sampling_module append Input range list print Model create_context_module create_convolution_block append Input range create_convolution_block create_convolution_block create_convolution_block sum clip_by_value log sum sum __setattr__ format partial list concatenate Model create_convolution_block append Input range compile tolist | # Reward-penalty-Dice-loss The paper of this project, named ***Learning Non-Unique Segmentation with Reward-Penalty Dice Loss***, was accepted by WCCI (IJCNN) 2020. Most research and applications of semantic segmentation focus on addressing unique segmentation problems, where there is only one gold standard segmentation result for every input image. This may not be true in some problems, e.g., medical applications. We may have non-unique segmentation annotations as different surgeons may perform successful surgeries for the same patient in slightly different ways. To comprehensively learn non-unique segmentation tasks, we propose the reward-penalty Dice loss (RPDL) function as the optimization objective for deep convolutional neural networks (DCNN). RPDL is capable of helping DCNN learn non-unique segmentation by enhancing common regions and penalizing outside ones. <p align="center"> <img src="learn.JPG" width="600"> </p> ## Prerequisites Python 3.6, Tensorflow 1.14.0, Keras 2.2.4 ## Baselines * Weighted cross-entropy loss (WCEL) | 532 |
JamesLiao714/MC_GAN | ['style transfer'] | ['Multi-Content GAN for Few-Shot Font Style Transfer'] | options/train_options.py data/image_folder.py train_Stack.py data/data_loader.py train.py util/kernel_size.py util/image_pool.py util/png.py test_Stack.py models/base_model.py models/models.py models/StackGAN_model.py util/html.py data/base_data_loader.py options/base_options.py test.py util/util.py util/plot_loss.py test_video.py models/networks.py options/test_options.py util/visualizer.py models/cGAN_model.py main main BaseDataLoader Data normalize_stack PartialData CreateDataLoader FlatData StackDataLoader DataLoader PartialDataLoader is_image_file make_dataset ImageFolder default_loader font_transform BaseModel cGANModel create_model InputTransformation define_G_3d get_norm_layer GANLoss ResnetGenerator ResnetDecoder ResnetBlock define_D weights_init conv_norm_relu_module ResnetEncoder define_Dec define_G ResnetGenerator_3d_conv convTranspose_norm_relu_module define_Enc NLayerDiscriminator define_preNet print_network StackGANModel BaseOptions TestOptions TrainOptions HTML ImagePool encode print_numpy varname diagnose_network VerticalFlip mkdirs HorizontalFlip mkdir info save_image tensor2im Visualizer get_image_paths set_input save_images print test save enumerate get_current_visuals batchSize CreateDataLoader niter_decay print_current_errors get_current_errors update_learning_rate range display_current_results create_model plot_current_errors lr float int time Visualizer niter load_data optimize_parameters optimize_parameters_Stacked which_epoch1 len size Compose initialize partial StackDataLoader stack DataLoader PartialDataLoader is_image_file join sorted isdir print append walk int arange view mean permute range initialize model print cGANModel name StackGANModel hasattr fill_ print bias normal_ __name__ print BatchNorm2d partial InstanceNorm2d apply cuda ResnetGenerator_3d_conv get_norm_layer print ResnetGenerator UnetGenerator apply cuda get_norm_layer print UnetEncoder apply ResnetEncoder cuda get_norm_layer print ResnetDecoder apply UnetDecoder cuda get_norm_layer print apply NLayerDiscriminator cuda get_norm_layer InputTransformation print apply cuda print parameters transpose numpy print parameters fromarray reshape squeeze astype save zeros range print join search print float64 astype flatten shape mkdir makedirs | # MC-GAN in PyTorch on windows ### 期末專題 ### 指導教授: 戴文凱  ## Prerequisites: - Windows anaconda3 - Python 3.6 - GPU: NVIDIA GeForce RTX™ 2080 - CUDA10.1+ CuDNN ### MC-GAN train/test | 533 |
JamesQFreeman/PointRend | ['instance segmentation', 'semantic segmentation'] | ['PointRend: Image Segmentation as Rendering'] | pointGenerate.py _new_if_near _if_near getpoint _get_edge_k_neighbor pad min shape pad zeros max range int _new_if_near _if_near print shape uniform append range _get_edge_k_neighbor | # PointRend An numpy-based implement of PointRend This is an implement a PointRend function for Segmentation result refinement. The paper can be find at https://arxiv.org/pdf/1912.08193.pdf The official implement can be find at https://github.com/facebookresearch/detectron2/tree/master/projects/PointRend ## Usage copy the pointGenerate.py to your directory and you are ready to rock. ``` from pointGenerate import getpoint my_mask = np.asarray(Image.open("tree_mask.jpg").resize((32,32))) | 534 |
JamesZhutheThird/Rb-PaStaNet | ['human object interaction detection'] | ['Rb-PaStaNet: A Few-Shot Human-Object Interaction Detection Based on Rules and Part States'] | lib/ult/config.py check.py lib/networks/pasta_AVA.py tools/Test_pasta_HICO_DET.py script/Download_data.py tools/Train_pasta_AVA.py lib/ult/ava_loss_weight.py tools/Train_pasta_HICO_DET_1.py lib/ult/visualization.py Weights/read_rule.py lib/networks/pasta_HICO_DET.py lib/ult/obj_80_768_averg_matrix.py -Results/Evaluate_HICO_DET.py lib/ult/timer.py lib/models/test_Solver_AVA_pasta.py lib/ult/HICO_DET_utils.py lib/networks/test_Solver_HICO_DET_pasta.py lib/ult/ult_HICO_DET.py script/part_box_generation.py tools/_init_paths.py lib/models/train_Solver_HICO_DET_pasta.py lib/models/train_Solver_AVA_pasta.py get_hoi.py lib/ult/ult_AVA.py -Results/HICO_DET_utils.py lib/models/test_Solver_HICO_DET_pasta.py lib/networks/for_test.py -Results/Generate_detection.py tools/Test_pasta_AVA.py tools/Train_pasta_HICO_DET.py parse_args parse_args iou calc_hit getSigmoid get_map calc_ap test_net im_detect test_net im_detect Generate_action train_net SolverWrapper train_net SolverWrapper resnet_arg_scope ResNet50 resnet_arg_scope ResNet50 test_net im_detect iou calc_hit getSigmoid get_map calc_ap Timer Generate_action_AVA Augmented_Verb_AVA_transfer Generate_part_bbox Get_Next_Instance_Verb_AVA_transfer draw_relation Generate_part_score bbox_trans Generate_part_bbox Get_Next_Instance_HO_HICO_DET_for_only_PVP Generate_action_PVP Augmented_box bb_IOU get_skeleton Get_next_sp Generate_action_object Generate_action_HICO Generate_relation_bbox Augmented_HO_Neg_HICO_DET_for_only_PVP76 Get_next_sp_with_pose Generate_action_rule draw_bounding_boxes_HOI_PIC _draw_single_box draw_bounding_boxes_PVP draw_bounding_boxes draw_bounding_boxes_HOI download_file_from_google_drive parse_args parse_args parse_args parse_args parse_args add_path add_argument ArgumentParser print min max float64 iou astype load cumsum calc_hit min len set add array append keys range open zeros calc_ap range Generate_part_bbox reshape astype float32 append imread range seed toc format RNG_SEED print average_time tic range im_detect len zeros range load concatenate loadtxt len zfill Generate_action test_image_HO empty DATA_DIR open DATA_DIR open append dump iglob concatenate mkdir int join array join remove ConfigProto makedirs zeros array range zeros array isinstance str Augmented_Verb_AVA_transfer reshape float64 astype float32 shape imread concatenate reshape append randint empty range len copy zeros bbox_trans minimum maximum concatenate float64 reshape min astype floor append randint max zeros reshape zeros range line tuple zeros range len int min zeros float round range zeros bbox_trans get_skeleton concatenate append reshape zeros isinstance zeros zeros_like float64 min astype max range minimum isinstance reshape astype float32 zfill maximum shape Augmented_HO_Neg_HICO_DET_for_only_PVP76 imread DATA_DIR list Generate_action_PVP concatenate loadtxt float64 reshape astype zeros sample Generate_action_object Generate_action_HICO Generate_relation_bbox ROOT_DIR append randint Generate_action_rule range len line Draw text rectangle ceil getsize fromarray int uint8 copy _draw_single_box round array range fromarray uint8 copy _draw_single_box round array enumerate fromarray uint8 copy _draw_single_box round array range fromarray uint8 copy _draw_single_box round array enumerate get get_confirm_token save_response_content Session insert | # *Rb-PaSta*Net: A Few-Shot Human-Object Interaction Detection Based on Rules and Part States ### Abstract Existing Human-Object Interaction (HOI) Detection approaches have achieved great progress on non-rare classes while rare HOI classes are still not well-detected. In this paper, we intend to apply human prior knowledge into the existing work. So we add human-labeled rules to ***PaSta*Net** and propose ***Rb-PaSta*Net** aimed at improving rare HOI classes detection. Our results show a certain improvement of the rare classes, while the non-rare classes and the overall improvement is more considerable. ### Authors * [Zichen Zhu](https://github.com/JamesZhutheThird), Shanghai Jiao Tong University * [Shenyu Zhang](https://github.com/CyberSY), Shanghai Jiao Tong University * [Qingquan Bao](https://github.com/QingquanBao), Shanghai Jiao Tong University ### Paper IMVIP 2020 Proceedings Booklet is available on [Google Drive](https://drive.google.com/file/d/1IkSjw5D5Tc8FIpMwo6yVdo_X6QN8BwM8/view?usp=sharing) (page.105-108). Our preview paper is available on [arXiv](https://arxiv.org/pdf/2008.06285.pdf). ### Presentation | 535 |
JanRocketMan/regression-prior-networks | ['depth estimation', 'monocular depth estimation'] | ['Regression Prior Networks'] | utils/data_loading.py distributions/mixture_gaussian.py utils/ssim_gradient_losses.py models/unet_model.py utils/turbo_cmap.py test_distributions.py evaluation/show_examples.py test_models.py utils/func_utils.py eval_kitti_model.py evaluation/depth_testing.py ood_eval_nyu.py evaluation/ood_testing.py ood_eval_kitti.py eval_nyu_model.py utils/depth_utils.py distributions/__init__.py training/l1ssim_trainer.py training/nyu_trainers.py training/rkl_nwp_trainer.py models/simple_model.py distributions/diagonal_normal_wishart.py utils/viz_utils.py training/distribution_trainer.py get_samples.py training/kitti_trainers.py kitti_train.py evaluation/calibration_testing.py training/distillation_trainer.py distributions/nw_prior.py nyu_train.py distributions/distribution_wrappers.py utils/model_utils.py get_test_metrics test_diagonal_normal_wishart DiagonalWishart NormalDiagonalWishart kl_normal_diag_wishart kl_diag_wishart transform_to_distribution_params GaussianEnsembleWrapper ProbabilisticWrapper test_gaussian_mixture GaussianDiagonalMixture test_nw_prior NormalWishartPrior calculate_calibration_intervals nyu_evaluate_calibration_metrics nyu_evaluate_performance_metrics compute_rel_metrics load_ood_data load_ood_data_kitti nyu_evaluate_ood_auc_scores show_model_examples standartize_array test_simple_model GaussianNoise SimpleModel Decoder Encoder UpSample UNetModel test_densedepth DistillationTrainer smoothed_kl_normal_normal NLLSingleDistributionTrainer SingleDistributionTrainer KittiNLLDistributionTrainer KittiRKLTrainer KittiL1SSIMTrainer KittiDistillationTrainer L1SSIMTrainer NyuRKLTrainer NyuNLLDistributionTrainer NyuDistillationTrainer NWPriorRKLTrainer load_test_data getNoTransform getNoTransformKitti _is_numpy_image getTrainingEvalDataKITTI RandomChannelSwap depthDatasetMemory ToTensor ToTensorKitti random_crop_and_resize extract_zip DepthDatasetKITTI getDefaultTrainTransformKitti RandomHorizontalFlip _is_pil_image getDefaultTrainTransform getTrainingEvalData loadZipToMem scale_up predict_distributions get_uncertainty_measure renorm_distribution DepthNorm renorm_param InvertDepthNorm reshape_images predict_targets percentile mvdigamma rel_error AverageMeter reduce_tensor switch_bn_updates _load_densenet_dict load_unet_model_from_checkpoint create_window image_gradient gaussian image_gradient_loss ssim colorize get_tensor_with_histograms get_example_figure mean eval print zip positive real mvdigamma mvlgamma df sum dimensionality DiagonalWishart precision_diag pow div unsqueeze belief df sum kl_divergence log dimensionality exp FloatTensor print backward DiagonalWishart ones NormalDiagonalWishart mean wishart unsqueeze any linspace logpdf range log_prob append unsqueeze range len print GaussianDiagonalMixture ones print zeros ones NormalWishartPrior sum arange astype tqdm mean append abs FloatTensor print concatenate predict_distributions calculate_calibration_intervals unsqueeze verbose interpolate permute DepthNorm numpy maximum mean sqrt abs log mean compute_rel_metrics zeros fliplr range len crop_transform glob Compose zeros array enumerate open crop_transform glob Compose zeros array enumerate open nan_to_num permute roc_auc_score concatenate FloatTensor predict_distributions unsqueeze interpolate DepthNorm permute cat randn print SimpleModel s_model ProbabilisticWrapper GaussianEnsembleWrapper randn print UNetModel ProbabilisticWrapper pow ZipFile seed int print size randrange load extract_zip BytesIO list format print shuffle filename ZipFile len DataLoader depthDatasetMemory loadZipToMem print DepthDatasetKITTI DataLoader values reshape stack append len range resize InvertDepthNorm clamp loc isinstance precision_diag distributions scale renorm_param range len clip hasattr reshape_images permute append renorm_distribution range len squeeze getattr hasattr float round numel item arange unsqueeze digamma device to norm load list group match load_state_dict keys compile load GaussianEnsembleWrapper size ProbabilisticWrapper DataParallel load_state_dict append to range cat eval train modules mean image_gradient abs Tensor contiguous unsqueeze size min mean conv2d pow device to set_title rc set_yticks add_subplot GridSpec subplots_adjust imshow set_ylabel set_xticks figure float range zeros_like grid clf percentile list savefig legend append range concatenate get_xlim zip xlim keys enumerate distplot rc convert set_style figure len cmapper get_cmap clip | # [Regression Prior Networks](https://arxiv.org/abs/2006.11590) An official PyTorch implementation of "Regression Prior Networks" for effective uncertainty estimation. ## Results Example on Nyuv2 dataset (monocular depth estimation)  Performance metrics  ## Installation This repo was tested on Python 3.7.6 and PyTorch 1.4.0 All other requirements can be installed with conda | 536 |
Janus-Shiau/ood_confidence_tensorflow | ['out of distribution detection'] | ['Learning Confidence for Out-of-Distribution Detection in Neural Networks'] | conf_net/visualize.py conf_net/base_conf.py run_example.py conf_net/metrics.py conf_net/interp_func.py conf_net/losses.py conf_net/ops.py Trainer BaseConfNet linear neg_likelihoold_loss complete_f1_score softmax_correlation relu1 safe_log relu draw_confidence_histogram show subplots set_title set_xlabel hist set_ylabel legend | # Confidence of Out-of-Distribution for Tensorflow Here is an unofficial implementation and experiement of estimating the confidence for prediction form neural networks from ["Learning Confidence for Out-of-Distribution Detection in Neural Networks"](https://arxiv.org/pdf/1802.04865.pdf) for [Tensorflow](https://www.tensorflow.org/). <img src="doc/paper_fig_outline.png" alt="Overview of the work" width="1000" /></a> <img src="doc/paper_fig_results.png" alt="Results of the work" width="500" /></a> How to measure the confidence of the network is an interesting topics, and raising more and more attention recently.\ For example, the workshop, [Uncertainty and Robustness in Deep Learning - ICML 2019](https://sites.google.com/view/udlworkshop2019/home). In this paper, the author propose confidence branch with estimated confidence to perform out-of-distribution detection.\ On the other hand, this confidence can also be use to estimate the uncertainty of the model. To be brief, the idea of this paper is very intuitive and easy to apply. | 537 |
JasonTLWang/LSTM-flare-prediction | ['time series'] | ['Predicting Solar Flares Using a Long Short-Term Memory Network'] | DEMONSTRATION/LSTM_M_sample_run/LSTMflare.py DEMONSTRATION/LSTM_C_sample_run/LSTMflare.py DEMONSTRATION/LSTM_M5_sample_run/LSTMflare.py Table5_dataset_and_source_code/LSTMpredict.py DEMONSTRATION - Clean Version/LSTM_C_sample_run/LSTMflare.py DEMONSTRATION - Clean Version/LSTM_M_sample_run/LSTMflare.py DEMONSTRATION - Clean Version/LSTM_M5_sample_run/LSTMflare.py data_transform lstm attention_3d_block load_data data_transform lstm attention_3d_block load_data data_transform lstm attention_3d_block load_data data_transform lstm attention_3d_block load_data data_transform lstm attention_3d_block load_data data_transform lstm attention_3d_block load_data data_transform lstm partition_10_folds attention_3d_block load_data int insert print tolist shape read_csv append array range values len transform fit to_categorical LabelEncoder dot int concatenate Model Input attention_3d_block seed shuffle append round range len | Predicting Solar Flares Using a Long Short-term Memory Network Hao Liu, Chang Liu, Jason T. L. Wang and Haimin Wang We present a long short-term memory (LSTM) network for predicting whether an active region (AR) would produce a ϒ-class flare within the next 24 hours. We consider three ϒ classes, namely ≥M5.0 class, ≥M class, and ≥C class, and build three LSTM models separately, each corresponding to a ϒ class. Each LSTM model is used to make predictions of its corresponding ϒ-class flares. The essence of our approach is to model data samples in an AR as time series and use LSTMs to capture temporal information of the data samples. Each data sample has 40 features including 25 magnetic parameters obtained from | 538 |
JasonTLWang/RNN-CME-prediction | ['time series'] | ['Predicting Coronal Mass Ejections Using SDO/HMI Vector Magnetic Data Products and Recurrent Neural Networks'] | CMEpredict/CMEpredict.py output_result lstm get_n_features_thresh attention_3d_block load_data gru int insert tolist read_csv append array range values len dot int concatenate Model Input attention_3d_block Model Input attention_3d_block read_csv values | JasonTLWang/RNN-CME-prediction | 539 |
Jasonlee1995/DeepLab_v1 | ['semantic segmentation'] | ['Semantic Image Segmentation with Deep Convolutional Nets and Fully Connected CRFs', 'Efficient Inference in Fully Connected CRFs with Gaussian Edge Potentials'] | Implementation/utils.py Implementation/augmentation.py Implementation/model.py Implementation/train.py ToPILImage CenterCrop RandomRotation ToTensor RandomCrop RandomAffine PILToTensor Resize RandomResizedCrop RandomHorizontalFlip RandomGrayscale Pad RandomPerspective Mask_Aug RandomVerticalFlip _setup_size PILToTensor_img Normalize GaussianBlur _setup_angle _check_sequence_input ColorJitter DeepLab_v1 make_layers VGG16_LargeFOV DenseCRF VGG16_LargeFOV mIoU Number isinstance Number _check_sequence_input isinstance children list isinstance Sequential Conv2d range vgg16 len argmax cuda range | # DeepLab v1 Implementation with Pytorch ## 0. Develop Environment ``` Docker Image - tensorflow/tensorflow:tensorflow:2.4.0-gpu-jupyter Library - Pytorch : Stable (1.7.1) - Linux - Python - CUDA (11.0) ``` - Using Single GPU (not tested on cpu only) ## 1. Explain about Implementation | 540 |
JayMan91/aaai_predit_then_optimize | ['combinatorial optimization'] | ['Smart Predict-and-Optimize for Hard Combinatorial Optimization Problems'] | experiments/qptl/QPTL_hard00.py experiments/Knapsack/knapsack_exps.py experiments/energy/Hard4_prdct_sol2.py experiments/qptl/QPTL_Load2.py experiments/qptl/Unweighted_qptl.py experiments/energy/ICON_Load2SPO_objcut.py experiments/energy/TrueSolutions_01.py QPTL_ICON/qpthlocal/__init__.py experiments/energy/TrueSolutions_04.py QPTL/qpthlocal/qp.py QPTL/qpthlocal/util.py experiments/energy/ICON_Load6SPO.py EnergyCost/torch_SPO_updated.py experiments/energy/MSE_prdct_sol_hard0.py experiments/energy/TrueSolutions_02.py EnergyCost/ICON.py experiments/energy/ICON_Hard03SPO.py EnergyCost/SPO_tts.py experiments/energy/ICON_Load1SPO.py EnergyCost/generate_ranking_knapsack_benchmarks.py experiments/qptl/QPTL_Load6.py experiments/energy/TrueSolutions_00.py experiments/energy/Hard1_prdct_sol.py experiments/energy/MSE_prdct_sol_hard5.py QPTL_ICON/qptl_model.py experiments/energy/Hard4_prdct_sol4.py get_energy.py QPTL_ICON/qpthlocal/solvers/__init__.py QPTL_ICON/qpthlocal/solvers/cvxpy.py experiments/energy/MSE_prdct_sol.py experiments/energy/MSE_prdct_sol_hard4.py EnergyCost/test.py QPTL/qpthlocal/solvers/pdipm/single.py experiments/energy/MSE_prdct_sol_hard2.py KnapsackSolving.py SPO_dp_lr.py EnergyCost/regression_SPO.py experiments/energy/MSE_prdct_sol_hard3.py experiments/energy/ICON_Hard01SPO.py experiments/energy/ICON_Hard02SPO.py EnergyCost/SelectiveRegression.py QPTL/qpthlocal/solvers/cvxpy.py experiments/energy/ICON_Hard04SPO.py QPTL_ICON/qpthlocal/solvers/pdipm/single.py EnergyCost/LinearRegression.py EnergyCost/energy_cost.py experiments/energy/ICON_Load1SPO_objcut.py QPTL/qpthlocal/__init__.py QPTL_ICON/qpthlocal/solvers/pdipm/spbatch.py experiments/energy/TrueSolutions_03.py experiments/energy/MSE_prdct_sol_hard1.py QPTL_ICON/qpthlocal/qp.py experiments/energy/ICON_Hard00SPO.py sgd_learner.py EnergyCost/ICON_exp.py experiments/qptl/weighted_qptl.py QPTL/melding_knapsack.py experiments/energy/Hard4_prdct_sol3.py experiments/energy/Hard4_prdct_sol.py EnergyCost/experiment.py experiments/qptl/qptl_tst.py experiments/qptl/QPTL_Load1.py experiments/energy/Hard2_prdct_sol.py experiments/energy/Hard5_prdct_sol.py QPTL/qpthlocal/solvers/pdipm/spbatch.py QPTL/qpthlocal/solvers/pdipm/batch.py experiments/energy/Hard0_prdct_sol.py QPTL/qpthlocal/solvers/__init__.py QPTL/Weighted_knapsack_qptl.py EnergyCost/tets.py experiments/energy/Hard3_prdct_sol.py QPTL_ICON/qpthlocal/util.py experiments/energy/test.py experiments/energy/TrueSolutions_05.py QPTL_ICON/qpthlocal/solvers/pdipm/batch.py EnergyCost/SPO.py experiments/energy/ICON_Hard05SPO.py experiments/energy/Hard4_prdct_sol1.py experiments/energy/ICON_Load2SPO.py get_energy_grouped get_energy_pandas get_energy eval_knapsack knapsack_diversity solveKnapsackProblemRelaxation solveKnapsackProblem regret_knapsack solveKnapsackGreedily train_fwdbwd_grad knapsack_value get_data get_profits diffprof_grid get_kn_indicators ICON_solution LogitRegression GridRegression shortest_path train_fwdbwd_oneitem test_fwd train_fwdbwd get_profits_pred diffprof LinearRegression grid_search get_profits_ICON get_profits_pred_ICON get_data_ICON Pytorch_regression SGD_SPO_dp_lr cost_minimize LogitRegression train_fwdbwd_grad get_energy_indicators train_fwdbwd_oneitem get_profits_pred test_fwd get_profits train_fwdbwd diffprof LinearRegression generate_heaps_of_numbers_and_attributes get_artificial_data apply_order_preserving_transformation make_size_multiple_of_k partition_into_groups generate_benchmarks shuffle_around_items remove_and_return_random_element data_reading ICON_scheduling ICON_scheduling_relaxation optimal_value main Gurobi_ICON Pytorch_regression Regression_generic Pytorch_SelReg SGD_SPO SGD_SPO_generic qptl forward_gurobi_prebuilt QPFunction make_gurobi_model QPSolvers forward_single_np_gurobi SpQPFunction bdiag print_header extract_nBatch to_np expandParam bger get_sizes forward_single_np factor_solve_kkt_reg unpack_kkt factor_solve_kkt KKTSolvers solve_kkt_ir kkt_resid_reg pre_factor_kkt factor_kkt solve_kkt get_step forward btrifact_hack factor_solve_kkt pre_factor_kkt factor_kkt solve_kkt get_step forward KKTSolvers cat_kkt solve_kkt get_step forward qptl_ICON forward_gurobi_prebuilt QPFunction make_gurobi_model QPSolvers forward_single_np_gurobi SpQPFunction bdiag print_header extract_nBatch to_np expandParam bger get_sizes forward_single_np factor_solve_kkt_reg unpack_kkt factor_solve_kkt KKTSolvers solve_kkt_ir kkt_resid_reg pre_factor_kkt factor_kkt solve_kkt get_step forward btrifact_hack factor_solve_kkt pre_factor_kkt factor_kkt solve_kkt get_step forward KKTSolvers cat_kkt solve_kkt get_step forward nunique int get_energy_pandas max range values len get_energy_pandas apply vstack as_matrix train_test_split array values int insert len any nan interpolate range read_csv drop sort range len update getAttr time optimize list MAXIMIZE addVar print Runtime addConstr setObjective Model objVal setParam sum range values len update getAttr time optimize list MAXIMIZE addVar Runtime addConstr setObjective Model objVal setParam sum range values len ones solveKnapsackProblemRelaxation array solveKnapsackProblem append zeros sum solveKnapsackGreedily range len eval_knapsack confusion_matrix zeros sum array solveKnapsackProblem get_profits zeros float range str add_weight create_graph bellman_ford_path where zeros range len sorted ones solveKnapsackProblemRelaxation set solveKnapsackProblem zeros sum eval train eval train backward Variable ones model zero_grad step criterion model Variable backward zero_grad tensor step train_fwdbwd median confusion_matrix ravel dict eval get_profits append zeros train sum range get_kn_indicators len array get_kn_indicators shortest_path array solve_model pop items make_model defaultdict solver knapsack_value info append range len sum list Minimize NewIntVar Solve Add print Value append ObjectiveValue CpSolver CpModel range len get_energy_indicators average stack get_energy_indicators sort set add append range len randint int len randint len shuffle range generate_heaps_of_numbers_and_attributes int print sort apply_order_preserving_transformation shuffle make_size_multiple_of_k shuffle_around_items partition_into_groups append remove_and_return_random_element range len int asarray generate_benchmarks range len int list map float range split getAttr items optimize Runtime addVar addConstrs print addConstr status setObjective Model objVal setParam zeros sum MINIMIZE range getAttr items optimize addVar addConstrs print addConstr status setObjective Model objVal setParam zeros sum MINIMIZE range print items sorted data_reading print ICON_scheduling get_energy optimal_value listdir update optimize addConstr setObjective MINIMIZE Model array nonzero zip append QuadExpr range update addConstr Model nonzero zip append QuadExpr range optimize setObjective MINIMIZE array QuadExpr range len print size size type_as byte view zip T Minimize Problem Variable solve quad_form ravel format factor_solve_kkt abs squeeze type_as solve_kkt_ir print clone bdiag mean t min repeat solve_kkt get_step factor_kkt range get_sizes max bmm factor_solve_kkt_reg kkt_resid_reg repeat range get_sizes btrisolve bmm squeeze type_as cat btrifact_hack get_sizes btrisolve bmm squeeze type_as cat btrifact_hack get_sizes btrisolve squeeze cat get_sizes btrisolve bmm int btriunpack type_as clone cat btrifact_hack get_sizes bmm byte size clone btrifact_hack btriunpack norm dot mv max view exit embed t mv potrs t mm potrf type_as potrf view potrs t mm potrf Size size cat_kkt QR fill_ Size size contiguous clone _indices squeeze stack cuda cat spbqrfactsolve size stack range len | # aaai_predit_then_optimize Code release for AAAI 2020 paper "Smart Predict-and-Optimize for Hard Combinatorial Optimization Problemss" | 541 |
Jeevesh8/Cross-Lingual-Voice-Cloning | ['speech synthesis'] | ['Natural TTS Synthesis by Conditioning WaveNet on Mel Spectrogram Predictions', 'Learning to Speak Fluently in a Foreign Language: Multilingual Speech Synthesis and Cross-Language Voice Cloning'] | logger.py text/numbers.py residual_encoder.py text/cleaners.py plotting_utils.py train.py text/symbols.py layers.py text/cmudict.py utils.py audio_processing.py data_utils.py loss_scaler.py distributed.py multiproc.py hparams.py model.py gradient_reversal.py text/__init__.py speaker_classifier.py loss_function.py stft.py griffin_lim window_sumsquare dynamic_range_decompression dynamic_range_compression TextMelCollate TextMelLoader DistributedDataParallel _unflatten_dense_tensors _flatten_dense_tensors apply_gradient_allreduce reverse_grad grad_reverse create_hparams LinearNorm ConvNorm TacotronSTFT Tacotron2Logger Tacotron2Loss LossScaler DynamicLossScaler Tacotron2 Decoder Postnet Prenet Encoder LocationLayer Attention plot_gate_outputs_to_numpy plot_spectrogram_to_numpy save_figure_to_numpy plot_alignment_to_numpy continuous_given_discrete residual_encoders residual_encoder speaker_classifier STFT validate load_model load_checkpoint anneal_lr save_checkpoint init_distributed prepare_dataloaders prepare_directories_and_logger warm_start_model train reduce_tensor get_mask_from_lengths load_wav_to_torch to_gpu load_filepaths_and_text lowercase english_cleaners expand_abbreviations collapse_whitespace basic_cleaners convert_to_ascii transliteration_cleaners expand_numbers _parse_cmudict _get_pronunciation CMUDict normalize_numbers _expand_dollars _expand_ordinal _expand_decimal_point _expand_number _remove_commas text_to_sequence _clean_text _symbols_to_sequence _should_keep_symbol sequence_to_text _arpabet_to_sequence get_window normalize pad_center zeros range exp angle Variable squeeze rand astype float32 pi from_numpy transform range cat append view_as numel list requires_grad register_forward_hook register_hook parameters values broadcast HParams parse values info reshape tostring_rgb fromstring subplots xlabel draw close ylabel colorbar tight_layout imshow save_figure_to_numpy subplots xlabel draw close ylabel colorbar tight_layout imshow save_figure_to_numpy subplots xlabel draw close ylabel tight_layout scatter save_figure_to_numpy range len all_reduce clone print device_count set_device init_process_group validation_files DistributedSampler distributed_run n_frames_per_step DataLoader training_files TextMelCollate TextMelLoader join chmod Tacotron2Logger makedirs apply_gradient_allreduce min redefine_y_l distributed_run after_optim_step fp16_run cuda load items update format print load_state_dict state_dict print format load load_state_dict print format save format print log_validation eval train validate model batch_size clip_grad_norm_ zero_grad residual_encoder save_checkpoint fp16_run prepare_dataloaders prepare_directories_and_logger max cuda seed initialize load_model ignore_layers Adam epochs after_optim_step grad_clip_thresh parse_batch warm_start_model master_params range format use_saved_learning_rate param_groups anneal_lr perf_counter distributed_run manual_seed item log_training enumerate int join criterion apply_gradient_allreduce print load_checkpoint backward isnan parameters init_distributed step len bool arange item load int16 read resample astype float32 is_available contiguous cuda sub lowercase collapse_whitespace lowercase convert_to_ascii collapse_whitespace lowercase expand_abbreviations collapse_whitespace convert_to_ascii expand_numbers append _get_pronunciation sub split split group split int group sub match group len cleaner getattr | # Tacotron 2 (without wavenet) **DISCLAIMER :- The following code base has been modified according to the paper [Learning to Speak Fluently in a Foreign Language:Multilingual Speech Synthesis and Cross-Language Voice Cloning](https://arxiv.org/pdf/1907.04448.pdf)** ## Dataset Format The model needs to be provided 2 text files 1 for the purpose of training and 1 for validation. Each line of the txt file should follow the following format :- ``` <path-to-wav-file>|<text-corresponding-to-speech-in-wav>|<speaker-no>|<lang-no> ``` ```<speaker-no>``` goes from 0 to n-1, where n is the number of speakers. ```<lang-no>``` goes from 0 to m-1 , where m is the number of languages. ## Hparams | 542 |
Jeffrey-Ede/Denoising-Kernels-MLPs-Autoencoders | ['denoising'] | ['Autoencoders, Kernels, and Multilayer Perceptrons for Electron Micrograph Restoration and Compression'] | autoencoder_train-val-test.py misc_scripts/create_kernel+MLP_learning_curves.py noise_removal_kernels.py apply_autoencoders.py autoencoder.py example-kernel-or-MLP-denoise.py misc_scripts/create_autoencoder_learning_curves.py example-compress-decompress.py misc_scripts/read_autoencoder_learning_curves.py example-autoencoder-denoise.py misc_scripts/create_denoised_examples.py apply_kernels_MLPs.py misc_scripts/read_kernel+mlp_learning_curves.py Micrograph_Autoencoder RunConfig experiment scale0to1 disp architecture load_image norm_img record_parser flip_rotate reshaper input_fn RunConfig experiment scale0to1 disp preprocess architecture main load_image norm_img record_parser adam_updates flip_rotate disp plot_data plot_data moving_average remove_repeated_iters moving_average decode strided_conv_block cond reshape architecture randint randint imread fill min max fill min max ones load_image preprocess flip_rotate int namedWindow scale0to1 size reshape waitKey sqrt imshow WINDOW_NORMAL round conv2d deconv_block get_shape gradients Variable name square pow assign sqrt assign_add zip append zeros minimize AdamOptimizer mean_squared_error cond scale0to1 reshape print reset_default_graph all_variables set get_position arange plot xlabel minorticks_on size text add_subplot ylabel set_position log10 linspace set_ticks_position legend xticks enumerate append print enumerate cumsum insert | # Denoising-Kernels-MLPs-Autoencoders This repository is for the [paper](https://arxiv.org/abs/1808.09916) "Autoencoders, Kernels, and Multilayer Perceptrons for Electron Micrograph Restoration and Compression." ## Examples Example applications of the every autoencoder, kernel and multilayer perceptron are provided as an appendix in the paper. ## Example Usage Example applications of autoencoders to compression/decompression and noise removal and kernels/multilayer perceptrons to noise removal are provided in `example-compress-decompress.py`, `example-autoencoder-denoise.py` and `example-kernel-or-MLP-denoise`. Each of the example scripts demonstrates that models only needs to be loaded once to be used for inference multiple times. ## Download To get the training and inference scripts, simply copy the files from or clone this repository: ``` git clone https://github.com/Jeffrey-Ede/Denoising-Kernels-MLPs-Autoencoders.git | 543 |
JeffreyCA/xumx | ['music source separation'] | ['All for One and One for All: Improving Music Separation by Bridging Networks'] | xumx/train.py xumx/data.py xumx/lr_scheduler.py xumx/utils.py xumx/comm.py xumx/eval.py xumx/test.py setup.py xumx/loss.py xumx/args.py xumx/model.py get_train_args get_inference_args CommunicatorWrapper create_float_context load_datasources _augment_channelswap Compose _augment_gain MUSDBDataSource separate_and_evaluate sdr_loss mse sdr_loss_core unsqueeze mse_loss ReduceLROnPlateau OpenUnmix_CrossNet Spectrogram istft STFT test separate istft train bandwidth_to_max_bin get_statistics get_nnabla_version_integer EarlyStopping AverageMeter parse_known_args add_argument ArgumentParser parse_known_args add_argument ArgumentParser get_extension_context uniform MUSDBDataSource parse_args Compose add_argument separate eval_mus_track save_estimates squared_error mse concatenate reshape sdr_loss_core shape unsqueeze tile range sum stft shape reshape deconvolution zeros_like ones reshape cos pi get_parameter_or_create pad get_parameter sin zeros range mean T d OpenUnmix_CrossNet STFT complex128 transpose astype wiener unmix_target from_numpy_array residual_model append load_parameters array istft enumerate context model resample chunk_dur warn outdir Path get_extension_context set_auto_forward str stem separate concatenate astype inputs set_default_context mkdir trange split_to_mono int items with_suffix from_file sample_rate write float32 repeat get_inference_args context mcoef zero batch_size CommunicatorWrapper zero_grad import_extension_module data_iterator MonitorSeries weight_decay ReduceLROnPlateau Monitor forward get_extension_context save_states seed list OpenUnmix_CrossNet Adam valid_dur add n_procs shape epochs _size next range update MonitorTimeElapsed set_learning_rate format load_datasources RandomState bandwidth_to_max_bin nfft slice ctx sdr_loss copy get_train_args set_default_context Spectrogram lr avg trange update_lr save_parameters int join bandwidth NdArray get_parameters get_statistics backward print Variable sample_rate set_parameters EarlyStopping output AverageMeter clear_memory_cache all_reduce unmix get_all_reduce_callback step mse_loss makedirs list map groups data T scale_ squeeze tracks partial_fit maximum tqdm from_numpy_array set_description Spectrogram StandardScaler max range len float linspace | # CrossNet-Open-Unmix (X-UMX) for Spleeter Web **This is a modified version of the [official X-UMX repo](https://github.com/sony/ai-research-code/tree/master/x-umx) made to be compatible with [Spleeter Web](https://github.com/JeffreyCA/spleeter-web)!** This repository contains the NNabla implementation of __CrossNet-Open-Unmix (X-UMX)__, an improved version of [Open-Unmix (UMX)](https://github.com/sigsep/open-unmix-nnabla) for music source separation. X-UMX achieves an improved performance without additional learnable parameters compared to the original UMX model. Details of X-UMX can be found in [our paper](https://arxiv.org/abs/2010.04228). ## Quick Music Source Separation Demo by X-UMX From the Colab link below, you can try using X-UMX to generate and listen to separated audio sources of your audio music file. Please give it a try! [](https://colab.research.google.com/github/sony/ai-research-code/blob/master/x-umx/X-UMX.ipynb) __Related Projects:__ x-umx | [open-unmix-nnabla](https://github.com/sigsep/open-unmix-nnabla) | [open-unmix-pytorch](https://github.com/sigsep/open-unmix-pytorch) | [musdb](https://github.com/sigsep/sigsep-mus-db) | [museval](https://github.com/sigsep/sigsep-mus-eval) | [norbert](https://github.com/sigsep/norbert) ## The Model  As shown in Figure (b), __X-UMX__ has almost the same architecture as the original UMX, | 544 |
Jeffyrao/neural-tweet-search | ['information retrieval'] | ['Multi-Perspective Relevance Matching with Hierarchical ConvNets for Social Media Search'] | train.py data_preprocess.py attention_model.py utils.py default_args.py add_attention_layer_with_query_weighting max_pooling_with_mask add_conv_layer keras_diagonal max_pooling add_attention_layer mean_pooling add_attention_layer_with_doc_weighting add_embed_layer repeat_vector create_attention_model elementwise_prod attention_weighting_prod mean_pooling_with_mask create_masks read_metadata save_data gen_data inject_word_weight read_urls read_sentences inject_ngram_weight sample_val_set load_data compute_overlap_feat read_relevance construct_vocab_emb get_best_args get_default_args load_best_args print_dataset evaluate set_args get_model_weights create_option_parser print_args main batch_generator get_word_vector word_tokenize merge_two_dicts get_ngrams split_sent clean_text unsplit_query normalize_unicode get_vector invert_dict print int_shape sum print Embedding Sequential add SpatialDropout1D len Convolution1D dropout_layer append conv_layer range GlobalMaxPooling1D Dropout setattr setattr doc_char_embedding_layer add_attention_layer_with_query_weighting setattr add_conv_layer print Sequential add_attention_layer extend url_char_embedding_layer add_attention_layer_with_doc_weighting add_embed_layer query_char_embedding_layer zip append Input range query_word_embedding_layer exists exists ones shape range shape range zeros shape range max zeros ones shape range read_metadata compute_overlap_feat max exists open create_masks pad_sequences read_sentences read_relevance invert_dict read_urls inject_ngram_weight load time merge_two_dicts print min extend inject_word_weight update int sorted format print set sample len load get_word_vector replace endswith print makedirs astype float32 write len close load_word2vec_format zeros open load open glob items dump makedirs save open format communicate float Popen split print shape unsplit_query get_weights layers ceil int range print pprint print print dir test getattr type add_option OptionParser layers get_best_args delete SGD ReduceLROnPlateau set_weights get_default_args list ModelCheckpoint load_best_args Adam gen_data add RMSprop shape append create_attention_model get_weights range invert_dict predict format print_dataset save_data get_model_weights shuffle lower sample_val_set load_weights zip construct_vocab_emb zeros compile enumerate int remove merge_two_dicts set_args evaluate print EarlyStopping fit print_args load_data summary randint array len append join enumerate update copy items max values iteritems lower sub endswith endswith list | # Multi-Perspective Relevance Matching with Hierarchical ConvNets for Social Media Search This repo contains code and data for our neural tweet search paper published in [AAAI'19](https://arxiv.org/abs/1805.08159). Given a query, we aim to return the most relevant documents(tweets) by ranking their relevency. In social media search, the scenario is different as standard ad-hoc retrieval: shorter document length, less formal languages and multiple relevance source signals (e.g., URL, hashtag). We propose a hierarchical convolutional model to approach the hetergeneous relevance signals (tweet, URL, hashtag) at multiple perspectives, including character-, word-, phrase- and sentence-level modeling. Our model demonstrated significant gains on multiple twitter datasets against state-of-the-art neural ranking models. More details can be found in our paper. ## Requirements - Python 2.7 - Tensorflow or Theano (tested on TF 1.4.1) - Keras (tested on 2.0.5) ## Install - Download our repo: ``` | 545 |
JeongsolKim/BiS400_term_project | ['style transfer'] | ['Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization'] | StyleTransfer.py Trainer_with_discriminator.py BatchGenerator.py Decoder.py Trainer.py Discriminator.py Encoder.py utils.py batchgenerator decoder discriminator encoder styletransfer trainer trainer_with_discriminator MinMax_Scale deprocessing preprocessing reduce_max constant reduce_min tile preprocess_input concat expand_dims enumerate concat reverse expand_dims enumerate | # BiS400_term_project Unofficial tensorflow 2 implementation of neural style transfer based on 'arbitrary style transfer in real-time with adaptive instance normalization' (https://arxiv.org/abs/1703.06868) | 546 |
JeremyBYU/FastGaussianAccumulator | ['autonomous driving', 'semantic segmentation'] | ['Gauge Equivariant Convolutional Networks and the Icosahedral CNN', 'Polylidar3D -- Fast Polygon Extraction from 3D Data'] | examples/python/util/mesh_util.py src/Python/fastgac/__init__.py src/Python/fastgac/helper.py src_docs/make_docs.py src_docs/conf.py src/Python/slowga/peak_and_cluster.py src/Python/fastgac/scikit_image/rank_order.py tests/python/test_peak_transition.py examples/python/paper/plot_hilbert.py examples/python/paper/plot_mesh_beta.py examples/python/paper/plot_linear_interp.py src/Python/slowga/__init__.py examples/python/run_ico.py examples/python/run_meshes.py src/Python/slowga/helper.py src/Python/setup.py examples/python/run_hilbert.py examples/python/paper/run_meshes_archive.py examples/python/run_ga.py examples/python/archive/run_normals copy.py scripts/rename_project.py src/Python/slowga/icosahedron.py src/Python/fastgac/scikit_image/skimage_feature_peak.py scripts/manage_versions.py src/Python/slowga/projections.py src/Python/fastgac/o3d_util.py tests/python/conftest.py examples/python/run_normals.py examples/python/paper/plot_mesh.py src/Python/fastgac/peak_and_cluster.py tests/python/test_peak.py src/Python/slowga/__main__.py tests/python/helpers/setup_helper.py setup.py examples/python/util/line_mesh.py CMakeExtension CMakeBuild main main analyze_mesh visualize_unwrapping decompose extract_chart main main visualize_gaussian_integration plot_hilbert_curve get_image_peaks main example_normals integrate_normals_and_visualize main example_normals integrate_normals_and_visualize main set_attributes main plot_indices calc_linear_regression full_extent main main get_image_peaks plot_issues_2 visualize_gaussian_integration main create_line_set reorder_single_hv_to_s2 plot_hilbert_curve main normalized LineMesh align_vector_to_another main get_mesh_data_iterator create_tag parse_args bump main rename_files traverse_folder rename_file_or_folder ignore_folders replace_string_list main parse_args replace_strings_in_file bdist_wheel down_sample_normals create_arrow assign_vertex_colors get_arrow vector_magnitude get_arrow_normals split_triangles plot_meshes draw_normals translate_meshes normalized align_vector_to_another normalize_box get_pc_all_peaks create_line_set get_colors get_point_normals create_open_3d_mesh calc_angle_delta get_high_intensity_peaks find_peaks_from_ico_charts find_peaks_from_accumulator get_point_clusters normalized average_clusters rank_order _get_peak_mask peak_local_max _exclude_border _get_high_intensity_peaks create_arrow assign_vertex_colors get_arrow vector_magnitude get_arrow_normals split_triangles plot_meshes draw_normals translate_meshes normalized align_vector_to_another normalize_box get_pc_all_peaks get_point_normals get_colors create_open_3d_mesh calc_angle_delta generate_key_from_point refine_icosahedron construct_midpoint cantor_mapping create_icosahedron get_point_idx create_icosahedron_mesh get_point_clusters find_peaks_from_accumulator average_clusters azimuth_equidistant_fast convert_phi_theta down_proj plot_projection convert_stereographic convert_lat_long azimuth_equidistant convert_phi_theta_centered visualize_refinement generate_sphere_examples GaussianAccumulator GaussianAccumulatorKDPy assign_hilbert_curve refined_ico_mesh plot_hilbert_curve visualize_gaussian_integration generate_family_of_icosahedron main get_colors filter_normals_by_phi is_enum_class skip setup get_git_short_hash PyAPIDocsBuilder _create_or_clear_dir remove_dir SphinxDocsBuilder small_normals ico_kwargs cluster_kwargs average_filter find_peaks_kwargs test_peaks test_same_output test_peak_local_max_cpp find_peaks_from_ico_charts_updated test_peak_all_scipy test_peak_all_cpp test_peak_local_max_scipy sample_sphere_cap cluster_normals setup_fastgac generate_random_normals sort_by_distance_from_point cartesian_to_polar setup_fastgac_simple polar_to_catersian MatX3d format asarray integrate buckets print GaussianAccumulatorKD perf_counter get_bucket_normals array len convert_normals_to_hilbert GaussianAccumulatorOpt projected_bbox convert_normals_to_s2id int asarray triangles vertices vertex_colors create_open_3d_mesh asarray vertices triangles create_open_3d_mesh GaussianAccumulatorS2Beta arange reduce copy_ico_mesh image translate_meshes xticks plot_meshes yticks show assign_vertex_colors imshow find_peaks append num_buckets range asarray get_normalized_bucket_counts int refine_icochart print decompose dict visualize_gaussian_integration array assign_vertex_colors GaussianAccumulatorS2Beta refine_icochart refine_icosahedron decompose copy_ico_mesh extract_chart plot_meshes analyze_mesh get_mesh_data_iterator enumerate visualize_unwrapping asarray print find_peaks_from_ico_charts dict IcoCharts vertices get_pc_all_peaks get_arrow_normals get_normalized_bucket_counts_by_vertex fill_image subplots arange find_peaks_from_accumulator axis show legendHandles set_title get_bucket_projection set_xlabel bar scatter get_bucket_normals legend get_arrow_normals num_buckets set_picker get_bucket_sfc_values asarray mpl_connect tight_layout get_normalized_bucket_counts get_pc_all_peaks zip __name__ argsort dict set_ylabel MatX3d assign_vertex_colors asarray triangle_normals integrate format triangles print down_sample_normals perf_counter get_normalized_bucket_counts vertices num_buckets create_open_3d_mesh __name__ clear_count GaussianAccumulatorS2Beta get_image_peaks GaussianAccumulatorKDPy dict visualize_gaussian_integration plot_meshes plot_hilbert_curve MatX3d assign_vertex_colors asarray integrate triangles perf_counter get_normalized_bucket_counts vertices create_open_3d_mesh show clear_count asarray GaussianAccumulatorS2Beta arange print translate dict imshow sort_by_distance_from_point image draw_geometries find_peaks xticks array integrate_normals_and_visualize yticks load cluster_normals concatenate example_normals add_argument path sort_by_distance_from_point ArgumentParser parse_args find_peaks_from_ico_charts get_average_normals_by_vertex get_normalized_bucket_counts_by_vertex fill_image IcoCharts max paint_uniform_color triangles GaussianAccumulatorS2 LineMesh vertices create_from_triangle_mesh create_open_3d_mesh get_bucket_sfc_values set_xlabel set_ylabel legend get_xticklabels draw union get_yticklabels asarray subplots arange plot set_ylim min set_xlim tight_layout set_ylabel twinx nan set_attributes savefig get_bucket_sfc_values calc_linear_regression format plot print min floor ceil max linregress plot_indices read_triangle_mesh find_peaks_from_ico_charts axis image show str rotate filter_smooth_laplacian shape imshow get_arrow_normals get_normalized_bucket_counts_by_vertex fill_image as_matrix draw_geometries compute_triangle_normals IcoCharts Vector3dVector get_bucket_average_normals get_average_normals_by_vertex PointCloud max ones mask filter_normals_by_phi int min Vector2iVector Vector3dVector convert_normals_to_hilbert MatX3d subplots Vector3dVector vstack show get_bucket_projection scatter vertex_colors get_bucket_normals legend expand_dims asarray ascontiguousarray get_normalized_bucket_counts projected_bbox draw_geometries PointCloud triangles print argsort create_line_set convert_normals_to_hilbert asarray projected_bbox argsort get_bucket_normals stem int64 astype nonzero zip reorder_single_hv_to_s2 norm arccos array_equal cross dot atleast_1d norm LineSet cylinder_segments Vector2iVector str compute_triangle_normals read_triangle_mesh rotate as_matrix zip enumerate vertex_colors write_triangle_mesh column_stack add_argument ArgumentParser join format hexsha print exit is_dirty Repo tag bump create_tag replace zip str parent name replace_string_list rename info debug rename_file_or_folder is_dir info iterdir replace_strings_in_file traverse_folder rename_files parent libname_short libname_python error copytree exit rmtree Path info resolve replace_strings_in_file exists libname int min max ascontiguousarray paint_uniform_color TriangleMesh compute_triangle_normals reshape ascontiguousarray Vector3dVector compute_vertex_normals flip Vector3iVector deepcopy paint_uniform_color arange zeros_like copy Vector3iVector Vector3dVector zeros enumerate asarray triangles split_triangles vertex_colors range append deepcopy get_axis_aligned_bounding_box translate deepcopy isinstance translate create_coordinate_frame get_axis_aligned_bounding_box draw_geometries append enumerate LineSet vstack asarray triangle_normals arccos rad2deg min max sqrt sum allclose abs create_arrow vector_magnitude get_rotation_matrix_from_axis_angle rotate translate align_vector_to_another array Normalize get_colors ascontiguousarray Vector3dVector PointCloud paint_uniform_color Vector3dVector PointCloud append get_arrow range array fcluster average_clusters find_peaks linkage nonzero column_stack get_high_intensity_peaks asarray make_mask linkage average_clusters mask image image_to_vertex_idx peak_local_max fcluster array append unique get_point_clusters average normalized append sum array dtype zeros_like cumsum astype uint32 ravel zeros argsort nonzero max maximum_filter enumerate dtype ones_like T all find_objects isinstance zeros_like tuple astype ndim _get_high_intensity_peaks _get_peak_mask any int32 unique _exclude_border fill enumerate append array ValueError create_icosahedron norm get generate_key_from_point construct_midpoint append len list tolist extend dict get_point_idx array range format print perf_counter zeros sqrt arctan2 ones_like arccos arctan2 copy pi rad2deg zeros zeros copy arccos arctan2 pi copy zeros range zeros copy arccos arctan2 normalize_box cos sin zeros norm arccos atleast_1d normalize_box zeros show subplots set_title gaussian_normals reshape set_xlabel axis perf_counter tight_layout scatter set_ylabel enumerate create_icosahedron refine_icosahedron create_open_3d_mesh append refine_icosahedron create_open_3d_mesh compute_vertex_normals compute_triangle_normals create_sphere create_icosahedron_mesh paint_uniform_color asarray triangle_normals triangles refine_icosahedron plot_meshes draw_normals Vector3dVector vertices create_open_3d_mesh PointCloud cos deg2rad astype distance_from_coordinates HilbertCurve append uint32 array range gaussian_normals colors nbuckets azimuth_equidistant assign_hilbert_curve GaussianAccumulator plot_meshes normalize colors calc_angle_delta visualize_refinement plot_projection generate_sphere_examples TriangleMesh insert generate_family_of_icosahedron check_output strip hasattr escape match __doc__ import_from_str is_enum_class connect print rmtree exists makedirs print rmtree exists asarray dict dict MatX3d integrate cluster_normals concatenate print sort_by_distance_from_point find_peaks setup_fastgac_simple array assert_allclose find_peaks_from_ico_charts get_normalized_bucket_counts_by_vertex asarray get_average_normals_by_vertex setup_fastga image asarray benchmark setup_fastga find_peaks benchmark setup_fastga image asarray benchmark setup_fastga find_peaks benchmark MatX3d find_peaks asarray integrate cluster_normals concatenate print find_peaks_from_ico_charts sort_by_distance_from_point get_average_normals_by_vertex setup_fastga_simple get_normalized_bucket_counts_by_vertex array fill_image assert_allclose MatX3d GaussianAccumulatorS2Beta integrate dict get_normalized_bucket_counts_by_vertex IcoCharts fill_image IcoCharts GaussianAccumulatorS2Beta column_stack cos sin arccos arctan2 radians cos pi apply sqrt uniform sin align_vectors array column_stack arccos pi uniform zeros polar_to_catersian column_stack append generate_random_normals range sample_sphere_cap power sum | # Fast Gaussian Accumulator [](https://pypi.org/project/fastgac/) [](https://jeremybyu.github.io/FastGaussianAccumulator/) [](https://github.com/JeremyBYU/FastGaussianAccumulator/actions/workflows/tests.yml) [](https://github.com/JeremyBYU/FastGaussianAccumulator/blob/master/LICENSE) A Gaussian Sphere Accumulator refers to the notion of discretizing the **surface** of the unit sphere (a gaussian surface) into buckets/cells. One can then integrate/accumulate a list of **unit normals** into these buckets. The end result is then a histogram of the sphere. There are many choices for the discretization process, however this library uses equilateral triangles because each cell will have nearly the same **area** and **shape**. This process is done by recursively subdividing (called "refining") the primary faces of an icosahedron. The following image shows our discretization strategy. The first object discretizes a sphere with uniform spacing of phi/theta (note small cells at poles, this represenation is not used), the second object is an icosahedron, the third object is the first level of recursion for an icosahedron, the last object is the second level of recursion of an icosahedron.  Once a level of refinement is chosen, one can then integrate the surface normals of 3D triangular mesh into the cells/buckets. For example integrating the normals into a level four (4) icosahedron would look like the image below. Bright yellow indicates more counts for the triangle cells. This is basically showing that the floor [0, 0, 1] and walls [0, +/-1, 0] are common. Documenation can be found [here](https://jeremybyu.github.io/FastGaussianAccumulator/). <img src="https://raw.githubusercontent.com/JeremyBYU/FastGaussianAccumulator/master/assets/imgs/gaussian_accumulator_example.png" alt="GaussianAccumulator" width="660"/> | 547 |
JeremyBYU/polylidar | ['autonomous driving'] | ['Polylidar3D -- Fast Polygon Extraction from 3D Data'] | examples/python/for_paper/generate_logo.py examples/python/util/mesh_util.py examples/python/extras/test_o3d.py src/Python/polylidar/polylidarutil/plane_filtering.py src/Python/polylidar/__init__.py examples/python/bilateral.py src_docs/make_docs.py examples/python/robust.py src/Python/polylidar/polylidarutil/__init__.py examples/python/extras/test_matrix.py examples/python/for_landing/o3d_slow_down.py examples/python/for_paper/mesh_examples.py src_docs/conf.py examples/python/basic25d.py examples/python/basic2d_algorithm.py examples/python/for_paper/basic25d_algorithm_explained.py src/Python/polylidar/polylidarutil/line_mesh.py examples/python/for_paper/plane_segmentation.py examples/python/extras/test_delaunay.py examples/python/for_landing/basic_rooftop_classification_algorithm.py tests/python/shape_test.py tests/python/benchmark_test.py tests/python/helpers/utils.py src/Python/setup.py examples/python/basic2d.py examples/python/for_paper/manifold_meshes.py examples/python/for_landing/basic_rooftop_classification.py examples/python/basic25d_algorithm.py examples/python/for_paper/california_points.py examples/python/realsense_mesh.py examples/python/util/helper_mesh.py examples/python/for_landing/test_classified.py examples/python/for_paper/bench_mesh_report.py tests/python/conftest.py examples/python/util/helper_polylidar.py examples/python/for_paper/polygon_example_research_statement.py examples/python/basic_mesh.py examples/python/for_paper/polygon_extraction_from_mesh.py examples/python/util/realsense_util.py examples/python/extras/open3d_mesh.py examples/python/for_paper/polygon_example.py src/Python/polylidar/polylidarutil/open3d_util.py main main main main get_np_buffer_ptr callback get_image_peaks down_sample_normals main filter_and_create_open3d_polygons extract_all_dominant_planes run_test main callback make_uniform_grid_mesh main filter_and_create_open3d_polygons run_test main extract_mesh_planes create_open3d_pc generate_point_cloud main create_open_3d_mesh main main get_np_buffer_ptr main create_color convert_to_square_image handle_shapes main extract_polygons main extract_polygons main create_color get_np_buffer_ptr classify_point_cloud convert_to_square_image change_class handle_shapes main generate_planar_pointcloud extract_polygons main set_labels main plot_df main plot_points main get_np_buffer_ptr stitch_letters read_alphabet main triangulate_and_combine set_labels callback get_image_peaks down_sample_normals main filter_and_create_open3d_polygons extract_all_dominant_planes run_test callback paint_planes open_3d_mesh_to_trimesh split_triangles assign_some_vertex_colors main filter_and_create_open3d_polygons extract_all_dominant_planes run_test callback paint_planes open_3d_mesh_to_trimesh split_triangles assign_some_vertex_colors main filter_and_create_open3d_polygons extract_all_dominant_planes run_test callback paint_planes open_3d_mesh_to_trimesh split_triangles assign_some_vertex_colors main filter_and_create_open3d_polygons extract_all_dominant_planes run_test plot_polygons plot_planes_3d main pick_valid_normals create_meshes create_meshes_cuda laplacian_opc laplacian_then_bilateral_opc_cuda create_open_3d_mesh_from_tri_mesh bilateral_opc_cuda laplacian_then_bilateral_opc plot_triangle_normals bilateral_opc compute_normals_and_centroids_opc create_meshes_cuda_with_o3d create_mesh_from_organized_point_cloud create_open_3d_mesh laplacian_opc_cuda get_image_peaks filter_and_create_polygons extract_planes_and_polygons_from_mesh down_sample_normals extract_all_dominant_plane_normals extract_planes_and_polygons_from_classified_mesh main get_mesh_data_iterator get_file_list convert_trajectory get_realsense_data extract_mesh_planes create_open3d_pc get_rgbd_file_lists read_trajectory prep_mesh get_frame_data sorted_alphanum create_open_3d_mesh bdist_wheel main normalized LineMesh align_vector_to_another make_grid create_open_3d_mesh_from_tri_mesh open_3d_mesh_to_trimesh clear_polys get_extrinsics flatten set_line handle_shapes update_points set_initial_view create_lines create_open_3d_mesh construct_grid add_column filter_planes_and_holes plot_poly get_points filter_planes create_kd_tree recover_3d plot_indices_text generate_test_points get_point scale_points set_up_axes plot_polygons_3d plot_planes_3d get_poly_coords plot_triangles get_all_triangles plot_points convert_to_shapely_polygons set_axes_radius get_colored_planar_segments plot_polygons get_estimated_lmax set_axes_equal generate_3d_plane rotation_matrix get_triangles_from_list apply_rotation plot_triangle_meshes is_enum_class skip setup get_git_short_hash PyAPIDocsBuilder _create_or_clear_dir remove_dir SphinxDocsBuilder test_clusters test_100k_array_3d_lmax test_100k_array_lmax cluster_groups hardcase1_params bad_convex_hull_params num_groups random_points hardcase1 basic_params building2 building1 params_lmax np_100K_array np_100K_array_3d group_size test_building1 test_building2 test_verify_hardcase1 test_verify_building1 test_verify_building2 test_hardcase1 test_clusters test_random_points load_csv load_npy verify_all get_point verify_points verify_valid_polygon verify_all_polygons_are_valid get_poly_coords basic_polylidar_verification subplots seed show plot_polygons_3d Polylidar3D plot_planes_3d scatter format asarray concatenate view_init extract_planes_and_polygons set_axes_equal generate_3d_plane time rotation_matrix triangles print dict apply_rotation MatrixDouble savefig set_zlim3d generate_test_points axis plot_triangles get_colored_planar_segments perf_counter plot_polygons get_estimated_lmax get_triangles_from_list plot_triangle_meshes flatten create_lines filter_planes_and_holes perf_counter info int min max ascontiguousarray asarray debug find_peaks_from_ico_charts perf_counter dict vertices get_pc_all_peaks get_arrow_normals get_normalized_bucket_counts_by_vertex fill_image MatX3d triangle_normals integrate down_sample_normals align_vectors get_image_peaks Polylidar3D range asarray perf_counter copy extract_planes_and_polygons_optimized info extract_tri_set print GaussianAccumulatorS2 extend MatrixDouble IcoCharts filter_and_create_open3d_polygons bilateral_filter_normals callback asarray triangle_normals open_3d_mesh_to_trimesh extend Vector3dVector flatten vertices append extract_all_dominant_planes isinstance draw_geometries translate create_coordinate_frame info construct_grid get_mesh_data_iterator translate create_coordinate_frame construct_grid run_test enumerate bilateral_filter_normals triangle_normals compute_triangle_normals open_3d_mesh_to_trimesh Vector3dVector compute_vertex_normals draw_geometries dict extract_mesh_planes make_uniform_grid_mesh intrinsic_matrix depth Polylidar3D counter_clock_wise create_open3d_pc points create_open_3d_mesh_from_tri_mesh ascontiguousarray perf_counter extract_planes_and_polygons triangles dict MatrixDouble filter_and_create_open3d_polygons extract_tri_mesh_from_float_depth MatrixDouble perf_counter MatrixFloat info get_realsense_data rotate get_frame_data range len load_csv paint_uniform_color compute_triangle_normals TriangleMesh Vector3dVector compute_vertex_normals Vector3iVector asarray triangles ascontiguousarray append flip enumerate create_open_3d_mesh seed rotation_matrix concatenate ascontiguousarray apply_rotation generate_3d_plane Vector3dVector PointCloud extract_mesh_planes estimate_normals max create_from_point_cloud_poisson create_open3d_pc vertices paint_uniform_color TriangleMesh generate_point_cloud DoubleVector create_from_point_cloud_ball_pivoting min remove_vertices_by_mask triangulate randn copy triplot Delaunator reshape get_np_buffer_ptr join list sorted read_triangle_mesh extend listdir int sqrt reshape convert_to_square_image copy tab20 MatrixUInt8 GaussianAccumulatorS2Beta create_meshes_cuda Polylidar3D create_open_3d_mesh_from_tri_mesh reshape extract_all_dominant_plane_normals set_vertex_classes IcoCharts extract_planes_and_polygons_from_classified_mesh reduce LineMesh exterior iconcat append array load uint8 create_color astype convert_to_square_image handle_shapes Path extract_polygons PointCloud append randn ones column_stack ones int change_class sqrt int viridis classify_point_cloud generate_planar_pointcloud set_xlabel set_ylabel set_zlabel set_labels show lines tight_layout set_linestyle lineplot twinx figure legend color_palette savefig int plot_df from_records rename split show scatter subplots axis plot_points append array copy concatenate dict stitch_letters ascontiguousarray set_yticks subplots_adjust read_alphabet set_xticks randint triangulate asarray triangles concatenate MatrixDouble Delaunator triangulate_and_combine plot_trisurf array MatrixInt asarray triangles ascontiguousarray MatrixDouble vertices create_tri_mesh_copy find_peaks_from_accumulator max get_bucket_normals ascontiguousarray get_normalized_bucket_counts int min deepcopy paint_uniform_color arange triangle_normals zeros_like copy Vector3iVector Vector3dVector zeros enumerate asarray triangles isinstance compute_triangle_normals split_triangles compute_vertex_normals vertex_colors zip range assign_some_vertex_colors paint_planes draw_geometries GaussianAccumulatorS2Beta dict extract_all_dominant_plane_normals PolygonPatch holes add_patch Polygon append plot_trisurf enumerate shell simplify set_xlabel buffer set_xlim get_ylim set_zlabel get_xlim PolygonPatch Polygon add_patch set_ylabel get_points set_ylim triangle_normals asarray vertices triangles reshape ascontiguousarray flip asarray Matrix3fRef debug float64 astype perf_counter float32 laplacian_K3 laplacian_K5 debug float64 astype float32 perf_counter laplacian_K5_cuda laplacian_K3_cuda asarray Matrix3fRef debug compute_normals_and_centroids perf_counter astype float32 asarray Matrix3fRef debug float64 astype perf_counter float32 bilateral_K3 float64 debug astype bilateral_K3_cuda perf_counter compute_normals_and_centroids_opc int asarray Matrix3fRef debug size float64 astype perf_counter float32 reshape dict laplacian_K3 bilateral_K3 laplacian_K5 int float64 bilateral_opc_cuda size astype float32 perf_counter reshape dict laplacian_K5_cuda laplacian_K3_cuda reshape MatrixDouble perf_counter extract_tri_mesh_from_organized_point_cloud show uint8 subplots reshape astype imshow asarray ascontiguousarray set_triangle_normals pick_valid_normals laplacian_then_bilateral_opc dict MatrixDouble create_mesh_from_organized_point_cloud set_triangle_normals pick_valid_normals laplacian_then_bilateral_opc_cuda dict MatrixDouble create_mesh_from_organized_point_cloud create_open_3d_mesh_from_tri_mesh create_meshes_cuda clear_count MatX3d assign_vertex_colors asarray triangle_normals integrate get_image_peaks triangles debug down_sample_normals GaussianAccumulatorS2 perf_counter get_normalized_bucket_counts dict vertices IcoCharts create_open_3d_mesh filter_planes_and_holes perf_counter asarray Polylidar3D filter_and_create_polygons perf_counter extend extract_planes_and_polygons extract_planes_and_polygons_optimized MatrixDouble dict vertices align_vectors range append extract_planes_and_polygons_optimized_classified asarray Polylidar3D filter_and_create_polygons perf_counter extend dict MatrixDouble vertices align_vectors range append str compute_triangle_normals read_triangle_mesh rotate as_matrix zip enumerate vertex_colors write_triangle_mesh column_stack sorted_alphanum get_file_list append inv range len get_rgbd_file_lists read_trajectory convert_trajectory read_pinhole_camera_intrinsic create_from_color_and_depth create_from_depth_image read_image paint_uniform_color compute_triangle_normals norm arccos array_equal cross dot atleast_1d norm LineSet cylinder_segments LineMesh Vector2iVector any Vector3dVector Vector2iVector Vector3dVector LineSet set_line make_grid append float array range remove_line add_line clear_polys rotate_func LineMesh exterior append array convert_to_pinhole_camera_parameters get_view_control convert_to_pinhole_camera_parameters convert_from_pinhole_camera_parameters get_view_control text range str asarray interiors Polygon add_patch shell exterior PolygonPatch plot_indices_text array enumerate debug cKDTree shape vstack append ones column_stack add_column asarray interiors Polygon perf_counter query exterior append array area create_kd_tree shell simplify list interiors geoms apply buffer recover_3d append format asarray debug perf_counter enumerate Polygon inv get_points exterior area create_kd_tree shell simplify list interiors geoms apply buffer recover_3d append format asarray debug perf_counter enumerate Polygon inv get_points exterior asarray cos dot sqrt sin Polygon sort get_poly_coords shell append set_xlim3d set_ylim3d set_zlim3d set_axes_radius mean array abs max randn zeros abs column_stack seed multivariate_normal random vstack array range sqrt pi append get_point range len append get_point enumerate len triangles get_triangles_from_list set_xlabel set_ylabel set_axes_equal set_zlabel holes plot enumerate plot_triangles PolygonPatch add_patch check_output strip hasattr escape match __doc__ import_from_str is_enum_class connect print rmtree exists makedirs print rmtree exists Polylidar3D MatrixDouble benchmark extract_planes_and_polygons Polylidar3D MatrixDouble benchmark extract_planes_and_polygons Polylidar3D MatrixDouble benchmark extract_planes_and_polygons dict generate_test_points get_estimated_lmax param randn verify_points verify_points verify_points verify_all verify_all verify_all verify_all verify_all verify_valid_polygon get_poly_coords shell Polygon Polylidar3D extract_planes_and_polygons verify_all_polygons_are_valid MatrixDouble basic_polylidar_verification | <h1 align="center"> Polylidar3D <br> </h1> <h4 align="center">Polygon Extraction from 2D Point Sets, Unorganized/Organized 3D Point Clouds, and Triangular Meshes</h4> <p align="center"> <a href="#key-features">Key Features</a> • <a href="#documentation-and-branches">Documentation</a> • <a href="#polylidar-use-cases">Use Cases</a> • <a href="#credits">Credits</a> • | 548 |
JeroenBertels/optimizingdice | ['medical image segmentation', 'semantic segmentation'] | ['Optimizing the Dice Score and Jaccard Index for Medical Image Segmentation: Theory & Practice'] | unet_generalized.py create_unet_like_model introduce_metadata Input abs list ones Model reverse append range format reversed stack zip enumerate input_shape print summary zeros array len | # Optimizing Dice score and Jaccard Index for Medical Image Segmentation This repository open sources the code and models belonging to the public datasets used in: - Optimizing the Dice Score and Jaccard Index for Medical Image Segmentation: Theory and Practice ``` Bertels, J., Eelbode, T., Berman, M., Vandermeulen, D., Maes, F., Bisschops, R., & Blaschko, M. B. (2019, October). Optimizing the Dice score and Jaccard index for medical image segmentation: Theory and practice. In International Conference on Medical Image Computing and Computer-Assisted Intervention (pp. 92-100). Springer, Cham. ``` Links: [Springer](https://link.springer.com/chapter/10.1007/978-3-030-32245-8_11) | [arXiv](https://arxiv.org/abs/1911.01685) - Optimization for Medical Image Segmentation: Theory and Practice when evaluating with Dice Score or Jaccard Index | 549 |
JetBrains-Research/kotlin-code-anomaly | ['anomaly detection'] | ['Using Large-Scale Anomaly Detection on Code to Improve Kotlin Compiler'] | feature_extraction/ngram/ast_set2matrix/lib/tree2vec/lib/Helpers/AstReader.py feature_extraction/ngram/ast_set2matrix/lib/tree2vec/lib/FeatureExtraction/Features/AllNGramsExtractor.py feature_extraction/contexts_to_code2vec.py feature_extraction/ngram/ast_set2matrix/lib/tree2vec/main.py feature_extraction/ngram/ast_set2matrix/main.py detection/ngram/anomaly_detection/anomaly_selection.py feature_extraction/ngram/ast_set2matrix/vectors2matrix.py feature_extraction/ngram/ast_set2matrix/sparse_transform.py detection/ngram/anomaly_detection/lib/DatasetLoader.py feature_extraction/ngram/ast_set2matrix/lib/tree2vec/lib/FeatureExtraction/Features/NGramsExtractor.py feature_extraction/ngram/extract_features.py repo-fetching/fetch_custom.py detection/autoencoder/autoencoder_model.py detection/ngram/anomaly_detection/main.py detection/autoencoder/main.py repo-fetching/fetch_from_list.py detection/ngram/anomaly_detection/lib/helpers/TimeLogger.py feature_extraction/filter_methods.py repo-fetching/fetch.py detection/metrics/analyzer/svm.py detection/ngram/anomaly_detection/autoencoding.py feature_extraction/ngram/ast_set2matrix/lib/tree2vec/lib/FeatureExtraction/Features/DepthExtractor.py feature_extraction/ngram/ast_set2matrix/collect_statistic.py detection/metrics/analyzer/methods.py feature_extraction/ngram/ast_set2matrix/trees2vectors.py feature_extraction/ngram/ast_set2matrix/lib/tree2vec/lib/FeatureExtraction/Features/CharsLengthExtractor.py detection/autoencoder/anomalies_search.py repo-fetching/clone-custom.py feature_extraction/ngram/ast_set2matrix/lib/helpers/FilesWalker.py detection/autoencoder/data_read.py detection/metrics/analyzer/common_io.py detection/metrics/analyzer/repo-graph.py feature_extraction/ngram/ast_set2matrix/lib/tree2vec/feature_extractor.py feature_extraction/ngram/code2tree/code_to_psi.py feature_extraction/ngram/ast_set2matrix/matrix2csv.py feature_extraction/ngram/ast_set2matrix/normalize.py detection/metrics/analyzer/clustering.py feature_extraction/ngram/ast_set2matrix/lib/helpers/TimeLogger.py feature_extraction/metrics/concat_csv.py detection/ngram/anomaly_detection/get_sample_number_by_filepath.py detection/ngram/anomaly_detection/lib/DatasetLoaderToDisk.py feature_extraction/ngram/ast_set2matrix/lib/tree2vec/lib/FeatureExtraction/FeatureExtractor.py detection/ngram/anomaly_detection/lib/DatasetLoaderFromDisk.py detection/metrics/analyzer/results-analysis.py detection/metrics/analyzer/plots3d.py feature_extraction/ngram/code2tree/parse_psi.py detection/ngram/anomaly_detection/lib/Autoencoder.py calculate_differences calc_mean_std search_anomalies_by_threshold search_anomalies conv_name train AutoencoderModel read_raw_data_no_names raw_data_no_names_to_batches raw_data_with_names_to_batches get_pool TrainValDataSet read_raw_data_with_names batches_to_torch vector_str_to_float read_torch_batches train_model find_anomalies run_kmeans print_plots read_data parse_timediff log signature_to_url_and_fname ascii_read dbscan_anomaly_selection binary_read anomaly_selection deviation_anomaly_selection binary_write ascii_write csv_shape autoencoding Autoencoder AutoencoderModel DatasetLoader DatasetLoaderFromDisk DatasetLoaderToDisk TimeLogger DataSet merge read_contexts_dirs get_method_project ContextsWriter tts_projects DataSetSelector tts_methods concat_csvs extract_features select_bc_features collect_statistic matrix2csv_streaming matrix2csv normalize sparse_transform trees2vectors collect_features_statistic create_file_if_needed vectors2matrix FilesWalker TimeLogger feature_extractor FeatureExtractor AllNGramsExtractor CharsLengthExtractor DepthExtractor NGramsNumberExtractor AstReader path_to_number mask_package group_iter unmask_words SourceChecker mask_words number_to_path folder_to_psi psi_to_json get_indent get_node_type to_old_style git seek_key_points search_repos search git clone_all git git detach numpy read_torch_batches split flatten logical_or any numpy read_torch_batches calc_mean_std search_anomalies_by_threshold print str time model print backward zero_grad Adam parameters numpy save append step mse_loss range get_train_val Pool append next islice range list islice iter read_raw_data_with_names batches_to_torch raw_data_with_names_to_batches load int data_sources features_number parent epochs_passed TrainValDataSet save_pref lr mkdir n_epochs encoding_dim_percent train AutoencoderModel load list stds_threshold batch_size save_path search_anomalies zip model_load_path arange KMeans clf xticks yticks shape imshow scatter title ylim savefig meshgrid range predict asarray plot xlim fit_predict reshape cluster_centers_ to_csv figure genfromtxt tight_layout savefig figure draw_subplot print write split int reshape TimeLogger finish array len TimeLogger finish TimeLogger finish fit_predict mean TimeLogger finish append std enumerate ascii_read dbscan_anomaly_selection binary_read TimeLogger finish deviation_anomaly_selection pack size chunks flatten TimeLogger finish append load ascii_write sorted binary_write calc_differences csv_shape print_model_summary Autoencoder TimeLogger finish ceil enumerate fit name int glob split dataset_name print islice set projects_number iter out_dir test_size dataset_name print train_size islice set val_size iter out_dir glob print dict keys enumerate trees2vectors str matrix2csv_streaming vectors2matrix matrix2csv folder_to_psi sparse_transform mkdir items read sorted makedirs close len TimeLogger loads finish split open TimeLogger finish TimeLogger walk finish makedirs TimeLogger walk finish makedirs TimeLogger walk finish makedirs close TimeLogger dirname finish walk makedirs extract read FeatureExtractor fullmatch split mask_words with_suffix sum parts unmask_words append next range iter str with_suffix glob path_to_number relative_to print SourceChecker group_iter copy number_to_path rmtree filter mkdir append exists run strip all startswith any isinstance len json print dict sleep __format__ first search range len __format__ search append print replace print strptime git listdir exists | JetBrains-Research/kotlin-code-anomaly | 550 |
JetBrains-Research/pubtrends-review | ['extractive summarization'] | ['Automatic generation of reviews of scientific papers'] | review/config.py review/utils.py review/text.py review/model.py load_model Classifier Summarizer preprocess_text split_text convert_token_to_id text_to_data get_dec_lr get_gradnorm get_enc_lr setup_single_gpu expand_posembs_ifneed Summarizer info froze_backbone unfroze_head convert_tokens_to_ids max extend len append preprocess_text split_text max device to info | [](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub) # pubtrends-review This is a source code for the paper: ["Automatic generation of reviews of scientific paper"](https://arxiv.org/abs/2010.04147).\ Was accepted as a full paper at [International Conference on Machine Learning and Applications (ICMLA) 2019](https://ieeexplore.ieee.org/document/9356351). Refer to [review/README.md](review/README.md) for instruction on dataset creation and model training. # Authors See [AUTHORS.md](AUTHORS.md) for a list of authors and contributors. # PubTrends * PubTrends is available as web service at [https://pubtrends.net](https://pubtrends.net) | 551 |
JetsGame/CycleJet | ['data augmentation'] | ['Lund jet images from generative and cycle-consistent adversarial networks'] | scripts/plotting/plot_hyperopt.py src/cyclejet/scripts/run.py src/cyclejet/tools.py scripts/plotting/plot_model.py setup.py src/cyclejet/cyclegan.py src/cyclejet/instancenormalization.py build_dataframe plot_pairs plot_scans plot_correlations main main plot_event CycleGAN InstanceNormalization plot_model loss_calc load_yaml main build_and_train_model run_hyperparameter_scan DataFrame keys enumerate get set_xscale subplots print set_yscale set_xlabel set_xlim scatter set_ylabel savefig violinplot stripplot keys enumerate len print savefig figure corr heatmap print savefig figure pairplot build_dataframe plot_pairs plot_scans print plot_correlations pprint append load_yaml load CycleGAN savefull plot_model strip predict plot_event imagesA inverse avg save isfile array imagesB average norm print time format print space_eval MongoTrials Trials pprint fmin items eval clear_session print CycleGAN predict loss_calc imagesA inverse train array imagesB ArgumentParser run_hyperparameter_scan runcard copyfile hyperopt parse_args build_and_train_model mkdir add_argument force output rmtree cluster | [](https://doi.org/10.5281/zenodo.3384918) CycleJet ======== This repository contains the code and results presented in [arXiv:1909.01359](https://arxiv.org/abs/1909.01359). ## About CycleJet is a framework to create mappings between different categories of jets using CycleGANs. The model architecture is adapted from https://github.com/eriklindernoren/Keras-GAN/tree/master/cyclegan. ## Install CycleJet CycleJet is tested and supported on 64-bit systems running Linux. Install CycleJet with Python's pip package manager: | 552 |
JetsGame/gLund | ['data augmentation'] | ['Lund jet images from generative and cycle-consistent adversarial networks'] | scripts/plotting/plot_hyperopt.py src/glund/models/dcgan.py src/glund/model.py src/glund/read_data.py src/glund/plotting.py src/glund/models/vae.py src/glund/models/aae.py src/glund/models/autoencoder.py scripts/plotting/plot_observables.py src/glund/JetTree.py src/glund/models/bgan.py src/glund/preprocess.py src/glund/models/wgan_gp.py src/glund/scripts/glund_generate.py scripts/testing/glund_test_encoding.py src/glund/tools.py scripts/testing/glund_plot_samples.py src/glund/models/lsgan.py src/glund/models/optimizer.py src/glund/models/wgan.py scripts/plotting/plot_slices.py src/glund/models/gan.py setup.py src/glund/scripts/glund.py build_dataframe plot_pairs plot_scans plot_correlations main main plot_sdmult n_sd plot_slice_kt plot_activation plot_slice_delta plot_slice_kt_noratio plot_slice_delta_noratio main main main SoftDropMult JetTree LundCoordinates LundImage load_model_and_preprocessor build_model plot_lund_with_ref plot_lund Averager load_preprocessor PreprocessorPCA Preprocessor PreprocessorAE build_preprocessor PreprocessorZCA Reader Image Jets zca_whiten loss_calc_raw loss_calc ZCA AdversarialAutoencoder Autoencoder BGAN DCGAN GAN LSGAN MinibatchDiscrimination build_optimizer sampling VAE WGAN WGANGP RandomWeightedAverage load_yaml main build_and_train_model run_hyperparameter_scan main plot_events plot_events_debug DataFrame keys enumerate get set_xscale subplots print set_yscale set_xlabel set_xlim scatter set_ylabel savefig violinplot stripplot keys enumerate len print savefig figure corr heatmap print savefig figure pairplot build_dataframe plot_pairs plot_scans print plot_correlations pprint append uniform exp range subplots arange grid linspace set_xlabel savefig legend append interp2d range set_xlim close keys load n_sd text average hist array set_ylim len data li_gen JetTree sdmult plot_sdmult len label_data_pairs average SoftDropMult nev LundImage zeros range enumerate values Jets load subplots arange set_xlabel set_xlim grid close hist savefig legend append sum keys range set_ylim len subplots grid axis linspace xticks yticks exp append_axes make_axes_locatable set_xlabel savefig legend sum plot close keys load set_xscale set_axisbelow text subplots_adjust average set_ylabel array subplots grid axis linspace xticks yticks exp append_axes make_axes_locatable set_yscale set_xlabel savefig legend sum plot close keys load set_xscale set_axisbelow text subplots_adjust average set_ylabel array linspace xticks exp ylabel ylim savefig legend sum semilogx close xlim keys load xlabel text subplots_adjust average figure array linspace xticks yticks exp ylabel ylim savefig legend sum close loglog xlim keys load xlabel text subplots_adjust average figure array npx plot_slice_kt plot_slice_kt_noratio plot_activation plot_slice_delta plot_slice_delta_noratio plot_lund_with_ref plot_lund reference autoencoder subplots set_text axis inverse pca show ndenumerate PreprocessorPCA shape imshow PreprocessorAE expand_dims PreprocessorZCA zca plot astype close choice Preprocessor norm mnist reshape fit load_data transform epochs LSGAN WGAN print WGANGP GAN VAE BGAN DCGAN AdversarialAutoencoder length load load_preprocessor build_model load load JetTree values reshape astype float32 load_data zeros enumerate LundImage Jets print Preprocessor PreprocessorPCA PreprocessorZCA load build_preprocessor sum var norm print average zeros abs range len norm print average zeros ssim abs range T dot eigh sqrt diag Adagrad isinstance Adam RMSprop SGD random_normal time format print space_eval MongoTrials Trials pprint fmin items eval clear_session loss_calc_raw inverse LundImage values Averager generate expand_dims JetTree build_model astype Jets enumerate unmask print reshape float32 load_data transform zeros train build_preprocessor fit strip ArgumentParser run_hyperparameter_scan save runcard copyfile hyperopt parse_args load_yaml build_and_train_model mkdir add_argument plot_samples force output rmtree cluster subplots axis inverse values LundImage set_title transpose imshow savefig expand_dims range JetTree astype Jets enumerate unmask reshape float32 average load_data transform zeros len unmask JetTree values reshape inverse transform zeros enumerate LundImage Jets Averager debugplots load_model_and_preprocessor ngen plot_events generate plot_events_debug | [](https://doi.org/10.5281/zenodo.3384920) gLund ====== This repository contains the code and results presented in [arXiv:1909.01359](https://arxiv.org/abs/1909.01359). ## About gLund is a framework using the Lund jet plane to construct generative models for jet substructure. ## Install gLund gLund is tested and supported on 64-bit systems running Linux. Install gLund with Python's pip package manager: | 553 |
Jhy1993/HAN | ['network embedding'] | ['HAHE: Hierarchical Attentive Heterogeneous Information Network Embedding'] | utils/process.py models/gat.py utils/process_ppi.py data/DBLP_four_area/hin2kg.py utils/layers.py data/DBLP_four_area/modify_term.py data/exp.py models/__init__.py jhyexp.py preprocess_dblp.py models/base_gattn.py data/DBLP_four_area/untitled0.py ex_acm3025.py sample_mask load_data_dblp my_Kmeans my_KNN split_idx my_Kmeans BaseGAttN HeteGAT_multi HeteGAT HeteGAT_no_coef GAT SimpleAttLayer attn_head attn_head_const_1 sp_attn_head preprocess_features normalize_adj sparse_to_tuple adj_to_bias sample_mask parse_index_file load_data preprocess_adj standardize_data find_split dfs_split test run_dfs process_p2p zeros format print sample_mask shape zeros loadmat int sum permutation format print squeeze len KNeighborsClassifier append f1_score argmax array range predict fit sum format normalized_mutual_info_score print KMeans squeeze adjusted_rand_score len append argmax array range predict fit int format print append argmax range len labels_ silhouette_score value isinstance Variable concat transpose reduce_sum softmax expand_dims random_normal tensordot matmul shape eye empty range append int strip open format lil_matrix from_dict_of_lists tolil tuple sort min tolist sample_mask print adjacency_matrix shape parse_index_file vstack zeros max range len to_tuple range isinstance len mean todense std diags flatten dot sum array diags flatten coo_matrix sum array normalize_adj eye full range run_dfs range print range max count todense find_split tolist set_trace len identity shape append range node_link_graph test adjacency_matrix empty enumerate load items int dfs_split print tolil argwhere transform zeros StandardScaler array fit | # Paper https://github.com/Jhy1993/Representation-Learning-on-Heterogeneous-Graph # HAN The source code of Heterogeneous Graph Attention Network (WWW-2019). The source code is based on [GAT](https://github.com/PetarV-/GAT) # Reference If you make advantage of the HAN model or use the datasets released in our paper, please cite the following in your manuscript: ``` @article{han2019, title={Heterogeneous Graph Attention Network}, | 554 |
JiahuiSun/Exp-Graph-WaveNet | ['traffic prediction'] | ['Graph WaveNet for Deep Spatial-Temporal Graph Modeling'] | preutil.py train.py generate_training_data.py test.py original_train.py util.py engine.py model.py trainer main generate_train_val_test generate_graph_seq2seq_io_data seq_gen linear gcn nconv gwnet main load_pickle calculate_scaled_laplacian calculate_normalized_laplacian load_adj masked_mae metric masked_rmse asym_adj DataLoader masked_mape sym_adj load_dataset StandardScaler masked_mse main main load_pickle calculate_scaled_laplacian calculate_normalized_laplacian load_adj masked_mae metric masked_rmse MAE asym_adj DataLoader RMSE masked_mape sym_adj Logger load_dataset StandardScaler masked_mse MAPE concatenate print abs transpose min astype range shape stack append zeros expand_dims type max timedelta64 values zeros range reshape int join concatenate print transpose interval read_hdf astype shape traffic_df_filename output_dir expand_dims savez_compressed timedelta64 values seq_gen print generate_train_val_test data in_dim batch_size gcn_bool adjdata weight_decay save device inverse_transform round nhid seq_length str addaptadj load_adj transpose argmin squeeze metric load_state_dict load_dataset append adjtype to range cat state_dict format randomadj dropout trainer get_iterator shuffle mean eval expid num_nodes train enumerate load time learning_rate aptonly epochs diags flatten coo_matrix sum array flatten coo_matrix diags diags tocoo flatten coo_matrix eye sum array calculate_normalized_laplacian csr_matrix reduce identity shape eigsh print load_pickle shape load join DataLoader transform StandardScaler isnan float zeros_like where zeros_like where isnan float abs zeros_like where isnan float abs item gwnet nodevec2 numpy DataFrame max heatmap savefig relu softmax checkpoint to_csv nodevec1 mm seed manual_seed_all param_groups manual_seed write array add_scalar values MAPE RMSE MAE | # My experiment notes ## 生成实验数据 - generate_training_data.py,代码会将数据格式变成(B, T, V, F)的四维tensor,放到final data下面 - n_his,用多少个过去的点预测 - n_pred,预测未来多少个点 ## 跑实验 - train.py,实验结果,包括log和图像,都在result下面 # Graph WaveNet for Deep Spatial-Temporal Graph Modeling This is the original pytorch implementation of Graph WaveNet in the following paper: [Graph WaveNet for Deep Spatial-Temporal Graph Modeling, IJCAI 2019] (https://arxiv.org/abs/1906.00121). | 555 |
JialongJiang/Active_learning_spin | ['active learning'] | ['Active Learning of Spin Network Models'] | Figures/Fig1/plot_fig1.py Figures/SI_fish_spectrum/spectrum_convergence.py Figures/SI_three_node/three_node_optimal.py Figures/SI_pertJ/plot_pertj.py Figures/SI_three_node/all_three_node.py Figures/SI_net_scaling/net_sample_size.py Figures/SI_fish_scaling/fish_with_sz.py Figures/plot_network.py Figures/Fig2/plog_fig2.py Figures/Fig3/plot_fig3.py plot_network move_axis plot_wline add_xtick process_axis add_ytick put_network average_abs find_last plot_traj plot_traj plot_traj plot_eig large_axis get_position set_position set_aspect spring_layout circular_layout draw_networkx_nodes set_axis_off from_numpy_array draw_networkx_labels draw_networkx_edges array range size range semilogy set_aspect set_yticks set_xticks set_xticks set_xticklabels set_yticklabels set_yticks add_axes plot_network mean std plot errorbar shape nonzero zeros max range sum expand_dims abs get_position set_position set_aspect arange set_xticklabels set_yticklabels set_yticks grid large_axis imshow set_xticks set_ylabel round move_axis | # Active learning of spin network models Code and Figures for "Active learning of spin network models" For figures, please add ".." to the sys.path so that "plot_network" can be properly loaded. For code, please add "util_fun" to the search path of MATLAB. | 556 |
JiananLi2016/LayoutGAN-Tensorflow | ['scene generation'] | ['LayoutGAN: Generating Graphic Layouts with Wireframe Discriminator'] | utils.py main.py ops.py model.py main lrelu relation_nonLocal batch_norm linear conv2d layout_bbox layout_point show_all_variables save_npy_img image_manifold_size merge checkpoint_dir sample_dir pprint __flags ConfigProto makedirs as_list trainable_variables analyze_vars argmax fromarray uint8 concatenate reshape squeeze convert astype extend where flatten putpalette zeros sum array range merge zeros enumerate ceil int floor sqrt | ## LayoutGAN in Tensorflow Official Tensorflow implementation of "LayoutGAN: Generating Graphic Layouts with Wireframe Discriminators" publishsed in ICLR 2019: https://openreview.net/forum?id=HJxB5sRcFQ. Some codes are implemented from https://github.com/carpedm20/DCGAN-tensorflow. This project is licensed under the terms of the “Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International” license. ## Online Demo Animation videos to demonstrate the movements of all the graphic elements. - MNIST <img src="demo/MNIST.gif" width="400" height="400"> - Tangram | 557 |
Jianbo-Lab/BAPP | ['adversarial attack'] | ['HopSkipJumpAttack: A Query-Efficient Decision-Based Attack'] | build_model.py hsja.py load_data.py main.py resnet.py construct_original_network ImageModel initialize select_delta compute_distance geometric_progression_for_stepsize hsja decision_function binary_search_batch clip_image project approximate_gradient split_data ImageData attack construct_model_and_data create_resnet_generator lr_schedule_sgd lr_schedule_cifar100 resnet_v2 lr_schedule resnet_layer append gradients get_session print concat SGD resnet_v2 expand_dims range compile arange sign geometric_progression_for_stepsize decision_function logspace clip_image argmax initialize compute_distance binary_search_batch expand_dims approximate_gradient predict format sqrt int select_delta print reshape min len predict clip_image list norm randn reshape mean sqrt uniform decision_function clip_image sum len clip_image reshape len minimum ones argmin where decision_function zeros array project len uniform decision_function sqrt sqrt seed format permutation concatenate print mean append argmax range predict len seed dataset_name ImageData ImageModel split_data model_name argmax array format construct_model_and_data print concatenate hsja constraint argmax imsave enumerate attack_type print print print Conv2D conv int add Model Input range resnet_layer ImageDataGenerator fit | # HopSkipJumpAttack (previously named as Boundary Attack++) Code for [HopSkipJumpAttack: A Query-Efficient Decision-Based Adversarial Attack](https://arxiv.org/abs/1904.02144) by Jianbo Chen, Michael I. Jordan, Martin J. Wainwright. ## Clarification If you are using the code to compare HSJA with other algorithms, you will need to **set your own counter for the number of model evaluations**. "max_num_evals" in hsja.py is the maximum number of evaluations for estimating gradient (for each iteration), **not the total number of model evaluations**. To increase the total number of model evaluations, set a larger num_iterations. ## Dependencies The code for HopSkipJumpAttack runs with Python and requires Tensorflow of version 1.2.1 or higher. Please `pip install` the following packages: - `numpy` - `tensorflow` | 558 |
Jianbo-Lab/HSJA | ['adversarial attack'] | ['HopSkipJumpAttack: A Query-Efficient Decision-Based Attack'] | build_model.py hsja.py load_data.py main.py resnet.py construct_original_network ImageModel initialize select_delta compute_distance geometric_progression_for_stepsize hsja decision_function binary_search_batch clip_image project approximate_gradient split_data ImageData attack construct_model_and_data create_resnet_generator lr_schedule_sgd lr_schedule_cifar100 resnet_v2 lr_schedule resnet_layer append gradients get_session print concat SGD resnet_v2 expand_dims range compile arange sign geometric_progression_for_stepsize decision_function logspace clip_image argmax initialize compute_distance binary_search_batch expand_dims approximate_gradient predict format sqrt int select_delta print reshape min len predict clip_image list norm randn reshape mean sqrt uniform decision_function clip_image sum len clip_image reshape len minimum ones argmin where decision_function zeros array project len uniform decision_function sqrt sqrt seed format permutation concatenate print mean append argmax range predict len seed dataset_name ImageData ImageModel split_data model_name argmax array format construct_model_and_data print concatenate hsja constraint argmax imsave enumerate attack_type print print print Conv2D conv int add Model Input range resnet_layer ImageDataGenerator fit | # HopSkipJumpAttack (previously named as Boundary Attack++) Code for [HopSkipJumpAttack: A Query-Efficient Decision-Based Adversarial Attack](https://arxiv.org/abs/1904.02144) by Jianbo Chen, Michael I. Jordan, Martin J. Wainwright. ## Clarification If you are using the code to compare HSJA with other algorithms, you will need to **set your own counter for the number of model evaluations**. "max_num_evals" in hsja.py is the maximum number of evaluations for estimating gradient (for each iteration), **not the total number of model evaluations**. To increase the total number of model evaluations, set a larger num_iterations. ## Dependencies The code for HopSkipJumpAttack runs with Python and requires Tensorflow of version 1.2.1 or higher. Please `pip install` the following packages: - `numpy` - `tensorflow` | 559 |
JiapengL/multi_ling_search | ['information retrieval'] | ['Cross-Lingual Document Retrieval with Smooth Learning'] | src/dssm_model.py src/dt_processor.py train_crossentropy.py train_driver.py data_prep.py preprocess.py src/utils.py src/evaluator.py src/train_function.py create_doc_text_dict divide_queries sample_neg create_dataset main create_query_text_dict create_query_doc_dict pad_convert numerize DataProcessor run run run LSTM CrossEntropy DeepDSSM SimpleDSSM DataProcessor ndcg_at_k prediction_accuracy map_mrr dcg_at_k precision_at_k prediction_matrix predict_cross predict train_model eval_model test_model train_model_result test_cross_model train_ul_model eval_cross_model pad_convert numerize defaultdict dict dict sample int len set sample list tqdm set seed format print query_path create_doc_text_dict add_argument rel_path train_negsample divide_queries sample_neg mkdir ArgumentParser create_dataset doc_path parse_args create_query_text_dict test_negsample create_query_doc_dict len ones max len numerize load_embeddings device seed str SimpleDSSM generate_train_batch train_batchsize q_extn_embedding deep to DataProcessor build_vocab use_gpu close manual_seed d_extn_embedding time DeepDSSM print File load_vocab create_vocabulary is_shuffle create_dataset len list StepLR Adam epochs test_cross_model VAT_Simple range format generate_data_index eval_cross_model train_model parameters vat model clip_grad_norm_ zero_grad theta lstm clip_grad precision_at_k append generate_eval_index cat ndcg_at_k predict Adv_Deep eval use_adv item Adv_Simple backward AdamW generate_dev_batch cal_loss accuracy LSTM train step max indices mean append range len append range indices len dcg_at_k append tensor range len list squeeze range len zeros sum range len sum index indices append next range len use_gpu numerize model backward print clip_grad_norm_ zero_grad clip_grad cal_loss parameters train_batchsize is_shuffle item append train step generate_batch use_gpu numerize generate_ul_batch model backward print clip_grad_norm_ zero_grad clip_grad is_shuffle cal_loss parameters train_batchsize item IntTensor append train step generate_batch use_gpu ndcg_at_k format numerize model print map_mrr cal_loss train_batchsize eval mean precision_at_k item append cat generate_batch use_gpu ndcg_at_k format numerize model print map_mrr cal_loss train_batchsize eval mean precision_at_k item append cat generate_batch use_gpu ndcg_at_k format numerize model print map_mrr cal_loss train_batchsize eval mean precision_at_k item append cat numerize model theta list prediction_accuracy train_batchsize append to sum range generate_batch predict cat use_gpu format mean eval item predict_cross print cal_loss use_cross numerize model theta list prediction_accuracy train_batchsize append to sum range generate_batch predict cat use_gpu format mean eval item predict_cross print cal_loss use_cross | # Cross-Lingual Document Retrieval with Smooth Learning A smooth learning framework for Cross-Lingual Document Retrieval. More details can be found at https://arxiv.org/abs/2011.00701 | 560 |
Jiawei955/detection-of-physical-adversarial-attack | ['adversarial attack'] | ['AdvHat: Real-world adversarial attack on ArcFace Face ID system'] | Codes/alignment.py Codes/resnet.py Codes/defense.py Codes/demo.py Codes/attack.py Codes/dumping.py align/detect_face.py Codes/cos_tf.py nms bulk_detect_face ONet Network imresample bbreg detect_face_force detect_face pad create_mtcnn rerec RNet layer generateBoundingBox PNet main to_rgb preprocess parse_arguments main prep parse_arguments main prep parse_arguments load_net l1_distance noisy detect main get_natural_acc main preprocess parse_arguments main parse_arguments resnet_face18 IRBlock ResNet resnet50 SEBlock ResNetFace Bottleneck resnet152 conv3x3 resnet34 resnet18 BasicBlock resnet101 realpath split where vstack pnet nms transpose pad ceil append expand_dims range imresample hstack astype copy bbreg tile generateBoundingBox empty zeros int rnet onet int32 rerec amin len nms transpose imresample hstack rnet copy where bbreg astype pad onet int32 tile rerec zeros range where vstack pnet nms transpose pad ceil append imresample range hstack astype copy bbreg tile generateBoundingBox power empty zeros enumerate minimum int rnet onet int32 rerec amin len reshape transpose vstack transpose hstack where fix flipud vstack empty argsort maximum zeros_like minimum ones astype where int32 expand_dims transpose maximum tile resize shape empty warpAffine SimilarityTransform astype float32 estimate array vstack output_dir input_dir argmax sorted to_rgb append imread sum imsave detect_face preprocess mkdir power listdir join T print min tqdm makedirs add_argument ArgumentParser arange gradients gen_random sign rescale init_logo init_face image clip_by_value abs Session clip run str list ones multiply transpose len placeholder reduce_sum Imgen gen_fixed savefig stn expand_dims range get_tensor_by_name TVloss LR plot hstack mean time prep now float32 anchor_face projector zeros import_graph_def fit face1 face2 load items resnet_face18 list OrderedDict load_state_dict join l1_distance asarray mean eval transform float listdir range append open join l1_distance asarray mean eval unsqueeze transform float listdir range append open load resnet_face18 Compose DataParallel load_state_dict get_natural_acc VideoCapture model FONT_HERSHEY_SIMPLEX max round release destroyAllWindows waitKey imshow centroids set flip read reshape putText dot rectangle initializer save forward open mx DataBatch ceil bind close sqrt batch set_params int Module load_checkpoint write array asnumpy ImageIter load_url ResNet load_state_dict load_url ResNet load_state_dict load_url ResNet load_state_dict load_url ResNet load_state_dict load_url ResNet load_state_dict ResNetFace | # Detection of Physical Adversarial Attacks Goal: To create a detection algorithm against physical adversarial attack with adjustable false positive rate. Method: The base of detection mechanism is based upon the lack of robustness of adversarial examples. ### Directory: ##### 1. Data Folder: Contains 4 folders. (Only 1 person's images uploaded on github, if need for more datasets contact the authors) Images_FINAL: Original Data Images_Adv_FINAL: Data with sticker Images_Aligned_FINAL: Aligned Data (600 * 600) Images_Adv_Aligned_FINAL: Aligned Adversarial Data (600 * 600) ##### 2. Models: Load 2 models | 561 |
Jiaxuan-Li/MGU-Net | ['medical image segmentation'] | ['Multi-scale GCN-assisted two-stage network for joint segmentation of retinal layers and disc in peripapillary OCT images'] | data/seg_dataset.py models/nets/OSNet.py utils/logger.py utils/utils.py models/utils/init_weights.py models/nets/MGUNet.py utils/vis.py models/utils/utils.py models/nets/TSNet.py main_ts.py data/seg_transforms.py models/__init__.py models/net_builder.py utils/loss.py main_os.py models/utils/__init__.py train_seg eval_seg test_seg eval main parse_args train train_seg eval_seg test_seg eval main parse_args train segList get_list_dir Label_Transform Compose ToTensor Normalize net_builder MGR_Module MGUNet_2 MGUNet_1 OSMGUNet TSMGUNet weights_init_orthogonal weights_init_normal weights_init_xavier init_weights weights_init_kaiming GloRe_Unit img2df UnetUp UnetUp4 UnetConv feature_fusion GCN Basconv Logger loss_builder1 loss_builder2 DiceLoss compute_single_avg_score save_model compute_dice AverageMeter compute_avg_score adjust_learning_rate compute_pa save_dice_single draw_img gray2rgbimage vis_result data model zero_grad numpy max cuda compute_dice update compute_single_avg_score format size info enumerate deepcopy time backward print AverageMeter step len update time format print AverageMeter upper info append enumerate len save_model loss_builder2 adjust_learning_rate Logger max cuda name Adam append range format net_builder eval lr info join items print parameters train epochs set_names makedirs load join format print name net_builder eval Logger load_state_dict model_path cuda set_names load join print name net_builder eval Logger load_state_dict model_path cuda set_names add_argument ArgumentParser segList test_seg DataLoader __version__ open str name data_dir parse_args Compose lr Normalize manual_seed load join train_seg print extend t makedirs loss_builder1 append join listdir OSMGUNet TSMGUNet data normal_ __name__ constant_ data normal_ xavier_normal_ __name__ constant_ data normal_ kaiming_normal_ __name__ constant_ data orthogonal_ normal_ __name__ constant_ apply log_softmax cuda cat NLLLoss DiceLoss NLLLoss DiceLoss param_groups epochs lr step copyfile join save copyfile flatten float sum range flatten float sum range range join gray2rgbimage imwrite draw_img astype putText gray2rgbimage FONT_HERSHEY_SIMPLEX addWeighted ones shape astype | # MGU-Net Multi-Scale GCN-Assisted Two-Stage Network for Joint Segmentation of Retinal Layers and Disc in Peripapillary OCT Images The codes are implemented in PyTorch and trained on NVIDIA Tesla V100 GPUs. ## Introduction An accurate and automated tissue segmentation algorithm for retinal optical coherence tomography (OCT) images is crucial for the diagnosis of glaucoma. However, due to the presence of the optic disc, the anatomical structure of the peripapillary region of the retina is complicated and is challenging for segmentation. To address this issue, we develop a novel graph convolutional network (GCN)-assisted two-stage framework to simultaneously label the nine retinal layers and the optic disc. Specifically, a multi-scale global reasoning module is inserted between the encoder and decoder of a U-shape neural network to exploit anatomical prior knowledge and perform spatial reasoning. We conduct experiments on human peripapillary retinal OCT images. We also provide public access to the [collected dataset](http://www.yuyeling.com/project/mgu-net/), which might contribute to the research in the field of biomedical image processing. The Dice score of the proposed segmentation network is 0.820 ± 0.001 and the pixel accuracy is 0.830 ± 0.002, both of which outperform those from other state-of-the-art techniques. <div align=center><img width="750" src="https://github.com/Jiaxuan-Li/MGU-Net/blob/main/figs/fig2.png"/></div> ## Experiments ### Dataset 1. Collected dataset: Download our [collected dataset](http://www.yuyeling.com/project/mgu-net/). <br />The labeled images are grayscale images. Labels and corresponding pixel values are as follows: | 562 |
JieyuZ2/NEP | ['network embedding'] | ['Neural Embedding Propagation on Heterogeneous Networks'] | nep/logger.py nep/dataset.py nep/model.py nep/utils.py nep/main.py Dataset EvaDataset myLogger evaluate_embedding parse_args main MLPClassifier MLP LabelEncoder ModuleNet ModuleBlock load_graph_new plot load_train_test_node load_node join_int load_graph negSampleBatch load_train_data makeDist load_groups load_feature print_config save_checkpoint write_train_data exec_time load_label next_batch VoseAlias setFormatter basicConfig getLogger print addHandler StreamHandler Formatter info model zero_grad DataLoader cuda Adam append range predict format concatenate EvaDataset num_epoch_eval flush enumerate backward print reshape parameters step std add_argument ArgumentParser num_class suffix train_nodes log_level model id_to_type myLogger zero_grad LabelEncoder num_epoch print_config save_checkpoint free_memory setLevel path_max_length cuda open save_pattern pattern_path len num_pattern Adam strftime num_data_per_epoch prefix test_nodes append init_pattern save_embedding state_dict evaluate_embedding range dump format num_link_type output_path timedelta return_embedding id_to_name info num_node ModuleNet join time num_link next_batch target_node_type log_dir backward print copy_embedding parameters filter num_walkers_for_pattern load_pattern train step Dataset collect_data early_stop makedirs items str rstrip format print info vars join format endswith print system warning save walk items keys append array enumerate items sorted defaultdict shuffle index set append len defaultdict append set permutation arange len print load exit array close savefig figure range len defaultdict set power defaultdict items sample_n | ## Implementation of *NEP*, ICDM 2019. Please cite the following work if you find the code useful. ``` @inproceedings{yang2019neural, Author = {Yang, Carl and Zhang, Jieyu and Han, Jiawei}, Booktitle = {ICDM}, Title = {Neural embedding propagation on heterogeneous networks}, Year = {2019} } ``` | 563 |
JimmyDoan1309/Neural-Style-Transfer | ['style transfer'] | ['A Neural Algorithm of Artistic Style'] | utils.py download_img color_transfer BytesIO asarray ANTIALIAS resize content open max reshape lab2rgb mean shape rgb2lab std clip | # Neural Style Transfer This is a implementation of Neural Style Transfer proposed by Leon A. Gatys (https://arxiv.org/abs/1508.06576) Using Keras and Eager execution Some example    | 564 |
JindongJiang/RedNet | ['semantic segmentation'] | ['RedNet: Residual Encoder-Decoder Network for indoor RGB-D Semantic Segmentation'] | utils/utils.py RedNet_inference.py RedNet_data.py RedNet_model.py RedNet_train.py RandomFlip ToTensor SUNRGBD RandomHSV scaleNorm RandomCrop Normalize RandomScale inference TransBasicBlock conv3x3 RedNet Bottleneck train load_ckpt CrossEntropyLoss2d color_label print_log save_ckpt unsqueeze_ RedNet load_ckpt model last_ckpt float transpose output rgb eval permute resize depth to imread imsave data model LambdaLR zero_grad SGD print_log DataLoader DataParallel numpy CEL_weighted SUNRGBD epochs to save_ckpt range SummaryWriter last_ckpt add_histogram color_label start_epoch checkpoint add_image enumerate int RedNet summary_dir time load_ckpt make_grid backward print CrossEntropyLoss2d add_scalar named_parameters parameters ckpt_dir step len squeeze astype float32 vectorize numpy print format data print join format save load format print load_state_dict isfile _exit | # RedNet This repository contains the official implementation of the RedNet (Residual Encoder-Decoder Architecture). It turns out that the simple encoder-decoder structure is powerful when combined with residual learning. For further details of the network, please refer to our article [RedNet: Residual Encoder-Decoder Network for indoor RGB-D Semantic Segmentation](http://bit.ly/2MrIT78).  <!-- <img src="overall_structure.png" width=80% title="Overall structure of RedNet" /> --> ## Dependencies: PyTorch 0.4.0, TensorboardX 1.2 and other packages listed in `requirements.txt`. ## Dataset The RedNet model is trained and evaluated with the [SUN RGB-D Benchmark suit](http://rgbd.cs.princeton.edu/paper.pdf). Please download the data on the [official webpage](http://rgbd.cs.princeton.edu), unzip it, and place it with a folder tree like this, ```bash SOMEPATH # Some arbitrary path | 565 |
JingqingZ/BaiduTraffic | ['traffic prediction'] | ['Deep Sequence Learning with Auxiliary Information for Traffic Prediction'] | intermediate_files/release_traffic_speed_subdataset.py src/preprocessing/get_query_info_beijing.py src/preprocessing/filter_around_traffic_beijing.py src/baselines.py src/preprocessing/around_traffic_mv_avg_15min_1km_completion.py src/train.py src/model.py src/preprocessing/get_around_traffic_beijing_mv_avg_1km.py src/query_distribution_filtfilt.py intermediate_files/query_distribution_filtfilt.py intermediate_files/time_feature_extraction_15min.py intermediate_files/get_link_info_feature_beijing.py src/error.py src/around_traffic_beijing_filtfilt.py src/playground.py src/around_traffic_filter_beijing.py src/config.py src/time_feature_extraction_15min.py intermediate_files/mercator_convertor.py src/dataloader.py intermediate_files/around_traffic_mv_avg_15min_1km_completion.py src/preprocessing/query_d.py src/preprocessing/new_anomalty1109.py src/calculate_connected_comp.py src/log.py src/preprocessing/get_link_info_feature_beijing.py src/utils.py intermediate_files/get_query_info_beijing.py intermediate_files/get_query_distribution_feature_beijing_1km_seq.py src/around_traffic_completion_15min.py src/preprocessing/get_query_distribution_feature_beijing_1km_seq.py src/preprocessing/s_grid_and_d_grid.py intermediate_files/release_query_subdataset_beijing.py link_info_feature_extraction distance timeid get_start_time traffic_speed_extraction time_feature_extraction test_arima test_baseline get_xy join roadnet_extraction find get_minibatch_all_query get_minibatch_4_test_query load_data_all get_minibatch_features load_data_noneighbour get_event_filter find_neighbours get_event_filter_allpath get_minibatch_4_test_event get_minibatch_4_test get_minibatch load_event_data get_minibatch_features_4_test get_query_data get_pathlist load_features get_minibatch_all_comb get_minibatch_all get_minibatch_4_test_all_comb load_data get_event_orders get_minibatch_4_test_neighbour sort_path_error get_event_loss mape get_error Logger Query_Model Seq2Seq_Model All_Comb_Model Spacial_Model Query_Comb_Model WideDeep_Model filt_error draw_sequence draw_roadnet analyse_event_link test_combine get_data RoadNode get_event_link roadnet_extraction compare_filt time_feature_extraction Seq2Seq_Controller WideDeep_Controller All_Comb_Controller Query_Comb_Controller Query_Controller Controller now2string make_dirlist mape link_info_feature_extraction distance timeid timeid list defaultdict format print open append zeros float range split int tm_mon tm_mday strptime tm_hour tm_min strptime timedelta int load format defaultdict print write close split open keys range len zeros int list get_event_filter_allpath in_seq_length shuffle stack get_pathlist get_event_orders append load_event_data range out_seq_length time print load_data_noneighbour test get_xy out_seq_length fit print load_data_noneighbour test get_xy mean out_seq_length find join format print len split open load update readline result_path str readlines close ProgressBar write get_neighbours data_path dict eval split get_dict enumerate open load result_path list print readlines close reversed data_path eval stack swapaxes append expand_dims array open load result_path list print readlines close data_path shape eval stack append expand_dims enumerate open list result_path readlines eval append open list stack append zeros start_id end_id load list print close data_path shape stack append expand_dims open list stack append zeros start_id end_id list stack append zeros start_id end_id list stack append zeros start_id range out_seq_length end_id list batch_size stack append zeros start_id range end_id list batch_size stack append zeros start_id range out_seq_length end_id list stack append zeros start_id range out_seq_length end_id list batch_size stack append zeros start_id range out_seq_length end_id list batch_size stack append zeros start_id range end_id list batch_size stack append zeros start_id range end_id range valid_length full_length zeros enumerate get_event_filter batch_size list batch_size stack end_id append zeros start_id range out_seq_length len load print close index data_path zeros enumerate open load data_path open load print impact_k data_path expand_dims array open load time result_path savez print load_data_noneighbour nanmean shape mape nan get_event_filter zeros load_event_data array range out_seq_length load print mean shape get_pathlist load valid_length print in_seq_length len load_data_noneighbour copy dict shape eval mape nanmean nan full_length open zeros range split str list deep_previous deep_next set_printoptions append update close ProgressBar RoadNode keys enumerate write dict zeros open show list sorted DiGraph exit append pagerank update add_edge close ProgressBar eval enumerate load items draw data_path dict add_nodes_from load print open keys len show load_data plot load print close data_path mean zeros abs open load show plot close exit data_path open list dump print readlines data_path dict eval split append enumerate open load print data_path open enumerate list print reshape stack swapaxes append randint range makedirs | # Deep Sequence Learning with Auxiliary Information for Traffic Prediction. KDD 2018. (Accepted) ### Binbing Liao, Jingqing Zhang, Chao Wu, Douglas McIlwraith, Tong Chen, Shengwen Yang, Yike Guo, Fei Wu ###### Binbing Liao and Jingqing Zhang contributed equally to this article. Paper Link: [arXiv](https://arxiv.org/abs/1806.07380) or [KDD18](http://www.kdd.org/kdd2018/accepted-papers/view/deep-sequence-learning-with-auxiliary-information-for-traffic-prediction) ## Contents 1. [Abstract](#Abstract) 2. [Q-Traffic Dataset](#Dataset) 3. [Code](#Code) 4. [Citation](#Citation) 5. [Poster and Video](#Poster) | 566 |
JiwonCocoder/matching1 | ['visual localization', 'semantic correspondence'] | ['Neighbourhood Consensus Networks'] | train.py lib/model.py point_transfer_demo.py lib/pf_dataset.py lib/normalization.py image/normalization.py lib/point_tnf.py lib/dataloader.py lib/py_util.py lib/conv4d.py lib/im_pair_dataset.py lib/torch_util.py eval_inloc.py lib/plot.py lib/transformation.py matching.py lib/eval_util.py eval_pf_pascal.py process_epoch weak_loss process_epoch weak_loss normalize_image NormalizeImageDict Conv4d conv4d DataLoaderIter default_collate DataLoader _worker_loop ExceptionWrapper pin_memory_batch _pin_memory_loop pck_metric pck ImagePairDataset FeatureExtraction featureL2Norm MutualMatching NeighConsensus ImMatchNet CorrelationFlow get_noise maxpool4d FeatureCorrelation UnNormalize normalize_image NormalizeImageDict PFPascalDataset plot_image save_plot unnormalize_axis PointsToUnitCoords bilinearInterpPointTnf corr_to_matches nearestNeighPointTnf normalize_axis PointsToPixelCoords create_file_path str_to_bool save_checkpoint BatchTensorToVars collate_custom Softmax1D expand_dim AffineTnf AffineGridGen view model size mean permute normalize max format backward print step zero_grad capitalize numpy loss_fn batch_preprocessing_fn enumerate len show subplots set_title print normalize_image system shape imshow Normalize numpy list isinstance Variable size add expand div unsqueeze cuda is_cuda Variable size contiguous conv3d half get_device HalfTensor zeros range cuda is_cuda cat seed get set_num_threads put collate_fn get pin_memory_batch isinstance put is_tensor sum isinstance Sequence new zip _new_shared Mapping Mapping is_tensor isinstance Sequence ne float size mean pow expand_as zeros le sum range data PointsToUnitCoords size pck bilinearInterpPointTnf numpy range PointsToPixelCoords expand_as size max view tuple div fmod unsqueeze append max range cat FloatTensor print squeeze astype from_numpy shape argmax detach zeros isinstance show uint8 view Variable astype add imshow cuda is_cuda set_major_locator NullLocator set_axis_off margins subplots_adjust savefig view size softmax linspace expand_as meshgrid max range view min pow sqrt unsqueeze cat int view isinstance Variable toidx size multrows abs sqrt unsqueeze long topoint sum cuda is_cuda clone normalize_axis expand_as unnormalize_axis clone expand_as dirname makedirs is_tensor Mapping isinstance exp unsqueeze join str basename copyfile dirname save makedirs size list | # Neighbourhood Consensus Networks  ## About This is the implementation of the paper "Neighbourhood Consensus Networks" by I. Rocco, M. Cimpoi, R. Arandjelović, A. Torii, T. Pajdla and J. Sivic. For more information check out the project [[website](http://www.di.ens.fr/willow/research/ncnet/)] and the paper on [[arXiv](https://arxiv.org/abs/1810.10510)]. ## Getting started ### Dependencies The code is implemented using Python 3 and PyTorch 0.3. All dependencies should be included in the standard Anaconda distribution. ### Getting the datasets The PF-Pascal dataset can be downloaded and unzipped by browsing to the `datasets/pf-pascal/` folder and running `download.sh`. | 567 |
JoeMWatson/input-inference-for-control | ['stochastic optimization'] | ['Efficient Stochastic Optimal Control through Approximate Bayesian Input Inference'] | i2c/model.py scripts/experiments/linear_known_covariance_control.py scripts/mpc_state_est/run.py scripts/experiments/double_cartpole_known.py scripts/linear_gaussian_covariance_control.py i2c/env.py scripts/mpc_state_est/mpc_quad.py i2c/inference/quadrature.py scripts/experiments/linear_known.py scripts/experiments/pendulum_known.py i2c/utils.py i2c/env_def.py scripts/experiments/double_cartpole_known_quad.py scripts/experiments/pendulum_known_act_reg_quad.py i2c/i2c.py i2c/exp_types.py i2c/policy/mpc.py scripts/i2c_run.py scripts/experiments/cartpole_known_quad.py scripts/generate_gifs.py i2c/env_autograd.py scripts/experiments/pendulum_known_quad.py scripts/mpc_state_est/process_results.py scripts/experiments/double_cartpole_known_lin.py i2c/policy/linear.py scripts/experiments/cartpole_known.py scripts/experiments/linear_known_quad.py baselines/ilqr.py scripts/experiments/double_cartpole_known_cq.py setup.py scripts/lqr_compare.py scripts/nonlinear_covariance_control.py scripts/experiments/double_cartpole_known_gh.py IterativeLqr LinearMinimumEnergy PendulumKnown BaseKnownSim CartpoleKnown BaseSim make_env DoubleCartpoleKnown PendulumKnownActReg LinearSim BaseLinear cartpole_dynamics pendulum_dynamics double_cartpole_dynamics PendulumKnown DoubleCartpoleDef CartpoleKnown FurutaDef PendulumDef CartpoleDef BaseDef DoubleCartpoleKnown BaseCartpoleDef FurutaKnown PendulumKnownActReg LinearDef LinearMinimumEnergyDef GaussHermiteQuadrature Linearize GaussianI2c CubatureQuadrature moment2information information2moment is_pos_def I2cGraph I2cCell concat_normals LinearMinimumEnergy LinearBase PendulumKnown BaseModelLearn make_env_model CartpoleKnown CartpoleLearn FurutaLearn LinearExact DoubleCartpoleLearn PendulumLearn BaseModel FurutaKnown BaseModelKnown PendulumKnownActReg DoubleCartpoleKnown write_commit finite_horizon_lqr_tv set_seed configure_plots TrajectoryEvaluatorEnsemble StochasticTrajectoryEvaluator covariance_2d make_results_folder setup_logger TrajectoryEvaluator plot_uncertainty finite_horizon_lqr quadratic_trajectory_cost QuadratureInference plot_ellipse func ExpertTimeIndexedLinearGaussianPolicy TimeIndexedLinearGaussianPolicy PartiallyObservedMpcPolicy MpcPolicy pi_format make_pendulum_cov_control_gif make_dcp_trajopt_gif save_trajectories run main plot_covariance_control plot_controller main plot_value_function plot_trajectory main plot_covariance_control run_experiment Experiment IlqrMpc Quadrotor AnalyticalLinearDynamics single_experiment QuadrotorKnown add_tuple QuadrotorDef ContactDetector T clip pi sin T squeeze cos sin power ones squeeze inv cos hstack matmul stack sin zeros clip T concatenate reshape vstack eye zeros array diag T concatenate reshape eye zeros array diag T array diag eye T T Jacobian ones eye zeros array diag T diag eye T array diag T vstack eye array diag dot inv dot inv all block_diag concatenate _env reshape T squeeze inv zeros range T squeeze inv zeros range seed join makedirs sqrt Ellipse eig rad2deg removeHandler basicConfig sqrt squeeze fill_between Repo hexsha Ellipse eig add_patch rad2deg sqrt int round pi R randn sig_x_term add_subplot cos pi linspace set_major_formatter frombuffer set_title make_env_model ones set_xlabel N_DURATION add_gridspec sin inference append range Qf mu_x_term plot set_xlim close N_INFERENCE alpha I2cGraph zip ENVIRONMENT indexed_confidence_bound zeros FuncFormatter join optimize alpha_update_tol Q reshape set_yticks get_marginal_state_action_distribution draw tostring_rgb learn_msgs mimsave MODEL tqdm set_ylabel set_xticks figure eye fill_between set_ylim len POLICY_COVAR subplots set_ylim pi frombuffer TimeIndexedLinearGaussianPolicy set_title make_env_model set_xlabel sig_x0 dim_x mu_x_terminal N_DURATION legend append range plot covariance_2d set_xlim close N_INFERENCE I2cGraph ENVIRONMENT enumerate join optimize x0 sig_x_terminal tostring_rgb batch_eval write draw make_env learn_msgs MODEL reshape tqdm set_ylabel mimsave dim_u cells len get_marginal_observed_trajectory POLICY_COVAR zero R sig_x_term StochasticTrajectoryEvaluator plot_cost z simulated mu_u save TimeIndexedLinearGaussianPolicy plot_sim make_env_model z_term get_marginal_trajectory shape dim_x N_DURATION inference run_render range sig_u Qf mu_x_term reset_metrics format plot save_trajectories close N_INFERENCE eval alpha I2cGraph info ENVIRONMENT plot_metrics load alpha_update_tol Q print plot_alphas reshape batch_eval write make_env learn_msgs MODEL tqdm policy_class dim_u zeros QR join save_traj save sig_x3_pf subplots save set_title set_yscale set_xlabel sig_x0 kl_terms mu_x_terminal savefig legend asarray format plot covariance_2d sig_x0_pf enumerate join x0 print sig_x_terminal mu_x3_pf set_ylabel mu_x0_pf cells len POLICY_COVAR make_results_folder TimeIndexedLinearGaussianPolicy make_env_model dim_x N_DURATION plot_covariance_control range N_INFERENCE I2cGraph ENVIRONMENT batch_eval write make_env learn_msgs MODEL tqdm dim_u cells join subplots set_title plot set_xlabel close set_ylabel get_state_action_prior savefig H legend save range get_marginal_state_action join subplots set_title plot reshape set_xlabel close set_ylabel savefig H legend save get_local_linear_policy range dim_u join asarray subplots set_title plot reshape set_xlabel close dim_x set_ylabel savefig alpha legend save range R plot_trajectory xag A ones plot_traj plot_controller plot_value_function a _backward_ricatti_msgs finite_horizon_lqr B Q _forward_backward_msgs eye zeros log plot_sim configure_plots plot_metrics propagate T array diag eye single_experiment nb_steps subplots pi plot_trajectory flatten QuadrotorKnown linspace save exists einsum run seed ones block_diag step IlqrMpc set_xlabel Quadrotor sig_x0 render dim_x heaviside dirname savefig sin append set_control range asarray plot IterativeLqr close set_xlim copy PartiallyObservedMpcPolicy realpath sqrt I2cGraph policy gravity enumerate join T optimize x0 print reshape dm_state mimsave AnalyticalLinearDynamics reset set_ylabel calibrate_alpha eye dim_u zeros dm_act diag set_ylim makedirs | # input-inference-for-control Approximate Inference for Stochastic Optimal Control [comment]: <> () [comment]: <> () <img src="https://github.com/JoeMWatson/input-inference-for-control/blob/master/assets/dcp_10s.gif" width="400"/> <img src="https://github.com/JoeMWatson/input-inference-for-control/blob/master/assets/p_cc_10s.gif" width="400"/> [](https://arxiv.org/abs/1910.03003) [](https://arxiv.org/abs/2103.06319) [](https://arxiv.org/abs/2105.07693) [](https://www.python.org/downloads/release/python-376/) | 568 |
JohanZYe/IWAE-pytorch | ['density estimation'] | ['Importance Weighted Autoencoders'] | model/ConvIWAE.py Utils.py model/ExplicitIWAE.py model/PytorchIWAE.py main.py create_canvas Plot_loss_curve AnalyticalIWAE PytorchIWAE show list arange plot xlabel ylabel locator_params title figure legend keys values len zeros range figure reshape | # Importance Weighted Autoencoders (IWAE) Link to paper: https://arxiv.org/abs/1509.00519 <b>AnalyticalIWAE:</b> IWAE calculating loss manually <b>PytorchIWAE:</b> IWAE using built-in torch functions to evaluate and calculation loss. <br> Includes example of algorithm very easy to apply to existing VAE (although a bit slower) <b>ConvIWAE:</b> An example of convolutional IWAE, not integrated with main script, only as example # Importance Weighted Autoencoders - Gaussian encoder and decoder #### Pytorch IWAE Loss Curve:  #### Pytorch IWAE 60 epoch results: | 569 |
JonathanVanDyke/ML-Unity | ['unity'] | ['Unity: A General Platform for Intelligent Agents'] | ml-agents-envs/mlagents/envs/communicator_objects/unity_rl_input_pb2.py ml-agents/mlagents/trainers/components/reward_signals/curiosity/model.py ml-agents-envs/mlagents/envs/communicator_objects/unity_to_external_pb2.py ml-agents/mlagents/trainers/learn.py ml-agents-envs/mlagents/envs/communicator_objects/custom_observation_pb2.py ml-agents/mlagents/trainers/meta_curriculum.py ml-agents/mlagents/trainers/tests/test_barracuda_converter.py ml-agents/mlagents/trainers/ppo/models.py ml-agents/mlagents/trainers/trainer_controller.py ml-agents/mlagents/trainers/components/bc/model.py ml-agents/mlagents/trainers/tests/test_curriculum.py ml-agents-envs/mlagents/envs/communicator.py ml-agents-envs/mlagents/envs/communicator_objects/custom_reset_parameters_pb2.py ml-agents/mlagents/trainers/tests/test_ppo.py ml-agents-envs/mlagents/envs/tests/test_rpc_communicator.py ml-agents/mlagents/trainers/components/reward_signals/__init__.py ml-agents-envs/setup.py ml-agents/mlagents/trainers/tests/mock_brain.py ml-agents-envs/mlagents/envs/action_info.py ml-agents-envs/mlagents/envs/rpc_communicator.py ml-agents/mlagents/trainers/tests/test_bcmodule.py ml-agents/mlagents/trainers/tests/test_trainer_controller.py ml-agents/mlagents/trainers/components/reward_signals/reward_signal_factory.py ml-agents/setup.py ml-agents/mlagents/trainers/barracuda.py ml-agents-envs/mlagents/envs/tests/test_envs.py ml-agents/mlagents/trainers/sac/policy.py ml-agents-envs/mlagents/envs/env_manager.py ml-agents/mlagents/trainers/ppo/trainer.py ml-agents-envs/mlagents/envs/tests/test_timers.py ml-agents-envs/mlagents/envs/communicator_objects/unity_rl_output_pb2.py ml-agents-envs/mlagents/envs/communicator_objects/unity_rl_initialization_output_pb2.py ml-agents-envs/mlagents/envs/communicator_objects/unity_input_pb2.py ml-agents/mlagents/trainers/tests/test_meta_curriculum.py ml-agents/mlagents/trainers/components/reward_signals/curiosity/signal.py ml-agents-envs/mlagents/envs/subprocess_env_manager.py ml-agents/mlagents/trainers/bc/trainer.py ml-agents-envs/mlagents/envs/communicator_objects/agent_action_proto_pb2.py ml-agents/mlagents/trainers/curriculum.py ml-agents/mlagents/trainers/tests/test_policy.py ml-agents/mlagents/trainers/ppo/policy.py ml-agents-envs/mlagents/envs/communicator_objects/space_type_proto_pb2.py ml-agents/mlagents/trainers/tests/test_learn.py ml-agents-envs/mlagents/envs/communicator_objects/brain_parameters_proto_pb2.py ml-agents/mlagents/trainers/tests/test_demo_loader.py ml-agents/mlagents/trainers/models.py ml-agents-envs/mlagents/envs/communicator_objects/agent_info_proto_pb2.py ml-agents-envs/mlagents/envs/communicator_objects/environment_parameters_proto_pb2.py ml-agents/mlagents/trainers/tests/test_simple_rl.py ml-agents-envs/mlagents/envs/policy.py ml-agents/mlagents/trainers/exception.py ml-agents/mlagents/trainers/buffer.py ml-agents/mlagents/trainers/bc/online_trainer.py ml-agents-envs/mlagents/envs/communicator_objects/engine_configuration_proto_pb2.py ml-agents/mlagents/trainers/tensorflow_to_barracuda.py ml-agents-envs/mlagents/envs/communicator_objects/unity_to_external_pb2_grpc.py ml-agents-envs/mlagents/envs/mock_communicator.py ml-agents/mlagents/trainers/tests/test_rl_trainer.py ml-agents-envs/mlagents/envs/timers.py ml-agents-envs/mlagents/envs/communicator_objects/unity_message_pb2.py ml-agents-envs/mlagents/envs/environment.py ml-agents-envs/mlagents/envs/communicator_objects/custom_action_pb2.py ml-agents/mlagents/trainers/bc/policy.py ml-agents-envs/mlagents/envs/simple_env_manager.py ml-agents-envs/mlagents/envs/base_unity_environment.py ml-agents/mlagents/trainers/trainer_util.py ml-agents/mlagents/trainers/tests/test_trainer_util.py ml-agents-envs/mlagents/envs/communicator_objects/unity_output_pb2.py ml-agents/mlagents/trainers/components/reward_signals/extrinsic/signal.py ml-agents/mlagents/trainers/sac/trainer.py ml-agents-envs/mlagents/envs/sampler_class.py ml-agents/mlagents/trainers/tests/test_sac.py ml-agents-envs/mlagents/envs/exception.py ml-agents/mlagents/trainers/sac/models.py ml-agents/mlagents/trainers/components/reward_signals/gail/model.py ml-agents-envs/mlagents/envs/communicator_objects/header_pb2.py ml-agents/mlagents/trainers/rl_trainer.py ml-agents/mlagents/trainers/tests/test_reward_signals.py ml-agents-envs/mlagents/envs/brain.py ml-agents/mlagents/trainers/components/reward_signals/gail/signal.py ml-agents/mlagents/trainers/ppo/multi_gpu_policy.py ml-agents/mlagents/trainers/tests/test_multigpu.py ml-agents-envs/mlagents/envs/communicator_objects/demonstration_meta_proto_pb2.py ml-agents-envs/mlagents/envs/communicator_objects/resolution_proto_pb2.py ml-agents/mlagents/trainers/demo_loader.py ml-agents/mlagents/trainers/components/bc/module.py ml-agents/mlagents/trainers/tests/test_trainer_metrics.py ml-agents-envs/mlagents/envs/tests/test_sampler_class.py ml-agents/mlagents/trainers/tests/test_buffer.py ml-agents-envs/mlagents/envs/communicator_objects/command_proto_pb2.py ml-agents/mlagents/trainers/trainer.py ml-agents-envs/mlagents/envs/socket_communicator.py ml-agents-envs/mlagents/envs/tests/test_subprocess_env_manager.py ml-agents/mlagents/trainers/bc/models.py ml-agents/mlagents/trainers/bc/offline_trainer.py ml-agents/mlagents/trainers/tf_policy.py ml-agents/mlagents/trainers/tests/test_bc.py ml-agents-envs/mlagents/envs/communicator_objects/unity_rl_initialization_input_pb2.py ml-agents/mlagents/trainers/trainer_metrics.py BarracudaWriter fuse print_known_operations compress Build sort lstm write fuse_batchnorm_weights trim mean gru Model summary Struct parse_args to_json rnn BufferException Buffer Curriculum make_demo_buffer load_demonstration demo_to_buffer CurriculumError MetaCurriculumError TrainerError CurriculumLoadingError CurriculumConfigError create_environment_factory CommandLineOptions create_sampler_manager parse_command_line run_training prepare_for_docker_run try_create_meta_curriculum main MetaCurriculum EncoderType LearningModel LearningRateSchedule AllRewardsOutput RLTrainer get_layer_shape pool_to_HW flatten sqr_diff process_layer process_model get_layer_rank slow_but_stable_topological_sort get_attr basic_lstm ModelBuilderContext order_by get_epsilon get_tensor_dtype replace_strings_in_list debug embody by_op get_tensor_dims strided_slice remove_duplicates_from_list axis_to_barracuda by_name locate_actual_output_node convert strides_to_HW get_tensor_data very_slow_but_stable_topological_sort gru TFPolicy UnityPolicyException UnityTrainerException Trainer TrainerController TrainerMetrics _load_config load_config initialize_trainers BehavioralCloningModel OfflineBCTrainer OnlineBCTrainer BCPolicy BCTrainer BCModel BCModule create_reward_signal RewardSignal CuriosityModel CuriosityRewardSignal ExtrinsicRewardSignal GAILModel GAILRewardSignal PPOModel get_devices MultiGpuPPOPolicy PPOPolicy PPOTrainer get_gae discount_rewards SACPolicyNetwork SACTargetNetwork SACNetwork SACModel SACPolicy SACTrainer create_mock_pushblock_brain create_buffer simulate_rollout create_mock_3dball_brain create_mock_banana_brain setup_mock_unityenvironment create_mock_braininfo create_mock_brainparams setup_mock_env_and_brains test_barracuda_converter test_bc_export bc_dummy_config test_bc_trainer_step test_bc_trainer_add_proc_experiences test_cc_bc_model test_dc_bc_model test_visual_cc_bc_model test_bc_trainer_end_episode test_bc_policy_evaluate dummy_config test_visual_dc_bc_model create_bc_trainer sac_dummy_config test_bcmodule_rnn_update test_bcmodule_update ppo_dummy_config create_policy_with_bc_mock test_bcmodule_dc_visual_update test_bcmodule_defaults test_bcmodule_rnn_dc_update test_buffer_sample construct_fake_buffer assert_array fakerandint test_buffer test_buffer_truncate test_curriculum_load_invalid_json location default_reset_parameters test_init_curriculum_bad_curriculum_raises_error test_curriculum_load_missing_file test_init_curriculum_happy_path test_increment_lesson test_curriculum_load_good test_get_config test_load_demo test_load_demo_dir basic_options test_docker_target_path test_run_training test_env_args test_commandline_args 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_create_model dummy_config test_average_gradients test_update basic_mock_brain test_take_action_returns_action_info_when_available basic_params test_take_action_returns_nones_on_missing_values test_take_action_returns_empty_with_no_agents test_trainer_increment_step test_trainer_update_policy test_rl_functions test_ppo_model_dc_vector_rnn test_ppo_model_cc_vector_rnn test_add_rewards_output test_ppo_policy_evaluate test_ppo_model_cc_visual dummy_config test_ppo_model_dc_vector test_ppo_model_dc_visual test_ppo_get_value_estimates test_ppo_model_cc_vector test_gail_dc_visual sac_dummy_config reward_signal_update reward_signal_eval test_extrinsic test_curiosity_cc test_gail_rnn test_gail_cc ppo_dummy_config create_policy_mock test_curiosity_dc curiosity_dummy_config test_curiosity_visual test_curiosity_rnn gail_dummy_config create_mock_all_brain_info create_rl_trainer dummy_config test_rl_trainer create_mock_brain create_mock_policy test_sac_update_reward_signals create_sac_policy_mock test_sac_model_dc_visual test_sac_cc_policy test_sac_visual_policy test_sac_model_cc_vector_rnn test_sac_model_dc_vector test_sac_model_cc_vector dummy_config test_sac_model_dc_vector_rnn test_sac_model_cc_visual test_sac_rnn_policy test_sac_save_load_buffer test_sac_dc_policy test_simple_sac clamp test_simple_ppo Simple1DEnvironment _check_environment_trains test_initialization_seed test_start_learning_trains_until_max_steps_then_saves basic_trainer_controller test_take_step_adds_experiences_to_trainer_and_trains dummy_config trainer_controller_with_take_step_mocks trainer_controller_with_start_learning_mocks test_start_learning_trains_forever_if_no_train_model TestTrainerMetrics test_initialize_online_bc_trainer test_initialize_ppo_trainer test_initialize_trainer_parameters_override_defaults test_load_config_invalid_yaml dummy_offline_bc_config test_initialize_invalid_trainer_raises_exception dummy_bad_config dummy_config test_load_config_missing_file test_load_config_valid_yaml dummy_offline_bc_config_with_override dummy_online_bc_config ActionInfo BaseUnityEnvironment safe_concat_np_ndarray BrainInfo BrainParameters safe_concat_lists Communicator UnityEnvironment EnvManager EnvironmentStep SamplerException UnityWorkerInUseException UnityException UnityCommunicationException UnityTimeOutException UnityEnvironmentException UnityActionException MockCommunicator Policy RpcCommunicator UnityToExternalServicerImplementation MultiRangeUniformSampler UniformSampler SamplerFactory SamplerManager GaussianSampler Sampler SimpleEnvManager SocketCommunicator worker EnvironmentResponse UnityEnvWorker StepResponse SubprocessEnvManager EnvironmentCommand TimerNode hierarchical_timer get_timer_root get_timer_tree reset_timers set_gauge timed GaugeNode TimerStack UnityToExternalServicer UnityToExternalStub add_UnityToExternalServicer_to_server test_initialization test_reset test_close test_step test_handles_bad_filename test_rpc_communicator_checks_port_on_create test_rpc_communicator_create_multiple_workers test_rpc_communicator_close test_empty_samplers sampler_config_1 check_value_in_intervals incorrect_uniform_sampler test_incorrect_sampler test_sampler_config_1 sampler_config_2 incorrect_sampler_config test_incorrect_uniform_sampler test_sampler_config_2 mock_env_factory SubprocessEnvManagerTest MockEnvWorker test_timers decorated_func join isdir print replaceFilenameExtension add_argument exit verbose source_file ArgumentParser target_file sqrt topologicalSort list hasattr layers addEdge Graph print inputs set len list hasattr layers print filter match trim_model compile data layers print tensors float16 replace layers dumps data dtype layers isinstance print name tensors inputs outputs shape zip array_without_brackets to_json globals Build array_equal pool reduce Build tanh mad tanh mul Build concat add sigmoid sub mad _ tanh mul Build concat add sigmoid mad print sorted keys Buffer reset_local_buffers number_visual_observations append_update_buffer append range enumerate make_demo_buffer load_demonstration join read suffix isdir endswith BrainParametersProto from_agent_proto DemonstrationMetaProto ParseFromString AgentInfoProto isfile append from_proto listdir _DecodeVarint32 parse_args add_argument ArgumentParser start_learning fast_simulation create_sampler_manager sampler_file_path put reset_parameters lesson load_config keep_checkpoints str docker_target_name load_model multi_gpu TrainerController save_freq trainer_config_path run_id num_envs format create_environment_factory external_brains no_graphics try_create_meta_curriculum base_port curriculum_folder env_args SubprocessEnvManager train_model initialize_trainers env_path pop SamplerManager load_config set_all_curriculums_to_lesson_num MetaCurriculum reset_parameters keys chmod format basename isdir glob copyfile copytree prepare_for_docker_run replace seed Process join parse_command_line getLogger print debug run_training start Queue info append randint setLevel range num_runs endswith len print HasField hasattr get_attr isinstance get_attr tensor_shape ndarray isinstance shape int_val bool_val float_val ListFields name ndarray isinstance str tensor_content ndarray product isinstance get_tensor_dtype print get_tensor_dims unpack int_val bool_val array float_val enter append add set Build mul sub insert Build tolist append range len locate_actual_output_node name find_tensor_by_name split locate_actual_output_node name lstm find_tensor_by_name find_forget_bias split get_layer_shape id Struct tensor get_layer_rank layer_ranks hasattr name patch_data rank input_shapes out_shapes input get_attr append replace_strings_in_list tensors embody astype op inputs zip enumerate print float32 patch_data_fn model_tensors map_ignored_layer_to_its_input co_argcount len items hasattr get_tensors name print process_layer eval slow_but_stable_topological_sort ModelBuilderContext sort assign_ids pop range insert len layers verbose Struct process_model open print_known_operations fuse compress node GraphDef Model dims_to_barracuda_shape insert get_tensor_dims inputs MessageToJson ParseFromString cleanup_layers read memories print sort write trim summary print_supported_ops update format SACTrainer OfflineBCTrainer copy OnlineBCTrainer PPOTrainer get check_config rcls list_local_devices size range reversed zeros_like append discount_rewards Mock ones Mock array range brain_name create_buffer brain sequence_length append range vector_action_space_size Buffer ones number_visual_observations append_update_buffer shape append sum range enumerate setup_mock_unityenvironment mock_env create_mock_braininfo create_mock_brainparams create_mock_brainparams create_mock_brainparams create_mock_brainparams join remove _get_candidate_names convert _get_default_tempdir dirname abspath isfile next create_bc_trainer export_model create_mock_pushblock_brain Mock BCTrainer simulate_rollout mock_env dirname abspath setup_mock_unityenvironment policy create_mock_braininfo create_mock_3dball_brain update_policy create_bc_trainer increment_step agents process_experiences step create_bc_trainer add_experiences end_episode agents process_experiences step create_bc_trainer add_experiences BCPolicy evaluate close reset MockCommunicator reset_default_graph UnityEnvironment reset_default_graph reset_default_graph reset_default_graph reset_default_graph mock_env dirname abspath setup_mock_unityenvironment create_mock_braininfo create_policy_with_bc_mock close ppo_dummy_config create_mock_3dball_brain update items close create_policy_with_bc_mock create_mock_3dball_brain update items close create_policy_with_bc_mock create_mock_3dball_brain update items close create_mock_banana_brain create_policy_with_bc_mock update items close create_mock_banana_brain create_policy_with_bc_mock flatten list range len append range Buffer get_batch construct_fake_buffer assert_array append_update_buffer make_mini_batch reset_agent array sample_mini_batch construct_fake_buffer append_update_buffer construct_fake_buffer truncate_update_buffer append_update_buffer Curriculum Curriculum Curriculum dumps StringIO StringIO make_demo_buffer load_demonstration dirname abspath make_demo_buffer load_demonstration dirname abspath MagicMock basic_options MagicMock parse_command_line parse_command_line 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 MultiGpuPPOPolicy create_mock_brainparams reset_default_graph create_mock_brainparams update Mock reset_default_graph MultiGpuPPOPolicy create_mock_brainparams MagicMock TFPolicy basic_mock_brain basic_params BrainInfo get_action MagicMock TFPolicy basic_mock_brain basic_params BrainInfo get_action MagicMock TFPolicy basic_mock_brain ActionInfo basic_params BrainInfo get_action evaluate close reset MockCommunicator PPOPolicy reset_default_graph UnityEnvironment get_value_estimates items close reset MockCommunicator PPOPolicy reset_default_graph UnityEnvironment reset_default_graph reset_default_graph reset_default_graph reset_default_graph reset_default_graph reset_default_graph assert_array_almost_equal array discount_rewards Mock increment_step BrainParameters assert_called_with PPOTrainer simulate_rollout update_policy policy PPOTrainer setup_mock_env_and_brains AllRewardsOutput BrainParameters PPOTrainer add_rewards_outputs update SACPolicy PPOPolicy setup_mock_env_and_brains reset evaluate model simulate_rollout _execute_model prepare_update update_dict make_mini_batch create_policy_mock reward_signal_update reward_signal_eval reward_signal_update reward_signal_eval create_policy_mock dirname abspath create_policy_mock reward_signal_update reward_signal_eval create_policy_mock reward_signal_update reward_signal_eval create_policy_mock reward_signal_update reward_signal_eval create_policy_mock reward_signal_update reward_signal_eval create_policy_mock reward_signal_update reward_signal_eval create_policy_mock reward_signal_update reward_signal_eval create_mock_brainparams RLTrainer dummy_config create_mock_brain Mock create_mock_all_brain_info create_rl_trainer values end_episode construct_curr_info episode_steps create_mock_braininfo create_mock_policy add_experiences SACPolicy setup_mock_env_and_brains update evaluate create_sac_policy_mock simulate_rollout close update_buffer reset reset_default_graph create_sac_policy_mock simulate_rollout close update_reward_signals reset_default_graph update evaluate create_sac_policy_mock simulate_rollout close update_buffer reset reset_default_graph update evaluate create_sac_policy_mock simulate_rollout update_buffer reset reset_default_graph update evaluate create_sac_policy_mock simulate_rollout close update_buffer reset reset_default_graph reset_default_graph reset_default_graph reset_default_graph reset_default_graph reset_default_graph reset_default_graph str Mock SACTrainer save_model simulate_rollout len dummy_config policy setup_mock_env_and_brains Simple1DEnvironment _check_environment_trains Simple1DEnvironment _check_environment_trains TrainerController assert_called_with MagicMock basic_trainer_controller start_learning assert_called_once MagicMock assert_not_called trainer_controller_with_start_learning_mocks trainer_controller_with_start_learning_mocks start_learning MagicMock assert_called_once MagicMock basic_trainer_controller assert_called_once Mock MagicMock current_all_brain_info EnvironmentStep advance outputs assert_not_called trainer_controller_with_take_step_mocks assert_called_once_with previous_all_brain_info dummy_offline_bc_config dummy_offline_bc_config_with_override BrainParametersMock BrainParametersMock dummy_online_bc_config dummy_config BrainParametersMock dummy_bad_config _load_config StringIO extend copy items value EnvironmentResponse external_brains payload text get_timer_root reset_timers put reset _send_response reset_parameters StepResponse env_factory step memory action perf_counter push reset method_handlers_generic_handler add_generic_rpc_handlers UnityEnvironment close MockCommunicator UnityEnvironment close MockCommunicator reset str local_done print agents step close MockCommunicator UnityEnvironment len UnityEnvironment close MockCommunicator close RpcCommunicator close RpcCommunicator close RpcCommunicator SamplerManager sample_all sampler_config_1 sampler_config_2 SamplerManager SamplerManager sample_all incorrect_uniform_sampler incorrect_sampler_config set_gauge | <img src="docs/images/unity-wide.png" align="middle" width="3000"/> <img src="docs/images/image-banner.png" align="middle" width="3000"/> # Unity ML-Agents Toolkit (Beta) [](docs/Readme.md) [](LICENSE) **The Unity Machine Learning Agents Toolkit** (ML-Agents) is an open-source Unity plugin that enables games and simulations to serve as environments for training intelligent agents. Agents can be trained using reinforcement learning, imitation learning, neuroevolution, or other machine learning methods through a simple-to-use Python API. We also provide implementations (based on TensorFlow) | 570 |
JoonHyung-Park/ODIN | ['out of distribution detection'] | ['Enhancing The Reliability of Out-of-distribution Image Detection in Neural Networks'] | metric.py main.py dataload.py densenet.py test_loader DenseNet3 TransitionBlock BottleneckBlock DenseBlock BasicBlock main recursion_change_bn auroc tpr95 format Compose ImageFolder DataLoader CIFAR100 load items time format print write temperature out_dataset test_loader open recursion_change_bn epsilon enumerate items isinstance BatchNorm2d enumerate arange loadtxt float sum len arange loadtxt float sum len | # ODIN Implementation of 'Enhancing The Reliability Of Out-Of-Distribution Image Detection In Neural Networks' * Requirements * numpy * pytorch * torchvision * Command - python3 main.py --epsilon [EPSILON] --temperature [TEMPERATURE] --out_dataset [OUT_DATASET] - python3 metric.py | 571 |
JordanAsh/badge | ['active learning'] | ['Deep Batch Active Learning by Diverse, Uncertain Gradient Lower Bounds'] | query_strategies/bayesian_active_learning_disagreement_dropout.py query_strategies/random_sampling.py vgg.py query_strategies/cpu_dist.py run.py query_strategies/entropy_sampling.py dataset.py query_strategies/least_confidence.py query_strategies/baseline_sampling.py query_strategies/strategy.py query_strategies/__init__.py scripts/agg_results.py query_strategies/core_set.py query_strategies/core_set_solve.py query_strategies/util.py query_strategies/adversarial_deepfool.py model.py query_strategies/least_confidence_dropout.py query_strategies/adversarial_bim.py query_strategies/entropy_sampling_dropout.py query_strategies/badge_sampling.py query_strategies/active_learning_by_learning.py query_strategies/margin_sampling_dropout.py query_strategies/kcenter_greedy.py query_strategies/kmeans_sampling.py resnet.py query_strategies/margin_sampling.py DataHandler1 DataHandler4 DataHandler3 DataHandler2 get_dataset get_MNIST get_CIFAR10 get_handler get_SVHN get_FashionMNIST Net1 Net3 Net2 get_net ResNet ResNet18 ResNet34 Bottleneck ResNet101 test ResNet50 BasicBlock ResNet152 mlpMod linMod VGG test ActiveLearningByLearning AdversarialBIM AdversarialDeepFool init_centers BadgeSampling gram_red gram_aug sample_k_imp BaselineSampling BALDDropout CoreSet solve_fac_loc gemm_func output_dtype dist_ext dist ext_arrs dist_accum auto_dtype EntropySampling EntropySamplingDropout KCenterGreedy KMeansSampling LeastConfidence LeastConfidenceDropout MarginSampling MarginSamplingDropout RandomSampling Strategy save_df_as_npy load_df_from_npy max_columns plot_count plot_matrix save_legend parse_file smooth filter_alg parse_dirs plot_lc parse_philly_dirs avg_folds plot_sep_cdfs plot_all_matrices pop_std cdf parse_dir plot_cdfs MNIST test_data train_labels train_data test_labels FashionMNIST test_data train_labels train_data test_labels data labels from_numpy SVHN data targets from_numpy CIFAR10 array randn Variable ResNet18 print size net VGG str sum print rv_discrete astype set_trace append argmax range len dot T array dot block gram_red T print min choice dot pinv gram_aug array range len update format addVar print LinExpr addConstr now Model append range len ones shape T dtype result_type float32 auto_dtype float32 ext_arrs gemm_func output_dtype gemm_func dtype T output_dtype gemm_function astype dot issubdtype list columns index save ravel load isinstance reshape MultiIndex shape DataFrame sorted columns reindex_axis reshape DataFrame dstack ravel index unravel_index argmax len ones convolve int print close findall float append open parse_dir int sorted dump glob print parse_file open findall exists compile len groupby list reset_index plot xlabel param_to_str_fn ylabel OrderedDict param_to_str_t title savefig figure zip set_ylim groupby param_to_str_fn grid param_to_str_t set_major_formatter xticks max values yticks sorted list set_fontsize len FormatStrFormatter ylabel apply OrderedDict title savefig ticklabel_format reset_index ScalarFormatter plot save_legend set_xlim set mean unique zip print xlabel min subplots_adjust set_style figure fill_between drop plot_matrix t_fn OrderedDict groupby subplots set_yticklabels axis set_visible tick_params round max values set_title matshow make_axes_locatable append_axes colorbar savefig append sum range format set_xticklabels mean add_axes int print text min subplots_adjust ttest_1samp pow zeros array len argsort cumsum step len reset_index OrderedDict t_fn plot_cdfs close set_linewidth get_lines figure legend savefig gca get_legend_handles_labels grid xticks max values yticks ylabel title savefig append sum set_xlim set mean cdf int xlabel subplots_adjust pow set_style figure | # Batch Active learning by Diverse Gradient Embeddings (BADGE) An implementation of the BADGE batch active learning algorithm. Details are provided in our paper, [Deep Batch Active Learning by Diverse, Uncertain Gradient Lower Bounds](https://arxiv.org/abs/1906.03671), which was presented as a talk in ICLR 2020. This code was built by modifying [Kuan-Hao Huang's deep active learning repository](https://github.com/ej0cl6/deep-active-learning). **Update:** We now understand BADGE to be an approximation of a more general algorithm, [Batch Active Learning via Information maTrices (BAIT)](https://arxiv.org/abs/2106.09675), which we published in NeurIPS 2021. The classification variant of BAIT has been added to this repository for completeness. # Dependencies To run this code fully, you'll need [PyTorch](https://pytorch.org/) (we're using version 1.11.0), [scikit-learn](https://scikit-learn.org/stable/), and [OpenML](https://github.com/openml/openml-python). We've been running our code in Python 3.8. # Running an experiment `python run.py --model resnet --nQuery 1000 --data CIFAR10 --alg badge`\ | 572 |
JorgeGtz/TextureNets_implementation | ['style transfer'] | ['Texture Networks: Feed-forward Synthesis of Textures and Stylized Images'] | train_g2d_periodic.py sample_g2d_periodic.py Pyramid2D Up_Bn2D postp Conv_block2D Pyramid2D Normalize_gradients Up_Bn2D VGG postp GramMSELoss GramMatrix Conv_block2D postpa postpb | # TextureNets_implementation PyTorch (version 0.4.1) implementation of the texture synthesis model in [Texture Networks: Feed-forward Synthesis of Textures and Stylized Images](https://arxiv.org/abs/1603.03417) of Ulyanov et al. Based on Gatys' [code](https://github.com/leongatys/PytorchNeuralStyleTransfer) ## Training The python script **train_g2d_periodic.py** trains a generator network. The code requires the libraries: numpy, PIL and torch. The VGG-19 perceptual loss between 2D images uses Gatys' implementation. To run the code you need to get the pytorch VGG19-Model from the bethge lab by running: ``` sh download_models.sh | 573 |
Jpvmello/traffic-light-detection-synthetic-context | ['autonomous driving'] | ['Deep traffic light detection by overlaying synthetic context on arbitrary natural images'] | generate_dataset.py blur geometric_transform get_traffic_scenes get_probabilties_vector brightness_transform distribution multiply generate_sample show_grid_of_augs get_pos_and_shape_list process_img histogram_noise parse_args test_get_position get_position has_intersection augment_target get_mask_from_image hc_probabilties_vector remove_padding blend int uint8 Sequential astype uniform float get_position show arange size add imshow full zeros get_probabilties_vector range len Sequential copy uniform float augment_image randint set_state augment_target warpAffine min float32 getRotationMatrix2D shape uniform getPerspectiveTransform randint abs warpPerspective uint8 copyMakeBorder ones astype float32 copy erode BORDER_CONSTANT range int add flatten zeros get_annotations_positions_vector_germany sum full range len uint8 Multiply astype min max argwhere random get_position int brightness_transform Sequential blend shape get_mask_from_image histogram_noise resize append IMREAD_UNCHANGED imread round augment_image enumerate zeros_like add_argument ArgumentParser ones blur arange resize brightness_transform ones multiply waitKey process_img imshow ones_like format astype copy get_mask_from_image hc_probabilties_vector enumerate print float32 zeros join basename replace endswith isfile sep imwrite Sequential put resize seed ones get_pos_and_shape_list process_img shape uniform append augment_image format augment_target astype copy float enumerate join time uint8 float32 append join | # Deep traffic light detection by overlaying synthetic context on arbitrary natural images [Jean Pablo Vieira de Mello](https://github.com/Jpvmello), [Lucas Tabelini Torres](https://github.com/lucastabelini), [Rodrigo F. Berriel](http://rodrigoberriel.com/), [Thiago M. Paixão](https://sites.google.com/view/thiagopx), [Alberto F. De Souza](https://inf.ufes.br/~alberto), [Claudine Badue](https://www.inf.ufes.br/~claudine/), [Nicu Sebe](http://disi.unitn.it/~sebe/) and [Thiago Oliveira-Santos](https://www.inf.ufes.br/~todsantos/home) Source code, trained models and image sets referring to the paper **Deep traffic light detection by overlaying synthetic context on arbitrary natural images**, published in [SIBGRAPI 2020](https://sibgrapi2020.cin.ufpe.br) C&G Track ([Elsevier Computer & Graphics Journal (CAG)](http://www.journals.elsevier.com/computers-and-graphics/) special issue) are available here. DOI: [10.1016/j.cag.2020.09.012](https://doi.org/10.1016/j.cag.2020.09.012) arXiv: [https://arxiv.org/pdf/2011.03841](https://arxiv.org/pdf/2011.03841) Free ScienceDirect Share Link: [https://authors.elsevier.com/a/1c2eGMFvH~cEL](https://authors.elsevier.com/a/1c2eGMFvH~cEL) (available until December 30, 2020)  ### Abstract Deep neural networks come as an effective solution to many problems associated with autonomous driving. By providing real image samples with traffic context to the network, the model learns to detect and classify elements of interest, such as pedestrians, traffic signs, and traffic lights. However, acquiring and annotating real data can be extremely costly in terms of time and effort. In this context, we propose a method to generate artificial traffic-related training data for deep traffic light detectors. This data is generated using basic non-realistic computer graphics to blend fake traffic scenes on top of arbitrary image backgrounds that are not related to the traffic domain. Thus, a large amount of training data can be generated without annotation efforts. Furthermore, it also tackles the intrinsic data imbalance problem in traffic light datasets, caused mainly by the low amount of samples of the yellow state. Experiments show that it is possible to achieve results comparable to those obtained with real training data from the problem domain, yielding an average mAP and an average F1-score which are each nearly 4 p.p. higher than the respective metrics obtained with a real-world reference model. ## Generating synthetic dataset | 574 |
JudyYe/CVP | ['future prediction', 'video prediction'] | ['Compositional Video Prediction'] | cfgs/collections.py cvp/evaluator.py cvp/layers.py _init_path.py data/ShapeStacks.py data/debug_init_paths.py utils/box_utils.py train.py PerceptualSimilarity/util/html.py cvp/bilinear.py cvp/collections.py cfgs/base_cfgs.py PerceptualSimilarity/__init__.py cvp/losses.py cvp/decoder.py cvp/pok_model.py test.py cvp/graph.py cvp/models.py cvp/logger.py cvp/vid_encoder.py utils/data_utils.py cfgs/train_cfgs.py demo.py PerceptualSimilarity/util/visualizer.py cfgs/const.py cvp/vis.py cvp/layout.py cfgs/test_cfgs.py utils/model_utils.py PerceptualSimilarity/util/util.py cvp/debug_init_paths.py data/DemoImage.py multi main main quan main add_path str_tuple int_tuple int_list bool_flag BaseOptions float_tuple AttrDict TestOptions TrainOptions crop_bbox_batch_cudnn crop_bbox tensor_linspace _invperm uncrop_bbox bilinear_sample crop_bbox_batch AttrDict add_path refine_module Pix Comb add_layer_to NoFactor vstack hstack Evaluator BypassFactorGCNet BypassFactorFCNet _init_weights NoEdgeConv GraphEdgeConv GraphResBlock FcResBlock build_mlp build_pre_act build_pre_act_list _get_padding ResidualBlock Unflatten GlobalAvgPool build_cnn deconv3d build_fblock _init_conv get_activation build_fblock2 build_fconv batchNorm5d get_normalization_2d Flatten _boxes_to_grid gauss_mask mask_to_region _bbox_to_grid_fwd01 bbox_to_mask bbox_to_bg_feat splat soft_mask_splat_to_bg splat_with_wgt _pool_samples mask_norm _boxes_to_grid_inv bbox_to_bg mask_to_bg splat_neg sg2im_masks_to_layout boxes_to_region_layout mask_splat_to_bg boxes_to_layout mask_to_layout bbox_to_region splat_to_bg_feat Logger get_G_loss resize_l1_loss get_D_loss add_loss LossManager CVP collate_batch LP BaseBG NoFactor PoseEncoder VidD PoseFCDecoder PoseFrameGan PoseVaeNoFactor StateEncoder PoseVaePos VidG PoseVidGan PoseDecoder PoseVae FrameG kl_criterion ImageLearnedPrior ImageFixPrior VidEncoder TrajHierarchy ImageNoZ gaussian_lstm skeleton_13B_valid get_skeleton_pred get_bbox_traj_image convert_torch2cv skeleton_13B skeleton_10B get_layout_list draw_bbox_image convert_cv2torch mask get_skeleton_color convert_batch2cv render_pose skeleton_13B_trip get_crop get_bbox_traj deprocess_dt_v_o_image add_path build_vid_loaders dt_collate_fn DemoShapeStacks build_vid_loaders ShapeStacks dt_collate_fn PerceptualLoss HTML im2tensor dssim montage prep_display_image zeroClipper varname random_swap tensor2tensorlab resize_image save_image tensor2vec datetime_str psnr np2tensor diagnose_network rand_flip mkdirs load_image tensor2im cos_sim bootstrap read_csv_file_as_text normalize_blob read_text_file grab_patch mkdir info resize_image_zoom flatten_nested_list cos_sim_blob normalize_tensor print_numpy l2 voc_ap tensorlab2tensor rgb2lab read_file tensor2np zoom_to_res Visualizer extents_to_centers xy_to_xyxy xyxy_to_transform extents_to_logcenters box_stack invert_box_transform apply_box_transform extents_to_xy logcenters_to_extents transform_to_xyxy centers_to_extents imagenet_preprocess imagenet_deprocess_batch rescale Resize imagenet_deprocess crop_image build_all_model vid_batch_to_cuda get_model_name build_loaders int get_bbox_traj_image save_pack dt extend convert_batch2cv append range seed build_all_model join print Evaluator manual_seed multi build_loaders int save_vid_traj get_bbox_traj_image save_raw_box_image save_seq2gif dt push_pix_error convert_batch2cv push_box_error save_cmp_snapshot calc_total_bbox_error perceptual_metric range initialize draw_save_error draw_save_pix DistModel quan model add_images zero_grad Logger add_loss output_dir save separate_losses LossManager FloatTensor dt Adam dirname get_bbox_traj state_dict dec_zero_grad startswith type get_crop get_model_name backward parameters train step makedirs append tuple crop_bbox view size contiguous nonzero zeros range size type_as crop_bbox all view size contiguous type_as nonzero append type range cat size stack expand clamp to bilinear_sample expand mul view clamp size expand to size dim expand insert Conv2d ReLU append BatchNorm2d LeakyReLU range refine_module extend Upsample append range ones hstack append range len ones range len hasattr isinstance weight kaiming_normal_ Linear float startswith kaiming_uniform weight kaiming_normal int _get_padding ResidualBlock isinstance AvgPool2d print MaxPool2d Linear Conv2d _init_conv get_activation Upsample append get_normalization_2d enumerate Flatten split BatchNorm1d InstanceNorm1d len Dropout ReLU append LeakyReLU range Linear InstanceNorm1d len Conv2d Tanh Sigmoid ReLU append BatchNorm2d LeakyReLU range Dropout AvgPool2d Conv2d get_activation append get_normalization_2d range len AvgPool2d Conv2d get_activation append get_normalization_2d range len BatchNorm1d InstanceNorm1d print Linear ReLU append LeakyReLU Dropout BatchNorm1d InstanceNorm1d print Linear ReLU append LeakyReLU range Dropout _boxes_to_grid grid_sample size expand _pool_samples logcenters_to_extents size expand _boxes_to_grid grid_sample view size _pool_samples _boxes_to_grid grid_sample FloatTensor size stack append mask_norm sum cuda range cat _boxes_to_grid grid_sample FloatTensor size stack append mask_norm sum cuda range cat _boxes_to_grid grid_sample FloatTensor size stack append cuda range cat FloatTensor size splat stack append cuda range cat size splat stack cuda append sum mask_norm range cat size splat_neg splat stack append mask_norm sum cuda range cat view to clamp size expand floor nonzero _bbox_to_grid_fwd01 scatter_add splat_with_wgt splat_with_wgt _boxes_to_grid grid_sample clamp size stack append sum cuda range _boxes_to_grid grid_sample size expand stack append range _boxes_to_grid grid_sample clamp size stack append sum cuda range cat _boxes_to_grid_inv grid_sample FloatTensor size stack append cuda range _boxes_to_grid_inv grid_sample size stack append range pow int sum softmax view size expand stack to size expand stack sub to view size expand stack sub to view ones print size clamp expand item zeros scatter_add view print size l1_loss avg_pool2d item size l1_loss add_loss to l1_dst_loss_weight size to add_loss append stack enumerate exp log convert_torch2cv view size imagenet_deprocess_batch append range uint8 COLOR_BGR2RGB FloatTensor transpose astype cvtColor enumerate uint8 transpose astype ascontiguousarray COLOR_RGB2BGR numpy cvtColor int skeleton_13B_valid skeleton_13B skeleton_10B size convert_cv2torch astype skeleton_13B_trip append zeros numpy range len int skeleton_13B_valid skeleton_13B skeleton_10B size convert_cv2torch astype skeleton_13B_trip append zeros numpy range line tuple range circle len int line tuple astype circle enumerate int line tuple astype range circle int line tuple astype range circle int size convert_cv2torch astype append zeros numpy range circle minimum int size tolist astype maximum convert_cv2torch append zeros numpy range circle minimum int size astype maximum copy rectangle append numpy range append imagenet_deprocess_batch range size imagenet_deprocess_batch view append imagenet_deprocess_batch range view clamp size imagenet_deprocess_batch append range int line transpose len astype numpy zeros is_tensor range circle enumerate view print size stack append range len print DataLoader is_train DemoShapeStacks int num_val_samples shuffle_val ShapeStacks now readline close append float open sqrt sum shape normalize_blob view normalize_tensor rgb2lab tensor2im filterwarnings np2tensor astype lab2rgb rgb2lab tensor2np isclose clip transpose numpy print parameters astype max zoom fromarray save print join search print float64 astype flatten shape mkdir makedirs uint dtype permutation arange reshape astype sqrt ceil zeros meshgrid array append readline close open append split append readline close open arange concatenate size maximum sum max range exp transpose is_tensor stack extents_to_centers centers_to_extents apply_box_transform stack transpose is_tensor log extents_to_centers invert_box_transform box_stack box_stack box_stack is_tensor box_stack stack is_tensor log hstack transpose is_tensor stack append clamp size clone imagenet_deprocess append range cat append range interpolate cat cuda exp appr_pix_loss appr_fea_loss int build_vid_loaders startswith load model print eval load_state_dict cuda checkpoint | # Compositional Video Prediction Yufei Ye, Maneesh Singh, Abhinav Gupta*, and Shubham Tulsiani* [Project Page](https://judyye.github.io/CVP/), [Arxiv](http://arxiv.org/abs/1908.08522)  Given an initial frame, the task is to predict the next few frames in pixel level. The key insight is that a scene is comprised of distinct entities that undergo joint motions. To operationalize this idea, we propose **Compositional Video Prediction** (CVP), which consists of three main modules: 1) **Entity Predictor**: predicts per-entity representation; 2) **Frame Decoder**: generate pixels given entity-level representation; 3) **Encoder**: generate latent variables to account for multi-modality. | 575 |
JuliaWolleb/DeScarGAN | ['anomaly detection'] | ['DeScarGAN: Disease-Specific Anomaly Detection with Weak Supervision'] | Evaluation/Evaluation_Chexpert.py Evaluation/Evaluation_Synthetic_Dataset.py utils/Functions.py utils/tools.py model/generator_discrminator.py model/DeScarGAN.py main.py create_synthetic_dataset.py gaus2d intersections logpdf ellipse_polyline main Solver Solver Solver crop_and_concat Generator Discriminator deconv2d_bn_block conv2d_block Identity dense_layer_bn Flatten conv2d_bn_block GaussianSmoothing save_tensor_image_as_png label2onehot scalar_2_vector classification_loss save_tensor_image_as_png_gray create_labels update_lr gradient_penalty npy_loader kappa_score GaussianSmoothing eval_binary_classifier MapTransformOverNumpyArrayChannels RandomWarpTransform imshow standardize TransposeNumpy RandomWarpDeformer normalize read_mha_to_numpy visualize cos deg2rad pi linspace sin append empty LinearRing intersection print train test dataset_path choose_net dataset Solver mode pad Sequential ConvTranspose2d Upsample Conv2d view size sqrt to sum zeros size label2onehot ones size append to range param_groups fromarray uint8 print thumbnail cm_hot get_cmap array fromarray scalar_2_vector imshow figure save fromarray scalar_2_vector imshow figure save shape imread copy GetArrayViewFromImage from_numpy load mean std sum confusion_matrix min max min max show transpose numpy dict sum | # DeScarGAN: Disease-Specific Anomaly Detection with Weak Supervision This is the official Pytorch implementation of the paper [DeScarGAN: Disease-Specific Anomaly Detection with Weak Supervision](https://arxiv.org/abs/2007.14118) by Julia Wolleb, Robin Sandkühler and Philippe C. Cattin. Paper Abstract ------------------- Anomaly detection and localization in medical images is a challenging task, especially when the anomaly exhibits a change of existing structures, e.g., brain atrophy or changes in the pleural space due to pleural effusions. In this work, we present a weakly supervised and detail-preserving method that is able to detect structural changes of existing anatomical structures. In contrast to standard anomaly detection methods, our method extracts information about the disease characteristics from two groups: a group of patients affected by the same disease and a healthy control group. Together with identity-preserving mechanisms, this enables our method to extract highly disease-specific characteristics for a more detailed detection of structural changes. We designed a specific synthetic data set to evaluate and compare our method against state-of-the-art anomaly detection methods. Finally, we show the performance of our method on chest X-ray images. Our method called DeScarGAN outperforms other anomaly detection methods on the synthetic data set and by visual inspection on the chest X-ray image data set. <img src="Result_DeScarGAN.jpg" width="60%"> Datasets ------------------- For the generation of the synthetic dataset, one has to run the script [create_synthetic_dataset.py](./create_synthetic_dataset.py). A new folder called "./warp-set" will be created and the generated images of both the diseased and healthy subjects will be stored in there seperately. If one wants to use the Chexpert dataset, it is available for download [here](https://stanfordmlgroup.github.io/competitions/chexpert/). | 576 |
JunKong5/Semveal2020-task9 | ['sentiment analysis'] | ['HPCC-YNU at SemEval-2020 Task 9: A Bilingual Vector Gating Mechanism for Sentiment Analysis of Code-Mixed Text'] | sentimix/Code/dual_embed.py sentimix/Code/Attention_layer.py sentimix/dataprocess/spanlish/preprocessData.py sentimix/Code/gating_2lang_spanlish/process.py sentimix/dataprocess/hindi/dataprocess.py sentimix/dataprocess/pre_process_1.py sentimix/Code/gating_2lang_hindi/process.py sentimix/dataprocess/hindi/tool.py sentimix/Code/word_embed_2lang/vote_classifier.py sentimix/Code/plot_batchsize.py sentimix/Code/MyNormalizer.py sentimix/Code/word_embed_2lang/Capsule_net.py sentimix/dataprocess/hindi/cat_process.py sentimix/Code/gating_2lang_hindi/metric.py sentimix/Code/word_embed_2lang/char_word_cat.py sentimix/Code/gating_2lang_spanlish/vector gating.py sentimix/Code/word_embed_2lang/voting_model.py sentimix/dataprocess/hindi/config.py sentimix/dataprocess/spanlish/dataprocess.py sentimix/Code/word_embed_2lang/model_bilstm.py sentimix/Code/word_embed_2lang/stacking.py sentimix/dataprocess/spanlish/cat_process.py sentimix/dataprocess/spanlish/utils1.py sentimix/dataprocess/googletrans_temp.py sentimix/Code/word_embed_2lang/model_attention.py sentimix/Code/gating_2lang_hindi/change.py sentimix/Code/word_embed_2lang/model_cnn_lstm.py sentimix/Code/gating_proccess.py sentimix/dataprocess/spanlish/utils.py sentimix/dataprocess/spanlish/tool.py sentimix/result/change.py sentimix/Code/gating_spanlish/gating_proccess.py sentimix/Code/gating_spanlish/change.py sentimix/Code/word_embed_2lang/split_test.py sentimix/dataprocess/spanlish/pre_process_1.py sentimix/Code/gating2.py sentimix/Code/gating_2lang_spanlish/metric.py sentimix/Code/word_embed_2lang/process.py sentimix/Code/Capsule_net.py sentimix/Code/word_embed_2lang/Attention_layer.py sentimix/dataprocess/hindi/techniques.py sentimix/dataprocess/hindi/demo.py sentimix/dataprocess/spanlish/get_process.py sentimix/Code/vector gating_hinglish.py sentimix/dataprocess/spanlish/get_result.py sentimix/Code/gating_2lang_hindi/MyNormalizer.py sentimix/Code/gating_2lang_hindi/vector gating.py sentimix/Code/gating_2lang_spanlish/MyNormalizer.py sentimix/Code/gating_spanlish/MyNormalizer.py sentimix/dataprocess/config.py sentimix/dataprocess/utils.py sentimix/dataprocess/hindi/preprocess.py sentimix/Code/word_embed_2lang/stacking_xgboost.py sentimix/dataprocess/spanlish/Data/check.py sentimix/Code/processdata.py sentimix/Code/word_embed_2lang/model_capsule.py sentimix/dataprocess/hindi/utils.py sentimix/dataprocess/spanlish/config.py sentimix/Code/gating_spanlish/vector gating.py sentimix/dataprocess/hindi/get_process.py AttentionMC AttentionMV AttentionMM Attention_layer AttentionM Capsule squash buildmodel RNN parse save_model save_data word convert_char2num accuracy get_activations LossHistory accuracy_curve evaluate_model get_W parse save_model save_data build_data_train_test load_bin_vec accuracy get_activations LossHistory char2num make_idx_data MyLayer accuracy_curve evaluate_model get_idx_from_sent get_W parse build_data_train_test load_bin_vec make_idx_data parsetest get_idx_from_sent removeRepeat removeVovels token normalize_matrix get_W parse save_model write_as_test build_data_train_test load_bin_vec accuracy LossHistory char2num make_idx_data accuracy_curve parsetest get_idx_from_sent removeRepeat removeVovels token normalize_matrix get_W parse build_data_train_test load_bin_vec make_idx_data parsetest get_idx_from_sent get_W parse save_model write_as_test AttentionM build_data_train_test load_bin_vec accuracy LossHistory char2num make_idx_data accuracy_curve parsetest get_idx_from_sent removeRepeat removeVovels token normalize_matrix get_W parse build_data_train_test load_bin_vec make_idx_data parsetest get_idx_from_sent get_W parse save_model write_as_test AttentionM build_data_train_test load_bin_vec accuracy LossHistory char2num make_idx_data accuracy_curve parsetest get_idx_from_sent get_W parse build_data_train_test load_bin_vec make_idx_data parsetest get_idx_from_sent removeRepeat removeVovels token normalize_matrix get_W parse save_model write_as_test build_data_train_test load_bin_vec accuracy LossHistory char2num make_idx_data accuracy_curve parsetest get_idx_from_sent AttentionMC AttentionMV AttentionMM Attention_layer AttentionM Capsule squash buildmodel parse convert_char2num accuracy LossHistory accuracy_curve write_as_test AttentionM accuracy_curve accuracy LossHistory squash Capsule AttentionM accuracy_curve accuracy LossHistory squash Capsule AttentionM accuracy_curve accuracy LossHistory squash Capsule AttentionM accuracy_curve accuracy LossHistory squash Capsule get_W parse build_data_train_test load_bin_vec make_idx_data parsetest get_idx_from_sent lstmModel attentionModel get_stacking capsulnetModel accuracy cnnlstmModel main trainandTest accuracy _parallel_fit_estimator VotingClassifier lstmModel attentionModel capsulnetModel accuracy cnnlstmModel process_text tokenize write_file write_as_test removeURL replaceMultiExclamationMark write_as_test removeuser processtest replaceuser processemoji process write_file replaceMultiQuestionMark removehashtag ekphrasis_config removeNumbers replacement replaceMultiStopMark replacehashtag removeSpecialchar removeHashtagInFrontOfWord replaceslang replaceContraction review_to_wordlist tokenize P countEmoticons countSlang countMultiExclamationMarks replaceMultiExclamationMark candidates replaceURL known countElongated addCapTag edits1 countMultiQuestionMarks removeUnicode replaceMultiQuestionMark spellCorrection replace words removeNumbers replaceNegations replaceAtUser replaceMultiStopMark countMultiStopMarks edits2 removeHashtagInFrontOfWord countAllCaps replaceElongated replaceContraction removeEmoticons addNotTag test_saved_model statistic_fuck pre_convert generate_data convert getMetrics test_svc test_pell_correct get_wassa_data test ekphrasis_config preprocessData delete_token process_text write_file write_as_test process_test removeURL replaceMultiExclamationMark write_as_test removeuser processtest replaceuser processemoji process write_file replaceMultiQuestionMark removehashtag ekphrasis_config removeNumbers replacement replaceMultiStopMark replacehashtag removeSpecialchar removeHashtagInFrontOfWord replaceslang replaceContraction review_to_wordlist process_text test_saved_model statistic_fuck pre_convert generate_data convert getMetrics test_svc test_pell_correct get_wassa_data test ekphrasis_config preprocessData delete_token process_text write_file write_as_test process_test write_as_test process_text clean_str write_file tokenize sqrt epsilon sum square Embedding embedding_layer Model Input compile asarray print lower open token append split asarray lower open append token split list print pad_sequences set append show subplot str plot grid title figure legend range len time print TensorBoard EarlyStopping to_categorical loss_plot strftime LossHistory Model mkdir summary ModelCheckpoint train_test_split Input compile fit close write save_weights to_json open function print to_categorical evaluate dump File close create_dataset open str print recall_score confusion_matrix trace f1_score float sum list asarray print insert pad_sequences tolist set shape append enumerate len defaultdict len set lower range split keys info dict zeros uniform len append append array pad_sequences get_idx_from_sent max len append lower split print print shape removeVovels findall removeRepeat lower append print open token append print max len Model Input compile Model Input compile Embedding embedding_layer Model Input compile Model Input compile int format print EarlyStopping fit makedirs vstack save append zeros range predict len load join dump get_stacking concatenate print to_categorical SVC fit accuracy shape append argmax array predict open XGBClassifier accuracy predict fit fit lower startswith demojize append split lower replace tokenize append join startswith split sub sub sub sub sub join sub sub sub join print add ekphrasis_config range len subn join remove replace len lower sub ekphrasis_config demojize keys range split replacement replaceMultiStopMark replaceContraction replacehashtag replaceslang replaceuser processemoji lower sub removeURL replaceMultiExclamationMark append replaceMultiQuestionMark enumerate split replacement replaceMultiStopMark replaceContraction replacehashtag replaceslang replaceuser processemoji lower sub removeURL replaceMultiExclamationMark append replaceMultiQuestionMark enumerate split join replace lower sub get_text startswith append split join word_tokenize punctuation spellCorrection stem lemmatize translate pos_tag addCapTag maketrans replaceElongated replaceNegations sub sub sub compile append word_tokenize synsets sub compile sub lemmas name synsets add set antonyms append replace sub findall sub replace len sum to_categorical range mean argmax clip print DataFrame to_csv argmax read_csv values to_csv read_csv append DataFrame range len print to_csv read_csv DataFrame range len SpellCorrector correct print print join remove split reset_index DataFrame to_csv append preprocessData range len load arange replace read_table print to_categorical SVC fit getMetrics argmax array predict open arange to_categorical SVC getMetrics argmax open load_model read_table shape append walk predict dump replace concatenate listdir load join print zeros array fit load replace read_table concatenate print to_categorical SVC fit getMetrics shape append zeros argmax array predict open join read_table append range values len join list read_table to_csv index append DataFrame range len append lower tokenize enumerate | JunKong5/Semveal2020-task9 | 577 |
JunMa11/SegLoss | ['medical image segmentation', 'semantic segmentation'] | ['Segmentation Loss Odyssey'] | losses_pytorch/focal_loss.py test/nnUNetV1/loss_functions/boundary_loss.py test/nnUNetV1/network_training/nnUNetTrainerCE.py test/nnUNetV2/loss_functions/dice_loss.py test/nnUNetV1/network_training/nnUNetTrainer_Lovasz.py test/nnUNetV1/network_training/nnUNetTrainer_pGDice.py losses_pytorch/ND_Crossentropy.py test/nnUNetV1/network_training/nnUNetTrainer_DiceTopK10.py test/nnUNetV2/network_training/nnUNetTrainerV2_Loss_CE.py test/nnUNetV1/network_training/nnUNetTrainer_DiceHD.py test/nnUNetV1/network_training/nnUNetTrainerWCE.py test/nnUNetV1/network_training/nnUNetTrainerWCET2.py test/nnUNetV1/network_training/nnUNetTrainerWCET1.py losses_pytorch/dice_loss.py test/nnUNetV1/network_training/nnUNetTrainer_ExpLogT0.py test/nnUNetV1/network_training/nnUNetTrainerWCET4.py test/nnUNetV1/network_training/nnUNetTrainerEDT.py test/nnUNetV1/network_training/nnUNetTrainer_ExpLogT1.py test/nnUNetV1/loss_functions/lovasz_loss.py test/nnUNetV1/network_training/nnUNetTrainer_HDBinary.py test/nnUNetV1/network_training/nnUNetTrainer_TopK10.py test/nnUNetV1/network_training/nnUNetTrainer_IouCE.py test/nnUNetV1/loss_functions/dice_loss.py test/nnUNetV1/network_training/nnUNetTrainer_ExpLogT4.py test/nnUNetV1/network_training/nnUNetTrainer_SmDice.py losses_pytorch/lovasz_loss.py test/nnUNetV1/network_training/nnUNetTrainer.py test/nnUNetV1/network_training/nnUNetTrainerWCET0.py test/nnUNetV1/network_training/nnUNetTrainer_Focal.py test/nnUNetV2/network_training/nnUNetTrainerV2_Loss_TopK10.py test/nnUNetV1/network_training/nnUNetTrainer_Asym.py losses_pytorch/hausdorff.py test/nnUNetV2/loss_functions/TopK_loss.py test/nnUNetV1/loss_functions/focal_loss.py test/nnUNetV1/network_training/nnUNetTrainer_GDice.py test/nnUNetV1/network_training/nnUNetTrainerCascadeFullRes.py test/nnUNetV1/network_training/nnUNetTrainer_IouTopK10.py test/nnUNetV2/network_training/nnUNetTrainerV2_Loss_DiceTopK10CE.py test/nnUNetV2/network_training/nnUNetTrainerV2_Loss_DiceTopK10Focal.py test/nnUNetV1/network_training/nnUNetTrainer_Tversky.py test/nnUNetV1/loss_functions/ND_Crossentropy.py test/nnUNetV1/network_training/nnUNetTrainer_ExpLogT2.py test/nnUNetV1/network_training/nnUNetTrainer_Dice.py test/nnUNetV1/network_training/nnUNetTrainer_SS.py losses_pytorch/boundary_loss.py test/nnUNetV2/loss_functions/crossentropy.py test/nnUNetV1/network_training/network_trainer.py test/nnUNetV1/network_training/nnUNetTrainer_DiceBD.py test/nnUNetV1/network_training/nnUNetTrainer_Iou.py test/nnUNetV2/network_training/nnUNetTrainerV2_Loss_DiceTopK10.py test/nnUNetV2/loss_functions/focal_loss.py test/nnUNetV2/network_training/nnUNetTrainerV2_Loss_Dice.py test/nnUNetV1/network_training/nnUNetTrainer_ExpLog.py test/nnUNetV1/loss_functions/TopK_loss.py test/nnUNetV1/network_training/nnUNetTrainer_FocalTversky.py test/nnUNetV2/network_training/nnUNetTrainerV2_Loss_DiceFocal.py DC_and_BD_loss softmax_helper SoftDiceLoss get_tp_fp_fn compute_edts_forhdloss BDLoss compute_edts_forPenalizedLoss DistBinaryDiceLoss sum_tensor FocalLoss HausdorffDTLoss HausdorffERLoss lovasz_grad LovaszSoftmax CrossentropyND nll_loss WeightedCrossEntropyLoss flatten TopKLoss DisPenalizedCE WeightedCrossEntropyLossV2 compute_edts_forPenalizedLoss DC_and_BD_loss compute_gt_dtm compute_sdf get_tp_fp_fn SoftDiceLoss DC_and_HD_loss HDLoss compute_pred_dtm BDLoss SSLoss TverskyLoss IoULoss FocalTversky_loss get_tp_fp_fn SoftDiceLoss ExpLog_loss DC_and_CE_loss DC_and_topk_loss flatten gt2onehot AsymLoss SoftDiceLossV2 DC_and_Focal_loss PenaltyGDiceLoss GDiceLossV2 GDiceLoss FocalLoss lovasz_grad LovaszSoftmax DistPenalizedCE CrossentropyND nll_loss WeightedCrossEntropyLoss flatten CrossentropyNDTopK TopKThreshold WeightedCrossEntropyLossV2 compute_edts_forPenalizedLoss TopKLoss nnUNetTrainer_DiceTopK10 NetworkTrainer nnUNetTrainer nnUNetTrainerCascadeFullRes nnUNetTrainerCE get_default_augmentation_withEDT nnUNetTrainerEDT nnUNetTrainerWCE nnUNetTrainerWCET0 nnUNetTrainerWCET1 nnUNetTrainerWCET2 nnUNetTrainerWCET4 nnUNetTrainer_Asym nnUNetTrainer_Dice nnUNetTrainer_DiceBD nnUNetTrainer_DiceHD nnUNetTrainer_ExpLog nnUNetTrainer_ExpLogT0 nnUNetTrainer_ExpLogT1 nnUNetTrainer_ExpLogT2 nnUNetTrainer_ExpLogT4 nnUNetTrainer_Focal nnUNetTrainer_FocalTversky nnUNetTrainer_GDice nnUNetTrainer_HDBinary nnUNetTrainer_Iou nnUNetTrainer_IouCE nnUNetTrainer_IouTopK10 nnUNetTrainer_Lovasz nnUNetTrainer_pGDice nnUNetTrainer_SmDice nnUNetTrainer_SS nnUNetTrainer_TopK10 nnUNetTrainer_Tversky RobustCrossEntropyLoss GDL IoULoss get_tp_fp_fn_tn SoftDiceLoss DC_and_CE_loss DC_and_BCE_loss DC_and_topk_loss SoftDiceLossSquared DC_and_Focal_loss GDL_and_CE_loss MCCLoss DC_topk_focal_loss DC_topk_ce_loss FocalLossV2 FocalLoss TopKLoss nnUNetTrainerV2_Loss_CE nnUNetTrainerV2_Loss_Dice nnUNetTrainerV2_Loss_DiceFocal nnUNetTrainerV2_Loss_DiceTopK10 nnUNetTrainerV2_Loss_DiceTopK10CE nnUNetTrainerV2_Loss_DiceTopK10Focal nnUNetTrainerV2_Loss_TopK10 exp size repeat int sorted sum astype tuple size shape stack sum_tensor range len zeros distance_transform_edt range shape distance_transform_edt shape zeros max range cumsum sum len tuple size contiguous permute dim range squeeze uint8 distance_transform_edt astype any zeros bool range distance_transform_edt astype any zeros bool range zeros distance_transform_edt any range tuple size shape range len MaskTransform DataChannelSelectionTransform max MirrorTransform Convert3DTo2DTransform GammaTransform NumpyToTensor AppendChannelsTransform MoveSegAsOneHotToData Convert2DTo3DTransform append get RenameTransform RemoveRandomConnectedComponentFromOneHotEncodingTransform Compose MultiThreadedAugmenter RemoveLabelTransform ApplyRandomBinaryOperatorTransform SegChannelSelectionTransform SpatialTransform tuple size shape stack sum_tensor range len | # Loss functions for image segmentation

```
@article{LossOdyssey,
title = {Loss Odyssey in Medical Image Segmentation},
journal = {Medical Image Analysis},
volume = {71},
pages = {102035},
| 578 |
JunMa11/SegWithDistMap | ['medical image segmentation', 'lesion segmentation', 'semantic segmentation'] | ['Boundary loss for highly unbalanced segmentation'] | code/train_LA_MultiHead_FGDTM_L1.py code/train_LA_Rec_SDF_L1.py code/dataloaders/utils.py code/test_LA.py code/train_LA_MultiHead_SDF_L1PlusL2.py code/train_LA_Rec_SDF_L1PlusL2.py code/train_LA_SDF.py code/test_LITS.py code/train_LITS_Rec_SDF_L2.py code/dataloaders/livertumor.py code/networks/vnet_multi_task.py code/test_LITS_MultiHead_SDF.py code/test_LITS_Rec_SDF.py code/train_LITS.py code/test_LA_MultiHead_SDF.py code/train_LA_HD.py code/dataloaders/la_heart.py code/train_LA_MultiHead_FGDTM_L1PlusL2.py code/utils/util.py code/test_LA_Rec_FGDTM.py code/networks/vnet_sdf.py code/train_LA_AAAISDF_L1.py code/train_LA_MultiHead_FGDTM_L2.py code/train_LITS_Rec_SDF_L1.py code/utils/ramps.py code/train_LA_Rec_FGDTM_L2.py code/train_LA_Rec_FGDTM_L1PlusL2.py code/networks/vnet.py code/train_LA_Rec_SDF_L2.py code/test_LA_MultiHead_FGDTM.py code/test_util.py code/networks/vnet_multi_head.py code/train_LiTS_MultiHead_SDF_L2.py code/networks/vnet_rec.py code/train_LITS_Rec_SDF_L1PlusL2.py code/train_LA_MultiHead_SDF_L2.py code/train_LA_BD.py code/train_LITS_BD.py code/train_LiTS_MultiHead_SDF_L1.py code/train_LITS_HD.py code/test_LA_Rec_SDF.py code/train_LA_Rec_FGDTM_L1.py code/utils/losses.py code/train_LA_MultiHead_SDF_L1.py code/train_LA_AAAISDF.py code/train_LA.py code/test_LA_AAAISDF.py compute_sdf AAAI_sdf_loss worker_init_fn test_calculate_metric test_calculate_metric test_single_case calculate_metric_percase cal_dice dist_test_all_case test_calculate_metric test_single_case calculate_metric_percase cal_dice dist_test_all_case test_calculate_metric test_single_case calculate_metric_percase cal_dice dist_test_all_case test_calculate_metric test_single_case calculate_metric_percase cal_dice dist_test_all_case test_calculate_metric test_single_case calculate_metric_percase cal_dice dist_test_all_case test_calculate_metric test_single_case calculate_metric_percase cal_dice test_all_case test_calculate_metric test_single_case calculate_metric_percase cal_dice dist_test_all_case test_calculate_metric test_single_case calculate_metric_percase cal_dice dist_test_all_case test_all_case test_single_case calculate_metric_percase cal_dice worker_init_fn compute_sdf dice_loss worker_init_fn dice_loss compute_sdf compute_sdf1_1 boundary_loss worker_init_fn hd_loss dice_loss compute_dtm compute_dtm01 worker_init_fn worker_init_fn dice_loss compute_dtm worker_init_fn dice_loss compute_dtm worker_init_fn dice_loss compute_dtm compute_sdf dice_loss worker_init_fn compute_sdf dice_loss worker_init_fn compute_sdf dice_loss worker_init_fn worker_init_fn dice_loss compute_dtm worker_init_fn dice_loss compute_dtm worker_init_fn dice_loss compute_dtm compute_sdf dice_loss worker_init_fn compute_sdf dice_loss worker_init_fn compute_sdf dice_loss worker_init_fn compute_sdf1_1 worker_init_fn worker_init_fn dice_loss compute_sdf compute_sdf1_1 boundary_loss worker_init_fn hd_loss dice_loss compute_dtm compute_dtm01 worker_init_fn compute_sdf dice_loss worker_init_fn compute_sdf dice_loss worker_init_fn compute_sdf dice_loss worker_init_fn compute_sdf dice_loss worker_init_fn compute_sdf dice_loss worker_init_fn RandomNoise CenterCrop CreateOnehotLabel ToTensor LAHeart iterate_once RandomCrop RandomRotFlip TwoStreamBatchSampler grouper iterate_eternally RandomNoise CenterCrop CreateOnehotLabel ToTensor iterate_once RandomCrop RandomRotFlip TwoStreamBatchSampler grouper LiverTumor iterate_eternally lr_poly generate_param_report decode_seg_map_sequence recursive_glob encode_segmap decode_segmap post_processing get_pascal_labels get_iou get_dice get_cityscapes_labels cross_entropy2d get_mc_dice ResidualConvBlock UpsamplingDeconvBlock Upsampling DownsamplingConvBlock VNet ConvBlock ResidualConvBlock VNetMultiHead UpsamplingDeconvBlock Upsampling DownsamplingConvBlock ConvBlock ResidualConvBlock UpsamplingDeconvBlock VNetMultiTask Upsampling DownsamplingConvBlock ConvBlock ResidualConvBlock UpsamplingDeconvBlock Upsampling DownsamplingConvBlock VNetRec ConvBlock ResidualConvBlock UpsamplingDeconvBlock Upsampling DownsamplingConvBlock VNet ConvBlock AAAI_sdf_loss sum_tensor entropy_loss dice_loss1 dice_loss iou_loss compute_sdf01 compute_sdf1_1 compute_fore_dist softmax_mse_loss entropy_loss_map sdf_kl_loss softmax_kl_loss symmetric_mse_loss softmax_dice_loss sigmoid_rampup linear_rampup cosine_rampdown load_model AverageMeter UnifLabelSampler Logger learning_rate_decay norm_ip norm_range uint8 min astype distance any zeros bool max range norm sum numel seed load join str format print eval load_state_dict test_all_case cuda dist_test_all_case epoch_num calculate_metric_percase save DataFrame str list test_single_case OrderedDict append format astype join print File makedirs float32 to_csv tqdm Nifti1Image eye preproc_fn len squeeze min astype float32 range sigmoid shape pad ceil expand_dims numpy cuda net astype zeros float sum range jc hd95 dc asd argmax softmax tanh calculate_metric_percase DataFrame list test_single_case OrderedDict append format astype WriteImage join print File makedirs float32 to_csv tqdm GetImageFromArray preproc_fn len save Nifti1Image eye format print float sum uint8 min astype distance zeros max range mean einsum astype distance any zeros bool max range astype distance any zeros bool range mean float einsum print shape expand_dims any bool zeros astype get_pascal_labels enumerate append transpose decode_segmap from_numpy show copy imshow get_pascal_labels get_cityscapes_labels zeros range str close write open criterion size squeeze long CrossEntropyLoss item append sum range len print item long range len item zeros long range len label binary_fill_holes sum range regionprops float sum float sum mean sum cuda log softmax range sum cuda log softmax log_softmax softmax kl_div uint8 astype shape distance zeros expand_dims max range uint8 astype shape distance zeros expand_dims max range int sorted sum astype tuple size shape sum_tensor range len tuple size shape kl_div range len clip load format print size load_state_dict isfile param_groups sqrt clamp | # 3D Medical Image Segmentation With Distance Transform Maps ## Motivation: How Distance Transform Maps Boost Segmentation CNNs [(MIDL 2020)](https://2020.midl.io/papers/ma20a.html) Incorporating the distance Transform maps of image segmentation labels into CNNs-based segmentation tasks has received significant attention in 2019. These methods can be classified into two main classes in terms of the main usage of distance transform maps. - Designing new loss functions - Adding an auxiliary task, e.g. distance map regression  However, with these new methods on the one hand and the diversity of the specific implementations and dataset-related challenges on the other, it's hard to figure out which design can generalize well beyond the experiments in the original papers. In this repository, we want to re-implement these methods (published in 2019) and evaluate them on the same 3D segmentation tasks (heart and liver tumor segmentation). ## Experiments | Task | LA Contributor | GPU | LiTS Contributor | GPU | | 579 |
Jungguchoi/Hybrid_CNN_with_1DCAE | ['time series'] | ['ShortFuse: Biomedical Time Series Representations in the Presence of Structured Information'] | Hybrid_CNN(ShortFuse).py Conv_AE | # Hybrid_CNN_with_1DCAE ### This code implements the following paper. #### Paper URL : https://arxiv.org/abs/1705.04790 #### Paper Title : ShortFuse: Biomedical Time Series Representations in the Presence of Structured Information #### Authors : Madalina Fiterau, Suvrat Bhooshan, Jason Fries, Charles Bournhonesque, Jennifer Hicks, Eni Halilaj, Christopher Ré, Scott Delp #### In this paper, authors suggest hybrid Convolutional layer and hybrid LSTM module. #### But in this repositories, I implemented only hybrid convolutional layer. #### [email protected] | 580 |
JunjH/Revisiting_Single_Depth_Estimation | ['depth estimation', 'monocular depth estimation'] | ['Revisiting Single Image Depth Estimation: Toward Higher Resolution Maps with Accurate Object Boundaries'] | train.py models/senet.py loaddata_demo.py demo.py nyu_transform.py loaddata.py models/modules.py demo_transform.py test.py util.py sobel.py models/densenet.py models/net.py models/resnet.py main test define_model _is_numpy_image CenterCrop ToTensor Scale Normalize _is_pil_image getTrainingData getTestingData depthDataset depthDataset readNyu2 Lighting Grayscale _is_numpy_image Saturation CenterCrop RandomRotate Contrast ToTensor Brightness Scale Normalize RandomHorizontalFlip _is_pil_image RandomOrder ColorJitter Sobel lg10 evaluateError averageErrors nValid addErrors getNanMask setNanToZero maxOfTwo nNanElement densenet161 DenseNet _DenseLayer _DenseBlock _Transition MFF R E_densenet D E_senet _UpProjection E_resnet model ResNet resnet50 Bottleneck resnet152 conv3x3 resnet34 resnet18 BasicBlock resnet101 se_resnext50_32x4d senet154 SENet SEResNetBottleneck SEBottleneck SEResNeXtBottleneck initialize_pretrained_model Bottleneck se_resnet152 se_resnet50 se_resnext101_32x4d SEModule se_resnet101 densenet161 senet154 model resnet50 E_densenet E_senet E_resnet load define_model test eval load_state_dict cuda readNyu2 model numpy cuda imsave enumerate DataLoader depthDataset DataLoader depthDataset DataLoader depthDataset lt clone clone getNanMask nValid lg10 sum pow div numpy setNanToZero float abs maxOfTwo load_url load_state_dict DenseNet load_url ResNet load_state_dict load_url ResNet load_state_dict load_url ResNet load_state_dict load_url ResNet load_state_dict load_url ResNet load_state_dict load_url load_state_dict initialize_pretrained_model SENet initialize_pretrained_model SENet initialize_pretrained_model SENet initialize_pretrained_model SENet initialize_pretrained_model SENet initialize_pretrained_model SENet | # Revisiting Single Image Depth Estimation: Toward Higher Resolution Maps with Accurate Object Boundaries <br> Junjie Hu, Mete Ozay, Yan Zhang, Takayuki Okatani https://arxiv.org/abs/1803.08673 Results -   Dependencies - + python 2.7<br> | 581 |
JunjieHu/xtreme-dev | ['cross lingual transfer'] | ['XTREME: A Massively Multilingual Multi-task Benchmark for Evaluating Cross-lingual Generalization'] | third_party/utils_retrieve.py third_party/run_classify.py third_party/roberta.py third_party/processors/pawsx.py third_party/processors/utils.py third_party/ud-conversion-tools/conllu_to_conll.py third_party/run_tag.py third_party/run_squad.py third_party/utils_tag.py utils_preprocess.py third_party/processors/squad.py third_party/processors/xnli.py third_party/xlm.py evaluate.py third_party/xlm_roberta.py third_party/ud-conversion-tools/lib/conll.py third_party/run_retrieval.py read_squad evaluate evaluate_one_task accuracy mlqa_em_f1 f1 squad_em_f1 read_tag read_label mlqa_preprocess panx_preprocess pawsx_preprocess udpos_preprocess xquad_preprocess tatoeba_preprocess remove_qa_test_annotations xnli_preprocess tydiqa_preprocess panx_tokenize_preprocess udpos_tokenize_preprocess RobertaForSequenceClassification RobertaLMHead RobertaClassificationHead RobertaForTokenClassification RobertaEmbeddings RobertaForQuestionAnswering RobertaForMultipleChoice RobertaForMaskedLM RobertaModel set_seed evaluate compute_metrics main train load_and_cache_examples extract_embeddings load_model tokenize_text mean_pool_embedding load_embeddings cls_pool_embedding concate_embedding prepare_batch main set_seed evaluate main to_list train load_and_cache_examples save_predictions set_seed evaluate main train load_and_cache_examples shift_embeddings unique_embeddings knnGPU knnCPU bucc_eval mine_bitext score similarity_search read_sent2id knn score_candidates bucc_optimize read_candidate2score text_load_unify bucc_extract InputFeatures get_labels InputExample convert_examples_to_features read_examples_from_file XLMForTokenClassification XLMRobertaForMultipleChoice XLMRobertaForSequenceClassification XLMRobertaForQuestionAnswering XLMRobertaForTokenClassification XLMRobertaConfig XLMRobertaModel XLMRobertaForMaskedLM PawsxProcessor _check_is_max_context SquadProcessor SquadV2Processor squad_convert_examples_to_features _improve_answer_span _is_whitespace SquadV1Processor SquadExample _new_check_is_max_context squad_convert_example_to_features_init squad_convert_example_to_features SquadFeatures SquadResult InputFeatures convert_examples_to_features InputExample XnliProcessor main parse_id CoNLLReader remove_all_cycle parse_deps DependencyTree parse_feats append strip open split f1_score recall_score precision_score float sum len print exit join items defaultdict all list evaluate_one_task sum keys values len from_pretrained join format model_name_or_path print data_dir _preprocess_one_file max_len model_type output_dir split makedirs join data_dir makedirs output_dir _process_one_file split from_pretrained join format model_name_or_path print data_dir _preprocess_one_file max_len model_type output_dir split makedirs join format remove_empty_space endswith print data_dir makedirs extend output_dir _read_one_file _write_files walk split join format print data_dir _preprocess_one_file output_dir makedirs join format print data_dir _preprocess_train_file output_dir _preprocess_file makedirs items list len copy output_dir zip range makedirs data_dir remove_qa_test_annotations data_dir remove_qa_test_annotations join list defaultdict items data_dir rename output_dir remove_qa_test_annotations makedirs join listdir seed manual_seed_all manual_seed gradient_accumulation_steps save_only_best_checkpoint model get_linear_schedule_with_warmup tuple clip_grad_norm_ zero_grad train_language DataLoader DataParallel DistributedDataParallel max_grad_norm output_dir save max exists initialize list set_seed logging_steps load_state_dict master_params state_dict SummaryWriter format close mean save_pretrained num_train_epochs info fp16 trange per_gpu_train_batch_size max_steps enumerate load join int n_gpu items evaluate model_name_or_path AdamW backward add_scalar makedirs tqdm parameters eval_test_set step train_batch_size len tuple DataLoader DataParallel argmax max eval_batch_size str sorted per_gpu_eval_batch_size compute_metrics append SequentialSampler update format eval info zip load_and_cache_examples n_gpu makedirs tqdm numpy get_train_examples save tensor get_pseudo_test_examples str max_seq_length data_dir get_labels get_translate_test_examples TensorDataset convert_examples_to_features format info pop join load barrier get_dev_examples get_test_examples get_translate_train_examples enable_attach from_pretrained init_checkpoint warning ArgumentParser device do_train output_dir save eval_all_checkpoints setLevel basicConfig list set_seed set_device get_labels device_count parse_args to WARN update format init_process_group lower save_pretrained info fp16 wait_for_attach task_name train join n_gpu evaluate model_name_or_path print do_predict_dev add_argument makedirs barrier test_split dict bool load_and_cache_examples local_rank len load format info sep_token append convert_tokens_to_ids min pad_token to max cls_token len join format info range exists from_pretrained pad_token_id format model_name_or_path device eval info pad_token to from_pretrained batch_size num_layers init_checkpoint save device max list all max_seq_length shape model_type prepare_batch ceil to range format tokenize_text astype eval info pad_token zip int pad_token_id model_name_or_path min float32 tqdm empty_cache len append sum view append hstack predict_dir similarity_search num_layers load_embeddings exists str extract_embeddings data_dir candidate_prefix range tgt_language bucc_eval extract_embeds embed_size src_language mine_bitext update version_2_with_negative output_dir max_answer_length default_timer do_lower_case n_best_size squad_evaluate verbose_logging enumerate int compute_predictions_logits compute_predictions_log_probs version_2_with_negative null_score_diff_threshold unique_id SquadResult squad_convert_examples_to_features warn get_examples_from_dataset version_2_with_negative register_half_function range model_name_or_path len extend read_examples_from_file split ignore_index labels format concatenate print min index_cpu_to_all_gpus search add argsort IndexFlatIP append zeros range add IndexFlatL2 search IndexFlatIP sum format print score shape zeros range format setdefault print open append len print format len print mean score max open add score_candidates sum shift_embeddings unique_embeddings format concatenate astype close knn mean stack zip enumerate print min normalize_L2 argsort text_load_unify items sorted range len items close write append open add zip set print read_sent2id format format print len bucc_optimize intersection read_candidate2score bucc_extract IndexFlatL2 search normalize_L2 add get format info join format isinstance zip print InputFeatures convert_tokens_to_ids words extend labels guid info append tokenize enumerate len join tokenize range length start min enumerate min enumerate end_position convert_ids_to_tokens _improve_answer_span warning is_impossible encode_plus cls_token_id tolist encode append range get language doc_tokens question_text whitespace_tokenize max_len_sentences_pair _new_check_is_max_context answer_text tokenize enumerate minimum join min index max_len start_position SquadFeatures array len arange size min cpu_count tqdm TensorDataset append tensor get language text_b convert_ids_to_tokens label float text_a encode_plus remove_node_properties defaultdict CoNLLReader exit write_conll remove_arabic_diacritics input lang replace_subtokens_with_fused_forms copy filter_sentence_content output_format remove_deprel_suffixes output read_conll_u split tuple map split list DiGraph len simple_cycles edges range remove_edge has_edge | # XTREME: A Massively Multilingual Multi-task Benchmark for Evaluating Cross-lingual Generalization [**Tasks**](#tasks-and-languages) | [**Download**](#download-the-data) | [**Baselines**](#build-a-baseline-system) | [**Leaderboard**](#leaderboard-submission) | [**Website**](https://ai.google.com/research/xtreme) | [**Paper**](https://arxiv.org/pdf/2003.11080.pdf) This repository contains information about XTREME, code for downloading data, and implementations of baseline systems for the benchmark. # Introduction The Cross-lingual TRansfer Evaluation of Multilingual Encoders (XTREME) benchmark is a benchmark for the evaluation of the cross-lingual generalization ability of pre-trained multilingual models. It covers 40 typologically diverse languages (spanning 12 language families) and includes nine tasks that collectively require reasoning about different levels of syntax and semantics. The languages in XTREME are selected to maximize language diversity, coverage in existing tasks, and availability of training data. Among these are many under-studied languages, such as the Dravidian languages Tamil (spoken in southern India, Sri Lanka, and Singapore), Telugu and Malayalam (spoken mainly in southern India), and the Niger-Congo languages Swahili and Yoruba, spoken in Africa. | 582 |
JunweiLiang/VERA_Shooter_Localization | ['temporal localization'] | ['Technical Report of the Video Event Reconstruction and Analysis (VERA) System -- Shooter Localization, Models, Interface, and Beyond'] | ml_code/AudioSync/ChunWai.py ml_code/GunshotDetection/getSpectrogramAndPower.py python_server/Daisy.py ml_code/GunshotDetection/watchSound.py ml_code/AudioSync/hough.py python_server/run.py ml_code/AudioSync/stft_cat.py ml_code/GunshotDetection/eval_json.py ml_code/AudioSync/wav2stft.py ml_code/GunshotDetection/ChunWai.py ml_code/GunshotDetection/videoSeg.py ml_code/GunshotDetection/liblinear_predict.py ml_code/AudioSync/globalSync.py ml_code/AudioSync/batchSequenceMatching.py ml_code/AudioSync/assignKmeans.py ml_code/GunshotDetection/reranking.py ml_code/GunshotDetection/eval_nolabel.py python_server/ChunWai.py python_server/Data.py python_server/process.py python_server/Preprocessing.py ml_code/AudioSync/getWav.py python_server/php_python.py Daisy | # VERA - The Shooter Localization System This repository contains the code and models for the following paper: **[Technical Report of the Video Event Reconstruction and Analysis (VERA) System - Shooter Localization, Models, Interface, and Beyond](https://arxiv.org/abs/1905.13313)** \ [Junwei Liang](https://www.cs.cmu.edu/~junweil/), [Jay D. Aronson](https://www.cmu.edu/dietrich/history/people/faculty/aronson.html), [Alexander Hauptmann](https://www.cs.cmu.edu/~alex/) *Our work received **Best Demo Award** at [CBMI 2019](http://cbmi2019.org/).* You can find more information/try out the shooter localization system at our [Project Page](https://vera.cs.cmu.edu/). Also, check out our 3D Reconstruction demo [here](https://vera.cs.cmu.edu/VERA_3D_Reconstruction). ## Introduction <div align="center"> | 583 |
JunzheJosephZhu/EEND-for-LENA | ['speaker diarization'] | ['End-to-End Neural Speaker Diarization with Self-attention'] | eend/bin/make_rttm.py eend/system_info.py eend/chainer_backend/models.py eend/bin/model_averaging.py eend/kaldi_data_old.py eend/feature_old.py eend/bin/infer.py eend/bin/train.py eend/chainer_backend/transformer.py egs/LENA/prepare_LENA.py eend/chainer_backend/train.py eend/chainer_backend/diarization_dataset.py eend/bin/yaml2bash.py eend/bin/make_mixture.py eend/chainer_backend/updater.py eend/kaldi_data.py eend/bin/rttm_stats.py eend/chainer_backend/utils.py egs/callhome/v1/local/make_musan.py eend/bin/visualize_attention.py eend/bin/random_mixture.py eend/bin/make_mixture_nooverlap.py eend/bin/random_mixture_nooverlap.py eend/feature.py eend/chainer_backend/infer.py splice get_frame_labels subsample stft _count_frames get_input_dim transform get_labeledSTFT splice get_frame_labels subsample stft _count_frames get_input_dim transform get_labeledSTFT load_spk2utt load_wav load_segments load_segments_rechash load_utt2spk extract_segments load_wav_scp process_wav load_reco2dur load_segments_hash KaldiData load_spk2utt load_wav load_segments load_segments_rechash load_utt2spk extract_segments load_wav_scp process_wav load_reco2dur load_segments_hash KaldiData print_system_info average_model_chainer get_frame_labels time2frame load_rttm _min_max_ave get_frame_labels time2frame load_rttm attention_plot print_var_assign_statements _gen_frame_indices KaldiDiarizationDataset _count_frames _gen_chunk_indices infer report_diarization_error TransformerDiarization batch_pit_loss balanced_BCE BLSTMDiarization dc_loss calc_diarization_error pit_loss train _convert PositionwiseFeedForward TransformerEncoder PositionalEncoding MultiHeadSelfAttention NoamScheduler GradientAccumulationUpdater get_free_gpus use_single_gpu prepare_noise prepare_speech prepare_music process_music_annotations main findmap bit_length int startswith sum T max min maximum log dot mean log10 mel abs std range pad as_strided bit_length int items read list print entryList end min astype _count_frames start array zeros openTextgrid len items read list stft entryList end min astype mean start array zeros openTextgrid len load_wav tolist index load_wav sorted tolist index keys open split append open split stdin read BytesIO endswith Popen endswith load_wav astype print replace load print savez_compressed append float open split time2frame load_rttm subplots arange set_yticklabels span list append_axes make_axes_locatable set_title set_xlabel imshow savefig pdf_file format plot size set_xlim tight_layout reversed zip get_frame_labels set_tick_params enumerate join int rttm_file invert_yaxis set_yticks set_ylabel set_xticks add_title set_ylim print isinstance enumerate range _count_frames min load_wav splice print_system_info wavs vstack use_single_gpu input_transform hasattr data_dir load_npz context_size TransformerDiarization frame_shift num_speakers join model_file stft shift frame_size get_input_dim out_dir transform to_gpu BLSTMDiarization KaldiData sigmoid log data to_cpu min argmin stack get_array_module len list sum stack zip minimum logical_and maximum get_array_module sum len report array calc_diarization_error zip Variable astype float32 square matmul get_array_module zeros sum SGD Trainer LogReport get_example use_single_gpu GradientClipping NoamScheduler train_data_dir seed str run setup gradclip hidden_size Adam dump_graph add_hook load_npz format snapshot TransformerDiarization Evaluator PlotReport ProgressBar StandardUpdater initmodel resume num_speakers MultiprocessIterator PrintReport GradientAccumulationUpdater print valid_data_dir extend KaldiDiarizationDataset MicroAverage to_gpu BLSTMDiarization int communicate linesep Popen split get int empty use readlines update join format replace endswith print process_music_annotations walk join format replace endswith print walk join format replace endswith print walk join prepare_noise prepare_speech prepare_music write open | # EEND (End-to-End Neural Diarization) EEND (End-to-End Neural Diarization) is a neural-network-based speaker diarization method. - https://www.isca-speech.org/archive/Interspeech_2019/abstracts/2899.html - https://arxiv.org/abs/1909.06247 (to appear at ASRU 2019) ## Install tools ### Requirements - NVIDIA CUDA GPU - CUDA Toolkit (8.0 <= version <= 10.1) ### Install kaldi and python environment ```bash | 584 |
JustWon/mystyletransfer | ['style transfer'] | ['A Neural Algorithm of Artistic Style'] | libs/dft.py libs/deepdream.py libs/batch_norm.py libs/datasets.py libs/vae.py libs/stylenet.py libs/inception.py libs/utils.py libs/nb_utils.py libs/dataset_utils.py libs/gif.py libs/vgg16.py libs/i2v.py batch_norm MNIST CELEB CIFAR10 DatasetSplit create_input_pipeline cifar10_download gtzan_music_speech_download cifar10_load dense_to_one_hot gtzan_music_speech_load Dataset deep_dream get_layer_names get_labels _setup guided_dream _apply idft_np ctoz ztoc dft_np build_gif i2v_download get_i2v_tag_model test_i2v preprocess i2v_tag_download deprocess get_i2v_model test_inception preprocess inception_download deprocess get_inception_model show_graph stylize test make_4d test_video warp_img binary_cross_entropy montage imcrop_tosquare download_and_extract_zip flatten bias_variable lrelu gabor make_latent_manifold conv2d gauss2d normalize to_tensor slice_montage download_and_extract_tar get_celeb_files montage_filters corrupt interp build_submission download convolve gauss linear get_celeb_imgs deconv2d load_audio weight_variable VAE test_celeb test_mnist test_sita train_vae test_vgg get_vgg_model preprocess test_vgg_face deprocess get_vgg_face_model read_data_sets reshape cifar10_load print format resize_images read string_input_producer WholeFileReader set_shape shuffle_batch decode_jpeg len download_and_extract_tar join read ztoc transpose dft_np gtzan_music_speech_download append array download_and_extract_tar load reshape cifar10_download swapaxes range open get_inception_model get_i2v_tag_model get_vgg_face_model get_vgg_model Graph get_vgg_model get_i2v_model get_i2v_tag_model get_inception_model get_vgg_face_model astype float32 shape range gaussian_filter Graph shape _setup print Graph min _setup shape max reshape cos pi hann dot pad linspace sin append array range len reshape cos pi dot linspace sin zeros enumerate show list asarray subplots set_axis_off map subplots_adjust shape ArtistAnimation save download download i2v_download load i2v_tag_download open int imresize min astype float32 array array download_and_extract_zip download_and_extract_tar readlines inception_download _show_entire_graph _rename_nodes expand_dims Graph preprocess make_4d get_vgg_model int clip copy round range stylize warp_img calc astype float32 preprocess createOptFlow_DeepFlow append imsave stylize urlretrieve astype float32 print urlretrieve exists download extractall makedirs download extractall ZipFile makedirs read astype float32 abs max append range interp flatnonzero min take append int sqrt range int isinstance imsave ones sqrt ceil array range int ones reshape squeeze sqrt ceil range join urlretrieve print mkdir range Graph Graph gauss Graph Graph format print ZIP_DEFLATED zipdir close abspath ZipFile enumerate stack set_shape random_normal isinstance stack set_shape random_normal isinstance flatten sqrt reshape int as_list exp squared_difference float32 placeholder reduce_sum flatten square reduce_mean reverse append bool enumerate montage Saver save max Session run restore make_latent_manifold VAE start_queue_runners astype close mean join minimize print create_input_pipeline reshape min float32 Coordinator finalize global_variables_initializer len MNIST make_latent_manifold minimize print montage reshape astype float32 VAE global_variables_initializer next_batch range Session run train_vae CELEB train_vae system mkdir load download open download | # Style_Transfer Implementation of Style Net in TensorFlow. Transfer the style of a painting / artistic creation to the content of an image. Code on Jupyter notebook: "Style-Net on TensorFlow.ipynb" Based on: https://arxiv.org/pdf/1508.06576.pdf ### Style Transfer Process:  ### Content image:  ### Style image: | 585 |
Jwrede/neural_style_transfer | ['style transfer'] | ['Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization'] | network.py test.py helper_functions.py test_funcs.py model.py adaIN std_and_mean Net style_interpolation style_video style_image ToTensor yiq_to_rgb test preserve_color_stable rgb_to_yiq plot_data var size view size expand std_and_mean preserve_color_stable plot_data test ToTensor test preserve_color_stable sum plot_data cat send ToTensor close get_next_data tqdm resize encode write_frames to range get_reader set_size_inches subplots len imshow enumerate yiq_to_rgb rgb_to_yiq | # Neural style Transfer with adaptive Instance normalization In this Repo I implemented the paper "Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization" (https://arxiv.org/abs/1703.06868) The colab Notebook can be found here: https://colab.research.google.com/drive/1-7E5haL8VhaajmUXBlpR7ynH8Ge7ywjR#scrollTo=YLa2rTxLUxAF ## Example pictures: ### Normal style transfer:  ### Keeping the original color scheme:  ### Lowered the influence of the style image for the end result:  | 586 |
Jyouhou/ICDAR2019-ArT-Recognition-Alchemy | ['scene text detection'] | ['Rethinking Irregular Scene Text Recognition'] | Source/__init__.py Source/datasets/ic19.py Source/evaluation_metrics/metrics.py Source/loss/maskedSmoothL1Loss.py Source/datasets/svtp.py Source/loss/sequenceCrossEntropyLoss.py Source/datasets/synthtextlist.py Source/loss/__init__.py Source/models/resnet_fpn.py Source/utils/meters.py Source/datasets/prediction.py Source/models/stn_head.py Source/datasets/utils.py Source/evaluators.py Source/models/RecInput.py Source/utils/data/transforms.py Source/datasets/cute80.py Source/models/resnet_fpn_v3.py Source/loss/maskedSTNLoss.py Source/datasets/ic19_val.py Source/datasets/augmentor.py Source/datasets/ic15.py Source/models/RectificationBaseline.py Source/models/recognition_subnet.py Source/utils/data/reconstruct.py Source/loss/maskedBCEWithLogitsLoss.py Source/models/Squarization.py Source/models/tps_spatial_transformer.py Source/evaluation_metrics/__init__.py Source/models/ResNet.py Source/utils/data/reconstruct_v1.py Source/models/__init__.py Source/datasets/iiit5k.py Source/utils/serialization.py Source/datasets/totaltext.py Source/models/resnet_fpn_v4.py Source/models/resnet_fpn_v2.py Source/utils/data/postprocess.py Source/utils/visualization_utils.py Source/trainers.py examples/main.py examples/config.py Source/utils/labelmaps.py Source/datasets/synth90k.py Source/models/CRNN_Baseline.py main_test_all.py Source/utils/logging.py Source/utils/__init__.py Source/utils/data/utils.py Source/datasets/concatdataset.py Source/datasets/ic03.py Source/loss/lowRankLoss.py Source/models/attention_recognition_head.py Source/datasets/svt.py Source/datasets/ic13.py Source/utils/osutils.py Source/datasets/__init__.py Source/models/recognition_fan.py get_args get_data main BaseEvaluator Evaluator Trainer BaseTrainer rotate_polygons boxlist2quads Augment color_augment quad2minrect quad2boxlist ConcatDataset CUTE80 IC03 IC13 IC15 get_ctrl_points sampling ic19 get_l2_dist get_ctrl_points sampling get_l2_dist IC19VAL IIIT5K prediction SVT SVTP Synth90k SynthTextList get_ctrl_points sampling TOTALTEXT get_l2_dist Rotation TextSquare names create get_dataset EditDistance_with_lexicon EditDistance _lexicon_search get_str_list RecPostProcess Accuracy_with_lexicon Accuracy _normalize_text names factory LowRankLoss MaskedBCEWithLogitsLoss _assert_no_grad to_contiguous MaskedSmoothL1Loss _assert_no_grad to_contiguous _assert_no_grad MaskedSTNLoss to_contiguous _assert_no_grad SequenceCrossEntropyLoss to_contiguous AttentionRecognitionHead AttentionUnit DecoderUnit ModelBuilder ModelBuilder BiLSTM FANet conv3x3 BasicBlock convBlock_basic RecSubNet conv_bn_relu ModelBuilder flip ResNet resnet50 ResNet_FPN Bottleneck resnet152 conv3x3 resnet34 resnet18 BuildBlock BasicBlock resnet101 ResNet resnet50 ResNet_FPN Bottleneck resnet152 conv3x3 resnet34 resnet18 BuildBlock BasicBlock resnet101 ResNet resnet50 ResNet_FPN_v2 Bottleneck resnet152 conv3x3 resnet34 resnet18 BuildBlock BasicBlock resnet101 ResNet resnet50 Bottleneck resnet152 conv3x3 ResNet_FPN_v3 resnet34 resnet18 BuildBlock BasicBlock resnet101 ResNet resnet50 Bottleneck resnet152 conv3x3 resnet34 ResNet_FPN_v4 resnet18 BuildBlock BasicBlock resnet101 ModelBuilder STNHead STNHead compute_partial_repr TPSSpatialTransformer grid_sample build_output_control_points names create char2id labels2strs get_vocabulary id2char TFLogger Logger AverageMeter mkdir_if_missing load_checkpoint save_checkpoint VisTPS VisIMG to_numpy to_torch sampling_num_per_side parse_args REC_ON_INPUT create isinstance ConcatDataset real_multiplier DataLoader zip append workers test_dataset batch_size voc_type target_coordinate_repr Trainer get_data inverse_kernel DataParallel MultiStepLR Logger num_test device max cuda train_data_dir seed hasattr test_data_dir aug logs_dir vis_dir epochs ModelBuilder padding_matrix TFLogger load_state_dict width to range height inf format num_train debug extra_train_data_dir Evaluator close target_control_points resume manual_seed vars join time evaluate Adadelta print load_checkpoint train_dataset max_len parameters filter evaluation_metric extra_train_dataset train step makedirs append range zeros array enumerate Polygon print boxlist2quads rotate append quad2boxlist rand brightness Augment lighting_noise linear_motionblur gaussian_blur list format cumsum print random append range len sampling int max float64 min astype shape uniform pad randint array warpAffine random RotationInTraining getRotationMatrix2D shape warn join filter size append to_numpy keys range len asarray argmin eval append _normalize_text get_str_list sum len get_str_list sum append len get_str_list sum get_str_list sum append exp get_str_list size min map append to_numpy sum log enumerate len is_contiguous load_url ResNet load_state_dict load_url ResNet load_state_dict load_url ResNet load_state_dict load_url ResNet load_state_dict load_url ResNet load_state_dict fill_ masked_fill_ size log view concatenate ones stack linspace Tensor list ascii_lowercase append ascii_letters digits append to_numpy join range makedirs join copy dirname save mkdir_if_missing load format print isfile to_numpy tps cuda permute to_numpy permute is_tensor | # ICDAR2019-ArT-Recognition-Code for PKU Team Zero ## Introduction This is the code repository for our algorithm that **ranked No.1** on [__ICDAR2019 Robust Reading Challenge on Arbitrary-Shaped Text__](https://rrc.cvc.uab.es/?ch=14&com=introduction) (Latin scripts). Our team name is PKU Team Zero. For more technical details, please refer to our paper: [Rethinking Irregular Scene Text Recognition](https://arxiv.org/abs/1908.11834). We hope our efforts will act as a stepping stone to better recognition algorithms.  ### Team - Shangbang Long (龙上邦), master student at MLD CMU. - Yushuo Guan (关玉烁), master student at EECS, Peking University. - Bingxuan Wang (王炳宣), junior undergraduate student at Yuanpei College, Peking University. - Kaigui Bian (边凯归), associate professor at EECS, Peking University. | 587 |
KAIST-vilab/SpherPHD_public | ['semantic segmentation'] | ['SpherePHD: Applying CNNs on a Spherical PolyHeDron Representation of 360 degree Images'] | loadTable.py network.py params.py MNIST_example.py loadData.py loadTestData loadTrainData conv_net conv2d maxpool avgpool str int asarray reshape astype Example ParseFromString tf_record_iterator append zeros frombuffer str int asarray reshape astype Example ParseFromString tf_record_iterator append zeros frombuffer gather squeeze bias_add gather squeeze reduce_max reduce_mean conv2d T maxpool avgpool | SpherePHD_public =============== This is SpherPHD MNIST classification example code. Train(6k)/test(1k), 10% of all dataset, can be found in [here](https://drive.google.com/drive/folders/1rvvedIZ8H0Qw4iYqmGyeR_X4QKCMppmJ?usp=sharing). For testing on larger dataset, the codes for dataset making and visualization are provided in [here](https://drive.google.com/open?id=1ZVx8E33d8z1_feBkMQ-UB_I2ogWO6jc3). Paper can be found in [here](http://openaccess.thecvf.com/content_CVPR_2019/papers/Lee_SpherePHD_Applying_CNNs_on_a_Spherical_PolyHeDron_Representation_of_360deg_CVPR_2019_paper.pdf). __Click the image below to see our result video__ [](https://www.youtube.com/watch?v=y9YkOOTf8LQ) | 588 |
KaidiXu/StrAttack | ['adversarial attack'] | ['Structured Adversarial Attack: Towards General Implementation and Better Interpretability'] | l2_LADMMST_attack_v3.py setup_cifar.py test_attack_iclr.py setup_inception.py train_models.py fgm.py l2_attack.py setup_mnist.py FGM CarliniL2 LADMMSTL2 CIFARModel CIFAR load_batch InceptionModelPrediction readimg NodeLookup ImageNet create_graph InceptionModel main maybe_download_and_extract run_inference_on_image MNIST extract_data MNISTModel extract_labels show main l1_l2_li_computation generate_data main train train_distillation read transpose fromstring append range create_graph read fatal join urlretrieve st_size print extractall stat model_dir makedirs maybe_download_and_extract create_graph imread array imresize fromarray squeeze save seed pop list append print reshape predict shuffle shape test_data sample array range test_labels argmax str show format amax abs reshape print len mean shape enumerate append randint sum range predict makedirs concatenate print compile Sequential fit SGD add shape Dense load_weights MaxPooling2D train_labels save Conv2D train_data Activation Flatten Dropout print train train_data predict MNIST load str CIFAR concatenate print train_distillation train makedirs | # StrAttack The code is for paper: 'Structured Adversarial Attack: Towards General Implementation and Better Interpretability' which accepted in ICLR 2019 (https://openreview.net/forum?id=BkgzniCqY7) by Kaidi Xu*, Sijia Liu*, Pu Zhao, Pin-Yu Chen, Huan Zhang, Quanfu Fan, Deniz Erdogmus, Yanzhi Wang, Xue Lin (* means equal contribution) ``` @inproceedings{ xu2018structured, title={Structured Adversarial Attack: Towards General Implementation and Better Interpretability}, author={Kaidi Xu and Sijia Liu and Pu Zhao and Pin-Yu Chen and Huan Zhang and Quanfu Fan and Deniz Erdogmus and Yanzhi Wang and Xue Lin}, booktitle={International Conference on Learning Representations}, year={2019}, | 589 |
KaijuML/parent | ['table to text generation', 'text generation'] | ['Handling Divergent Reference Texts when Evaluating Table-to-Text Generation'] | parent/parent.py setup.py parent/__init__.py _len_lcs _mention_probability parent _ngram_counts validate_parent_args nwise _lcs _parent overlap_probability main parent_instance_level set _len_lcs _lcs dict max range tee get items exp _ngram_counts min log fsum any append float sum range len print validate_parent_args partial isinstance sum _parent len list parent add_argument_group print references add_argument makedirs dest ArgumentParser avg_results parse_args split | # PARENT Code for [Handling Divergent Reference Texts when Evaluating Table-to-Text Generation](https://arxiv.org/abs/1906.01081). This largely follows [the code given by the google-research team](https://github.com/google-research/language/tree/master/language/table_text_eval), all credit to them. I simply have rewritten some part to be faster, removed all tensorflow mentions and wraped everything using multiprocessing (shipped with python). Original code can take up to several minutes to compute scores on the WikiBIO test set. With this implementation, it takes less than 10 seconds with 32 cpus. **EDIT 06-04-2021**: I have package everything so that it can be installed with pip. That way, you can install the repo once for all your projects. TODO: push to PyPI ```bash git clone https://github.com/KaijuML/parent.git cd parent pip install . | 590 |
Kainmueller-Lab/PatchPerPix | ['instance segmentation', 'semantic segmentation'] | ['PatchPerPix for Instance Segmentation'] | PatchPerPix/vote_instances/io_hdflike.py PatchPerPix/util/postprocess.py PatchPerPix/vote_instances/graph_mws.py PatchPerPix/models/autoencoder.py PatchPerPix/util/convert.py PatchPerPix/util/__init__.py PatchPerPix/vote_instances/vote_instances.py PatchPerPix/evaluate/evaluate_prediction.py PatchPerPix/vote_instances/__init__.py PatchPerPix/visualize/decode.py PatchPerPix/models/__init__.py PatchPerPix/vote_instances/offsets.py PatchPerPix/vote_instances/aff_patch_graph.py PatchPerPix/evaluate/__init__.py PatchPerPix/vote_instances/consensus_array.py PatchPerPix/util/selectGPU.py PatchPerPix/vote_instances/cuda_code.py PatchPerPix/visualize/patches.py PatchPerPix/visualize/instances.py PatchPerPix/vote_instances/parallelize_task.py PatchPerPix/vote_instances/get_patch_sets.py PatchPerPix/visualize/export_image.py PatchPerPix/vote_instances/vote_instances_blockwise.py PatchPerPix/models/unet_ppp.py PatchPerPix/models/fast_predict.py PatchPerPix/vote_instances/isbi_hacks.py PatchPerPix/vote_instances/ranked_patches.py PatchPerPix/visualize/compare_gt_pred_affs.py PatchPerPix/vote_instances/ref_vote_instances_blockwise.py PatchPerPix/vote_instances/graph_to_labeling.py PatchPerPix/vote_instances/utilVoteInstances.py PatchPerPix/vote_instances/stitch_patch_graph.py PatchPerPix/models/unet_with_fmap2.py PatchPerPix/visualize/__init__.py PatchPerPix/visualize/reshape_autoencoder_snapshot.py PatchPerPix/vote_instances/foreground_cover.py PatchPerPix/models/unet2d_with_fmap.py PatchPerPix/util/losses.py setup.py evaluate_numinst get_affinity_function evaluate_fg main evaluate_patch dense autoencoder decoder upsample global_average_pool downsample conv_pass FastPredict unet_with_fmap crop_spatial upsample downsample conv_pass crop crop_spatial upsample downsample conv_pass unet crop crop_to_factor crop_spatial unet_with_fmap2 upsample downsample conv_pass crop arr2image hdf2npy zarr2hdf main hdf2zarr get_loss_print get_loss get_loss_weighted get_loss_fn hex_to_rgb postprocess_fg relabel replace color remove_small_components postprocess_instances main selectGPU reshape_snapshot main decode predict_input_fn decoder_model_fn main decode_sample hex_to_rgb main visualize_instances main reshape_affinities_3d visualize_patches reshape_affinities reshape_snapshot main computePatchGraph_cuda computePatchGraph computeAndStorePatchPairs setAffgraph loadAffgraph create_consensus_array_cuda create_consensus_array loadOrComputeConsensus sync init_cuda alloc_zero_array get_cuda_stream make_kernel computeForegroundCover thinOutForegroundCover computeForegroundCoverLoop get_background_set get_boundary_set get_foreground_set mws affGraphToInstances affGraphToInstancesT IoHDF5 IoN5 IoBase IoDVID IoZarr filterInstanceBoundariesFromFG sparsifyPatches offset_list_from_precomputed _offset_list _offset_list_with_shift get_offset_lists_with_bb get_offset_lists run_task_zarr run_task load_input rank_patches_by_score rank_patches rank_patches_cuda loadOrComputePatchRanking replace load_input verify_shape blockwise_vote_instances main write_output get_chessboard_offsets stitch_vote_instances replace get_offsets get_offset_str load_input verify_shape clean_mask update_graph remove_intra_block_pairs blockwise_vote_instances main write_output get_chessboard_offsets stitch_vote_instances remove_pairs computeFGBGsets loadFromFile get_block_shape loadKernelFromFile getResKey get_grid_shape setKernelBuildOptions fillLookup loadAffinities merge_dicts do_block replace do_all to_instance_seg main get_arguments replace single_worker run_worker main non_overlapping_chessboard_worker stitch_vote_instances seg_to_affgraph_2d seg_to_affgraph_3d_multi seg_to_affgraph seg_to_affgraph_2d_multi endswith logical_not abs open squeeze transpose logical_and shape append sum prod range aff_fun get_affinity_function mean nonzero float print array join uint8 endswith print squeeze astype logical_and logical_not unique float sum array imsave open endswith logical_not open sorted ones squeeze logical_and remove_small_components sum imsave get replace astype label float join uint8 print array show glob zeros squeeze add_argument print pred_folder imshow ArgumentParser append parse_args array patchshape evaluate_patch enumerate layers getattr nn conv_layer range pooling_layer getattr layers resize_images layers resize_volumes getattr conv_trans_layer nn activation reduce_mean getattr info nn name get_collection TRAINABLE_VARIABLES histogram info append get dense as_list l2_regularizer list slice reshape upsample global_average_pool len l1_regularizer downsample tuple flatten conv_pass info prod enumerate as_list l2_regularizer slice reshape upsample len l1_regularizer conv_pass info prod enumerate conv2d max_pooling2d conv2d_transpose conv2d as_list slice as_list list slice as_list str crop_spatial format int print upsample concat downsample shape conv_pass prod range len as_list crop_spatial concat as_list list print tuple crop as_list str int list crop_spatial print upsample concat downsample shape conv_pass prod crop_to_factor len as_list str int crop_spatial isinstance print upsample concat downsample shape conv_pass prod dtype asarray print File close float32 create_dataset open enumerate len asarray Blosc File close create_dataset enumerate open uint32 astype imsave in_file hdf2npy endswith zarr2hdf in_key hdf2zarr mean_squared_error sparse_softmax_cross_entropy sigmoid_cross_entropy sigmoid tanh loss_fn get_loss_fn sigmoid loss_fn get_loss_fn print reduce_sum int arange max lstrip replace print unique array len print zeros_like unique hex_to_rgb print stack unique randint enumerate get join relabel uint8 replace uint16 transpose File astype write unique create_dataset uint32 array len uint16 logical_not open all ones remove_small_components append get replace distance_transform_edt astype stack unique label print File create_dataset array len int read len index append range enumerate split selectGPU endswith tuple round max open list ones squeeze shape range imsave astype choice sqrt stack enumerate int uint8 print reshape File float32 cbrt moveaxis array len gt_key num_patches pred_key reshape_snapshot out_file show_mip raw_key load autoencoder reshape tuple float32 placeholder sigmoid info FastPredict RunConfig transpose Estimator shape ceil range predict nonzero info float ConfigProto enumerate load int print reshape visualize_patches zeros array len join dtype max uint8 endswith squeeze File close astype shape dirname info decode_sample array open mask_key decode config out_key checkpoint endswith delete where max open glasbey_light squeeze color imsave hex_to_rgb close astype stack unique zip enumerate uint8 print File zeros array visualize_instances dtype debug min shape array info zeros max range max debug shape info zeros array range endswith max open dtype list expit squeeze len reshape_affinities_3d imsave range astype ascontiguousarray info uint8 File min float32 moveaxis array reshape_affinities threshold visualize_patches close key load endswith error exit setAffgraph add_edge Graph tuple info enumerate len get join remove sort uint32 alloc_zero_array cKDTree query_pairs any save info append zeros sum enumerate len get int join min loadKernelFromFile float32 alloc_zero_array shape setKernelBuildOptions setAffgraph int32 save info ceil range max make_kernel get_function add_edge Graph tuple transpose len any info sum enumerate compress concatenate print transpose dumps prod info append zeros array enumerate len loadKernelFromFile save DEBUG max shape append make_kernel get_function get alloc_zero_array info int join isEnabledFor min float32 setKernelBuildOptions free bool get join computeFGBGsets dump loadFromFile create_consensus_array close shape info create_consensus_array_cuda open synchronize get list zeros_like logical_and copy computeForegroundCoverLoop logical_not argwhere info zeros sum binary_dilation len get tuple reshape info sum array get argmax format query_ball_point zeros_like get_foreground_set copy cKDTree info zeros sum len tuple reshape logical_and map set argwhere binary_dilation int tuple reshape logical_and map set argwhere sample max len int tuple reshape logical_and map set argwhere sample max len data sorted discard list len min nodes set add keys any info append max values enumerate loadAffgraph data zeros_like tuple mws shape append get add_edge int16 Graph astype stack info enumerate minimum int connected_components line reshape maximum array print int list print logical_and sample range len append range append range join len shuffle mkdir enumerate join shuffle mkdir append range enumerate len join format isinstance print shuffle mkdir enumerate len read print tuple shape pad any endswith run_task IoZarr IoHDF5 compute format print verify_shape shape call_process write_output sum pipe append len sorted info append range len get info min loadKernelFromFile float32 alloc_zero_array shape setKernelBuildOptions free bool max make_kernel get_function decompress sorted format print tuple loads info append enumerate len get join dump format loadFromFile info print rank_patches_by_score rank_patches rank_patches_cuda free array open uint16 tuple delete max open Blosc ones logical_and shape append sum range get relabel asarray replace astype unique info zip float enumerate minimum print reshape min maximum create_dataset zeros bool array len append range enumerate minimum maximum expand_dims array tuple reshape astype maximum shape any zeros array len write minimum get list do_block IoHDF5 endswith astype float32 load_input close verify_shape info write_output IoZarr array uint16 tuple warning max Pool binary_dilation open Lock Blosc transpose map color shape remove_small_components get_chessboard_offsets prod imsave get relabel partial replace slice close astype copy nonzero unique info join uint8 min stitch_vote_instances File create_dataset blockwise_vote_instances len replace unique info array len add_edge tuple enumerate append remove any enumerate remove any append array enumerate do_block get_offsets update_graph DEBUG argmax Lock list sorted all nodes remove_intra_block_pairs uint32 prod format concatenate Graph debug get_offset_str load_input copy affGraphToInstances query_pairs IoZarr remove_pairs int isEnabledFor float32 cKDTree append array range enumerate info format uint8 get_offset_str create_dataset open get_offsets ones format debug ndim clean_mask int16 concatenate print tuple logical_not shape argwhere zeros empty array shape endswith print exit info open endswith open list expit squeeze exit shape expand_dims prod get close ascontiguousarray info keys load int File moveaxis array replace int format sub replace get append info get_block_shape items list parse_known_args add_argument ArgumentParser filterInstanceBoundariesFromFG uint16 loadOrComputeConsensus tuple where loadOrComputePatchRanking loadAffgraph multi_index list squeeze transpose exit shape pad uint32 sum prod get computeForegroundCover format astype copy alloc_zero_array info int uint8 join iternext thinOutForegroundCover nditer reshape sparsifyPatches float32 computePatchGraph computeAndStorePatchPairs fillLookup zeros array len get to_instance_seg array get uint8 info astype getResKey shape to_instance_seg loadAffinities array merge_dicts isdir do_all init_cuda vars get_arguments makedirs run_task_zarr join list time info shape dirname get_offset_lists run_worker range open join list Blosc all info endswith File close shape dirname get_chessboard_offset_lists create_dataset range open single_worker non_overlapping_chessboard_worker | # PatchPerPix for Instance Segmentation PDF: [PatchPerPix for Instance Segmentation](https://arxiv.org/abs/2001.07626) **Lisa Mais<sup>1</sup>, Peter Hirsch<sup>1</sup>, Dagmar Kainmueller**, ECCV2020</br> <sup>1</sup>Authors contributed equally, listed in random order</br>  ## Abstract We present a novel method for proposal free instance segmentation that can handle sophisticated object shapes that span large parts of an image and form dense object clusters with crossovers. Our method is based on predicting dense local shape descriptors, which we assemble to form instances. All instances are assembled simultaneously in one go. To our knowledge, our method is the first non-iterative method that yields instances that are composed of learnt shape patches. We evaluate our method on a diverse range of data domains, where it defines the new state of the art on four benchmarks, namely the ISBI 2012 EM segmentation benchmark, the BBBC010 C. elegans dataset, and 2d as well as 3d fluorescence microscopy datasets of cell nuclei. We show furthermore that our method also applies to 3d light microscopy data of drosophila neurons, which exhibit extreme cases of complex shape clusters. ## Installation This package requires Python 3 and TensorFlow 1.x (we do not support Tensorflow 2.x). It contains the core code for the neural network model and our instance segmentation method. ### Core | 591 |
Kali-Hac/SGE-LA | ['person re identification'] | ['Self-Supervised Gait Encoding with Locality-Aware Attention for Person Re-Identification'] | evaluate.py train.py main get_new_train_batches evaluate_reid get_batches GD pad_batch get_inputs get_data_BIWI GE process_decoder_input get_data_IAS get_data_KGBD train get_new_train_batches encoder_classify evaluate_reid encoder_classify_union_directly main encoder_decoder encoder_classify_union_directly_IAS evaluate_reid range len load get_default_graph print encoder_classify mkdir encoder_classify_union_directly train encoder_classify_union_directly_IAS column_stack Variable reduce_max float32 placeholder assign int32 load str tolist reshape load str tolist reshape load str tolist reshape max pad_batch append array range len dynamic_rnn MultiRNNCell variables MultiRNNCell AttentionWrapper LuongAttention Dense concat strided_slice GD Variable process_decoder_input GE stack get_batches permutation Graph get_data_BIWI tolist get_data_IAS get_data_KGBD next array load str sorted permutation list label_binarize ord print reshape Graph keys item array load str sorted list label_binarize global_variables_initializer relu Variable float32 placeholder matmul mkdir int32 item zeros keys random_normal load str sorted list label_binarize global_variables_initializer relu Variable float32 placeholder matmul mkdir int32 item zeros keys random_normal |   # Self-Supervised Gait Encoding with Locality-Aware Attention for Person Re-Identification By Haocong Rao, Siqi Wang, Xiping Hu, Mingkui Tan, Huang Da, Jun Cheng, Bin Hu. In [IJCAI 2020](https://www.ijcai.org/Proceedings/2020/125). The extended journal version is available in [T-PAMI 2021](https://ieeexplore.ieee.org/abstract/document/9466418) with open [codes](https://github.com/Kali-Hac/Locality-Awareness-SGE). ## Introduction This is the official implementation of the self-supervised gait encoding model presented by "Self-Supervised Gait Encoding with Locality-Aware Attention for Person Re-Identification". The codes are used to reproduce experimental results of the proposed Attention-basd Gait Encodings (AGEs) in the [**paper**](https://www.ijcai.org/proceedings/2020/0125.pdf).  Abstract: Gait-based person re-identification (Re-ID) is valuable for safety-critical applications, and using only *3D skeleton data* to extract discriminative gait features for person Re-ID is an emerging open topic. Existing methods either adopt hand-crafted features or learn gait features by traditional supervised learning paradigms. Unlike previous methods, we for the first time propose a generic gait encoding approach that can utilize *unlabeled* skeleton data to learn gait representations in a *self-supervised* manner. Specifically, we first propose to introduce self-supervision by learning to reconstruct input skeleton sequences in reverse order, which facilitates learning richer high-level semantics and better gait representations. Second, inspired by the fact that motion's continuity endows temporally adjacent skeletons with higher correlations (''*locality*''), we propose a locality-aware attention mechanism that encourages learning larger attention weights for temporally adjacent skeletons when reconstructing current skeleton, so as to learn locality when encoding gait. Finally, we propose *Attention-based Gait Encodings* (AGEs), which are built using context vectors learned by locality-aware attention, as final gait representations. AGEs are directly utilized to realize effective person Re-ID. Our approach typically improves existing skeleton-based methods by 10-20% *Rank-1* accuracy, and it achieves comparable or even superior performance to multi-modal methods with extra RGB or depth information. ## Requirements | 592 |
KanchanIIT/Highly-Optimized-Interactive-Image-Segmentation | ['interactive segmentation'] | ['Deep Interactive Object Selection'] | UI_interactive_segmentation.py train_interactive_segmentation.py model_distance_fun.py lrelu get_weight_bias our_func clk identity_initializer nm build compIoU build_vgg19 build_net lrelu get_weight_bias identity_initializer nm prepare_data build build_vgg19 build_net main Example sum Variable reshape size constant get_weight_bias reuse_variables loadmat build_net build_vgg19 concat conv2d range imwrite run ones morphologyEx circle shape expand_dims imread concatenate distance_transform_edt MORPH_ELLIPSE minimum deepcopy uint8 getStructuringElement maximum float32 MORPH_OPEN makedirs Tk mainloop Example | # Interactive Image Segmentation with Latent Diversity This is a Tensorflow implementation of Interactive Image Segmentation with Latent Diversity. It receives positive and negative clicks and produces segmentation masks. ## Examples Raw Segmentation Mask | Segmentation Results (Overlay) :-------------------------:|:-------------------------:  | ") Distance Map for Positive Clicks | Distance Map for Negative Clicks :-------------------------:|:-------------------------:  |  ## Setup | 593 |
KarthikKothareddy/pyod | ['outlier detection', 'anomaly detection'] | ['PyOD: A Python Toolbox for Scalable Outlier Detection'] | pyod/models/__init__.py pyod/utils/stat_models.py pyod/test/test_abod.py pyod/utils/utility.py examples/__init__.py pyod/test/test_base.py examples/iforest_example.py pyod/test/__init__.py pyod/models/iforest.py examples/xgbod_example.py pyod/test/test_loci.py pyod/models/knn.py pyod/models/ocsvm.py examples/abod_example.py setup.py pyod/version.py pyod/test/test_data.py pyod/__init__.py examples/lof_example.py pyod/models/loci.py docs/conf.py examples/mcd_example.py pyod/models/mcd.py pyod/utils/data.py examples/compare_all_models.py examples/temp_do_not_use.py pyod/models/combination.py examples/knn_example.py pyod/models/pca.py examples/comb_example.py pyod/test/test_cblof.py pyod/utils/__init__.py examples/loci_example.py pyod/test/test_auto_encoder.py pyod/test/test_utility.py examples/ocsvm_example.py examples/sos_example.py pyod/models/so_gaal.py pyod/test/test_knn.py pyod/test/test_ocsvm.py pyod/test/test_so_gaal.py examples/temp_do_not_use/deprecated_functions.py pyod/test/test_feature_bagging.py pyod/test/test_mo_gaal.py pyod/test/test_stat_models.py pyod/models/cblof.py pyod/test/test_iforest.py pyod/models/sklearn_base.py pyod/test/test_pca.py examples/cblof_example.py notebooks/benchmark.py pyod/test/test_lof.py pyod/models/gaal_base.py pyod/test/test_xgbod.py pyod/models/mo_gaal.py pyod/models/auto_encoder.py pyod/models/sos.py pyod/models/xgbod.py examples/lscp_example.py examples/mo_gaal_example.py examples/pca_example.py pyod/models/base.py pyod/models/feature_bagging.py pyod/models/lscp.py pyod/test/conftest.py pyod/test/test_hbos.py examples/hbos_example.py examples/so_gaal_example.py examples/feature_bagging_example.py pyod/test/test_combination.py pyod/models/lof.py pyod/models/abod.py pyod/test/test_mcd.py pyod/models/hbos.py pyod/test/test_lscp.py pyod/test/test_sos.py examples/auto_encoder_example.py readme visualize visualize visualize visualize visualize visualize visualize visualize visualize visualize visualize visualize visualize visualize visualize ABOD _calculate_wocs _wcos AutoEncoder BaseDetector CBLOF moa average _aom_moa_helper aom maximization _parallel_decision_function FeatureBagging _set_random_states create_generator create_discriminator _calculate_outlier_scores HBOS IForest KNN _get_critical_values LOCI _get_sampling_N LOF LSCP MCD MO_GAAL OCSVM PCA _pprint _partition_estimators _get_n_jobs SOS _get_perplexity SO_GAAL XGBOD TestFastABOD TestABOD TestAutoEncoder T ModifyInitParams Dummy1 Dummy3 VargEstimator Dummy2 K TestBASE MyEstimator TestLOF TestMOA TestAOM TestStatic TestData TestFeatureBagging TestHBOS TestIForest TestKnn TestKnnMean TestKnnMedian TestLOCI TestLOF TestLSCP TestMCD TestMO_GAAL TestOCSVM TestPCA TestSOS TestSO_GAAL TestStatModels TestScaler TestCheckDetector TestParameters TestMetrics TestXGBOD get_color_codes check_consistent_shape get_outliers_inliers generate_data evaluate_print _generate_data pairwise_distances_no_broadcast _pairwise_distances_no_broadcast_helper pearsonr_mat wpearsonr invert_order precision_n_scores argmaxn _sklearn_version_20 generate_bagging_indices score_to_label standardizer check_detector generate_indices check_parameter get_label_n show format suptitle get_outliers_inliers add_subplot _add_sub_plot savefig figure check_consistent_shape check_X_y title scatter legend get_color_codes dot norm combinations list _wcos append enumerate int list sample_without_replacement check_array randint shuffle mean zeros check_parameter max range reshape multiply check_array assert_equal sum check_array sorted set_params check_random_state randint get_params hasattr decision_function zip zeros enumerate int dis Sequential add sqrt Dense ceil Input Sequential add Dense gen Input digitize min log2 zeros range sort concatenate ones cumsum min _get_n_jobs iteritems list sorted join set_printoptions get_printoptions enumerate append len sum exp log main uniform randn int check_random_state _generate_data random_sample randint column_or_1d full where check_X_y column_or_1d check_consistent_length print format column_or_1d check_consistent_length check_array square asarray min sqrt sum max check_consistent_length check_array astype range wpearsonr check_array fit check_parameter column_or_1d scoreatpercentile astype column_or_1d get_label_n count_nonzero scoreatpercentile column_or_1d astype check_consistent_length len check_parameter column_or_1d partition len column_or_1d str __version__ generate_indices randint check_random_state randint sample_without_replacement | KarthikKothareddy/pyod | 594 |
KashinYana/link-prediction | ['link prediction'] | ['Spring-Electrical Models For Link Prediction'] | graph_tools_patch/original_files/__init__.py node2vec/main.py graph_tools_patch/__init__.py notebooks/tools.py notebooks/save_sample.py node2vec/node2vec.py notebooks/cross_validation.py random_layout arf_layout planar_layout radial_tree_layout sfdp_layout coarse_graph_stack prop_to_size _coarse_graph _propagate_pos coarse_graphs _avg_edge_distance fruchterman_reingold_layout random_layout arf_layout planar_layout radial_tree_layout sfdp_layout coarse_graph_stack prop_to_size _coarse_graph _propagate_pos coarse_graphs _avg_edge_distance fruchterman_reingold_layout main parse_args learn_embeddings read_graph list hasattr group_vector_property new_vertex_property ungroup_vector_property random fa _check_prop_vector range len _prop own_property Graph _Graph__graph new_vp GraphView make_maximal_planar num_vertices _prop random_layout sqrt _check_prop_vector _Graph__graph GraphView float _prop random_layout _check_prop_vector _Graph__graph GraphView list own_property infect_vertex_property GraphView max_cardinality_matching max_independent_vertex_set max range _prop new_vertex_property value_type propagate_pos _get_rng _Graph__graph GraphView base propagate_pos_mivs sanitize_pos avg_dist _prop _Graph__graph num_vertices random_layout print _coarse_graph reverse _propagate_pos append _avg_edge_distance range len num_vertices random_layout print copy reverse _propagate_pos append _avg_edge_distance range len num_vertices max _prop random_layout own_property print new_vertex_property coarse_graph_stack sanitize_pos _check_prop_vector _Graph__graph GraphView _get_rng coarse_graphs _avg_edge_distance enumerate _prop int own_property new_vertex_property copy _Graph__graph GraphView get_radial shortest_distance predecessor_tree min copy fa max log set_defaults add_argument ArgumentParser to_undirected weighted edges input read_edgelist save_word2vec_format output Word2Vec read_graph p Graph num_walks learn_embeddings simulate_walks walk_length preprocess_transition_probs directed q | # Spring-Electrical Models For Link Prediction ## Structure of this repository - `datasets/` is a datasets storage. We have converted all datasets to the same format, saved each of them in `<dataset_path>/input.txt` file. - `notebooks/` contains all scripts and jupyter notebooks used in exprements. - `graph_tools_patch/` has patch for graph_tools library, which allows to remove repolsive forses between nodes of the same type - `node2vec/` clone of https://github.com/aditya-grover/node2vec/tree/master/src | 595 |
Katsumata420/generic-pretrained-GEC | ['grammatical error correction'] | ['Stronger Baselines for Grammatical Error Correction Using Pretrained Encoder-Decoder Model'] | BART-GEC/fairseq/models/nat/nonautoregressive_transformer.py mBART-GEC/fairseq/criterions/label_smoothed_cross_entropy.py BART-GEC/examples/roberta/wsc/__init__.py mBART-GEC/fairseq/tasks/fairseq_task.py BART-GEC/fairseq/models/nat/insertion_transformer.py BART-GEC/fairseq_cli/train.py mBART-GEC/examples/translation_moe/score.py mBART-GEC/fairseq/data/backtranslation_dataset.py BART-GEC/fairseq/data/dictionary.py mBART-GEC/examples/speech_recognition/criterions/ASG_loss.py BART-GEC/examples/roberta/commonsense_qa/__init__.py mBART-GEC/examples/roberta/wsc/wsc_utils.py mBART-GEC/examples/translation_moe/src/mean_pool_gating_network.py mBART-GEC/fairseq/tasks/multilingual_denoising.py mBART-GEC/tests/test_export.py mBART-GEC/fairseq/logging/meters.py mBART-GEC/fairseq/data/encoders/space_tokenizer.py BART-GEC/fairseq/legacy_distributed_data_parallel.py mBART-GEC/fairseq/data/prepend_token_dataset.py BART-GEC/fairseq/criterions/sentence_ranking.py mBART-GEC/examples/noisychannel/rerank_tune.py mBART-GEC/fairseq/models/roberta/model.py mBART-GEC/scripts/count_docs.py BART-GEC/fairseq/options.py BART-GEC/fairseq/models/roberta/hub_interface.py mBART-GEC/fairseq/models/fairseq_encoder.py mBART-GEC/fairseq/modules/dynamicconv_layer/__init__.py mBART-GEC/fairseq/data/pad_dataset.py BART-GEC/fairseq/hub_utils.py mBART-GEC/fairseq/data/encoders/nltk_tokenizer.py BART-GEC/fairseq/optim/lr_scheduler/fixed_schedule.py BART-GEC/fairseq/modules/lightconv_layer/setup.py mBART-GEC/fairseq/modules/sparse_transformer_sentence_encoder_layer.py mBART-GEC/fairseq/__init__.py BART-GEC/fairseq/data/colorize_dataset.py BART-GEC/fairseq/modules/dynamicconv_layer/setup.py BART-GEC/fairseq/data/sharded_dataset.py BART-GEC/examples/speech_recognition/criterions/CTC_loss.py BART-GEC/fairseq/iterative_refinement_generator.py mBART-GEC/fairseq/criterions/__init__.py BART-GEC/fairseq/models/lstm_lm.py BART-GEC/fairseq/models/masked_lm.py BART-GEC/tests/test_backtranslation_dataset.py mBART-GEC/fairseq/modules/layer_norm.py BART-GEC/hubconf.py BART-GEC/fairseq/models/nat/cmlm_transformer.py BART-GEC/fairseq/tasks/translation.py mBART-GEC/interactive.py BART-GEC/fairseq/modules/beamable_mm.py mBART-GEC/fairseq/modules/lightconv_layer/__init__.py mBART-GEC/fairseq_cli/preprocess.py BART-GEC/fairseq/data/encoders/utils.py BART-GEC/fairseq/tasks/semisupervised_translation.py BART-GEC/fairseq/data/resampling_dataset.py mBART-GEC/fairseq/modules/linearized_convolution.py BART-GEC/fairseq/criterions/label_smoothed_cross_entropy.py BART-GEC/scripts/read_binarized.py BART-GEC/fairseq/modules/lightweight_convolution.py BART-GEC/fairseq/data/noising.py mBART-GEC/examples/roberta/multiprocessing_bpe_encoder.py mBART-GEC/fairseq/data/encoders/gpt2_bpe_utils.py mBART-GEC/tests/test_metrics.py BART-GEC/fairseq/incremental_decoding_utils.py BART-GEC/fairseq/sequence_generator.py mBART-GEC/examples/roberta/commonsense_qa/commonsense_qa_task.py mBART-GEC/fairseq/models/wav2vec.py mBART-GEC/fairseq/optim/adadelta.py mBART-GEC/fairseq/tokenizer.py mBART-GEC/fairseq/criterions/nat_loss.py mBART-GEC/fairseq/modules/dynamic_convolution.py mBART-GEC/scripts/wav2vec_featurize.py BART-GEC/tests/test_file_io.py BART-GEC/fairseq/optim/fairseq_optimizer.py mBART-GEC/fairseq/data/iterators.py BART-GEC/examples/speech_recognition/criterions/__init__.py BART-GEC/fairseq/models/nat/__init__.py BART-GEC/tests/test_sequence_generator.py mBART-GEC/fairseq/modules/lightconv_layer/setup.py mBART-GEC/tests/test_sequence_generator.py BART-GEC/generate.py BART-GEC/fairseq/data/legacy/__init__.py mBART-GEC/fairseq/models/masked_lm.py BART-GEC/scripts/average_checkpoints.py BART-GEC/examples/speech_recognition/data/data_utils.py mBART-GEC/fairseq/incremental_decoding_utils.py BART-GEC/fairseq/criterions/label_smoothed_cross_entropy_with_alignment.py BART-GEC/fairseq/data/encoders/__init__.py BART-GEC/fairseq/criterions/sentence_prediction.py BART-GEC/tests/test_multi_corpus_sampled_dataset.py mBART-GEC/fairseq/optim/fused_lamb.py mBART-GEC/fairseq/optim/adam.py mBART-GEC/examples/speech_recognition/data/replabels.py BART-GEC/interactive.py mBART-GEC/fairseq/data/legacy/__init__.py BART-GEC/examples/speech_recognition/tasks/speech_recognition.py mBART-GEC/fairseq/optim/lr_scheduler/reduce_lr_on_plateau.py BART-GEC/scripts/spm_train.py mBART-GEC/fairseq/modules/sinusoidal_positional_embedding.py BART-GEC/fairseq/modules/sparse_transformer_sentence_encoder_layer.py BART-GEC/fairseq/modules/highway.py mBART-GEC/tests/test_convtbc.py mBART-GEC/fairseq/models/multilingual_transformer.py mBART-GEC/fairseq/modules/grad_multiply.py mBART-GEC/examples/roberta/preprocess_RACE.py BART-GEC/examples/noisychannel/rerank_score_lm.py BART-GEC/fairseq/models/transformer.py mBART-GEC/examples/backtranslation/deduplicate_lines.py BART-GEC/fairseq/data/legacy/block_pair_dataset.py mBART-GEC/examples/speech_recognition/data/collaters.py BART-GEC/fairseq/data/backtranslation_dataset.py mBART-GEC/preprocess.py mBART-GEC/fairseq/data/language_pair_dataset.py mBART-GEC/fairseq/criterions/adaptive_loss.py BART-GEC/scripts/spm_decode.py mBART-GEC/fairseq/modules/conv_tbc.py mBART-GEC/fairseq/models/nat/nat_crf_transformer.py mBART-GEC/fairseq/models/distributed_fairseq_model.py BART-GEC/tests/test_convtbc.py mBART-GEC/fairseq/models/nat/nonautoregressive_transformer.py mBART-GEC/examples/roberta/wsc/wsc_criterion.py BART-GEC/fairseq/bleu.py mBART-GEC/fairseq/data/sharded_dataset.py BART-GEC/fairseq/pdb.py mBART-GEC/fairseq/optim/lr_scheduler/fixed_schedule.py BART-GEC/fairseq/optim/nag.py BART-GEC/fairseq/modules/lightconv_layer/lightconv_layer.py BART-GEC/fairseq/meters.py mBART-GEC/fairseq/criterions/sentence_prediction.py BART-GEC/fairseq/modules/lightconv_layer/__init__.py mBART-GEC/examples/noisychannel/__init__.py mBART-GEC/scripts/compare_namespaces.py BART-GEC/examples/noisychannel/__init__.py mBART-GEC/tests/test_bmuf.py BART-GEC/fairseq/modules/downsampled_multihead_attention.py mBART-GEC/fairseq/benchmark/dummy_lm.py BART-GEC/fairseq/optim/lr_scheduler/tri_stage_lr_scheduler.py mBART-GEC/scripts/rm_pt.py BART-GEC/fairseq/trainer.py BART-GEC/train.py BART-GEC/fairseq/models/bart/hub_interface.py mBART-GEC/fairseq/iterative_refinement_generator.py mBART-GEC/fairseq/logging/progress_bar.py BART-GEC/tests/test_noising.py BART-GEC/preprocess.py BART-GEC/fairseq/models/lightconv_lm.py BART-GEC/examples/__init__.py BART-GEC/fairseq/modules/conv_tbc.py BART-GEC/fairseq/modules/sinusoidal_positional_embedding.py mBART-GEC/fairseq/optim/lr_scheduler/triangular_lr_scheduler.py mBART-GEC/tests/test_multihead_attention.py BART-GEC/fairseq/distributed_utils.py mBART-GEC/fairseq/data/legacy/masked_lm_dictionary.py BART-GEC/fairseq/data/plasma_utils.py BART-GEC/fairseq/models/fairseq_incremental_decoder.py BART-GEC/tests/test_sequence_scorer.py BART-GEC/fairseq/modules/dynamic_crf_layer.py BART-GEC/scripts/count_docs.py mBART-GEC/fairseq/models/nat/__init__.py BART-GEC/fairseq/data/encoders/sentencepiece_bpe.py BART-GEC/fairseq/models/nat/nat_crf_transformer.py mBART-GEC/fairseq/tasks/audio_pretraining.py mBART-GEC/scripts/shard_docs.py BART-GEC/fairseq/registry.py mBART-GEC/fairseq/tasks/translation_lev.py BART-GEC/fairseq/data/prepend_dataset.py mBART-GEC/tests/test_dictionary.py BART-GEC/scripts/wav2vec_featurize.py BART-GEC/tests/test_metrics.py mBART-GEC/scripts/spm_decode.py BART-GEC/fairseq/utils.py mBART-GEC/fairseq/modules/dynamicconv_layer/setup.py mBART-GEC/fairseq/tasks/cross_lingual_lm.py mBART-GEC/tests/test_label_smoothing.py BART-GEC/fairseq/optim/lr_scheduler/inverse_square_root_schedule.py mBART-GEC/tests/test_token_block_dataset.py BART-GEC/fairseq/optim/bmuf.py mBART-GEC/fairseq/data/monolingual_dataset.py BART-GEC/fairseq/models/lightconv.py mBART-GEC/fairseq/benchmark/__init__.py mBART-GEC/fairseq/data/truncate_dataset.py mBART-GEC/fairseq/criterions/composite_loss.py BART-GEC/tests/test_memory_efficient_fp16.py mBART-GEC/fairseq/data/raw_label_dataset.py BART-GEC/examples/speech_recognition/data/collaters.py mBART-GEC/fairseq/data/audio/raw_audio_dataset.py BART-GEC/fairseq_cli/preprocess.py mBART-GEC/fairseq/models/fairseq_incremental_decoder.py BART-GEC/fairseq/models/fairseq_model.py BART-GEC/fairseq/models/fconv_lm.py mBART-GEC/fairseq/models/model_utils.py mBART-GEC/fairseq/optim/sgd.py mBART-GEC/fairseq/nan_detector.py mBART-GEC/setup.py mBART-GEC/fairseq/data/encoders/gpt2_bpe.py mBART-GEC/fairseq/data/encoders/hf_bert_bpe.py mBART-GEC/examples/speech_recognition/criterions/__init__.py mBART-GEC/fairseq/data/plasma_utils.py mBART-GEC/examples/speech_recognition/tasks/speech_recognition.py mBART-GEC/fairseq/data/colorize_dataset.py mBART-GEC/fairseq/optim/lr_scheduler/tri_stage_lr_scheduler.py mBART-GEC/fairseq/data/token_block_dataset.py mBART-GEC/validate.py BART-GEC/fairseq/data/offset_tokens_dataset.py BART-GEC/fairseq/optim/adadelta.py BART-GEC/scripts/shard_docs.py mBART-GEC/fairseq/models/lightconv_lm.py BART-GEC/fairseq/data/pad_dataset.py mBART-GEC/examples/speech_recognition/data/__init__.py mBART-GEC/fairseq/data/num_samples_dataset.py BART-GEC/fairseq/data/denoising_dataset.py mBART-GEC/tests/test_multi_corpus_sampled_dataset.py mBART-GEC/scripts/average_checkpoints.py mBART-GEC/fairseq/optim/nag.py BART-GEC/examples/roberta/wsc/wsc_utils.py BART-GEC/fairseq/checkpoint_utils.py mBART-GEC/examples/noisychannel/rerank_utils.py mBART-GEC/examples/backtranslation/extract_bt_data.py BART-GEC/fairseq/optim/lr_scheduler/__init__.py BART-GEC/eval_lm.py BART-GEC/fairseq/models/transformer_lm.py BART-GEC/fairseq/tasks/__init__.py BART-GEC/fairseq/tasks/denoising.py BART-GEC/fairseq/criterions/nat_loss.py mBART-GEC/scripts/build_sym_alignment.py BART-GEC/fairseq/optim/fused_lamb.py BART-GEC/examples/speech_recognition/data/__init__.py BART-GEC/fairseq/data/round_robin_zip_datasets.py BART-GEC/examples/speech_recognition/criterions/ASG_loss.py BART-GEC/fairseq/tasks/masked_lm.py mBART-GEC/fairseq/optim/lr_scheduler/polynomial_decay_schedule.py BART-GEC/tests/test_resampling_dataset.py mBART-GEC/fairseq/models/nat/insertion_transformer.py BART-GEC/tests/test_train.py mBART-GEC/tests/test_resampling_dataset.py BART-GEC/fairseq/modules/dynamic_convolution.py BART-GEC/fairseq/data/indexed_dataset.py mBART-GEC/fairseq_cli/generate.py BART-GEC/fairseq/tasks/sentence_ranking.py mBART-GEC/fairseq/data/noising.py BART-GEC/tests/test_sparse_multihead_attention.py mBART-GEC/fairseq_cli/eval_lm.py mBART-GEC/fairseq/data/roll_dataset.py BART-GEC/fairseq/optim/fused_adam.py mBART-GEC/examples/speech_recognition/models/__init__.py mBART-GEC/examples/roberta/wsc/__init__.py BART-GEC/fairseq/data/audio/raw_audio_dataset.py BART-GEC/fairseq/file_utils.py BART-GEC/fairseq/modules/sparse_transformer_sentence_encoder.py mBART-GEC/fairseq/models/nat/fairseq_nat_model.py BART-GEC/translate_nbest.py mBART-GEC/scripts/wav2vec_manifest.py mBART-GEC/fairseq/criterions/label_smoothed_cross_entropy_with_alignment.py mBART-GEC/examples/roberta/wsc/wsc_task.py mBART-GEC/fairseq/data/concat_dataset.py BART-GEC/fairseq/modules/logsumexp_moe.py mBART-GEC/examples/__init__.py BART-GEC/examples/roberta/wsc/wsc_task.py BART-GEC/fairseq/optim/adafactor.py mBART-GEC/fairseq/modules/transformer_sentence_encoder_layer.py BART-GEC/fairseq/models/roberta/model_camembert.py mBART-GEC/fairseq/modules/adaptive_input.py mBART-GEC/fairseq/tasks/sentence_prediction.py mBART-GEC/fairseq/data/encoders/moses_tokenizer.py mBART-GEC/examples/noisychannel/rerank.py mBART-GEC/examples/speech_recognition/infer.py mBART-GEC/fairseq/tasks/translation.py BART-GEC/fairseq/models/nat/fairseq_nat_model.py BART-GEC/examples/noisychannel/rerank.py mBART-GEC/examples/translation_moe/src/translation_moe.py mBART-GEC/examples/noisychannel/rerank_generate.py BART-GEC/fairseq/models/roberta/alignment_utils.py mBART-GEC/fairseq_cli/validate.py BART-GEC/tests/test_bmuf.py mBART-GEC/fairseq/modules/gelu.py mBART-GEC/fairseq/file_utils.py BART-GEC/scripts/rm_pt.py mBART-GEC/examples/noisychannel/rerank_score_bw.py mBART-GEC/fairseq/data/transform_eos_lang_pair_dataset.py BART-GEC/fairseq/optim/lr_scheduler/reduce_lr_on_plateau.py mBART-GEC/fairseq/data/encoders/__init__.py mBART-GEC/fairseq/tasks/multilingual_masked_lm.py mBART-GEC/fairseq/data/fairseq_dataset.py BART-GEC/fairseq/modules/adaptive_input.py BART-GEC/fairseq/models/wav2vec.py BART-GEC/fairseq/tasks/audio_pretraining.py BART-GEC/fairseq/data/data_utils.py BART-GEC/fairseq/data/encoders/gpt2_bpe.py BART-GEC/fairseq/data/monolingual_dataset.py BART-GEC/fairseq/data/transform_eos_dataset.py mBART-GEC/fairseq/optim/lr_scheduler/inverse_square_root_schedule.py BART-GEC/translate.py BART-GEC/examples/speech_recognition/tasks/__init__.py BART-GEC/fairseq/tasks/translation_moe.py BART-GEC/fairseq/modules/dynamicconv_layer/dynamicconv_layer.py BART-GEC/fairseq/data/num_samples_dataset.py mBART-GEC/tests/test_reproducibility.py BART-GEC/fairseq/modules/character_token_embedder.py BART-GEC/examples/roberta/preprocess_RACE.py BART-GEC/fairseq/modules/lightconv_layer/cuda_function_gen.py mBART-GEC/fairseq/modules/dynamic_crf_layer.py mBART-GEC/fairseq/models/fairseq_model.py mBART-GEC/fairseq/modules/transformer_sentence_encoder.py BART-GEC/fairseq/modules/transformer_sentence_encoder.py mBART-GEC/fairseq/models/lstm_lm.py BART-GEC/fairseq/models/distributed_fairseq_model.py BART-GEC/fairseq_cli/eval_lm.py BART-GEC/examples/speech_recognition/data/replabels.py mBART-GEC/fairseq/modules/character_token_embedder.py mBART-GEC/examples/noisychannel/rerank_options.py BART-GEC/fairseq/modules/mean_pool_gating_network.py BART-GEC/fairseq/modules/linearized_convolution.py mBART-GEC/fairseq/modules/dynamicconv_layer/dynamicconv_layer.py BART-GEC/fairseq/criterions/legacy_masked_lm.py BART-GEC/score.py mBART-GEC/fairseq/modules/multihead_attention.py BART-GEC/fairseq/models/model_utils.py BART-GEC/fairseq/optim/sgd.py mBART-GEC/tests/speech_recognition/test_collaters.py mBART-GEC/tests/test_utils.py mBART-GEC/fairseq/modules/scalar_bias.py mBART-GEC/scripts/split_train_valid_docs.py BART-GEC/fairseq/models/fconv_self_att.py mBART-GEC/fairseq/models/transformer_from_pretrained_xlm.py BART-GEC/fairseq/tasks/fairseq_task.py BART-GEC/fairseq/models/nat/iterative_nonautoregressive_transformer.py mBART-GEC/fairseq/tasks/__init__.py BART-GEC/tests/test_reproducibility.py mBART-GEC/fairseq/data/dictionary.py mBART-GEC/tests/test_concat_dataset.py BART-GEC/fairseq/data/prepend_token_dataset.py BART-GEC/fairseq/data/numel_dataset.py BART-GEC/fairseq/models/nat/levenshtein_utils.py BART-GEC/fairseq/modules/dynamicconv_layer/cuda_function_gen.py BART-GEC/fairseq/modules/learned_positional_embedding.py BART-GEC/fairseq/optim/__init__.py BART-GEC/fairseq/tasks/sentence_prediction.py BART-GEC/fairseq/data/encoders/fastbpe.py BART-GEC/fairseq/data/encoders/gpt2_bpe_utils.py mBART-GEC/fairseq/tasks/sentence_ranking.py BART-GEC/fairseq/data/encoders/moses_tokenizer.py mBART-GEC/tests/test_noising.py BART-GEC/fairseq/data/token_block_dataset.py mBART-GEC/docs/conf.py BART-GEC/tests/speech_recognition/test_vggtransformer.py BART-GEC/fairseq_cli/score.py mBART-GEC/fairseq/tasks/language_modeling.py BART-GEC/fairseq/modules/vggblock.py mBART-GEC/fairseq/models/fconv_lm.py BART-GEC/fairseq/models/nat/nonautoregressive_ensembles.py BART-GEC/fairseq/tasks/multilingual_masked_lm.py mBART-GEC/fairseq/modules/lightconv_layer/lightconv_layer.py BART-GEC/examples/roberta/wsc/wsc_criterion.py mBART-GEC/fairseq/modules/unfold.py BART-GEC/fairseq/modules/dynamicconv_layer/__init__.py mBART-GEC/fairseq/data/subsample_dataset.py BART-GEC/tests/test_label_smoothing.py mBART-GEC/fairseq_cli/score.py mBART-GEC/fairseq/models/fconv_self_att.py mBART-GEC/examples/speech_recognition/tasks/__init__.py mBART-GEC/fairseq/tasks/denoising.py mBART-GEC/fairseq/data/strip_token_dataset.py BART-GEC/fairseq/__init__.py BART-GEC/fairseq/data/subsample_dataset.py mBART-GEC/fairseq/models/transformer.py mBART-GEC/fairseq/models/roberta/hub_interface.py mBART-GEC/fairseq/optim/fp16_optimizer.py BART-GEC/fairseq/data/transform_eos_lang_pair_dataset.py BART-GEC/fairseq/modules/positional_embedding.py BART-GEC/tests/test_concat_dataset.py BART-GEC/fairseq/data/__init__.py BART-GEC/tests/test_token_block_dataset.py mBART-GEC/examples/speech_recognition/criterions/CTC_loss.py mBART-GEC/fairseq/models/nat/iterative_nonautoregressive_transformer.py BART-GEC/scripts/wav2vec_manifest.py BART-GEC/fairseq/modules/layer_norm.py BART-GEC/fairseq/modules/sparse_multihead_attention.py BART-GEC/tests/test_iterators.py mBART-GEC/fairseq/data/__init__.py mBART-GEC/fairseq/models/composite_encoder.py mBART-GEC/fairseq/criterions/masked_lm.py BART-GEC/fairseq/modules/multihead_attention.py BART-GEC/fairseq/data/mask_tokens_dataset.py mBART-GEC/fairseq/pdb.py mBART-GEC/fairseq/bleu.py mBART-GEC/fairseq/data/lru_cache_dataset.py BART-GEC/examples/translation_moe/score.py BART-GEC/fairseq/models/multilingual_transformer.py BART-GEC/fairseq/data/encoders/space_tokenizer.py mBART-GEC/fairseq/models/huggingface/__init__.py mBART-GEC/fairseq/data/prepend_dataset.py BART-GEC/fairseq/models/roberta/model.py BART-GEC/fairseq/progress_bar.py mBART-GEC/train.py mBART-GEC/tests/test_iterators.py BART-GEC/fairseq/criterions/adaptive_loss.py BART-GEC/examples/noisychannel/rerank_utils.py mBART-GEC/fairseq/data/round_robin_zip_datasets.py mBART-GEC/fairseq/tasks/translation_from_pretrained_xlm.py mBART-GEC/fairseq/data/sort_dataset.py BART-GEC/examples/speech_recognition/criterions/cross_entropy_acc.py BART-GEC/fairseq/models/transformer_from_pretrained_xlm.py BART-GEC/examples/speech_recognition/w2l_decoder.py BART-GEC/examples/roberta/commonsense_qa/commonsense_qa_task.py mBART-GEC/fairseq/modules/learned_positional_embedding.py mBART-GEC/scripts/spm_encode.py mBART-GEC/fairseq/tasks/masked_lm.py BART-GEC/examples/speech_recognition/__init__.py BART-GEC/fairseq/models/fairseq_encoder.py mBART-GEC/hubconf.py mBART-GEC/examples/speech_recognition/w2l_decoder.py mBART-GEC/fairseq/modules/__init__.py BART-GEC/fairseq/data/encoders/hf_bert_bpe.py mBART-GEC/fairseq/optim/lr_scheduler/__init__.py BART-GEC/fairseq/optim/fp16_optimizer.py BART-GEC/fairseq/metrics.py BART-GEC/fairseq/models/bart/__init__.py mBART-GEC/fairseq/data/lm_context_window_dataset.py mBART-GEC/fairseq/modules/dynamicconv_layer/cuda_function_gen.py mBART-GEC/fairseq/criterions/legacy_masked_lm.py BART-GEC/fairseq/models/bart/model.py mBART-GEC/fairseq/models/nat/nonautoregressive_ensembles.py mBART-GEC/fairseq/modules/sparse_transformer_sentence_encoder.py BART-GEC/fairseq/optim/adagrad.py BART-GEC/fairseq/models/fairseq_decoder.py BART-GEC/fairseq/data/fairseq_dataset.py mBART-GEC/examples/speech_recognition/data/data_utils.py BART-GEC/fairseq/data/lru_cache_dataset.py mBART-GEC/fairseq/data/base_wrapper_dataset.py BART-GEC/fairseq/tasks/language_modeling.py BART-GEC/fairseq/data/base_wrapper_dataset.py BART-GEC/tests/speech_recognition/test_collaters.py BART-GEC/fairseq/data/roll_dataset.py BART-GEC/fairseq/criterions/binary_cross_entropy.py mBART-GEC/examples/translation_moe/src/logsumexp_moe.py mBART-GEC/tests/test_sequence_scorer.py mBART-GEC/tests/speech_recognition/test_cross_entropy.py mBART-GEC/generate.py mBART-GEC/fairseq/modules/adaptive_softmax.py mBART-GEC/examples/speech_recognition/datasets/asr_prep_json.py BART-GEC/fairseq/modules/unfold.py mBART-GEC/fairseq/models/nat/cmlm_transformer.py BART-GEC/fairseq/models/roberta/model_xlmr.py mBART-GEC/fairseq/optim/lr_scheduler/fairseq_lr_scheduler.py mBART-GEC/tests/utils.py BART-GEC/setup.py BART-GEC/fairseq/modules/gelu.py mBART-GEC/fairseq/modules/sparse_multihead_attention.py BART-GEC/tests/test_utils.py mBART-GEC/fairseq/binarizer.py BART-GEC/fairseq/tasks/multilingual_translation.py mBART-GEC/fairseq/models/transformer_lm.py BART-GEC/tests/utils.py mBART-GEC/tests/speech_recognition/test_vggtransformer.py BART-GEC/fairseq/tasks/cross_lingual_lm.py mBART-GEC/fairseq/tasks/semisupervised_translation.py BART-GEC/fairseq/data/sort_dataset.py BART-GEC/fairseq/data/concat_dataset.py BART-GEC/fairseq/optim/lr_scheduler/fairseq_lr_scheduler.py mBART-GEC/fairseq/data/data_utils.py BART-GEC/fairseq/data/encoders/nltk_tokenizer.py mBART-GEC/fairseq/data/transform_eos_dataset.py mBART-GEC/fairseq/data/encoders/fastbpe.py mBART-GEC/fairseq/data/encoders/hf_byte_bpe.py mBART-GEC/tests/speech_recognition/asr_test_base.py BART-GEC/fairseq/optim/lr_scheduler/triangular_lr_scheduler.py mBART-GEC/fairseq/data/mask_tokens_dataset.py mBART-GEC/fairseq/modules/vggblock.py mBART-GEC/examples/speech_recognition/data/asr_dataset.py BART-GEC/fairseq/tokenizer.py BART-GEC/fairseq/binarizer.py mBART-GEC/fairseq/criterions/cross_entropy.py mBART-GEC/fairseq/data/encoders/sentencepiece_bpe.py mBART-GEC/fairseq/data/encoders/utils.py mBART-GEC/fairseq/benchmark/dummy_masked_lm.py mBART-GEC/fairseq/data/legacy/masked_lm_dataset.py mBART-GEC/fairseq/models/bart/__init__.py BART-GEC/tests/test_average_checkpoints.py BART-GEC/tests/test_dictionary.py mBART-GEC/tests/test_binaries.py BART-GEC/examples/speech_recognition/models/__init__.py mBART-GEC/fairseq/optim/fused_adam.py mBART-GEC/fairseq/optim/adagrad.py BART-GEC/fairseq/models/roberta/__init__.py mBART-GEC/fairseq/logging/metrics.py BART-GEC/fairseq/criterions/masked_lm.py BART-GEC/tests/speech_recognition/asr_test_base.py mBART-GEC/fairseq/modules/positional_embedding.py BART-GEC/examples/speech_recognition/models/w2l_conv_glu_enc.py BART-GEC/fairseq_cli/validate.py mBART-GEC/fairseq/utils.py mBART-GEC/tests/test_file_io.py BART-GEC/fairseq/models/fconv.py mBART-GEC/tests/test_backtranslation_dataset.py mBART-GEC/examples/speech_recognition/criterions/cross_entropy_acc.py BART-GEC/scripts/compare_namespaces.py mBART-GEC/fairseq/models/roberta/model_xlmr.py mBART-GEC/fairseq/benchmark/dummy_model.py mBART-GEC/fairseq/optim/adafactor.py BART-GEC/fairseq/sequence_scorer.py mBART-GEC/tests/test_memory_efficient_fp16.py mBART-GEC/fairseq/data/replace_dataset.py BART-GEC/fairseq/data/concat_sentences_dataset.py BART-GEC/tests/test_export.py BART-GEC/docs/conf.py BART-GEC/fairseq/data/nested_dictionary_dataset.py mBART-GEC/fairseq/data/append_token_dataset.py mBART-GEC/fairseq/data/legacy/block_pair_dataset.py mBART-GEC/score.py mBART-GEC/fairseq/optim/fairseq_optimizer.py mBART-GEC/fairseq_cli/interactive.py mBART-GEC/fairseq/distributed_utils.py BART-GEC/fairseq/data/strip_token_dataset.py mBART-GEC/examples/noisychannel/rerank_score_lm.py mBART-GEC/fairseq/data/list_dataset.py BART-GEC/fairseq/modules/scalar_bias.py mBART-GEC/fairseq/data/indexed_dataset.py BART-GEC/examples/noisychannel/rerank_options.py mBART-GEC/fairseq/options.py BART-GEC/fairseq/data/truncate_dataset.py mBART-GEC/fairseq/tasks/multilingual_translation.py mBART-GEC/fairseq/data/concat_sentences_dataset.py mBART-GEC/fairseq/criterions/sentence_ranking.py mBART-GEC/fairseq/data/resampling_dataset.py mBART-GEC/fairseq/models/roberta/__init__.py BART-GEC/fairseq/data/legacy/masked_lm_dataset.py BART-GEC/fairseq/optim/lr_scheduler/polynomial_decay_schedule.py mBART-GEC/fairseq/models/lightconv.py mBART-GEC/examples/speech_recognition/__init__.py mBART-GEC/scripts/spm_train.py BART-GEC/fairseq/data/encoders/subword_nmt_bpe.py BART-GEC/examples/speech_recognition/models/vggtransformer.py BART-GEC/examples/speech_recognition/utils/wer_utils.py BART-GEC/fairseq/tasks/translation_from_pretrained_xlm.py BART-GEC/fairseq/data/language_pair_dataset.py BART-GEC/fairseq/modules/adaptive_softmax.py BART-GEC/fairseq/file_io.py BART-GEC/fairseq/data/iterators.py mBART-GEC/fairseq/data/nested_dictionary_dataset.py mBART-GEC/fairseq/criterions/binary_cross_entropy.py BART-GEC/examples/noisychannel/rerank_score_bw.py BART-GEC/fairseq/optim/lr_scheduler/cosine_lr_scheduler.py mBART-GEC/fairseq/search.py mBART-GEC/fairseq/data/offset_tokens_dataset.py mBART-GEC/fairseq/modules/lightconv_layer/cuda_function_gen.py BART-GEC/examples/speech_recognition/datasets/asr_prep_json.py mBART-GEC/fairseq/models/roberta/model_camembert.py BART-GEC/fairseq/data/id_dataset.py BART-GEC/fairseq/data/list_dataset.py mBART-GEC/fairseq/optim/lr_scheduler/cosine_lr_scheduler.py BART-GEC/examples/roberta/multiprocessing_bpe_encoder.py BART-GEC/fairseq/modules/grad_multiply.py BART-GEC/fairseq/optim/adamax.py mBART-GEC/examples/translation_moe/src/__init__.py BART-GEC/scripts/spm_encode.py mBART-GEC/tests/test_average_checkpoints.py BART-GEC/validate.py mBART-GEC/fairseq/models/fconv.py BART-GEC/fairseq/data/append_token_dataset.py mBART-GEC/fairseq/optim/bmuf.py mBART-GEC/fairseq/data/denoising_dataset.py mBART-GEC/examples/speech_recognition/utils/wer_utils.py mBART-GEC/fairseq/models/__init__.py BART-GEC/fairseq/models/__init__.py mBART-GEC/fairseq/file_io.py mBART-GEC/fairseq/models/bart/model.py mBART-GEC/tests/test_train.py mBART-GEC/fairseq/optim/adamax.py mBART-GEC/tests/test_sparse_multihead_attention.py BART-GEC/fairseq_cli/interactive.py BART-GEC/fairseq/models/nat/levenshtein_transformer.py mBART-GEC/fairseq/models/fairseq_decoder.py mBART-GEC/fairseq/legacy_distributed_data_parallel.py mBART-GEC/examples/speech_recognition/models/w2l_conv_glu_enc.py BART-GEC/scripts/split_train_valid_docs.py mBART-GEC/fairseq/criterions/fairseq_criterion.py mBART-GEC/fairseq/models/nat/levenshtein_utils.py mBART-GEC/fairseq/modules/lightweight_convolution.py BART-GEC/fairseq/criterions/cross_entropy.py BART-GEC/examples/noisychannel/rerank_generate.py mBART-GEC/fairseq/data/encoders/subword_nmt_bpe.py BART-GEC/examples/noisychannel/rerank_tune.py mBART-GEC/fairseq/modules/transformer_layer.py BART-GEC/examples/speech_recognition/infer.py BART-GEC/fairseq/criterions/fairseq_criterion.py mBART-GEC/fairseq/registry.py mBART-GEC/fairseq/models/lstm.py BART-GEC/fairseq/search.py BART-GEC/fairseq/data/lm_context_window_dataset.py BART-GEC/examples/speech_recognition/data/asr_dataset.py mBART-GEC/fairseq/models/nat/levenshtein_transformer.py BART-GEC/fairseq/data/replace_dataset.py BART-GEC/fairseq/modules/__init__.py mBART-GEC/examples/speech_recognition/models/vggtransformer.py mBART-GEC/fairseq/data/numel_dataset.py BART-GEC/fairseq/criterions/composite_loss.py mBART-GEC/fairseq/models/bart/hub_interface.py BART-GEC/fairseq/data/raw_label_dataset.py BART-GEC/scripts/build_sym_alignment.py mBART-GEC/fairseq/models/roberta/alignment_utils.py mBART-GEC/fairseq/data/multi_corpus_sampled_dataset.py mBART-GEC/fairseq_cli/train.py BART-GEC/fairseq/modules/transformer_layer.py BART-GEC/fairseq/criterions/__init__.py mBART-GEC/fairseq/tasks/legacy_masked_lm.py BART-GEC/fairseq/optim/adam.py mBART-GEC/fairseq/hub_utils.py mBART-GEC/fairseq/sequence_generator.py BART-GEC/fairseq/data/multi_corpus_sampled_dataset.py BART-GEC/fairseq/tasks/translation_lev.py mBART-GEC/fairseq/sequence_scorer.py BART-GEC/fairseq/tasks/legacy_masked_lm.py mBART-GEC/fairseq/trainer.py mBART-GEC/fairseq/modules/beamable_mm.py mBART-GEC/scripts/read_binarized.py BART-GEC/fairseq/modules/transformer_sentence_encoder_layer.py BART-GEC/tests/test_binaries.py mBART-GEC/fairseq/modules/downsampled_multihead_attention.py mBART-GEC/fairseq/tasks/translation_from_pretrained_bart.py BART-GEC/tests/speech_recognition/test_cross_entropy.py BART-GEC/fairseq/models/lstm.py BART-GEC/translate_ems.py BART-GEC/fairseq/models/composite_encoder.py BART-GEC/fairseq_cli/generate.py BART-GEC/tests/test_multihead_attention.py mBART-GEC/fairseq/checkpoint_utils.py mBART-GEC/tests/test_character_token_embedder.py mBART-GEC/fairseq/data/id_dataset.py mBART-GEC/examples/roberta/commonsense_qa/__init__.py mBART-GEC/fairseq/models/huggingface/hf_gpt2.py BART-GEC/tests/test_character_token_embedder.py BART-GEC/fairseq/data/legacy/masked_lm_dictionary.py mBART-GEC/fairseq/optim/__init__.py mBART-GEC/eval_lm.py NumpyExtension load_score_files score_target_hypo cli_main rerank match_target_hypo cli_main gen_and_reprocess_nbest add_reranking_args get_tuning_parser get_reranking_parser add_tuning_args score_bw cli_main score_lm cli_main random_search cli_main get_score get_prefix_no_bpe get_prefix_from_len rescore_file_name get_num_bpe_tokens_from_len LMOutput lm_scoring make_right_to_left get_score_from_pos remove_bpe reprocess_nbest reprocess get_directories parse_bleu_scoring get_prefix BitextOutputFromGen remove_bpe_dict parse_lm calc_length_from_frac get_full_from_prefix BitextOutput write_reprocessed main MultiprocessingEncoder main get_examples InputExample CommonsenseQATask WSCCriterion WinograndeCriterion WSCTask WinograndeTask find_span find_token get_spacy_nlp jsonl_iterator convert_sentence_to_json filter_noun_chunks winogrande_jsonl_iterator extended_noun_chunks get_detokenizer process_predictions optimize_models cli_main load_models_and_criterions get_dataset_itr prepare_result_files add_asr_eval_argument main check_args W2lKenLMDecoder W2lDecoder W2lViterbiDecoder ASGCriterion CrossEntropyWithAccCriterion compute_ctc_uer CTCCriterion arr_to_toks AsrDataset Seq2SeqCollater apply_mv_norm lengths_to_encoder_padding_mask calc_mean_invstddev encoder_padding_mask_to_lengths unpack_replabels replabel_symbol pack_replabels main process_sample vggtransformer_base VGGTransformerEncoder prepare_transformer_encoder_params vggtransformer_enc_1 LinearizedConv1d Embedding LayerNorm VGGTransformerEncoderOnly TransformerDecoder base_architecture prepare_transformer_decoder_params vggtransformer_1 vggtransformer_2 VGGTransformerModel base_architecture_enconly VGGTransformerEncoderModel Linear w2l_conv_glu_enc W2lConvGluEncoder W2lConvGluEncoderModel SpeechRecognitionTask get_asr_dataset_from_json offset_to_col Code Token trimWhitespace EditDistance merge_counts AlignmentResult calc_wer_stats coordinate_to_offset calc_wer str2toks get_wer_alignment_codes offset_to_row WERTransformer corpus_bleu intra_ref load_sys merge dictolist multi_ref sentence_bleu main pairwise load_ref Binarizer safe_readline BleuStat SacrebleuScorer Scorer load_checkpoint_to_cpu torch_persistent_save convert_state_dict_type load_checkpoint verify_checkpoint_directory load_pretrained_component_from_model load_model_ensemble_and_task prune_state_dict save_checkpoint load_model_ensemble save_state _upgrade_state_dict checkpoint_paths all_gather_list get_default_group get_world_size is_master all_reduce get_rank infer_init_method distributed_init PathManager cached_path s3_etag http_get s3_request s3_get read_set_from_file get_from_cache filename_to_url load_archive_file url_to_filename split_s3_path get_file_extension from_pretrained GeneratorHubInterface TokenizerHubInterface BPEHubInterface init_incremental_state FairseqIncrementalState with_incremental_state IterativeRefinementGenerator LegacyDistributedDataParallel MetersDict AverageMeter StopwatchMeter Meter TimeMeter safe_round get_meter state_dict aggregate reset_meters get_smoothed_value log_scalar log_start_time get_active_aggregators log_custom get_meters reset_meter load_state_dict get_smoothed_values log_derived log_stop_time log_speed parse_args_and_arch eval_str_list get_validation_parser add_distributed_training_args add_checkpoint_args get_preprocessing_parser add_generation_args get_parser eval_bool add_eval_lm_args add_preprocess_args add_model_args add_common_eval_args get_eval_lm_parser add_dataset_args add_interactive_args add_optimization_args get_interactive_generation_parser get_generation_parser get_training_parser MultiprocessingPdb set_trace progress_bar tensorboard_log_wrapper noop_progress_bar tqdm_progress_bar rename_logger format_stat json_progress_bar build_progress_bar simple_progress_bar set_defaults setup_registry LengthConstrainedBeamSearch DiverseSiblingsSearch BeamSearch Sampling Search DiverseBeamSearch EnsembleModel SequenceGenerator SequenceGeneratorWithAlignment EnsembleModelWithAlignment SequenceScorer tokenize_line Trainer extract_hard_alignment clip_grad_norm_ get_token_to_word_mapping import_user_module deprecation_warning print_embed_overlap set_incremental_state has_parameters load_ensemble_for_inference _match_types parse_embedding parse_alignment move_to_cuda post_process_prediction get_available_activation_fns load_embedding get_perplexity new_arange apply_to_sample strip_pad buffered_arange log_softmax resolve_max_positions load_align_dict eval softmax get_activation_fn item convert_padding_direction make_positions set_torch_seed get_incremental_state _get_full_incremental_state_key fill_with_neg_inf replace_unk AdaptiveLoss BinaryCrossEntropyCriterion CompositeLoss CrossEntropyCriterion FairseqCriterion label_smoothed_nll_loss LabelSmoothedCrossEntropyCriterion LabelSmoothedCrossEntropyCriterionWithAlignment compute_cross_entropy_loss LegacyMaskedLmLoss MaskedLmLoss LabelSmoothedDualImitationCriterion SentencePredictionCriterion SentenceRankingCriterion AppendTokenDataset backtranslate_samples BacktranslationDataset BaseWrapperDataset ColorizeDataset ConcatDataset ConcatSentencesDataset collect_filtered batch_by_size process_bpe_symbol numpy_seed load_indexed_dataset collate_tokens infer_language_pair _filter_by_size_dynamic filter_by_size DenoisingDataset collate TruncatedDictionary Dictionary FairseqIterableDataset FairseqDataset EpochListening IdDataset infer_dataset_impl make_builder IndexedCachedDataset index_file_path IndexedDatasetBuilder __best_fitting_dtype code dataset_exists IndexedDataset IndexedRawTextDataset make_dataset get_available_dataset_impl read_longs MMapIndexedDatasetBuilder write_longs data_file_path MMapIndexedDataset _warmup_mmap_file ShardedIterator CountingIterator StreamingEpochBatchIterator EpochBatchIterating EpochBatchIterator GroupedIterator LanguagePairDataset collate ListDataset LMContextWindowDataset LRUCacheDataset MaskTokensDataset MonolingualDataset collate uniform_sampler MultiCorpusSampledDataset _unflatten _flatten NestedDictionaryDataset UnsupervisedMTNoising NoisingDataset WordDropout WordShuffle WordNoising NumelDataset NumSamplesDataset OffsetTokensDataset PadDataset LeftPadDataset RightPadDataset PlasmaArray PrependDataset PrependTokenDataset RawLabelDataset ReplaceDataset ResamplingDataset RollDataset RoundRobinZipDatasets ShardedDataset SortDataset StripTokenDataset SubsampleDataset TokenBlockDataset TransformEosDataset TransformEosLangPairDataset TruncateDataset BlockPairDataset MaskedLMDataset MaskedLMDictionary BertDictionary FileAudioDataset RawAudioDataset fastBPE GPT2BPE bytes_to_unicode get_pairs get_encoder Encoder BertBPE MosesTokenizer NLTKTokenizer SentencepieceBPE SpaceTokenizer SubwordNMTBPE get_whole_word_mask CompositeEncoder DistributedFairseqModel FairseqDecoder FairseqEncoder FairseqIncrementalDecoder BaseFairseqModel FairseqEncoderDecoderModel FairseqMultiModel FairseqLanguageModel FairseqModel FairseqEncoderModel PositionalEmbedding ConvTBC LinearizedConv1d Embedding fconv_iwslt_de_en fconv_wmt_en_ro FConvModel base_architecture AttentionLayer fconv_wmt_en_de FConvEncoder extend_conv_spec fconv_wmt_en_fr FConvDecoder Linear FConvLanguageModel base_lm_architecture fconv_lm_dauphin_wikitext103 fconv_lm_dauphin_gbw FConvModelSelfAtt PositionalEmbedding ConvTBC LinearizedConv1d Embedding SelfAttention fconv_self_att_wp base_architecture FConvEncoder FConvDecoder Linear LightConvModel LightConvDecoder LightConvDecoderLayer lightconv_wmt_zh_en_big Embedding LightConvEncoderLayer base_architecture LightConvEncoder lightconv_wmt_en_de_big lightconv_wmt_en_fr_big lightconv_iwslt_de_en lightconv_wmt_en_de Linear LightConvLanguageModel lightconv_lm_gbw base_lm_architecture lstm_wiseman_iwslt_de_en LSTMModel Embedding LSTM lstm_luong_wmt_en_de LSTMEncoder AttentionLayer LSTMCell base_architecture LSTMDecoder Linear base_architecture LSTMLanguageModel MaskedLMEncoder bert_base_architecture base_architecture bert_large_architecture xlm_architecture MaskedLMModel coalesce script_skip_tensor_list expand_2d_or_3d_tensor script_skip_tensor fill_tensors base_multilingual_architecture multilingual_transformer_iwslt_de_en MultilingualTransformerModel TransformerAlignModel transformer_vaswani_wmt_en_de_big transformer_wmt_en_de_big Embedding transformer_wmt_en_de_big_t2t transformer_wmt_en_de TransformerDecoder TransformerModel base_architecture transformer_vaswani_wmt_en_fr_big transformer_iwslt_de_en transformer_wmt_en_de_big_align transformer_align TransformerEncoder Linear TransformerFromPretrainedXLMModel base_architecture upgrade_state_dict_with_xlm_weights TransformerDecoderFromPretrainedXLM TransformerEncoderFromPretrainedXLM transformer_lm_big transformer_lm_gpt2_big transformer_lm_baevski_gbw base_lm_architecture transformer_lm_gpt2_small TransformerLanguageModel transformer_lm_baevski_wiki103 transformer_lm_gpt transformer_lm_gpt2_medium ConvFeatureExtractionModel Wav2VecPredictionsModel Wav2VecModel ZeroPad1d TransposeLast ConvAggegator norm_block Fp32GroupNorm Fp32LayerNorm base_wav2vec_architecture register_model_architecture register_model build_model BARTHubInterface BARTModel BARTClassificationHead bart_large_architecture _skeptical_unmasking cmlm_base_architecture cmlm_wmt_en_de CMLMNATransformerModel FairseqNATModel ensemble_decoder FairseqNATEncoder ensemble_encoder FairseqNATDecoder insertion_base_architecture InsertionTransformerDecoder InsertionTransformerModel NegativeDistanceScore _get_ins_targets _apply_ins_words IterNATransformerModel gumbel_noise _sequential_poisoning iter_nat_wmt_en_de inat_base_architecture LevenshteinTransformerDecoder levenshtein_transformer_vaswani_wmt_en_de_big levenshtein_transformer_wmt_en_de levenshtein_base_architecture LevenshteinTransformerModel levenshtein_transformer_wmt_en_de_big_t2t _fill _get_del_targets _apply_ins_masks _skip_encoder_out _get_ins_targets _apply_ins_words _apply_del_words _skip load_libnat nacrf_base_architecture NACRFTransformerModel EnsembleLevT BasicEnsembleModel _EnsembleModelEncoder _mean_pooling _argmax NATransformerModel base_architecture NATransformerDecoder _uniform_assignment nonautoregressive_transformer_wmt_en_de spacy_tokenizer spacy_nlp align_bpe_to_words align_features_to_words RobertaHubInterface RobertaEncoder RobertaLMHead base_architecture roberta_large_architecture RobertaClassificationHead roberta_base_architecture xlm_architecture RobertaModel CamembertModel XLMRModel AdaptiveInput TiedLinear AdaptiveSoftmax TiedHeadModule BeamableMM CharacterTokenEmbedder ConvTBC SingleHeadAttention Downsample GatedLinear DownsampledMultiHeadAttention Linear DynamicConv DynamicConv1dTBC Linear DynamicCRF logsumexp gelu_accurate gelu GradMultiply Highway LayerNorm LearnedPositionalEmbedding LightweightConv LightweightConv1d LightweightConv1dTBC LinearizedConvolution LogSumExpMoE MeanPoolGatingNetwork MultiheadAttention PositionalEmbedding ScalarBias scalar_bias SinusoidalPositionalEmbedding SparseMultiheadAttention SparseTransformerSentenceEncoder SparseTransformerSentenceEncoderLayer Linear TransformerEncoderLayer TransformerDecoderLayer TransformerSentenceEncoder init_bert_params TransformerSentenceEncoderLayer unfold1d infer_conv_output_dim VGGBlock _pair gen_forward gen_backward LightconvLayer lightconvFunction gen_forward gen_backward dynamicconvFunction DynamicconvLayer Adadelta Adafactor FairseqAdafactor Adagrad Adam FairseqAdam FairseqAdamax Adamax FairseqBMUF FairseqOptimizer MemoryEfficientFP16Optimizer _FP16OptimizerMixin DynamicLossScaler FP16Optimizer _MemoryEfficientFP16OptimizerMixin FusedAdamV2 FusedAdamV1 get_fused_adam_class FairseqLAMB NAG FairseqNAG SGD CosineSchedule FairseqLRScheduler FixedSchedule InverseSquareRootSchedule PolynomialDecaySchedule ReduceLROnPlateau TriangularSchedule TriStageLRSchedule AudioPretrainingTask CrossLingualLMTask DenoisingTask FairseqTask LanguageModelingTask LegacyMaskedLMTask MaskedLMTask MultiLingualMaskedLMTask MultilingualTranslationTask _lang_token _lang_token_index _get_bt_dataset_key parse_lambda_config SemisupervisedTranslationTask _get_denoising_dataset_key SentencePredictionTask SentenceRankingTask load_langpair_dataset TranslationTask TranslationFromPretrainedXLMTask TranslationLevenshteinTask TranslationMoETask setup_task register_task get_task main WordStat cli_main main _main cli_main main buffered_read cli_main make_batches dataset_dest_file binarize_alignments binarize get_offsets dataset_dest_prefix cli_main main get_parser cli_main validate get_valid_stats should_stop_early distributed_main cli_main main train get_training_stats main cli_main main last_n_checkpoints average_checkpoints main main main main get_parser parse_checkpoints last_n_checkpoints main every_n_checkpoints main main main main PretrainedWav2VecModel EmbeddingDatasetWriter H5Writer Prediction read_audio EmbeddingWriterConfig main get_parser TestAverageCheckpoints ModelWithSharedParameter TestBacktranslationDataset train_legacy_masked_language_model TestTranslation create_dummy_data eval_lm_main train_translation_model TestCommonOptions preprocess_translation_data TestStories TestLanguageModeling generate_main preprocess_lm_data train_masked_language_model TestMaskedLanguageModel train_language_model setup_args single_gpu_training train_step setup_model_loss_criterion Model TestBMUF TestCharacterTokenEmbedder TestConcatDataset TestConvTBC TestDictionary TestExportModels TestFileIO TestIterators TestLabelSmoothing TestMemoryEfficientFP16 TestMetrics TestMultiheadAttention TestMultiCorpusSampledDataset TestDataNoising TestReproducibility TestResamplingDataset TestSequenceGenerator TestSequenceGeneratorBase TestDiverseSiblingsSearch TestDiverseBeamSearch TestTopPSamplingSearch TestSequenceScorer TestSparseMultiheadAttention TestTokenBlockDataset mock_dict mock_trainer get_trainer_and_epoch_itr TestLoadCheckpoint TestUtils TestDataset TestEncoder sequence_generator_setup dummy_dataloader TestModel dummy_dictionary TestTranslationTask TestIncrementalDecoder TestFairseqEncoderBase TestFairseqEncoderModelBase check_decoder_output CrossEntropyCriterionTestBase get_dummy_encoder_output TestFairseqDecoderBase DummyEncoder DummyTask get_dummy_input get_dummy_task_and_parser TestBaseFairseqModelBase get_dummy_dictionary DummyEncoderModel check_encoder_output _current_postion_info TestFairseqEncoderDecoderModelBase TestSeq2SeqCollator CrossEntropyWithAccCriterionTest VGGTransformerModelTest_big VGGTransformerModelTest_mid VGGTransformerModelTest_base VGGTransformerEncoderTest TransformerDecoderTest NumpyExtension main get_hashes_and_lines main load_score_files score_target_hypo cli_main rerank match_target_hypo cli_main gen_and_reprocess_nbest add_reranking_args get_tuning_parser get_reranking_parser add_tuning_args score_bw cli_main score_lm cli_main random_search cli_main get_score get_prefix_no_bpe get_prefix_from_len rescore_file_name get_num_bpe_tokens_from_len LMOutput lm_scoring make_right_to_left get_score_from_pos remove_bpe reprocess_nbest reprocess get_directories parse_bleu_scoring get_prefix BitextOutputFromGen remove_bpe_dict parse_lm calc_length_from_frac get_full_from_prefix BitextOutput write_reprocessed main MultiprocessingEncoder main get_examples InputExample CommonsenseQATask WSCCriterion WinograndeCriterion WSCTask WinograndeTask find_span find_token get_spacy_nlp jsonl_iterator convert_sentence_to_json filter_noun_chunks winogrande_jsonl_iterator extended_noun_chunks get_detokenizer process_predictions optimize_models cli_main load_models_and_criterions get_dataset_itr prepare_result_files add_asr_eval_argument main check_args W2lKenLMDecoder W2lDecoder W2lViterbiDecoder ASGCriterion CrossEntropyWithAccCriterion compute_ctc_uer CTCCriterion arr_to_toks AsrDataset Seq2SeqCollater apply_mv_norm lengths_to_encoder_padding_mask calc_mean_invstddev encoder_padding_mask_to_lengths unpack_replabels replabel_symbol pack_replabels main process_sample vggtransformer_base VGGTransformerEncoder prepare_transformer_encoder_params vggtransformer_enc_1 LinearizedConv1d Embedding LayerNorm VGGTransformerEncoderOnly TransformerDecoder base_architecture prepare_transformer_decoder_params vggtransformer_1 vggtransformer_2 VGGTransformerModel base_architecture_enconly VGGTransformerEncoderModel Linear w2l_conv_glu_enc W2lConvGluEncoder W2lConvGluEncoderModel SpeechRecognitionTask get_asr_dataset_from_json offset_to_col Code Token trimWhitespace EditDistance merge_counts AlignmentResult calc_wer_stats coordinate_to_offset calc_wer str2toks get_wer_alignment_codes offset_to_row WERTransformer corpus_bleu intra_ref load_sys merge dictolist multi_ref sentence_bleu main pairwise load_ref LogSumExpMoE MeanPoolGatingNetwork TranslationMoETask Binarizer safe_readline BleuStat SacrebleuScorer Scorer load_checkpoint_to_cpu torch_persistent_save convert_state_dict_type load_checkpoint verify_checkpoint_directory load_pretrained_component_from_model load_model_ensemble_and_task prune_state_dict save_checkpoint load_model_ensemble save_state _upgrade_state_dict checkpoint_paths all_reduce_dict all_gather_list get_default_group get_world_size is_master all_reduce get_rank infer_init_method distributed_init PathManager cached_path s3_etag http_get s3_request s3_get read_set_from_file get_from_cache filename_to_url load_archive_file url_to_filename split_s3_path get_file_extension from_pretrained GeneratorHubInterface TokenizerHubInterface BPEHubInterface FairseqIncrementalState with_incremental_state IterativeRefinementGenerator LegacyDistributedDataParallel NanDetector parse_args_and_arch eval_str_list get_validation_parser add_distributed_training_args add_checkpoint_args get_preprocessing_parser add_generation_args get_parser eval_bool add_eval_lm_args add_preprocess_args add_model_args add_common_eval_args get_eval_lm_parser add_dataset_args add_interactive_args add_optimization_args get_interactive_generation_parser get_generation_parser get_training_parser MultiprocessingPdb set_trace set_defaults setup_registry LengthConstrainedBeamSearch DiverseSiblingsSearch BeamSearch Sampling Search DiverseBeamSearch EnsembleModel SequenceGenerator SequenceGeneratorWithAlignment EnsembleModelWithAlignment SequenceScorer tokenize_line Trainer extract_hard_alignment clip_grad_norm_ get_token_to_word_mapping import_user_module deprecation_warning print_embed_overlap set_incremental_state has_parameters split_paths load_ensemble_for_inference _match_types parse_embedding parse_alignment move_to_cuda post_process_prediction get_available_activation_fns load_embedding get_perplexity new_arange apply_to_sample strip_pad buffered_arange log_softmax resolve_max_positions load_align_dict eval softmax get_activation_fn item convert_padding_direction make_positions set_torch_seed get_incremental_state with_torch_seed fill_with_neg_inf replace_unk DummyDataset DummyLMTask DummyMaskedLMTask DummyDataset base_architecture DummyEncoder DummyModel AdaptiveLoss BinaryCrossEntropyCriterion CompositeLoss CrossEntropyCriterion FairseqCriterion label_smoothed_nll_loss LabelSmoothedCrossEntropyCriterion LabelSmoothedCrossEntropyCriterionWithAlignment compute_cross_entropy_loss LegacyMaskedLmLoss MaskedLmLoss LabelSmoothedDualImitationCriterion SentencePredictionCriterion SentenceRankingCriterion AppendTokenDataset backtranslate_samples BacktranslationDataset BaseWrapperDataset ColorizeDataset ConcatDataset ConcatSentencesDataset collect_filtered batch_by_size process_bpe_symbol numpy_seed load_indexed_dataset collate_tokens infer_language_pair _filter_by_size_dynamic filter_by_size DenoisingDataset collate TruncatedDictionary Dictionary FairseqIterableDataset FairseqDataset EpochListening IdDataset infer_dataset_impl make_builder IndexedCachedDataset index_file_path IndexedDatasetBuilder __best_fitting_dtype code dataset_exists IndexedDataset IndexedRawTextDataset make_dataset get_available_dataset_impl read_longs MMapIndexedDatasetBuilder write_longs data_file_path MMapIndexedDataset _warmup_mmap_file ShardedIterator CountingIterator StreamingEpochBatchIterator EpochBatchIterating EpochBatchIterator GroupedIterator LanguagePairDataset collate ListDataset LMContextWindowDataset LRUCacheDataset MaskTokensDataset MonolingualDataset collate uniform_sampler MultiCorpusSampledDataset _unflatten _flatten NestedDictionaryDataset UnsupervisedMTNoising NoisingDataset WordDropout WordShuffle WordNoising NumelDataset NumSamplesDataset OffsetTokensDataset PadDataset LeftPadDataset RightPadDataset PlasmaArray PrependDataset PrependTokenDataset RawLabelDataset ReplaceDataset ResamplingDataset RollDataset RoundRobinZipDatasets ShardedDataset SortDataset StripTokenDataset SubsampleDataset TokenBlockDataset TransformEosDataset TransformEosLangPairDataset TruncateDataset BlockPairDataset MaskedLMDataset MaskedLMDictionary BertDictionary FileAudioDataset RawAudioDataset fastBPE GPT2BPE bytes_to_unicode get_pairs get_encoder Encoder BertBPE HuggingFaceByteLevelBPE MosesTokenizer NLTKTokenizer SentencepieceBPE SpaceTokenizer SubwordNMTBPE get_whole_word_mask MetersDict AverageMeter StopwatchMeter Meter TimeMeter safe_round get_meter state_dict aggregate reset_meters get_smoothed_value log_scalar log_start_time get_active_aggregators log_custom get_meters reset_meter load_state_dict get_smoothed_values log_derived log_stop_time log_speed TqdmProgressBar BaseProgressBar progress_bar TensorboardProgressBarWrapper rename_logger format_stat NoopProgressBar SimpleProgressBar build_progress_bar JsonProgressBar CompositeEncoder DistributedFairseqModel FairseqDecoder FairseqEncoder FairseqIncrementalDecoder BaseFairseqModel FairseqEncoderDecoderModel FairseqMultiModel FairseqLanguageModel FairseqModel FairseqEncoderModel PositionalEmbedding ConvTBC LinearizedConv1d Embedding fconv_iwslt_de_en fconv_wmt_en_ro FConvModel base_architecture AttentionLayer fconv_wmt_en_de FConvEncoder extend_conv_spec fconv_wmt_en_fr FConvDecoder Linear FConvLanguageModel base_lm_architecture fconv_lm_dauphin_wikitext103 fconv_lm_dauphin_gbw FConvModelSelfAtt PositionalEmbedding ConvTBC LinearizedConv1d Embedding SelfAttention fconv_self_att_wp base_architecture FConvEncoder FConvDecoder Linear LightConvModel LightConvDecoder LightConvDecoderLayer lightconv_wmt_zh_en_big Embedding LightConvEncoderLayer base_architecture LightConvEncoder lightconv_wmt_en_de_big lightconv_wmt_en_fr_big lightconv_iwslt_de_en lightconv_wmt_en_de Linear LightConvLanguageModel lightconv_lm_gbw base_lm_architecture lstm_wiseman_iwslt_de_en LSTMModel Embedding LSTM lstm_luong_wmt_en_de LSTMEncoder AttentionLayer LSTMCell base_architecture LSTMDecoder Linear base_architecture LSTMLanguageModel MaskedLMEncoder bert_base_architecture base_architecture bert_large_architecture xlm_architecture MaskedLMModel coalesce script_skip_tensor_list expand_2d_or_3d_tensor script_skip_tensor fill_tensors base_multilingual_architecture multilingual_transformer_iwslt_de_en MultilingualTransformerModel TransformerAlignModel transformer_vaswani_wmt_en_de_big transformer_wmt_en_de_big Embedding transformer_wmt_en_de_big_t2t transformer_wmt_en_de TransformerDecoder TransformerModel base_architecture transformer_vaswani_wmt_en_fr_big transformer_iwslt_de_en transformer_wmt_en_de_big_align transformer_align TransformerEncoder Linear TransformerFromPretrainedXLMModel base_architecture upgrade_state_dict_with_xlm_weights TransformerDecoderFromPretrainedXLM TransformerEncoderFromPretrainedXLM transformer_lm_big transformer_lm_gpt2_big transformer_lm_baevski_gbw base_lm_architecture transformer_lm_gpt2_small TransformerLanguageModel transformer_lm_baevski_wiki103 transformer_lm_gpt transformer_lm_gpt2_medium ConvFeatureExtractionModel Wav2VecPredictionsModel Wav2VecModel ZeroPad1d TransposeLast ConvAggegator norm_block Fp32GroupNorm Fp32LayerNorm base_wav2vec_architecture register_model_architecture register_model build_model BARTHubInterface mbart_large_architecture BARTModel BARTClassificationHead bart_large_architecture HuggingFaceGPT2LanguageModel HuggingFaceGPT2Decoder hf_gpt2_medium hf_gpt2_xl default_architecture hf_gpt2_large _skeptical_unmasking cmlm_base_architecture cmlm_wmt_en_de CMLMNATransformerModel FairseqNATModel ensemble_decoder FairseqNATEncoder ensemble_encoder FairseqNATDecoder insertion_base_architecture InsertionTransformerDecoder InsertionTransformerModel NegativeDistanceScore _get_ins_targets _apply_ins_words IterNATransformerModel gumbel_noise _sequential_poisoning iter_nat_wmt_en_de inat_base_architecture LevenshteinTransformerDecoder levenshtein_transformer_vaswani_wmt_en_de_big levenshtein_transformer_wmt_en_de levenshtein_base_architecture LevenshteinTransformerModel levenshtein_transformer_wmt_en_de_big_t2t _fill _get_del_targets _apply_ins_masks _skip_encoder_out _get_ins_targets _apply_ins_words _apply_del_words _skip load_libnat nacrf_base_architecture NACRFTransformerModel EnsembleLevT BasicEnsembleModel _EnsembleModelEncoder _mean_pooling _argmax NATransformerModel base_architecture NATransformerDecoder _uniform_assignment nonautoregressive_transformer_wmt_en_de spacy_tokenizer spacy_nlp align_bpe_to_words align_features_to_words RobertaHubInterface RobertaEncoder RobertaLMHead base_architecture roberta_large_architecture RobertaClassificationHead roberta_base_architecture xlm_architecture RobertaModel CamembertModel XLMRModel AdaptiveInput TiedLinear AdaptiveSoftmax TiedHeadModule BeamableMM CharacterTokenEmbedder Highway ConvTBC SingleHeadAttention Downsample GatedLinear DownsampledMultiHeadAttention Linear DynamicConv DynamicConv1dTBC Linear DynamicCRF logsumexp gelu_accurate gelu GradMultiply FusedLayerNorm LayerNorm LearnedPositionalEmbedding LightweightConv LightweightConv1d LightweightConv1dTBC LinearizedConvolution MultiheadAttention PositionalEmbedding ScalarBias scalar_bias SinusoidalPositionalEmbedding SparseMultiheadAttention SparseTransformerSentenceEncoder SparseTransformerSentenceEncoderLayer Linear TransformerEncoderLayer TransformerDecoderLayer TransformerSentenceEncoder init_bert_params TransformerSentenceEncoderLayer unfold1d infer_conv_output_dim VGGBlock _pair gen_forward gen_backward dynamicconvFunction DynamicconvLayer gen_forward gen_backward LightconvLayer lightconvFunction Adadelta Adafactor FairseqAdafactor Adagrad Adam FairseqAdam FairseqAdamax Adamax FairseqBMUF FairseqOptimizer MemoryEfficientFP16Optimizer _FP16OptimizerMixin DynamicLossScaler FP16Optimizer _MemoryEfficientFP16OptimizerMixin FusedAdamV2 FusedAdamV1 get_fused_adam_class FairseqLAMB NAG FairseqNAG SGD CosineSchedule FairseqLRScheduler FixedSchedule InverseSquareRootSchedule PolynomialDecaySchedule ReduceLROnPlateau TriangularSchedule TriStageLRSchedule AudioPretrainingTask CrossLingualLMTask DenoisingTask FairseqTask LanguageModelingTask LegacyMaskedLMTask MaskedLMTask MultilingualDenoisingTask MultiLingualMaskedLMTask MultilingualTranslationTask _lang_token _lang_token_index _get_bt_dataset_key parse_lambda_config SemisupervisedTranslationTask _get_denoising_dataset_key SentencePredictionTask SentenceRankingTask load_langpair_dataset TranslationTask TranslationFromPretrainedBARTTask TranslationFromPretrainedXLMTask TranslationLevenshteinTask setup_task register_task get_task main WordStat cli_main main _main cli_main main buffered_read cli_main make_batches dataset_dest_file binarize_alignments binarize get_offsets dataset_dest_prefix cli_main main get_parser cli_main validate get_valid_stats should_stop_early distributed_main cli_main main train get_training_stats main cli_main main last_n_checkpoints average_checkpoints main main main main get_parser parse_checkpoints last_n_checkpoints main every_n_checkpoints main main main main PretrainedWav2VecModel EmbeddingDatasetWriter H5Writer Prediction read_audio EmbeddingWriterConfig main get_parser TestAverageCheckpoints ModelWithSharedParameter TestBacktranslationDataset train_legacy_masked_language_model TestTranslation create_dummy_data eval_lm_main TestOptimizers train_translation_model preprocess_translation_data TestStories TestLanguageModeling generate_main preprocess_lm_data train_masked_language_model TestMaskedLanguageModel train_language_model setup_args single_gpu_training train_step setup_model_loss_criterion Model TestBMUF TestCharacterTokenEmbedder TestConcatDataset TestConvTBC TestDictionary get_dummy_dictionary DummyTask get_dummy_task_and_parser TestExportModels TestFileIO TestIterators TestLabelSmoothing TestMemoryEfficientFP16 TestMetrics TestMultiheadAttention TestMultiCorpusSampledDataset TestDataNoising TestReproducibility TestResamplingDataset TestSequenceGenerator TestSequenceGeneratorBase TestDiverseSiblingsSearch TestDiverseBeamSearch TestTopPSamplingSearch TestSequenceScorer TestSparseMultiheadAttention TestTokenBlockDataset mock_dict mock_trainer get_trainer_and_epoch_itr TestLoadCheckpoint TestUtils TestDataset TestEncoder sequence_generator_setup dummy_dataloader TestModel dummy_dictionary TestTranslationTask TestIncrementalDecoder TestFairseqEncoderBase TestFairseqEncoderModelBase check_decoder_output CrossEntropyCriterionTestBase get_dummy_encoder_output TestFairseqDecoderBase DummyEncoder DummyTask get_dummy_input get_dummy_task_and_parser TestBaseFairseqModelBase get_dummy_dictionary DummyEncoderModel check_encoder_output _current_postion_info TestFairseqEncoderDecoderModelBase TestSeq2SeqCollator CrossEntropyWithAccCriterionTest VGGTransformerModelTest_big VGGTransformerModelTest_mid VGGTransformerModelTest_base VGGTransformerEncoderTest TransformerDecoderTest get_score unk eos list sorted result_string len add pad backwards append no_bpe_target range Scorer Dictionary parse_bleu_scoring keys load_score_files print encode_line get_full_from_prefix split print normalize argmax score_target_hypo data_dir_name right_to_left2 lm_name backwards2 rescore_file_name target_prefix_frac right_to_left1 lm_dict backwards1 list gen_model_name LMOutput diff_bpe all_shards num_rescore append range gen_subset nbest_list model2_name num_shards prefix_len remove_bpe sampling get_directories BitextOutputFromGen print source_prefix_frac model1_name BitextOutput list num_shards gen_model_name prefix_len data_dir_name gen_and_reprocess_nbest source_prefix_frac write_hypos score_bw score_lm sampling all_shards num_rescore get_directories target_prefix_frac range gen_subset match_target_hypo rerank get_reranking_parser parse_args_and_arch data backwards_score_dict_dir data_dir_name parse_args_and_arch target get_preprocessing_parser source rescore_file_name target_prefix_frac shard_id backwards1 str gen_model_name diff_bpe call dirname num_rescore no_bpe_target hypo parse_args gen_subset nbest_list model2_name no_bpe_hypo num_shards prefix_len sampling get_directories no_bpe_source main join score_dict_dir BitextOutputFromGen print source_lang source_prefix_frac model1_name get_generation_parser rescore_bpe_code target_lang write_reprocessed makedirs gen_and_reprocess_nbest add_reranking_args get_parser add_reranking_args get_parser add_tuning_args add_argument_group add_argument add_argument_group add_argument data_dir_name right_to_left2 parse_args_and_arch backwards2 rescore_file_name right_to_left1 target_prefix_frac shard_id backwards1 gen_model_name num_rescore gen_subset model2_name num_shards prefix_len sampling get_directories print source_lang source_prefix_frac model1_name get_generation_parser target_lang score_bw language_model data_dir_name lm_name rescore_file_name lm_dict target_prefix_frac shard_id gen_model_name lm_scoring num_rescore gen_subset nbest_list num_shards prefix_len sampling get_directories lm_bpe_code BitextOutputFromGen print source_lang source_prefix_frac target_lang score_lm seed list tune_param tune_subset concatenate Namespace gen_subset index copy rerank nbest_list share_weights array range enumerate len random_search get_tuning_parser int search group span append float compile split strip search group span append float enumerate compile split get_prefix_no_bpe len remove_bpe ceil split split sum get_prefix_no_bpe join reverse split rstrip replace remove_bpe search compile strip len get_num_bpe_tokens_from_len calc_length_from_frac append sum range len str join dirname no_bpe_hypo parse_args_and_arch call get_eval_lm_parser get_preprocessing_parser main no_bpe_target no_bpe_source write_reprocessed parse_args parse_args add_argument ArgumentParser join listdir split join str label write close paragraph open output_dir input_dir range get_examples makedirs len replace split enumerate add text lower idx startswith len MosesDetokenizer load get_spacy_nlp get_detokenizer append lower add_argument format print debug DecodePieces string cpu split load_checkpoint_to_cpu setup_task build_model load_state_dict build_criterion append fp16 make_generation_fast_ cuda half setup_task data import_user_module StopwatchMeter get_dataset_itr SentencePieceProcessor dataset check_args tolist load_dataset sum gen_subset format optimize_models results_path avg prepare_result_files info beam n criterion target_dictionary build_generator Load path load_models_and_criterions pathsep split len add_asr_eval_argument get_generation_parser main append str Token align codes tolist append range arr_to_toks mean var any calc_mean_invstddev size item append replabel_symbol range index append range int join length rate channels map encode_line info EncodeAsPieces endswith Sample cpu_count name from_iterable dictionary append dump audio_format load namedtuple labels output Namespace Namespace bias LinearizedConvolution sqrt normal_ weight constant_ getattr getattr getattr getattr getattr getattr getattr append Token split WERTransformer WERTransformer WERTransformer items ref print intra_ref load_sys sys multi_ref load_ref pairwise merge items sorted append rstrip startswith _corpus_bleu sys_len totals ref_len _corpus_bleu counts compute_bleu range append range len list corpus_bleu print add choice set mean zip append argmax range len list corpus_bleu print extend from_iterable zip append pairwise range enumerate len tell StopwatchMeter save_dir hasattr OrderedDict getattr sum update epoch get_num_updates format copy start info remove lexists end_of_epoch best_function stop checkpoint_paths join epoch optimizer_overrides get_train_iterator reset_optimizer lr_step reset_lr_scheduler eval load_state_dict restore_file save_dir makedirs items _upgrade_state_dict setattr load_model_ensemble_and_task load_checkpoint_to_cpu setup_task build_model load_state_dict append fullmatch append listdir compile enumerate range items isinstance OrderedDict is_tensor convert_state_dict_type has_parameters state_dict items set_defaults getattr max_positions group search create_pruning_pass info append keys load_checkpoint_to_cpu isinstance OrderedDict load_state_dict startswith keys join makedirs get int format all check_output distributed_world_size distributed_init_method format init_process_group WARNING gethostname is_master warn all_reduce distributed_rank get_rank is_initialized info is_available zeros setLevel cuda INFO get_default_group _cpu_buffer copy_ loads list tolist _buffer get_rank append range pack get_world_size ByteTensor unpack zero_ pin_memory bytes dumps all_reduce cpu len cached_path join remove format move mkdtemp rmtree info encode hexdigest sha256 str join isinstance str urlparse isinstance exists path netloc urlparse startswith resource split_s3_path Object resource split_s3_path download_fileobj get update write close tqdm iter_content len get str s3_etag join list isinstance url_to_filename filter startswith listdir head makedirs set items join isinstance Namespace load_archive_file import_user_module load_model_ensemble_and_task startswith abspath exists tuple get module_name __name__ hasattr uuid4 str clear update MetersDict setdefault copy update AverageMeter get_active_aggregators add_meter get_active_aggregators _DerivedMeter add_meter update get_active_aggregators TimeMeter reset add_meter start StopwatchMeter get_active_aggregators add_meter get_active_aggregators stop update new_meter_fn get_active_aggregators add_meter get_meter reset reset get_meters items MetersDict add_preprocess_args get_parser add_model_args add_optimization_args add_dataset_args add_distributed_training_args add_checkpoint_args get_parser add_interactive_args add_dataset_args get_parser add_generation_args add_eval_lm_args add_dataset_args get_parser add_argument_group add_dataset_args add_common_eval_args get_parser eval isinstance items hasattr max_tokens add_argument_group add_args parse_known_args getattr ArgumentParser modify_parser parse_args set_defaults max_sentences items replace add_argument import_user_module parse_known_args ArgumentParser add_argument_group add_argument add_argument_group add_argument add_argument_group add_argument add_argument_group add_argument add_argument_group add_argument add_argument add_argument_group add_common_eval_args add_argument add_argument_group add_common_eval_args add_argument add_argument_group add_argument add_argument_group add_argument f_back MultiprocessingPdb fb_tbmf_wrapper log_interval noop_progress_bar tqdm_progress_bar json_progress_bar simple_progress_bar sum format isinstance tolist round avg is_tensor name replace set items Namespace dest add_args ArgumentParser setattr _actions default strip sub deprecation_warning _get_full_incremental_state_key _get_full_incremental_state_key format set info symbols keys len range len get tokenize_line enumerate unk_string replace_unk string encode_line int arange LongTensor remainder size eq expand_as sum hasattr norm mul_ item isinstance _match_types tuple min map zip map_value_update pop join user_dir insert import_module getattr dirname abspath exists split warn deprecation_warning train training parameters next manual_seed int split IntTensor enumerate len accumulate list len squeeze get_token_to_word_mapping zip append float max size squeeze size masked_fill_ eq unsqueeze any sum log_softmax nll_loss generate_fn collate_fn listdir split copy_tensor max fill_ enumerate infer_dataset_impl format count make_dataset info append len seed int get_state hash append function fromiter collect_filtered format size tolist warn _filter_by_size_dynamic len fromiter GeneratorType isinstance strip rstrip LongTensor sort index_select sum merge exists empty readinto write array keys shape compute_alignment_weights zeros cat isinstance update str items isinstance OrderedDict enumerate OrderedDict int items split append list range ord add set list map build_bpe ByteTensor range len dict DistributedDataParallel find_unused_parameters append normal_ weight constant_ normal_ LearnedPositionalEmbedding weight constant_ bias normal_ weight constant_ bias sqrt normal_ weight constant_ base_architecture getattr base_architecture getattr base_architecture getattr base_architecture getattr getattr base_lm_architecture getattr base_lm_architecture getattr zero_ zero_ zero_ base_architecture getattr xavier_uniform_ encoder_layers encoder_ffn_embed_dim decoder_kernel_size_list attention_dropout encoder_embed_dim decoder_layers encoder_kernel_size_list decoder_embed_dim base_architecture getattr base_architecture base_architecture getattr getattr lightconv_wmt_en_de_big getattr lightconv_wmt_en_de_big attention_dropout decoder_kernel_size_list decoder_layers decoder_embed_dim base_lm_architecture getattr uniform_ uniform_ named_parameters named_parameters uniform_ uniform_ dropout base_architecture getattr dropout base_architecture getattr base_architecture getattr bert_base_architecture getattr base_architecture getattr append enumerate append size cat expand_2d_or_3d_tensor size sum type_as base_architecture getattr getattr base_multilingual_architecture base_architecture getattr base_architecture base_architecture getattr getattr transformer_vaswani_wmt_en_de_big getattr transformer_vaswani_wmt_en_de_big getattr transformer_vaswani_wmt_en_de_big base_architecture getattr getattr transformer_wmt_en_de_big load_checkpoint_to_cpu keys transformer_base_architecture hasattr base_lm_architecture getattr transformer_lm_big getattr transformer_lm_big getattr base_lm_architecture getattr base_lm_architecture getattr base_lm_architecture getattr base_lm_architecture getattr Sequential Fp32LayerNorm Fp32GroupNorm TransposeLast getattr encoder_embed_dim encoder_ffn_embed_dim getattr decoder_embed_dim long encoder_embed_dim encoder_ffn_embed_dim getattr decoder_embed_dim cmlm_base_architecture view size scatter_ zip float long suggested_ed2_path type_as masked_fill_ eq masked_fill gather float encoder_embed_dim encoder_ffn_embed_dim getattr decoder_embed_dim size rand masked_fill_ randint long range encoder_embed_dim encoder_ffn_embed_dim getattr decoder_embed_dim inat_base_architecture encoder_embed_dim encoder_ffn_embed_dim getattr decoder_embed_dim levenshtein_base_architecture levenshtein_base_architecture getattr levenshtein_transformer_vaswani_wmt_en_de_big getattr load_libnat load_libnat ne cumsum scatter_ new_zeros masked_fill_ sum max masked_scatter ne size masked_fill_ eq expand_as gather Tensor isinstance append size sum cat base_architecture getattr mean sum type_as float max detach base_architecture filter startswith append next enumerate new Counter stack unsqueeze append sum max range len English create_tokenizer spacy_nlp base_architecture base_architecture getattr is_available sqrt pi functional hasattr is_available SinusoidalPositionalEmbedding isinstance Embedding normal_ zero_ Linear pad size unsqueeze as_strided isinstance conv_op transpose randn import_module _lang_token index split split_exists join bos format count ConcatDataset dataset_exists PrependTokenDataset load_indexed_dataset StripTokenDataset info eos AppendTokenDataset TruncateDataset append len rstrip softmax_batch make_generation_fast_ output_word_stats cuda log values LMContextWindowDataset SequenceScorer sorted half getattr load_model_ensemble fp16 setattr keys dict next_epoch_itr get_eval_lm_parser setup_task getLogger unk import_user_module StopwatchMeter make_generation_fast_ eos cuda sacrebleu basicConfig result_string half pad getattr load_model_ensemble load_dataset sum gen_subset SacrebleuScorer format Scorer load_align_dict avg info fp16 beam n target_dictionary build_generator path replace_unk pathsep next_epoch_itr split next_epoch_itr print_alignment string make_batches buffered_read inference_step post_process_prediction map build_bpe pad buffer_size input src_lengths strip_pad src_tokens resolve_max_positions load_align_dict build_tokenizer remove_bpe zip enumerate source_dictionary replace_unk decode_fn max_positions load_dictionary destdir tgtdict build_dictionary align_suffix save max srcdict get_task joined_dictionary addHandler make_all alignfile dict_path FileHandler task train_path source_lang make_all_alignments target_lang dataset_dest_file make_builder finalize dataset_dest_file make_builder finalize format destdir source_lang only_source target_lang dataset_dest_prefix parse_args get_preprocessing_parser stdin print score sentence_bleu Dictionary get_parser sacrebleu validate is_master Trainer save_checkpoint arch save_dir seed max_tokens should_stop_early set_device verify_checkpoint_directory distributed_world_size device_id get_lr epoch build_model patience start build_criterion manual_seed lr_step get_train_iterator __name__ distributed_init load_checkpoint stop train max_sentences getattr epoch get_num_updates get_smoothed_values train_step validate reset_meters print begin_epoch log GroupedIterator save_checkpoint get_model get_training_stats build_progress_bar next_epoch_itr split elapsed_time round get_perplexity epoch get_valid_stats print fixed_validation_seed append get_smoothed_values set_torch_seed build_progress_bar next_epoch_itr get_num_updates format hasattr best_checkpoint_metric best save_checkpoint best_function get_perplexity main format spawn distributed_main randint distributed_rank info infer_init_method device_id get_training_parser load_model_ensemble_and_task update valid_step eval vars build_progress_bar get_validation_parser load items list isinstance clone OrderedDict HalfTensor div_ float keys len int group fullmatch append listdir compile inputs add_mutually_exclusive_group num_epoch_checkpoints last_n_checkpoints num_update_checkpoints average_checkpoints mosesdecoder_dir fast_align_dir print_keys mean load_indexed_dataset get_parser append fullmatch parse_checkpoints parse_checkpoints remove root_dirs exit copyfile save_last realpath walk model read Random root ext main list parse_args_and_arch get_training_parser _create_dummy_data _create_dummy_alignment_data main parse_args get_preprocessing_parser main get_validation_parser parse_args_and_arch get_training_parser stdin parse_args_and_arch get_generation_parser main StringIO main parse_args get_preprocessing_parser main get_validation_parser parse_args_and_arch get_training_parser main get_eval_lm_parser parse_args_and_arch main list parse_args_and_arch get_training_parser SGD input_size parameters Model FairseqBMUF manual_seed nb_classes cuda distributed_init CrossEntropyLoss backward model loss_fn train step data train_step randn setup_model_loss_criterion set_device input_size random_ parameters is_available nb_classes cuda range cat randint format distributed_world_size Namespace MagicMock MagicMock mock_dict view sizes mock_trainer TokenBlockDataset EpochBatchIterator LanguagePairDataset str finalize Dictionary range add_symbol DataLoader TestDataset enumerate len setup_task Namespace LongTensor build_model target_dictionary dummy_dictionary eos format add_symbol Dictionary range enumerate setup_task parse_args ArgumentParser add_args randn sort collate_tokens from_numpy index_select append randint range astype float32 from_numpy t_ randint basename format filename currentframe f_lineno _current_postion_info _current_postion_info hexdigest set process_predictions progress_bar TimeMeter cpu list _all_reduce_dict OrderedDict tensor to keys add_argument import_user_module resize_ list set_rng_state get_rng_state set_torch_seed warning TqdmProgressBar FbTbmfWrapper NoopProgressBar SimpleProgressBar JsonProgressBar getattr getattr bart_large_architecture getattr default_architecture getattr default_architecture getattr default_architecture getattr index numel add output_word_probs eq generate item float add_bos_token int any add_string print_alignment string log print_step inference_step hasattr progress_bar tolist post_process_prediction map add update strip_pad start TimeMeter remove_bpe enumerate join print stop cpu encode_line get_original_text progress_bar progress_bar | # Stronger Baselines for Grammatical Error Correction Using Pretrained Encoder-Decoder Model This is a code of the following paper: - Satoru Katsumata and Mamoru Komachi. 2020. Stronger Baselines for Grammatical Error Correction Using a Pretrained Encoder-Decoder Model. In Proc. of AACL2020. ## Contents - BART GEC - multilingual BART GEC - MASS GEC ## License See the LICENSE file. | 596 |
Kautenja/a-neural-algorithm-of-artistic-style | ['style transfer'] | ['A Neural Algorithm of Artistic Style'] | src/__init__.py src/normalize.py src/loss_functions.py src/optimizers/gd.py src/reconstruct_content.py src/optimizers/__init__.py src/transfer_style.py src/reconstruct_style.py src/optimizers/l_bfgs.py src/optimizers/adam.py frames_to_video.py src/callback.py pairs Callback total_variation_loss gram content_loss style_loss normalize denormalize reconstruct_content reconstruct_style Stylizer Adam GradientDescent L_BFGS next tee shape reshape int abs square copy copy clear_session constant function disable_eager_execution optimize concatenate astype placeholder shape uniform get_layer content_loss normalize VGG19 clear_session constant function disable_eager_execution optimize concatenate variable astype placeholder shape uniform get_layer normalize VGG19 style_loss | # A Neural Algorithm of Artistic Style (Keras Implementation)
An **implementation** of the arXiv preprint
[_A Neural Algorithm of Artistic Style [1]_](#references)
& paper
[_Image Style Transfer Using Convolutional Neural Networks [2]_](#references).
_Supports TensorFlow 2.4.1._
<div align="center">
| 597 |
Kenneth-Wong/het-eccv20 | ['scene parsing', 'graph generation', 'scene graph generation'] | ['Sketching Image Gist: Human-Mimetic Hierarchical Scene Graph Generation'] | lib/surgery.py lib/get_dataset_counts.py dataloaders/vrd.py lib/tree_lstm/decoder_tree_lstm.py lib/lstm/highway_lstm_cuda/build.py dataloaders/visual_genome200_keyrel_captions.py lib/resnet.py lib/evaluation/sg_eval.py models/eval_GCNcaptions.py lib/fpn/roi_align/functions/roi_align.py lib/evaluation/vrd_eval.py lib/word_vectors.py data/vg200/cleanse_raw_vg.py models/eval_rel_count.py lib/tree_lstm/val_gen_hrtree.py dataloaders/mscoco.py lib/lstm/highway_lstm_cuda/_ext/highway_lstm_layer/__init__.py lib/tree_lstm/graph_to_tree.py lib/caption_lstm/RelCaptionModel.py data/vg200/vg_to_roidb.py lib/fpn/roi_align/build.py lib/evaluation/sg_eval_slow.py lib/tree_lstm/decoder_hrtree_lstm.py lib/tree_lstm/gen_tree.py config.py lib/fpn/box_utils.py lib/fpn/nms/functions/nms.py lib/fpn/nms/_ext/nms/__init__.py models/visual_eval_rels.py lib/sparse_targets.py data/stanford_filtered/saliencymap.py lib/tree_lstm/def_tree.py dataloaders/hierarchy.py lib/fpn/relation_proposal/rel_proposal_target.py lib/lstm/RankingContext.py lib/fpn/proposal_assignments/rel_assignments.py lib/lstm/highway_lstm_cuda/alternating_highway_lstm.py lib/tree_lstm/gen_hrtree.py lib/pytorch_misc.py lib/fpn/roi_align/modules/roi_align.py data/vg200/utils/config.py data/vg200/utils/visualize_tree.py lib/tree_lstm/draw_tree.py lib/evaluation/test_sg_eval.py dataloaders/blob.py lib/tree_lstm/tree_lstm.py lib/fpn/relation_proposal/rel_anchor_target.py lib/fpn/relation_proposal/rel_proposal.py lib/tree_lstm/tree_utils.py models/eval_captions.py models/eval_rels.py lib/lstm/plain_rnn.py lib/rel_model_stanford.py lib/get_union_boxes.py lib/fpn/anchor_targets.py lib/fpn/co_nms/_ext/co_nms/__init__.py lib/tree_lstm/hrtree_lstm.py dataloaders/visual_genome200.py models/train_GCNcaptions.py lib/fpn/proposal_assignments/proposal_assignments_det.py lib/lstm/decoder_rnn.py lib/caption_lstm/GCNLSTMModel.py lib/fpn/proposal_assignments/proposal_assignments_postnms.py data/vg200/utils/word_embeddings.py lib/draw_rectangles/setup.py dataloaders/image_transforms.py lib/object_detector.py models/train_detector.py scripts/prepare_vrd_data.py lib/fpn/co_nms/build.py data/vg200/utils/tools.py lib/fpn/co_nms/functions/co_nms.py lib/fpn/roi_align/_ext/roi_align/__init__.py lib/fpn/proposal_assignments/proposal_assignments_rel.py dataloaders/visual_genome200_keyrel.py lib/lstm/attention_rnn.py lib/fpn/box_intersections_cpu/setup.py models/train_rels.py lib/fpn/nms/build.py lib/rel_model.py models/train_captions.py dataloaders/visual_genome.py lib/fpn/proposal_assignments/proposal_assignments_gtbox.py data/vg200/triplet_match.py lib/fpn/generate_anchors.py captions_path vg200_path path stanford_path vrd_path ModelConfig add_saliencyMap main visual_image_with_trees decisionnode RelationTree reporthook load_word_vectors obj_edge_vectors clusterIds random_crop Grayscale Contrast Brightness SquarePad RandomOrder Sharpness Hue CocoDataLoader coco_collate CocoDetection VGDataLoader load_image_filenames VG load_graphs assertion_checks vg_collate load_info VRD load_graphs assertion_checks VRDDataLoader vg_collate load_info box_filter get_counts union_regions union_boxes UnionBoxesAndFeats Result gather_res filter_roi_proposals load_resnet filter_det load_vgg RPNHead ObjectDetector transpose_packed_sequence_inds arange Flattener intersect_2d get_ranking enumerate_imsize keyrel_loss const_row to_variable pairwise batch_map diagonal_inds right_shift_packed_sequence_inds to_onehot gather_nd argsort_desc FocalLoss optimistic_restore cache np_to_variable random_choose clip_grad_norm update_lr save_net batch_index_iterator de_chunkize load_net print_para accuracy nonintersecting_2d_inds enumerate_by_image get_area_maps unravel_index RelPNHead _compare RelModel _sort_by_score _cnt_proposal LinearizedContext RelModelStanford ResNet resnet_l4 vgg_fc Bottleneck resnet_l123 resnet101 FrequencyBias filter_dets_for_gcn_caption filter_dets_for_caption filter_dets reporthook load_word_vectors obj_edge_vectors GCNLSTMModel _PadVisual RelCaptionCore _construct_graph _triplet get_treeNodes_depth _gen_key evaluate_from_dict _compute_subobj_matches BasicSceneGraphEvaluator evaluate_recall _compute_pred_matches _triplet iou BasicSceneGraphEvaluator eval_relation_recall _relation_recall _triplet eval_relation_recall _relation_recall iou _triplet VRDEvaluator evaluate_from_dict _compute_subobj_matches evaluate_recall _compute_pred_matches anchor_target_layer nms_overlaps bbox_loss bbox_intersections_pair co_bbox_overlaps bbox_intersections center_size bbox_overlaps_pair point_form bbox_overlaps bbox_preds generate_anchors _scale_enum _whctrs _ratio_enum generate_base_anchors _mkanchors apply_co_nms _import_symbols _nms_single_im apply_nms _import_symbols _sel_inds proposal_assignments_det proposal_assignments_gtbox rel_anchor_target rel_proposal rel_proposal_target RoIAlignFunction RoIAlign RoIAlignAvg RoIAlignMax _import_symbols unpack_to_tensors AttentionRNN _sort_by_score get_dropout_mask pack_vectors DecoderRNN get_dropout_mask PlainRNN unpack_to_tensors _sort_by_score get_dropout_mask pack_vectors RankingContext _sort_by_score _AlternatingHighwayLSTMFunction AlternatingHighwayLSTM block_orthogonal _import_symbols DecoderHrTreeLSTM get_dropout_mask DecoderTreeLSTM get_dropout_mask ArbitraryTree BasicBiTree BiTree write_cell draw_tree_region_v2 draw_box print_tree revert_normalize create_tree_img draw_tree_region print_node get_all_boxes_info sort_childs sorted_areas generate_forest gen_hrtree get_depths generate_forest RLFeatPreprocessNet rl_gen_tree arNode_to_biNode find_best_node graph_to_trees arTree_to_biTree arbitraryForest_to_biForest pass_embed_postprocess HrTreeLSTM_Foreward MultiLayer_BTreeLSTM OneDirectionalChainLSTM ChainLSTM get_dropout_mask HrTreeLSTM_Backward OneDirectionalTreeLSTM BidirectionalTreeLSTM pass_embed_postprocess MultiLayer_MultiTreeLSTM BiTreeLSTM_Backward BiTreeLSTM_Foreward get_dropout_mask OneDirectionalTreeLSTM BidirectionalTreeLSTM get_overlap_info print_tree TreeLSTM_IO get_box_info get_box_pair_info print_node bbox_center bbox_area get_all_boxes_info draw_tree_region_v2 write_cell sort_childs draw_box sorted_areas generate_forest revert_normalize create_tree_img draw_tree_region gen_hrtree val_epoch decode_sequence language_eval clip_gradient LanguageModelCriterion get_optim to_contiguous val_epoch decode_sequence language_eval clip_gradient LanguageModelCriterion get_optim to_contiguous val_batch gimme_the_dist predict val_epoch decode_sequence train_batch language_eval clip_gradient train_epoch LanguageModelCriterion get_optim to_contiguous val_epoch val_batch train_epoch train_batch val_epoch decode_sequence train_batch language_eval clip_gradient train_epoch LanguageModelCriterion get_optim to_contiguous val_batch fix_batchnorm fix_rest_net train_batch test_recall train_epoch get_optim val_epoch val_batch _clip DataLoader _clip_by_bound findMatched max print reshape transpose min shape create_dataset forward array range add_saliencyMap join File uint8 subplots RelationTree print text transpose astype add_patch imshow drawTree Rectangle gentree enumerate get format print normal_ Tensor enumerate len decode save open str list basename view append range format isfile binary_type join isinstance print makedirs extend tqdm split len items list defaultdict index append enumerate int size min crop astype int32 randint max column_stack append reduce Blob tuple size join format append exists enumerate File astype len append zeros bbox_overlaps range column_stack load sorted open append reduce Blob load array enumerate open copy zip zeros range len ones_like fill_diagonal where column_stack cat cat data Variable sort squeeze clone apply_nms nonzero zero_ cpu max get_device cuda apply_nms cat resnet101 vgg16 items join format print size set copy_ keys state_dict next tee size topk squeeze long size long arange fill_ items list File create_dataset items list asarray format print size File from_numpy copy_ range format print size f append batch_index_iterator Variable cuda LongTensor is_available join sorted format items named_parameters append topk size t eq mul_ expand_as append sum max ones diag where column_stack all Variable type cuda size dim range clone int numpy enumerate size long arange int enumerate append clone size min contiguous choice get_device cuda concatenate cumsum copy append range len append range zip items norm format sorted print size mul_ float print param_groups format data int view margin_ranking_loss Variable random_choose index_select get_device nonzero numpy cuda int view fill_ min enumerate_by_image nonzero long enumerate sorted transpose_packed_sequence_inds sort new enumerate_by_image get_device append cuda intersect_2d print enumerate_by_image numpy len print numpy intersect_2d len load_url ResNet load_state_dict resnet101 resnet101 layer4 classifier vgg16 view sort size numpy max view sort size enumerate_by_image append max cat view sort size enumerate_by_image append max cat load_word_vectors enumerate_by_image get_device append numpy cuda cat Variable size enumerate_by_image cuda get_device append max cat depth children intersect_2d reduce intersect1d argmax max column_stack max_width ones argsort_desc append sum prod range astype union1d float evaluate_recall enumerate max_depth get_treeNodes_depth len column_stack _triplet format print _compute_subobj_matches prod _compute_pred_matches column_stack int concatenate intersect_2d reshape any zip append int concatenate intersect_2d reshape any zip append column_stack _triplet ones min astype copy _relation_recall append prod column_stack float32 range astype int32 iou astype intersect1d zip enumerate minimum maximum argmax max reshape vstack ravel array range enumerate int generate_anchors sum ones reshape where argmax bbox_overlaps column_stack smooth_l1_loss size center_size log cat center_size exp ndarray isinstance ndarray isinstance ndarray isinstance clamp size min expand max bbox_intersections ndarray isinstance expand_as clamp size min max bbox_intersections_pair ndarray isinstance bbox_intersections expand_as bbox_overlaps view clamp size min expand max meshgrid stack arange generate_base_anchors vstack _ratio_enum array hstack sqrt _whctrs _mkanchors _whctrs _mkanchors co_nms_apply size min cuda get_device IntTensor long dir _wrap_function getattr append callable _nms_single_im int size append cat IntTensor sort size contiguous min nms_apply long int max sort squeeze _sel_inds numpy nonzero cuda get_device append round bbox_overlaps range cat size min choice int sort size min clone contiguous random_choose enumerate_by_image cuda get_device nonzero long cat max cuda fill_ view co_bbox_overlaps eq expand_as append sum range cat size astype nonzero long int sort contiguous clone enumerate_by_image int32 get_device append view sort size contiguous astype enumerate_by_image int32 nonzero cuda apply_co_nms get_device long range cat intersect_2d rand where floor vstack max cuda list defaultdict view co_bbox_overlaps ones set_trace numel append range cat size hstack astype choice zip long int items sort contiguous min clone enumerate_by_image int32 get_device zeros numpy array int copy_ div clone int Variable enumerate_by_image cuda get_device append max enumerate append range view data list product isinstance tuple size new orthogonal any zip max Variable fill_ int str draw_box Draw clamp convert clone astype save int left_child text rectangle right_child fromarray int write_cell str max_depth print clamp min clone astype create_tree_img save fromarray int left_child min array resize max right_child right_child print_node left_child int center_x print score index label depth int view ArbitraryTree gen_hrtree append sort reshape mean zeros numpy enumerate len get_all_boxes_info sort_childs sorted_areas fill_ view add_child get_depths append abs range cat len children max rand argsort vstack array range len argsort array vstack transpose array bbox_intersections_np rl_gen_tree int remove view Variable add_child index softmax cuda append max log len int remove view find_best_node ArbitraryTree contiguous add_child clone search_best_insert append zeros float range len append arTree_to_biTree range len arNode_to_biNode generate_bi_tree left_child generate_bi_tree add_left_child add_right_child range get_child_num right_child score range len view embed_out_layer embed_layer cat detach Variable numel expand bbox_intersections shape cuda float sum bbox_overlaps range bbox_area view min clone get_box_info max size view fill_ Variable range children range len leafcount children zip sum items dump transform_annos COCOEvalCap evaluate insert print COCO getImgIds loadRes append imgToEval open parameters Adam is_contiguous param_groups clamp_ append shape range batch_size save open test_size vocabs len eval_dump append dump format language_eval captionGenerator eval sample enumerate join time decode_sequence int print reshape convert tqdm numpy makedirs append evaluate_scene_graph_entry enumerate box_filter zeros array argsort format print enumerate lr_decay_every lr_decay_rate scheduled_sampling_increase_prob train_batch param_groups min scheduled_sampling_increase_every lr scheduled_sampling_start train lr_decay_start scheduled_sampling_max_prob enumerate time format backward clip_gradient print zero_grad captionGenerator grad_clip train step crit save_dir time print_interval format print mean append len data od_box_priors bbox_loss od_box_deltas od_box_targets rpn_scores squeeze size Series rpn_box_deltas od_obj_labels clip_grad_norm od_obj_dists cross_entropy val_batch evaluate concatenate coco COCOeval summarize accumulate loadRes coco numpy isinstance AlphaDropout BatchNorm3d eval modules BatchNorm1d BatchNorm2d Dropout fix_batchnorm named_parameters Adadelta ReduceLROnPlateau adam SGD batch_train all_modes rm_obj_dists relrank binary_cross_entropy keyrel_loss rel_rank_scores values sum vg200_kr keylabel_byfgbg keylabel_bykeyrel float rel_anchor_scores relpn rel_dists rm_obj_labels num_gpus all_modes print_stats num_gpus val_batch all_modes eval print_stats enumerate append reshape bbox_overlaps vstack | # HET: Sketching Image Gist Code for the ECCV 2020 paper: "[Sketching Image Gist: Human-Mimetic Hierarchical Scene Graph Generation][0]" (accepted). The code is partly referred to the project [rowanz/neural-motifs][1] and [KaihuaTang/VCTree-Scene-Graph-Generation][6]. If you get any problem that cause you unable to run the project, you can check the issues under [rowanz/neural-motifs][1] first. # Dependencies - You may follow these commands to establish the environments under Ubuntu system ``` Install Anaconda conda update -n base conda conda create -n motif pip python=3.6 conda install pytorch=0.3 torchvision cuda90 -c pytorch | 598 |
KevLuo/OpenSet_ReciprocalPoints | ['open set learning'] | ['Learning Open Set Network with Discriminative Reciprocal Points'] | rpl/datasets/dataset.py rpl/datasets/cifar_dataset.py rpl/models/backbone.py rpl/models/backbone_resnet.py rpl/generate_tiny_dataset.py rpl/train.py rpl/models/backbone_wide_resnet.py rpl/utils.py rpl/collect_cifar_rpl_prediction.py rpl/penalties.py rpl/evaluate.py rpl/collect_prediction.py rpl/datasets/open_dataset.py collect_rpl_max unseenval_baseline_thresh summarize seenval_baseline_thresh abridged_auc_softmax evaluate_val calc_auroc compute_rpl_logits compute_rpl_loss count_parameters setup_logger folder_to_name build_classes_mappings calculate_img_statistics name_to_folder CIFARDataset StandardDataset OpenDataset encoder32 encoder conv_init conv3x3 wide_basic wide_encoder show str plot print len set_xlim gca range set_ylim auc concatenate ones array zeros keys roc_auc_score exists float size keys long item zeros tensor sum full range len str print len append range auc exists float keys item zeros tensor sum long range len cdist reciprocal_points mean reshape criterion compute_rpl_logits latent_size item sum cuda range append range len StandardDataset Compose sqrt DataLoader array enumerate print numel named_parameters PrettyTable add_row name int listdir synset_from_pos_and_offset name int listdir synset_from_pos_and_offset setFormatter getLogger addHandler setLevel FileHandler bias xavier_uniform_ weight __name__ constant_ | # OpenSet_ReciprocalPoints Open-source, re-implementation of the published ECCV '20 paper on reciprocal points for open-set recognition. This paper is state-of-the-art in open-set recognition as of October 2020. Code cleanup in progress; results on test set will be updated soon. Confirmed with paper authors that this implementation is correct. Using dataloaders of the authors, the implementation actually exceeds the published performance on tiny-imagenet. Using my own dataloaders, the results are slightly below the published performance (data splits are different, so this is probably why). I also ran a standard deep learning baseline on both of these datasets. I actually find that the baseline has been underestimated by the current open-set literature; the current literature reports a much lower number for the baseline than the one I obtained with my own code. This may signal that the progress in open-set recognition is much more modest than it would seem. | Method | CIFAR+10 | Tiny Imagenet | | --- | --- | --- | | Published baseline| 81.6% | 57.7% | | My implementation of baseline| 89.24% (val) | 66.35% (val) | | My implementation of RPL | 89.79% (val) | 67.11% (val) | | 599 |
Subsets and Splits