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
Yushi-Hu/Query-by-Example
['word embeddings', 'dynamic time warping']
['Acoustic span embeddings for multilingual query-by-example search']
code/layers/bilinear.py code/loss.py code/layers/rnn.py code/layers/cnn.py code/qbe_query.py code/layers/__init__.py code/qbe_main_2015.py code/metric.py code/sched/__init__.py code/utils/cache.py code/optim/adam.py code/sched/multistep_lr.py code/sched/revert_on_plateau.py code/utils/config.py code/optim/__init__.py code/qbe_embed.py code/data.py code/utils/stateful_dataset.py code/optim/sgd.py code/layers/linear.py code/qbe_data.py code/net.py code/utils/speech_utils.py code/sched/reduce_lr_on_plateau.py code/sched/exponential_lr.py code/utils/saver.py combine_subwords_to_ids MultilangDataset use_spec_aug CountDict Obj02 BinaryFocalLoss BinaryCrossEntropyLoss compute_ap compute_precision class_ap compute_recall compute_prb crossview_ap acoustic_ap AcousticSpanRNN MultiviewSpanRNN AcousticWordRNN MultiViewRNN FineTuneBatchSampler CNNDataset FineTuneQueryDataset SearchDataset QueryDataset CNNEvalset FineTuneDataset load_net embed_searches embed_queries cos_dist_dict default_cos_to_score build_search_index sample_len hidden_to_emb grade_file Bilinear CNN_1D Linear RNN_default Adam SGD ExponentialLR MultiStepLR ReduceLROnPlateau RevertOnPlateau Cache partial_fun NetSaver Saver TrainerSaver stack add_deltas MultilangPackedBatchSampler StatefulDataset StatefulBatchSampler min shape randint max range insert items CountDict sum arange compute_precision compute_recall argmin abs max range len astype float32 float16 argsort pdist zeros range len cdist astype float32 float16 argsort zeros range argsort load eval set_savepath AcousticSpanRNN AcousticWordRNN load_net print SearchDataset loader feat_dim enumerate load_net print QueryDataset loader feat_dim enumerate reshape info print hidden_to_emb item append DataFrame keys range max info build_search_index reshape cdist item append keys enumerate list sorted parse attrib add set getroot keys split rsplit import_module getattr pad shape range zeros roll
# Embedding-based query-by-example search This is the code base for [Acoustic span embeddings for multilingual query-by-example search](https://arxiv.org/pdf/2011.11807.pdf) that will appear in SLT 2021. ``` @article{hu2020acoustic, title={Acoustic span embeddings for multilingual query-by-example search}, author={Hu, Yushi and Settle, Shane and Livescu, Karen}, journal={arXiv preprint arXiv:2011.11807}, year={2020} } ```
1,200
Yuting-Gao/CRNN_Mxnet
['optical character recognition', 'scene text recognition']
['An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition']
text_lstm.py text_deep_ocr_bucketing.py text_deep_ocr_bucketing_resume.py predict.py resnet.py make_train_list.py text_bucketing_iter.py init_args SimpleBatch sym_gen ctc_label get_data_batch get_symbol residual_unit resnet get_path_from_content TextIter SimpleBatch default_read_content get_label_from_content get_image_batch init_args remove_blank get_label sym_gen Accuracy ctc_label init_args remove_blank get_label sym_gen Accuracy ctc_label lstm resnet multilayer_bi_lstm_unroll_new add_argument ArgumentParser append list range len int ones transpose min hstack mean shape resize append zeros imread range BatchNorm Convolution Activation _set_attr Pooling Variable Convolution BatchNorm residual_unit Activation range len append strip append int ones transpose min hstack mean shape resize append zeros imread range zeros range int len append range len remove_blank append ctc_label argmax range len c SliceChannel Activation FullyConnected LSTMParam MakeLoss Flatten str get_symbol Reshape lstm ctc_loss h SoftmaxActivation Group append range SliceChannel FullyConnected insert LSTMState Concat import_module Variable BlockGrad Dropout
# CRNN_MXnet This repo contains MXnet verison of Convolutional Recurrent Neural Network(CRNN) for scene text recognition. CRNN is proposed in "An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition" Paper link: http://arxiv.org/abs/1507.05717 Original torch version: https://github.com/bgshih/crnn The architecture is this repo is: ResNet-34, 2-layer BLSTM and CTC. In order to reduce LSTM cost and tackle variable text length, Bucketing is applied. ## Mxnet Version Use the Mxnet CTC loss layer in contrib package, CTCLoss was added in MXnet 0.10.0. So the MXnet Version must >= 0.10.0. I use 0.10.1 and it works. ## Training 1.put your own dataset in a folder, e.g.icdar2013
1,201
YuvalNirkin/fsgan
['facial inpainting', 'semantic segmentation', 'face swapping']
['FSGAN: Subject Agnostic Face Swapping and Reenactment']
train_reenactment_attr_no_seg_v2_1.py datasets/image_seg_dataset.py experiments/reenactment/ijbc_msrunet_reenactment_attr.py utils/utils.py experiments/reenactment/ijbc_msrunet_reenactment_attr_no_seg.py experiments/reenactment/nfv_msrunet_reenactment_attr_no_seg_v2.1.py preprocess/render_sequences.py utils/img_utils.py preprocess/crop_video_sequences.py utils/temporal_smoothing.py experiments/swapping/ijbc_msrunet_blending.py utils/set_checkpoint_arch.py inference/swap.py utils/iou_metric.py models/simple_unet.py datasets/img_lms_pose_transforms.py utils/one_euro_filter.py datasets/image_list_dataset.py datasets/appearance_map.py utils/video_utils.py models/discriminators_pix2pix.py models/hopenet.py criterions/vgg_loss.py models/res_unet_msba.py preprocess/preprocess_video.py utils/video_renderer.py train_reenactment_attr_no_seg.py experiments/segmentation/celeba_unet.py utils/landmarks_utils.py models/res_unet.py preprocess/crop_image_sequences.py train_inpainting.py utils/batch.py train_reenactment_attr.py preprocess/detections2sequences_center.py preprocess/sequence_stats.py models/classifier1d.py preprocess/detections2sequences_1euro.py criterions/gan_loss.py utils/obj_factory.py models/res_unet_split.py models/simple_unet_02.py datasets/seq_dataset.py preprocess/produce_train_val.py utils/seg_utils.py models/msba.py utils/bbox_utils.py datasets/opencv_video_seq_dataset.py preprocess/clear_cache.py utils/tensorboard_logger.py train_blending.py models/hrnet.py utils/blur.py inference/reenact.py datasets/video_inference_dataset.py models/vgg.py datasets/img_landmarks_transforms.py utils/confusionmatrix.py preprocess/crop_video_sequences_batch.py preprocess/euler_sequences.py experiments/swapping/ijbc_msrunet_inpainting.py train_segmentation.py blend_imgs_bgr main transfer_mask blend_imgs main main main main main IOUBenchmark GANLoss VGGLoss Vgg19 AppearanceMapDataset fuse_clusters ImageListDataset find_classes read_bboxes ImagePairListDataset ImageTripletListDataset calc_weights_for_balanced_classes get_loader main opencv_loader main ImageSegDataset seg_label2img Pyramids call_recursive Crop rotate_img_landmarks interpolation_str2int RandomRotation Compose ToTensor Resize RandomGaussianBlur ImgLandmarksTransform RandomHorizontalFlip ColorJitter Pyramids Rotate RecursiveTransform RandomRotation ToTensor RandomGaussianBlur is_pose interpolation_str2int Resize RandomHorizontalFlip is_binary_mask call_recursive Crop is_img is_landmarks Compose rotate_img_landmarks_mask Normalize main border_str2int rotate_img_landmarks is_bbox ColorJitter is_video VideoSeqPairDataset parse_file_paths make_dataset make_dataset_dirs VideoSeqDataset calc_weights_for_balanced_classes main parse_file_paths SingleSeqRandomPairDataset SeqTripletDataset SingleSeqRandomDataset SeqPairDataset calc_weights_for_balanced_classes SeqInferenceDataset main get_total_frames_from_file SeqDataset VideoInferenceDataset FaceReenactmentRenderer render_appearance_map main FaceReenactment select_seq FaceSwapping transfer_mask render_appearance_map main FaceSwappingRenderer select_seq main make_linear_block classifier Classifier NLayerDiscriminator MultiscaleDiscriminator Hopenet hrnet_wlfw Bottleneck HighResolutionModule HighResolutionNet conv3x3 get_face_alignment_net BasicBlock MSBA main ResUNet MultiScaleResUNet ResnetBlock LocalEnhancer DownBlock make_conv_block main SkipConnectionBlock FlatBlock UpBlock ResUNet MultiScaleResUNet ResnetBlock LocalEnhancer res_unet DownBlock make_conv_block main SkipConnectionBlock FlatBlock UpBlock ResUNet MultiScaleResUNet ResnetBlock LocalEnhancer DownBlock make_conv_block main SkipConnectionBlock FlatBlock UpBlock UnetConv2 UnetUp unet UNet UnetConv2 UnetUp UNet vgg_fcn make_layers vgg19 VGG main main main process_video main parse_videos main main main smooth main smooth_poses VideoProcessBase VideoProcessCallable main parse_files main main extract_stats echo main parse_paths crop2img smooth_bboxes estimate_motion scale_bbox get_iou crop_img batch_iou get_main_bbox GaussianSmoothing ConfusionMatrix create_pyramid make_grid tensor2rgb bgr2tensor rgb2tensor unnormalize tensor2bgr IOUMetric filter_landmarks smooth_landmarks hflip_face_landmarks_98pts hflip_face_landmarks_68pts LandmarksHeatMapDecoder smooth_landmarks_98pts blend_landmarks_heatmap estimate_motion encode_landmarks_98pts LandmarksHeatMapEncoder extract_args partial_obj_factory main obj_factory exponential_smoothing OneEuroFilter smoothing_factor random_hair_inpainting_mask_tensor remove_inner_mouth blend_seg_label decode_binary_mask SoftErosion encode_segmentation main blend_seg_pred random_hair_inpainting_mask encode_binary_mask main TemporalSmoothing smooth_temporal AverageMeter TensorBoardLogger set_seed load_model str2int random_pair get_arch set_device init_weights save_checkpoint random_pair_range download_from_url main VideoRenderer smooth_detections_avg get_video_info get_media_resolution get_main_sequence get_media_info smooth_detections_avg_center smooth_detections_1euro estimate_motion Sequence float seamlessClone NORMAL_CLONE where blend_imgs_bgr bgr2tensor append numpy tensor2bgr range str2int DataParallel log2 DataLoader proces_epoch ReduceLROnPlateau save_checkpoint basename set_seed view set_device apply load_state_dict obj_factory to range TensorBoardLogger format Compose init_weights classes vgg load join int isinstance print weights WeightedRandomSampler min parameters isfile step len get_arch insert hasattr reset cKDTree sort query_ball_point ones sort sum array unique endswith loadtxt time ImageListDataset concatenate copy shape ImagePairListDataset ImageTripletListDataset imshow zeros range shape blend_seg_pred tensor2bgr isinstance warpAffine concatenate tuple transpose getRotationMatrix2D dot isinstance astype array warpAffine concatenate tuple transpose astype getRotationMatrix2D dot array img_transforms imread array join is_video sorted append expanduser listdir join is_video sorted isdir append expanduser listdir numpy circle append join basename id endswith get_video_info LINE_AA putText FONT_HERSHEY_SIMPLEX SeqPairDataset SeqDataset max plot xlabel min draw ylabel copy tight_layout triplot ylim clf array _renderer gca tick_params xlim find_simplex isnumeric face_reenactment FaceReenactment batch FaceSwapping face_swapping append norm_layer Linear load load_state_dict Classifier isfile HighResolutionNet init_weights HighResolutionNet init_weights CN rand in_nc msba MSBA append norm_layer Conv2d model append load pop load_state_dict UNet Conv2d pop str format VGG load_url load_state_dict make_layers load_url make_layers VGG load_state_dict remove glob tuple endswith any rmdir imwrite scale_bbox mkdir resize crop_img enumerate VideoCapture CAP_PROP_FRAME_HEIGHT id VideoWriter CAP_PROP_FPS CAP_PROP_FRAME_COUNT argmax VideoWriter_fourcc get mean CAP_PROP_FRAME_WIDTH read write Sequence endswith walk replace append join basename exists crop_video_sequences list partial loadtxt parse_videos intersect1d savetxt zip makedirs add expand_dims astype smooth_detections_1euro batch_iou sort tqdm detections rectangle repeat finalize full smooth_bboxes CAP_PROP_POS_FRAMES set_grad_enabled smooth start_index sum cat update face_pose set clear train hamming pad convolve range ones pad convolve range cache VideoProcessCallable join sorted isdir glob1 expanduser listdir setdiff1d arange parse_files isdir sorted set_description extract_stats product partial_obj_factory parse_paths append any isdir isfile print min max min max max concatenate astype array any copyMakeBorder copy array copy resize norm mean append array clip norm convolve ones shape pad zeros range convolve concatenate ones copy pad estimate_motion array range normalize to_tensor isinstance isinstance add_ zip unnormalize clone numpy astype tensor2rgb cat append avg_pool2d range isinstance copy copy view sub_ clamp astype interpolate power range zeros convolve ones reshape copy shape pad range reshape mean smooth_landmarks estimate_motion copy clamp sum repeat update isinstance eval import_module getattr splitext module_class update isinstance eval import_module getattr splitext pi float argmax range repeat float repeat range ellipse min randint where shape unique zeros max len unsqueeze append numpy random_hair_inpainting_mask range sub_ convert seek save BytesIO fillPoly array astype open save view device shape pad conv2d permute div_ to data orthogonal_ normal_ xavier_normal_ kaiming_normal_ __name__ constant_ print join format map seed warn manual_seed copyfile join save isinstance update join replace isinstance __module__ map eval __name__ find load print train load_state_dict obj_factory to randint min randint min get items list startswith process_response Session count OneEuroFilter concatenate mean one_euro_filter append array convolve ones pad array range smooth_detections_avg array astype convolve concatenate ones pad array range norm concatenate mean append array clip int probe float next split
## FSGAN - Official PyTorch Implementation ![Teaser](./docs/teaser.gif) Example video face swapping: Barack Obama to Benjamin Netanyahu, Shinzo Abe to Theresa May, and Xi Jinping to Justin Trudeau. This repository contains the source code for the video face swapping and face reenactment method described in the paper: > **FSGAN: Subject Agnostic Face Swapping and Reenactment** > *International Conference on Computer Vision (ICCV), Seoul, Korea, 2019* > Yuval Nirkin, Yosi Keller, Tal Hassner > [Paper](https://arxiv.org/pdf/1908.05932.pdf)   [Video](https://www.youtube.com/watch?v=BsITEVX6hkE) >
1,202
Yuxin-CV/DTN
['few shot learning']
['Diversity Transfer Network for Few-Shot Learning']
utils/__init__.py models_resnet.py generator.py miniImageNet/img2pickle.py utils/eval.py task_generator.py utils/misc.py main_DTN.py miniImageNet/proc_images.py AddInfo Generator GeneratorNet base_train validate base_val mean_confidence_interval save_checkpoint main train Net ResNetLike ResBlock Classifier GeneratorSupportSampler ImageLoader GeneratorSampler load_data main save_pickle accuracy init_params AverageMeter mkdir_p get_mean_and_std data base_train validate SGD MultiStepLR DataLoader save_checkpoint cuda epochs ImageLoader load_state_dict parse_args range update Compose start_epoch resume mkdir_p Normalize avg checkpoint load evaluate print AverageMeter empty_cache train step _ppf len mean array sem zero_grad cuda view transpose matmul next sum range cat update LongTensor size N_way mean N_shot avg tile item gen_num s criterion backward N_query sort print AverageMeter model_G model_E l2_norm zeros step eval AverageMeter mean_confidence_interval update criterion backward print size AverageMeter zero_grad model_E accuracy avg item train step cuda enumerate weight_norm eval AverageMeter print join mkdir_p save join asarray resize append listdir array save_pickle topk view size t eq mul_ expand_as append sum max print DataLoader div_ zeros range len normal constant isinstance kaiming_normal Conv2d bias modules BatchNorm2d weight Linear makedirs
# Diversity Transfer Network for Few-Shot Learning Pytorch implementation for ["Diversity Transfer Network for Few-Shot Learning"](http://arxiv.org/abs/1912.13182) (deep backbone, on miniImageNet). We also provide our trainded models. ## Citations If you find DTN useful in your research, please consider citing: ``` @inproceedings{chen2020diversity, title={Diversity Transfer Network for Few-Shot Learning.}, author={Chen, Mengting and Fang, Yuxin and Wang, Xinggang and Luo, Heng and Geng, Yifeng and Zhang, Xinyu and Huang, Chang and Liu, Wenyu and Wang, Bo}, booktitle={AAAI},
1,203
YvanYin/DiverseDepth
['depth estimation', 'monocular depth estimation']
['Virtual Normal: Enforcing Geometric Constraints for Accurate and Robust Depth Prediction', 'DiverseDepth: Affine-invariant Depth Prediction Using Diverse Data']
Minist_Test/lib/net_tools.py Minist_Test/lib/ResNeXt.py Minist_Test/tools/test_depth.py Minist_Test/lib/diverse_depth_model.py Minist_Test/lib/lateral_net.py DepthModel RelDepthModel FTB_block AFA_block fcn_topdown_predict fcn_topdown ASPP_block lateral_block lateral_resnext50_32x4d_body_stride16 lateral fcn_last_block fcn_topdown_block load_ckpt get_func strip_prefix_if_present ResNeXt50_32x4d_body_stride16 basic_bn_stem ResNeXtBottleneck ResNeXt_body add_stage ResNeXt101_32x4d_body_stride16 scale_torch parse_args join import_module split load isfile all strip_prefix_if_present load_state_dict info empty_cache keys OrderedDict items sorted keys Conv2d append ResNeXtBottleneck range add_argument ArgumentParser Compose astype float32 from_numpy transform
#### DiverseDepth Project This project aims to improve the generalization ability of the monocular depth estimation method on diverse scenes. We propose a learning method and a diverse dataset, termed DiverseDepth, to solve this problem. The [DiverseDepth](https://arxiv.org/abs/2002.00569) contents have been published in our "Virtual Normal" TPAMI version. This repository contains the source code of our paper (the DiverseDepth part): 1. [Wei Yin, Yfan Liu, Chunhua Shen, Virtual Normal: Enforcing Geometric Constraints for Accurate and Robust Depth Prediction](https://arxiv.org/abs/2103.04216). 2. [Wei Yin, Xinlong Wang, Chunhua Shen, Yifan Liu, Zhi Tian, Songcen Xu, Changming Sun, Dou Renyin. DiverseDepth: Affine-invariant Depth Prediction Using Diverse Data ](https://arxiv.org/abs/2002.00569) Training codes have been released!! ## Some Results ![Any images online](./examples/any_imgs.jpg) ![Point cloud](./examples/pcd.png)
1,204
YvanYin/VNL_Monocular_Depth_Prediction
['depth estimation', 'monocular depth estimation']
['Enforcing geometric constraints of virtual normal for depth prediction']
lib/utils/mobilenetv2_weight_helper.py tools/train_nyu_metric.py lib/core/config.py lib/utils/logging.py tools/parse_arg_train.py data/kitti_dataset.py tools/test_nyu_metric.py data/nyudv2_dataset.py lib/models/metric_depth_model.py lib/models/WCEL_loss.py lib/utils/net_tools.py lib/models/ResNeXt.py tools/parse_arg_test.py lib/models/image_transfer.py lib/models/MobileNetV2.py lib/utils/evaluate_depth_error.py data/any_dataset.py lib/utils/misc.py lib/utils/collections.py lib/models/lateral_net.py lib/utils/timer.py lib/utils/training_stats.py tools/train_kitti_metric.py lib/utils/resnext_weights_helper.py tools/test_kitti_metric.py tools/recover_surface_normal.py data/load_dataset.py tools/parse_arg_base.py tools/test_any_images.py lib/models/VNL_loss.py tools/parse_arg_val.py ANYDataset KITTIDataset find_dataset_lib CustomerDataLoader create_dataset NYUDV2Dataset merge_cfg_from_file _merge_a_into_b _decode_cfg_value _check_and_coerce_cfg_value_type print_configs resize_image kitti_merge_imgs bins_to_depth FTB_block AFA_block fcn_topdown_predict lateral_mobilenetv2_body_stride8 ASPP_block lateral_block lateral_resnext50_32x4d_body_stride16 fcn_topdown lateral fcn_last_block fcn_topdown_block Global_pool_block lateral_resnext101_32x4d_body_stride16 cal_params MetricDepthModel ModelLoss DepthModel ModelOptimizer conv_1x1_bn InvertedResidual conv_bn MobileNetV2_body_stride16 MobileNetV2_body_stride8 add_block MobileNetV2_body MobileNetV2 ResNeXt50_32x4d_body_stride16 basic_bn_stem ResNeXtBottleneck ResNeXt_body add_stage ResNeXt101_32x4d_body_stride16 VNL_Loss WCEL_Loss AttrDict select_index weighted_human_disagreement_rate recover_metric_depth evaluate_err evaluate_rel_err validate_err validate_err_kitti validate_rel_depth_err log_stats SmoothedValue setup_logging get_run_name convert_state_dict load_pretrained_imagenet_resnext_weights load_ckpt save_ckpt get_func convert_state_dict load_pretrained_imagenet_resnext_weights Timer TrainingStats BaseOptions TestOptions TrainOptions ValOptions depth_to_xyz vis_normal surface_normal_from_depth init_image_coor get_surface_normal scale_torch train val_kitti val train initialize dataset info items replace exit import_module info print join items isinstance join items cfg_file _merge_a_into_b log10 getattr ROOT_DIR DEPTH_MAX array DEPTH_MIN DECODER_OUTPUT_C deepcopy items isinstance _decode_cfg_value _check_and_coerce_cfg_value_type literal_eval isinstance string_types str list ndarray isinstance tuple type array sum cuda permute DEPTH_BIN_BORDER numpy resize zeros squeeze numpy print size sum keys state_dict append int range InvertedResidual Conv2d append ResNeXtBottleneck range mean var numpy sum weighted_human_disagreement_rate recover_metric_depth abs float64 size squeeze AddValue info numpy sum float64 size squeeze numpy AddValue info abs sum float64 size squeeze numpy AddValue info abs log sum weighted_human_disagreement_rate concatenate float64 size squeeze reshape numpy log10 AddValue info abs log amax sum weighted_human_disagreement_rate concatenate float64 size squeeze reshape numpy log10 AddValue info abs log amax select_index zeros_like reshape size sum int shuffle choice print basicConfig getLogger convert_state_dict join load items info MODEL_REPOSITORY copy_ ROOT_DIR PRETRAINED_WEIGHTS state_dict int join items array split join import_module split load isfile resume load_state_dict info empty_cache join isinstance LOG_DIR DataParallel save info module makedirs print T arange astype float32 tile cuda shape permute init_image_coor int unbind reshape squeeze size solve conv2d stack unsqueeze repeat sqrt sum cuda range depth_to_xyz avg_pool2d shape repeat permute append range get_surface_normal sqrt uint8 sum astype transpose astype float32 copy from_numpy IterToc BATCH_SIZE model criterion val_kitti UpdateIterStats optim eval save_ckpt enumerate ceil LogIterStats step IterTic optimizer len inference_kitti SmoothedValue print GetGlobalAverageValue sqrt validate_err_kitti enumerate len val BATCHSIZE SmoothedValue squeeze resize_image shape validate_err inference cuda enumerate len
#### Enforcing geometric constraints of virtual normal for depth prediction. [NEW] Training codes have been uploaded! This repository contains the source code of our paper: [Yin Wei, Yifan Liu, Chunhua Shen, Youliang Yan, Enforcing geometric constraints of virtual normal for depth prediction](https://arxiv.org/abs/1907.12209) (accepted for publication in ICCV' 2019). ## Some Results ![NYU_Depth](./examples/nyu_gif.gif) ![kitti_Depth](./examples/kitti_gif.gif) ![SurfaceNormal](./examples/surface_normal.jpg) ## Framework ![SurfaceNormal](./examples/framework.jpg)
1,205
Z-T-WANG/LaProp-Optimizer
['style transfer']
['LaProp: Separating Momentum and Adaptivity in Adam']
rainbow/model.py rainbow/train.py rainbow/laprop.py rainbow/common/wrappers.py cifar10 classification/optimizers.py laprop.py rainbow/test.py transformer/laprop.py rainbow/main.py rainbow/arguments.py rainbow/common/replay_buffer.py rainbow/common/utils.py rainbow/storage.py LaProp AdamW LaProp_stable LaProp get_args LaProp main NoisyLinear DQNBase DuelingDQN CategoricalDuelingDQN CategoricalDQN DQN Flatten ReplayBuffer NaivePrioritizedBuffer test_whole test train projection_distribution multi_step_reward compute_td_loss ReplayBuffer SumSegmentTree PrioritizedReplayBuffer SegmentTree MinSegmentTree beta_scheduler epsilon_scheduler save_model load_model set_global_seeds create_log_dir print_args print_log update_target wrap_atari_dqn WarpFrame LazyFrames make_atari FireResetEnv EpisodicLifeEnv ScaledFloatFrame wrap_deepmind wrap_pytorch NoopResetEnv FrameStack ImageToPyTorch MaxAndSkipEnv ClipRewardEnv FairseqLaprop LaProp parse_args add_argument ArgumentParser device wrap_atari_dqn seed SummaryWriter join get_args set_global_seeds evaluate make_atari create_log_dir close test export_scalars_to_json train env DQNBase batch_size dueling DuelingDQN Vmin Vmax sigma_init num_atoms noisy CategoricalDuelingDQN CategoricalDQN c51 int load_model glob print sort device append to array update_noisy_modules format lives load_model act print noisy render reset randrange device to step range n evaluation_interval update_noisy_modules it_capacity epsilon_scheduler save_model print_log randrange device compute_td_loss clip push beta_scheduler load_model beta_start ReplayBuffer eps_decay Adam render multi_step_reward buffer_size append to eps_final range beta_by_frame sample_noise clip_rewards format act prioritized_replay alpha item update_target deque gamma epsilon_by_frame n LaProp clear time print eps_start max_frames float32 noisy print_args parameters PrioritizedReplayBuffer reset step beta_frames add_scalar batch_size num_atoms zero_grad unsqueeze device current_model update_priorities abs offset ones squeeze step support expand to double sum detach projection_distribution prioritized_replay mean sample gamma backward smooth_l1_loss forward_log target_model multi_step numpy zeros_like view Vmin clamp target_model size Vmax num_atoms squeeze expand multi_step floor expand_as index_add_ float double long gamma enumerate load_state_dict state_dict join format dueling prioritized_replay strftime noisy multi_step double c51 mean time format print print str list items join state_dict dueling prioritized_replay noisy mkdir save double c51 load join dueling prioritized_replay noisy load_state_dict double c51 is_available seed manual_seed NoopResetEnv make MaxAndSkipEnv FrameStack EpisodicLifeEnv FireResetEnv WarpFrame wrap_deepmind
# LaProp-Optimizer Codes accompanying the paper [LaProp: Separating Momentum and Adaptivity in Adam](https://arxiv.org/abs/2002.04839) ## Use This implementation is based on [Pytorch](https://pytorch.org/). The LaProp optimizer is the class ```LaProp``` in file ```laprop.py```, which is adapted from the standard optimizer ```optim.Adam``` of Pytorch. ```laprop.LaProp``` uses the same calling signature as the standard ```optim.Adam```, only with an additional optional argument ```centered = False``` controlling whether to compute the centered second moment instead of the squared gradient. The input argument ```betas``` corresponds to the tuple <img src="https://github.com/Z-T-WANG/LaProp-Optimizer/blob/master/images/cde5b07ebaa7f798b2ed9abf1799672d.png" /> in our paper. The learning rate and the weight decay are decoupled in ```laprop.LaProp```, and therefore when one wants to apply a learning rate schedule with weight decay, one needs to decay ```'lr'``` and ```'weight_decay'``` simultaneously in the optimizer. When ```centered``` is enabled, the optimizer will update for ```self.steps_before_using_centered = 10``` steps in the non-centered way to accumulate information of the gradient, and after that it starts to use the centered strategy. The number of the non-centered steps is tentatively set to 10 at its initialization. ## Additional Details compared with the Paper In ```laprop.LaProp```, we have combined the learning rate and the accumulated momentum into one term, so that when the learning rate changes, the momentum accumulated by a larger learning rate still has a larger effect.
1,206
Z-Zheng/FarSeg
['semantic segmentation']
['Foreground-Aware Relation Network for Geospatial Object Segmentation in High Spatial Resolution Remote Sensing Imagery']
data/isaid.py data/patch_base.py apex_train.py hubconf.py configs/isaid/farseg50.py module/farseg.py module/loss.py isaid_eval.py farseg_resnet50 SegmSlidingWinInference run ISAIDSegmmDataset ImageFolderDataset RemoveColorMap ISAIDSegmmDataLoader PatchBasedDataset AssymetricDecoder FarSeg SceneRelation cosine_annealing annealing_softmax_focalloss poly_annealing softmax_focalloss linear_annealing dict eval load_state_dict FarSeg load_state_dict_from_url ProcessPoolExecutor NPmIoU DataLoader ckpt_path device forward argmax list tolist vis_dir VisualizeSegmm parse_args to shutdown build_and_load_from_file SummaryWriter format Compose patch close mean info zip config_path SegmSlidingWinInference keys enumerate submit add_scalar summary numpy ImageFolderDataset len size sum cross_entropy size sum cross_entropy annealing_function
<h2 align="center">Foreground-Aware Relation Network for Geospatial Object Segmentation in High Spatial Resolution Remote Sensing Imagery</h2> <!-- <h5 align="center">Foreground-Aware Relation Network for Geospatial Object Segmentation in High Spatial Resolution Remote Sensing Imagery</h5> --> <h5 align="right">by <a href="http://zhuozheng.top/">Zhuo Zheng</a>, <a href="http://rsidea.whu.edu.cn/">Yanfei Zhong</a>, <a href="https://junjue-wang.github.io/homepage/">Junjue Wang</a> and Ailong Ma</h5> <div align="center"> <img src="https://raw.githubusercontent.com/Z-Zheng/images_repo/master/farseg.png"><br><br> </div> This is an official implementation of FarSeg in our CVPR 2020 paper [Foreground-Aware Relation Network for Geospatial Object Segmentation in High Spatial Resolution Remote Sensing Imagery](https://openaccess.thecvf.com/content_CVPR_2020/papers/Zheng_Foreground-Aware_Relation_Network_for_Geospatial_Object_Segmentation_in_High_Spatial_CVPR_2020_paper.pdf). --------------------- ## Citation If you use FarSeg in your research, please cite the following paper:
1,207
ZHAOTING/dialog-processing
['response generation']
['Multi-Referenced Training for Dialogue Response Generation']
src/model/da_recog/roberta.py src/corpora/cornellmovie/build_response_gen_dataset.py src/model/response_gen/vhcr.py src/model/response_gen/hred.py src/corpora/swda/dataset_split2.py src/tasks/response_eval/train_supervised.py src/tasks/response_eval/train_unsupervised.py src/corpora/swda/swda_reader/swda_functions.py src/tasks/amt/mark_outliers.py src/tasks/response_gen_multi_response/aggregate_teacher_outputs.py src/model/modules/utils.py src/tasks/response_gen/train.py src/corpora/swda/get_pretrained_embedding.py src/model/response_gen_multi_response/gpt2.py src/model/modules/encoders.py src/model/response_eval/ruber.py src/tasks/response_eval/eval.py src/tasks/amt/clean_amt_data.py src/tasks/response_eval/apply_roberta_eval.py src/corpora/swda/swda_reader/metadata_processor.py src/corpora/dd/config.py src/tasks/response_gen/eval.py src/corpora/dd/get_pretrained_embedding.py src/corpora/cornellmovie/get_pretrained_embedding.py src/tasks/joint_da_seg_recog/data_source.py src/utils/statistics.py src/corpora/swda/swda_reader/__init__.py src/corpora/swda/dataset_split.py src/utils/helpers.py src/model/response_gen/hred_sep_uttr_enc.py src/tasks/amt/aggregated2samples.py src/tasks/response_eval/data_source_unsupervised.py src/model/response_gen_multi_response/hred_student.py src/corpora/personachat/config.py src/corpora/personachat/build_response_eval_dataset.py src/model/joint_da_seg_recog/attn_ed.py src/model/response_gen_multi_response/vhred.py src/model/response_gen_multi_response/vhred_multi_avg.py src/utils/config.py src/tasks/lm/data_source.py src/model/lm/rnnlm.py src/corpora/swda/config.py src/corpora/dd/build_response_gen_dataset.py src/utils/metrics.py src/model/modules/submodules.py src/model/response_eval/roberta.py src/corpora/personachat/build_response_gen_dataset.py src/optimization/lr_scheduler.py src/corpora/dd/build_response_gen_multi_response_dataset.py src/tokenization/gpt2_tokenizer.py src/model/response_gen_multi_response/hred.py src/tasks/response_gen_multi_response/eval.py src/corpora/swda/swda_reader/swda.py src/tokenization/bert_tokenizer.py src/tokenization/whitespace_tokenizer.py src/optimization/loss.py src/tokenization/customized_tokenizer.py src/tokenization/roberta_tokenizer.py src/model/joint_da_seg_recog/ed.py src/model/response_gen/gpt2.py src/model/response_gen/s2s.py src/corpora/dd/build_response_eval_dataset.py src/tasks/response_gen_multi_response/eval_vhred_lgm_k.py src/tasks/response_gen/aggregate_test_outputs.py src/model/da_recog/hre_sep_uttr_enc.py src/model/response_gen_multi_response/mhred.py src/tasks/da_recog/data_source.py src/tasks/joint_da_seg_recog/train.py src/corpora/dd/build_lm_dataset.py src/tasks/response_gen_multi_response/generate_teacher_outputs.py src/model/response_eval/adem.py src/model/response_gen_multi_response/hred_cvar.py src/tasks/response_gen/data_source.py src/corpora/swda/build_da_recog_dataset.py src/model/response_gen_multi_response/hred_multi_cvar.py src/tasks/lm/train.py src/model/da_recog/hre.py src/tasks/response_gen_multi_response/train.py src/corpora/swda/build_joint_da_seg_recog_dataset.py src/tasks/da_recog/train.py src/corpora/personachat/get_pretrained_embedding.py src/tasks/response_gen_multi_response/data_source.py src/corpora/cornellmovie/config.py src/utils/sif_embedding.py src/tasks/response_eval/data_source_supervised.py src/model/response_gen/vhred.py src/model/modules/decoders.py clean_cornellmovie_text load_conversations download_data tokenize_conversation train_dev_test_split_by_conversation load_lines Config train_dev_test_split extract_scores_from_worker_results extract_dialogs_from_amt_results load_txt_files aggregate_valid_conversations build_session download_data train_dev_test_split_by_topic clean_dd_text load_txt_files aggregate_valid_conversations build_session download_data train_dev_test_split_by_topic clean_dd_text Config train_dev_test_split extract_scores_from_worker_results extract_dialogs_from_amt_results clean_personachat_text train_dev_test_split build_session download_data Config process_session build_session train_dev_test_split_by_conv_no download_data clean_swda_text process_session build_session train_dev_test_split_by_conv_no download_data clean_swda_text Config metadata2dict create_csv CorpusReader Utterance Metadata Transcript HRE HRESepUttrEnc Roberta AttnEDSeqLabeler EDSeqLabeler RNNLM DecoderRNN backtrack_beam_result EncoderRNN RelFloorOneHotEncoder AbsFloorOneHotEncoder RelFloorEmbEncoder LGMVariation DynamicRNN GMMVariation LockedDropout GaussianVariation Attention AbsFloorEmbEncoder init_position_embedding init_word_embedding init_rnn_hidden_states gaussian_kld embedded_dropout init_module_weights print_model_stats ADEM Roberta RUBER GPT2 HRED HREDSepUttrEnc S2S VHCR VHRED GPT2 HRED HRED_CVaR HRED_Multi_CVaR HREDStudent Mechanism_HRED VHRED VHREDMultiAvg LabelSmoothingCrossEntropyLoss get_linear_schedule_with_warmup are_different_uttrs str2bool str2bool DataSource str2bool mlog DataSource str2bool mlog DataSource str2bool mlog str2bool DataSourceSupervised DataSourceUnsupervised str2bool str2bool mlog str2bool mlog DataSource str2bool mlog str2bool mlog str2bool DataSource str2bool mlog str2bool mlog str2bool str2bool mlog ModBertTokenizer CustomizedTokenizer ModGPT2Tokenizer ModRobertaTokenizer WhiteSpaceTokenizer ConfigFromDict load_partial_pretrained_word_embedding_as_dict standardize_english_text repackage_hidden_states StatisticsReporter SentenceMetrics ClassificationMetrics DAMetrics get_weighted_average SIF_embedding compute_pc remove_pc SignificanceTestMetrics OutlierDetector InterAnnotatorAgreementMetrics CorrelationMetrics clean_cornellmovie_text load_conversations download_data tokenize_conversation train_dev_test_split_by_conversation load_lines Config train_dev_test_split extract_scores_from_worker_results extract_dialogs_from_amt_results load_txt_files aggregate_valid_conversations build_session download_data train_dev_test_split_by_topic clean_dd_text Config train_dev_test_split extract_scores_from_worker_results extract_dialogs_from_amt_results clean_personachat_text build_session download_data Config process_session build_session train_dev_test_split_by_conv_no download_data clean_swda_text Config metadata2dict create_csv CorpusReader Utterance Metadata Transcript HRE HRESepUttrEnc Roberta AttnEDSeqLabeler EDSeqLabeler RNNLM DecoderRNN backtrack_beam_result EncoderRNN RelFloorOneHotEncoder AbsFloorOneHotEncoder RelFloorEmbEncoder LGMVariation DynamicRNN GMMVariation LockedDropout GaussianVariation Attention AbsFloorEmbEncoder init_position_embedding init_word_embedding init_rnn_hidden_states gaussian_kld embedded_dropout init_module_weights print_model_stats ADEM Roberta RUBER GPT2 HRED HREDSepUttrEnc S2S VHCR VHRED GPT2 HRED HRED_CVaR HRED_Multi_CVaR HREDStudent Mechanism_HRED VHRED VHREDMultiAvg LabelSmoothingCrossEntropyLoss get_linear_schedule_with_warmup are_different_uttrs str2bool DataSource str2bool mlog DataSource str2bool mlog DataSource str2bool mlog DataSourceSupervised DataSourceUnsupervised str2bool mlog DataSource str2bool mlog DataSource str2bool mlog mlog ModBertTokenizer CustomizedTokenizer ModGPT2Tokenizer ModRobertaTokenizer WhiteSpaceTokenizer ConfigFromDict load_partial_pretrained_word_embedding_as_dict standardize_english_text repackage_hidden_states StatisticsReporter SentenceMetrics ClassificationMetrics DAMetrics get_weighted_average SIF_embedding compute_pc remove_pc SignificanceTestMetrics OutlierDetector InterAnnotatorAgreementMetrics CorrelationMetrics standardize_english_text replace urlretrieve print raw_data_dir extractall download_url close rename ZipFile seed int shuffle len tokenize append items extract_scores_from_worker_results list list human_score_names mean append values shuffle len standardize_english_text sub append print zip list defaultdict append values len append join tokenize zip standardize_english_text sub standardize_english_text sub text caller interact Transcript damsl_act_tag lower clean_swda_text utterances len append join tokenize lower shape append backtrack_from_coordinate array range print size named_parameters Parameter load format fill_ print len uniform_ to range append open Parameter to uniform_ init_vec Parameter list isinstance fill_ MultiheadAttention Embedding named_parameters xavier_uniform_ parameters ModuleDict Identity BatchNorm1d uniform_ values embedding max_norm sparse padding_idx norm_type scale_grad_by_freq expand_as weight pow to log len intersection set print makedirs enable_log load_word2vec_format list keys fix_text replace strip lower sub Tensor tuple isinstance detach count_nonzero zeros dot range TruncatedSVD fit dot transpose compute_pc get_weighted_average remove_pc
# Dialog Processing This repository provides a general architecture for NLU and NLG in dialog modeling. The main idea is to design 1) a general data structure for easier access to different corpora and 2) general APIs for experimenting with different models and corpora with minimum efforts. | Section | |-| | [Paper Implementation](#implementation) | | [Run a task by commands](#example-commands-to-run-a-task) | | [Components](#components) | | [How to add new things](#how-to-add-new-corpus/task/model/tokenizer) | | [What are supported now](#what-are-supported-now) | ## Paper Implementation
1,208
ZIYU-DEEP/deepSAD-custom
['outlier detection', 'anomaly detection', 'semi supervised anomaly detection']
['Deep Semi-Supervised Anomaly Detection']
src/networks/cifar10_LeNet.py src/baseline_isoforest.py src/datasets/main.py src/base/torchvision_dataset.py src/main_evaluate.py src/baselines/kde.py src/baselines/ssad.py src/baseline_ssad.py src/base/custom_dataset_eval.py src/base/base_dataset.py src/baselines/SemiDGM.py src/utils/misc.py src/datasets/custom.py src/baselines/shallow_ssad/ssad_convex.py src/datasets/__init__.py src/baseline_SemiDGM.py src/baseline_ocsvm.py src/base/custom_dataset.py src/baseline_kde.py src/datasets/custom_eval.py src/baselines/ocsvm.py src/datasets/main_eval.py src/networks/main.py src/utils/__init__.py src/optim/ae_trainer.py src/datasets/odds.py src/networks/vae.py shallow/pyod_eval_other.py shallow/pyod_eval.py create_squeeze_array.py src/base/__init__.py src/base/base_net.py src/datasets/fmnist.py src/utils/visualization/plot_images_grid.py src/optim/variational.py src/networks/ed_lstm.py src/DeepSAD.py src/optim/DeepSAD_trainer.py src/base/odds_dataset.py src/base/base_trainer.py src/networks/mnist_LeNet.py src/base/base_trainer_eval.py src/DeepSAD_eval.py src/new_create_squeeze.py create_arrays.py src/networks/__init__.py src/networks/layers/standard.py src/datasets/preprocessing.py src/datasets/mnist.py src/optim/__init__.py src/optim/SemiDGM_trainer.py src/networks/layers/stochastic.py src/baselines/__init__.py src/networks/inference/distributions.py src/optim/vae_trainer.py src/main.py src/optim/DeepSAD_evaluater.py src/base/base_dataset_eval.py squeeze_arrays.py src/baselines/isoforest.py src/networks/dgm.py src/datasets/cifar10.py src/networks/fmnist_LeNet.py src/create_squeeze_array.py src/networks/lstm.py src/baselines/shallow_ssad/__init__.py src/utils/config.py src/networks/mlp.py txt_to_series array_to_window txt_to_series array_to_window main main main main main txt_to_series array_to_window DeepSAD DeepSAD_eval main txt_to_series array_to_window BaseADDataset BaseADDataset_eval BaseNet BaseTrainer BaseTrainer_eval CustomDataset CustomDataset_eval ODDSDataset TorchvisionDataset IsoForest KDE OCSVM SemiDeepGenerativeModel SSAD ConvexSSAD CIFAR10_Dataset MyCIFAR10 CustomADDataset CustomADDataset_eval FashionMNIST_Dataset MyFashionMNIST load_dataset load_dataset_eval MyMNIST MNIST_Dataset ODDSADDataset create_semisupervised_setting CIFAR10_LeNet CIFAR10_LeNet_Decoder CIFAR10_LeNet_Autoencoder DeepGenerativeModel StackedDeepGenerativeModel Classifier ed_LSTM_Decoder ed_LSTM_Net ed_LSTM_Autoencoder FashionMNIST_LeNet_Decoder FashionMNIST_LeNet_Autoencoder FashionMNIST_LeNet LSTM_Autoencoder LSTM_Net LSTM_Decoder build_autoencoder build_network MLP_Decoder MLP_Autoencoder Linear_BN_leakyReLU MLP MNIST_LeNet_Autoencoder MNIST_LeNet MNIST_LeNet_Decoder Decoder VariationalAutoencoder Encoder log_standard_gaussian log_standard_categorical log_gaussian Standardize GaussianSample Stochastic AETrainer DeepSADEvaluater DeepSADTrainer SemiDeepGenerativeTrainer VAETrainer ImportanceWeightedSampler SVI Config log_sum_exp enumerate_discrete binary_cross_entropy plot_images_grid append arange zip astype Config getLogger save_results load_ae unsqueeze IsoForest tensor setLevel load_config seed basicConfig list load_model addHandler transpose set_sharing_strategy load_dataset setFormatter save_config copy test manual_seed info zip INFO FileHandler plot_images_grid Formatter train KDE OCSVM save_model save_vae_results pretrain set_network SemiDeepGenerativeModel set_vae set_num_threads setseed SSAD drop DataFrame open len sum to_pickle format close DeepSAD write save_ae_results quantile makedirs FashionMNIST_Dataset MNIST_Dataset CIFAR10_Dataset CustomADDataset ODDSADDataset CustomADDataset_eval int permutation tolist solve flatten array len CIFAR10_LeNet MLP FashionMNIST_LeNet strip LSTM_Net DeepGenerativeModel MNIST_LeNet ed_LSTM_Net StackedDeepGenerativeModel VariationalAutoencoder MNIST_LeNet_Autoencoder FashionMNIST_LeNet_Autoencoder LSTM_Autoencoder ed_LSTM_Autoencoder CIFAR10_LeNet_Autoencoder MLP_Autoencoder exp log pi ones_like softmax ImportanceWeightedSampler size device to is_cuda cat max make_grid transpose imshow set_visible title savefig clf gca numpy
# Deep SAD with Customized Dataset This is repository modifying some part of the original Deep SAD [code](https://github.com/lukasruff/Deep-SAD-PyTorch). The work is ongoing. Later I would simplify its structure for easier understanding. Currently, major modifications include: 1. Adding the function (adding some classes in base, datasets, net, main and so on) to support custom datasets. 2. Adding a LSTM autoencoder to support learning of multivariate time series. (Currently you should change the dimensions in it.) 3. Adding a `main_evaluation.py` which provides a more flexible evaluation for the model. Basically, it loads a model and evaluates it on any data you choose. ## Citation You could find a preprint of the Deep Semi-Supervised Anomaly Detection paper on [arXiv](https://arxiv.org/abs/1906.02694). ``` @article{ruff2019,
1,209
ZJU-FAST-Lab/OPNet
['autonomous navigation']
['Learning-based 3D Occupancy Prediction for Autonomous Navigation in Occluded Environments']
krrt-planner/opnet/src/torch_dense/tools/model_dense_sgnn.py krrt-planner/uav_simulator/Utils/multi_map_server/build/catkin_generated/generate_cached_setup.py krrt-planner/opnet/src/torch_dense/transform.py krrt-planner/uav_simulator/quadrotor_msgs/src/quadrotor_msgs/msg/_PPROutputData.py krrt-planner/uav_simulator/Utils/multi_map_server/quadrotor_msgs/src/quadrotor_msgs/msg/_AuxCommand.py krrt-planner/uav_simulator/so3_disturbance_generator/src/so3_disturbance_generator/cfg/DisturbanceUIConfig.py krrt-planner/mapping/occ_grid/common/dumpTFWts.py krrt-planner/uav_simulator/map_generator/src/map_generator_easy.py krrt-planner/uav_simulator/so3_quadrotor_simulator/include/ode/libs/numeric/odeint/examples/elliptic.py krrt-planner/opnet/src/torch_dense/tools/net_node_trt.py krrt-planner/opnet/src/torch_dense/tools/test_model_nosdf.py krrt-planner/uav_simulator/Utils/multi_map_server/quadrotor_msgs/src/quadrotor_msgs/msg/__init__.py krrt-planner/opnet/src/torch_dense/tools/test_model_nosurf.py krrt-planner/uav_simulator/Utils/pose_utils/build/catkin_generated/installspace/_setup_util.py krrt-planner/uav_simulator/Utils/multi_map_server/quadrotor_msgs/build/devel/_setup_util.py krrt-planner/uav_simulator/Utils/multi_map_server/quadrotor_msgs/src/quadrotor_msgs/msg/_OutputData.py krrt-planner/uav_simulator/Utils/uav_utils/scripts/odom_to_euler.py krrt-planner/uav_simulator/Utils/multi_map_server/quadrotor_msgs/src/quadrotor_msgs/msg/_Gains.py krrt-planner/opnet/src/torch_dense/tools/dummy_node.py krrt-planner/opnet/src/torch_dense/tools/test_model_simple.py krrt-planner/uav_simulator/depth_sensor_simulator/src/csv_convert.py krrt-planner/opnet/src/torch_dense/tools/check_data.py krrt-planner/uav_simulator/Utils/multi_map_server/src/multi_map_server/msg/_MultiSparseMap3D.py krrt-planner/uav_simulator/Utils/pose_utils/build/devel/_setup_util.py krrt-planner/opnet/src/torch_dense/tools/test_scene.py krrt-planner/opnet/src/torch_dense/tools/model.py krrt-planner/uav_simulator/quadrotor_msgs/src/quadrotor_msgs/msg/_SO3Command.py krrt-planner/opnet/src/torch_dense/tools/play_dataset.py krrt-planner/uav_simulator/odom_visualization/build/catkin_generated/generate_cached_setup.py krrt-planner/uav_simulator/quadrotor_msgs/src/quadrotor_msgs/msg/_Serial.py krrt-planner/uav_simulator/Utils/multi_map_server/src/multi_map_server/msg/__init__.py krrt-planner/opnet/src/torch_dense/train_nosurf.py krrt-planner/uav_simulator/quadrotor_msgs/src/quadrotor_msgs/msg/_Corrections.py krrt-planner/opnet/src/torch_dense/train.py krrt-planner/uav_simulator/Utils/multi_map_server/quadrotor_msgs/src/quadrotor_msgs/msg/_StatusData.py krrt-planner/opnet/src/torch_dense/tools/net_node.py krrt-planner/uav_simulator/quadrotor_msgs/src/quadrotor_msgs/msg/_Gains.py krrt-planner/opnet/src/torch_dense/tools/check_onnx.py krrt-planner/uav_simulator/Utils/uav_utils/scripts/tf_assist.py krrt-planner/opnet/src/torch_dense/tools/ros_vis.py krrt-planner/uav_simulator/so3_quadrotor_simulator/include/ode/libs/numeric/odeint/performance/plot_result.py krrt-planner/uav_simulator/quadrotor_msgs/src/quadrotor_msgs/msg/_AuxCommand.py krrt-planner/uav_simulator/Utils/uav_utils/scripts/topic_statistics.py krrt-planner/opnet/src/torch_dense/aspp3d.py krrt-planner/opnet/src/torch_dense/common.py krrt-planner/uav_simulator/quadrotor_msgs/src/quadrotor_msgs/msg/_StatusData.py krrt-planner/opnet/src/torch_dense/tools/toonnx.py krrt-planner/uav_simulator/quadrotor_msgs/src/quadrotor_msgs/msg/_TRPYCommand.py krrt-planner/opnet/src/torch_dense/loss.py krrt-planner/uav_simulator/Utils/pose_utils/build/catkin_generated/generate_cached_setup.py krrt-planner/uav_simulator/so3_quadrotor_simulator/include/ode/libs/numeric/odeint/performance/performance.py krrt-planner/uav_simulator/Utils/multi_map_server/src/multi_map_server/msg/_VerticalOccupancyGridList.py krrt-planner/uav_simulator/quadrotor_msgs/src/quadrotor_msgs/msg/_PositionCommand.py krrt-planner/uav_simulator/Utils/multi_map_server/quadrotor_msgs/src/quadrotor_msgs/msg/_SO3Command.py krrt-planner/uav_simulator/quadrotor_msgs/src/quadrotor_msgs/msg/__init__.py krrt-planner/uav_simulator/Utils/multi_map_server/quadrotor_msgs/build/catkin_generated/installspace/_setup_util.py krrt-planner/opnet/src/torch_dense/data_util.py krrt-planner/opnet/src/torch_dense/tools/test_model.py krrt-planner/uav_simulator/odom_visualization/build/devel/_setup_util.py krrt-planner/opnet/src/torch_dense/tools/vis_check.py.py krrt-planner/opnet/src/torch_dense/scene_dataloader.py krrt-planner/opnet/src/torch_dense/tools/net_node_sub.py krrt-planner/uav_simulator/Utils/multi_map_server/build/devel/_setup_util.py krrt-planner/opnet/src/torch_dense/tools/trt_runner.py krrt-planner/uav_simulator/quadrotor_msgs/src/quadrotor_msgs/msg/_OutputData.py krrt-planner/uav_simulator/Utils/multi_map_server/src/multi_map_server/msg/_SparseMap3D.py krrt-planner/opnet/src/torch_dense/evluate.py krrt-planner/uav_simulator/Utils/uav_utils/scripts/send_odom.py krrt-planner/uav_simulator/odom_visualization/build/catkin_generated/installspace/_setup_util.py krrt-planner/uav_simulator/Utils/multi_map_server/quadrotor_msgs/src/quadrotor_msgs/msg/_PPROutputData.py krrt-planner/uav_simulator/Utils/multi_map_server/quadrotor_msgs/src/quadrotor_msgs/msg/_Corrections.py krrt-planner/opnet/src/torch_dense/tools/SSC_model.py krrt-planner/uav_simulator/Utils/multi_map_server/quadrotor_msgs/src/quadrotor_msgs/msg/_PositionCommand.py krrt-planner/uav_simulator/Utils/multi_map_server/quadrotor_msgs/src/quadrotor_msgs/msg/_TRPYCommand.py krrt-planner/opnet/src/torch_dense/model_dense_nosurf.py krrt-planner/uav_simulator/Utils/multi_map_server/src/multi_map_server/msg/_MultiOccupancyGrid.py krrt-planner/uav_simulator/Utils/multi_map_server/build/catkin_generated/installspace/_setup_util.py krrt-planner/opnet/src/torch_dense/tools/torch_to_onnx.py krrt-planner/opnet/src/torch_dense/tools/vis.py krrt-planner/uav_simulator/Utils/multi_map_server/quadrotor_msgs/src/quadrotor_msgs/msg/_Serial.py krrt-planner/uav_simulator/Utils/multi_map_server/src/multi_map_server/__init__.py krrt-planner/opnet/src/torch_dense/tools/loadonnx.py krrt-planner/uav_simulator/Utils/multi_map_server/quadrotor_msgs/build/catkin_generated/generate_cached_setup.py float_to_hex getTRTType _ASPPModule ASPP find_sample_data HostDeviceMem do_inference GiB locate_files add_help allocate_buffers do_inference_v2 visualize_fsdf_as_points sparse_to_dense_np dense_to_points preprocess_sdf_np visualize_sparse_sdf_as_points visualize_points dump_args_txt visualize_sparse_locs_as_points load_scene_known get_train_files save_dense_predictions sparse_to_dense_np_flipped unprocess_sdf_pt preprocess_sdf_pt visualize_sparse_flocs_as_points visiualize_diff make_scale_transform load_scene compute_batchids load_dense_train_file load_train_file dense_to_sparse_np tsdf_to_bool visualize_sdf_as_points visualize_occ_as_points main test compute_loss_dense compute_bce_dense compute_iou_sparse_dense compute_dense_occ_accuracy apply_log_transform compute_loss_nosdf occ_punish compute_l1_predsurf_dense compute_targets sscnet_loss compute_loss_nosurf compute_weights_missing_geo_dense compute_l1_tgtsurf_sparse_dense compute_bce_sparse_dense conv_block GenModel bridge_block TSDFEncoder upsample Refinement UNet PreEncoderLayer upconv_block count_num_model_params DenseSceneDataset collate_dense collate get_loss_weights test print_log_info print_log main train main train get_loss_weights test AddPepperNoise AddRandomFlip RandomliftFloor AddGaussianNoise MyTransforms main check load_and_run ocp_net main get_engine trt_inference conv_block GenModel bridge_block TSDFEncoder upsample Refinement UNet SurfacePrediction PreEncoderLayer upconv_block count_num_model_params ocp_net publish_pcl tsdf_callback publish_added_pcl main trt_net publish_pcl publish_added_pcl play_dataset ocp_net SSCModel mini_resblock_dil mini_resblock count_num_model_params conv_block GenModel bridge_block TSDFEncoder upsample Refinement UNet SurfacePrediction PreEncoderLayer upconv_block count_num_model_params conv_block GenModel bridge_block TSDFEncoder upsample Refinement UNet PreEncoderLayer upconv_block count_num_model_params conv_block GenModel bridge_block TSDFEncoder upsample Refinement UNet PreEncoderLayer upconv_block count_num_model_params conv_block GenModel bridge_block TSDFEncoder upsample Refinement UNet SurfacePrediction PreEncoderLayer upconv_block count_num_model_params main test trt_runner HostDeviceMem draw_geometries_with_back_face draw_geometries_with_back_face_multithreading draw_geometries_with_back_face main map_generator _rollback_env_variable _prefix_env_variable _get_workspaces assignment _parse_arguments rollback_env_variables comment prepend find_env_hooks prepend_env_variables _rollback_env_variable _prefix_env_variable _get_workspaces assignment _parse_arguments rollback_env_variables comment prepend find_env_hooks prepend_env_variables AuxCommand Corrections Gains OutputData PositionCommand PPROutputData Serial SO3Command StatusData TRPYCommand _rollback_env_variable _prefix_env_variable _get_workspaces assignment _parse_arguments rollback_env_variables comment prepend find_env_hooks prepend_env_variables _rollback_env_variable _prefix_env_variable _get_workspaces assignment _parse_arguments rollback_env_variables comment prepend find_env_hooks prepend_env_variables _rollback_env_variable _prefix_env_variable _get_workspaces assignment _parse_arguments rollback_env_variables comment prepend find_env_hooks prepend_env_variables _rollback_env_variable _prefix_env_variable _get_workspaces assignment _parse_arguments rollback_env_variables comment prepend find_env_hooks prepend_env_variables AuxCommand Corrections Gains OutputData PositionCommand PPROutputData Serial SO3Command StatusData TRPYCommand MultiOccupancyGrid MultiSparseMap3D SparseMap3D VerticalOccupancyGridList _rollback_env_variable _prefix_env_variable _get_workspaces assignment _parse_arguments rollback_env_variables comment prepend find_env_hooks prepend_env_variables _rollback_env_variable _prefix_env_variable _get_workspaces assignment _parse_arguments rollback_env_variables comment prepend find_env_hooks prepend_env_variables callback joy_callback imu_callback OdometryConverter main print dtype exit parse_known_args ArgumentParser join add_argument parse_known_args ArgumentParser sep join len abspath zip exists enumerate int binding_is_input nbytes HostDeviceMem volume get_binding_shape Stream mem_alloc nptype get_binding_dtype max_batch_size pagelocked_empty append synchronize execute_async synchronize execute_async_v2 splitlines range len fill zeros fill zeros stack where read asarray reshape sparse_to_dense_np unpack reverse append range open read reshape unpack reverse append range open read asarray reshape close unpack open read reshape close unpack open abs sign append stack array range zeros_like visualize_points print squeeze stack append array range visualize_points print squeeze stack append array range print astype float32 visualize_points visualize_points print squeeze stack append float array range print astype float32 visualize_points print astype float32 visualize_points describe ones transpose write divide matmul array len visualize_points squeeze shape dense_to_points zeros range eye join makedirs visiualize_diff range len print eval Sigmoid len seed max_to_vis print input_data_path num_hierarchy_levels makedirs test_file_list shuffle output test DataLoader get_train_files input_dim truncation DenseSceneDataset float len float clone range cuda range len abs log sign binary_cross_entropy_with_logits view clamp sum binary_cross_entropy_with_logits delete union1d intersect1d nonzero numpy range len squeeze sum clamp apply_log_transform loss_func SmoothL1Loss item abs mean Sigmoid apply_log_transform loss_func mean SmoothL1Loss unsqueeze binary_cross_entropy_with_logits compute_weights_missing_geo_dense compute_bce_dense extend compute_l1_predsurf_dense unsqueeze item append compute_weights_missing_geo_dense float range len compute_bce_dense extend compute_l1_predsurf_dense unsqueeze item append compute_weights_missing_geo_dense float range len compute_bce_dense extend unsqueeze item append compute_weights_missing_geo_dense float range len view fill_ nonzero item device to tensor shape size list parameters stack range cat len unsqueeze_ stack range len str print extend append range len array flush print_log_info print min fill zeros float max range model num_hierarchy_levels clip_grad_norm_ zero_grad print_log unsqueeze truncation save cuda weight_sdf_loss squeeze get_loss_weights compute_dense_occ_accuracy append range detach format compute_loss_dense weight_missing_geo num_iters_per_level mean item enumerate unsqueeze_ time use_loss_masking join isinstance backward print add_scalar logweight_target_sdf compute_targets parameters step len time format mean add_scalar batch_size print_log save open str dump_args_txt max_epoch input append range close start_epoch flush join time write extend train compute_loss_nosdf eval print num_hierarchy_levels save_input_target_pred compute_targets truncation save numpy enumerate len check load check_model graph printable_graph reshape do_inference_v2 astype float32 center time voxel_size dimx print reshape abs astype sign sparse_to_dense_np from_numpy read_points points int32 dimz truncation flipped publish publish init_node spin trt_net time voxel_size abs print squeeze sign truncation sleep flipped cuda enumerate write SceneDataset exists ones from_numpy target_data_path max_input_height create_window Visualizer get_render_option add_geometry destroy_window run append destroy_window run publish_map make_map sleep map_generator _rollback_env_variable sorted assignment insert copy comment append keys join remove _get_workspaces _prefix_env_variable sorted prepend comment append append join pop join sorted isdir assignment endswith comment index reversed append listdir range len add_argument ArgumentParser euler_from_quaternion header Vector3Stamped array publish euler_from_quaternion header Vector3Stamped array publish Vector3Stamped header publish
# OPNet & krrt-planner with map-prediction Video at: https://www.youtube.com/watch?v=Qb3ni_j0Dic Preprint: Learning-based 3D Occupancy Prediction for Autonomous Navigation in Occluded Environments https://arxiv.org/abs/2011.03981 # c++ realization of the paper: Kinodynamic RRT*: Asymptotically Optimal Motion Planning for Robots with Linear Dynamics Building: The depth_sensor_simulator package in uav_simulator is alternative to build with GPU or CPU to render the depth sensor measurement. By default, it is set to build with GPU in CMakeLists:
1,210
ZJUGiveLab/UNet-Version
['medical image segmentation', 'semantic segmentation']
['UNet 3+: A Full-Scale Connected UNet for Medical Image Segmentation']
models/layers.py loss/msssimLoss.py models/UNet_2Plus.py models/init_weights.py loss/iouLoss.py models/UNet.py loss/bceLoss.py models/UNet_3Plus.py BCE_loss _iou IOU IOU_loss create_window MSSSIM gaussian SSIM ssim msssim weights_init_orthogonal weights_init_normal weights_init_xavier init_weights weights_init_kaiming unetUp_origin unetUp unetConv2 UNet UNet_2Plus UNet_3Plus UNet_3Plus_DeepSup UNet_3Plus_DeepSup_CGM print bce_loss BCELoss sum range print IOU iou_loss Tensor contiguous unsqueeze size min mean conv2d pow device to print avg_pool2d stack device append ssim to prod range data normal_ __name__ constant_ data normal_ xavier_normal_ __name__ constant_ data normal_ kaiming_normal_ __name__ constant_ data orthogonal_ normal_ __name__ constant_ apply
# UNet 3+ Code for ICASSP 2020 paper ‘UNet 3+: A full-scale connected unet for medical image segmentation’ ## Requirements * python 3.6.2 * pytorch 1.3.1
1,211
ZJULearning/AMI
['text generation']
['Adversarial Mutual Information for Text Generation']
onmt/inputters/audio_dataset.py onmt/modules/multi_headed_attn.py tools/vid_feature_extractor.py tools/release_model.py onmt/inputters/__init__.py onmt/utils/logging.py onmt/modules/position_ffn.py tools/embeddings_to_torch.py onmt/modules/util_class.py onmt/train_single_conv.py onmt/modules/average_attn.py onmt/translate/__init__.py onmt/models/model.py onmt/models/model_saver.py onmt/decoders/transformer.py onmt/utils/loss.py onmt/modules/copy_generator.py onmt/decoders/__init__.py onmt/translate/penalties.py onmt/modules/embeddings.py onmt/translate/beam_search.py onmt/bin/preprocess.py onmt/models/__init__.py onmt/utils/optimizers.py onmt/utils/earlystopping.py onmt/inputters/image_dataset.py onmt/decoders/ensemble.py onmt/utils/cnn_factory.py onmt/inputters/datareader_base.py onmt/modules/structured_attention.py onmt/decoders/decoder.py onmt/translate/decode_strategy.py onmt/__init__.py onmt/encoders/mean_encoder.py onmt/translate/process_zh.py onmt/encoders/__init__.py onmt/opts.py onmt/modules/sparse_losses.py onmt/encoders/encoder.py translate.py onmt/translate/greedy_search.py onmt/translate/translator.py onmt/models/sru.py tools/apply_bpe.py onmt/trainer_nmt.py onmt/modules/gate.py tools/average_models.py ami_data_pro/convert_to_bw_gold.py onmt/utils/misc.py ami_data_pro/convert_to_medium_test_data.py onmt/utils/statistics.py onmt/modules/__init__.py ami_data_pro/select_results.py onmt/train_single_noise.py tools/create_vocabulary.py onmt/train_single_nmt.py onmt/trainer_conv.py onmt/modules/weight_norm.py ami_data_pro/convert_to_opm_format.py onmt/translate/translator_noise.py onmt/utils/distributed.py onmt/modules/global_attention.py tools/extract_embeddings.py onmt/utils/alignment.py onmt/translate/translation.py tools/test_rouge.py onmt/utils/rnn_factory.py onmt/train_single.py onmt/utils/__init__.py onmt/encoders/transformer.py onmt/trainer_noise.py onmt/inputters/vec_dataset.py train.py onmt/bin/server.py onmt/utils/report_manager.py onmt/modules/sparse_activations.py onmt/inputters/dataset_base.py preprocess.py onmt/utils/parse.py onmt/trainer.py onmt/modules/conv_multi_step_attention.py onmt/encoders/rnn_encoder.py tools/learn_bpe.py onmt/inputters/text_dataset.py onmt/models/stacked_rnn.py onmt/translate/translation_server.py onmt/bin/translate.py onmt/inputters/inputter.py onmt/utils/loss_ori.py onmt/noise_generator.py onmt/model_builder.py build_model build_base_model build_encoder build_embeddings build_decoder load_test_model Noise StoreLoggingLevelAction train_opts preprocess_opts DeprecateAction model_opts config_opts translate_opts build_trainer Trainer build_trainer EasyLoss Trainer build_trainer EasyLoss Trainer build_trainer EasyLoss Trainer main _check_save_model_path _tally_parameters configure_process _get_step2_valid_iter _new_check_save_model_path _tally_parameters _check_save_model_path _get_data_iter configure_process main _get_step2_valid_iter _new_check_save_model_path _tally_parameters _check_save_model_path _get_data_iter configure_process main _new_check_save_model_path _tally_parameters _get_step1_valid_iter _check_save_model_path _get_data_iter configure_process main build_save_dataset process_one_shard build_save_vocab preprocess count_features main _get_parser maybe_load_vocab check_existing_pt_files main start _get_parser main _get_parser translate DecoderBase StdRNNDecoder RNNDecoderBase InputFeedRNNDecoder EnsembleModel EnsembleGenerator EnsembleDecoderOutput EnsembleEncoder load_test_model EnsembleDecoder TransformerDecoder TransformerDecoderLayer EncoderBase MeanEncoder pack RNNEncoder unpack TransformerEncoder TransformerEncoderLayer audio_fields AudioSeqField AudioDataReader audio_sort_key MissingDependencyException DataReaderBase Dataset _join_dicts _dynamic_dict img_sort_key ImageDataReader image_fields batch_img _load_vocab _read_vocab_file batch_iter _old_style_nesting _merge_field_vocabs build_dataset_iter_multiple _build_field_vocab load_old_vocab _getstate build_vocab _pad_vocab_to_multiple _pool _old_style_vocab max_tok_len make_src filter_example MultipleDatasetIterator make_tgt parse_align_idx OrderedIterator AlignField _build_fv_from_multifield old_style_vocab _setstate _build_fields_vocab build_dataset_iter DatasetLazyIter get_fields _old_style_field_list text_sort_key _feature_tokenize TextMultiField text_fields TextDataReader vec_sort_key VecSeqField vec_fields VecDataReader NMTModel ModelSaver ModelSaverBase build_model_saver check_sru_requirement load_sru_mod SRU_Compute SRUCell CheckSRU SRU StackedLSTM StackedGRU AverageAttention ConvMultiStepAttention seq_linear CopyGenerator CopyGeneratorLossCompute collapse_copy_scores CopyGeneratorLoss VecEmbedding PositionalEncoding Embeddings SourceContextGate ContextGate context_gate_factory TargetContextGate BothContextGate GlobalAttention MultiHeadedAttention PositionwiseFeedForward SparsemaxFunction LogSparsemax _make_ix_like _threshold_and_support Sparsemax SparsemaxLossFunction SparsemaxLoss MatrixTree Cast Elementwise WeightNormLinear get_var_maybe_avg WeightNormConv2d WeightNormConvTranspose2d get_vars_maybe_avg BeamSearch GNMTGlobalScorer DecodeStrategy sample_with_temperature GreedySearch PenaltyBuilder zh_traditional_hk zh_simplify_v2 zh_traditional_tw zh_segmentator zh_traditional_standard zh_simplify Translation TranslationBuilder ServerModelError get_function_by_path TranslationServer Timer ServerModel critical build_translator Translator max_tok_len build_translator Translator max_tok_len to_word_align make_batch_align_matrix extract_alignment subword_map_by_spacer subword_map_by_joiner build_align_pharaoh GatedConv StackedCNN shape_transform all_gather_list all_reduce_and_rescale_tensors is_master multi_init Scorer EarlyStopping AccuracyScorer PPLScorer PatienceEnum scorers_from_opts init_logger build_loss_compute shards NewNMTLossCompute LossComputeBase filter_shard_state LabelSmoothingLoss NMTLossCompute build_loss_compute shards LossComputeBase filter_shard_state LabelSmoothingLoss NMTLossCompute use_gpu sequence_mask _split_corpus split_corpus set_random_seed generate_relative_positions_matrix fn_args aeq tile check_model_config report_matrix relative_matmul noamwd_decay Optimizer build_torch_optimizer MultipleOptimizer FusedAdam rsqrt_decay exponential_decay noam_decay make_learning_rate_decay_fn AdaFactor ArgumentParser ReportMgr ReportMgrBase build_report_manager rnn_factory Statistics create_parser get_pairs isolate_glossary recursive_split read_vocabulary check_vocab_and_split encode BPE main read_files_batch read_embeddings calc_vocab_load_stats main convert_to_torch_tensor get_vocabs main write_embeddings create_parser replace_pair get_pair_statistics prune_stats get_vocabulary main update_pair_statistics test_rouge rouge_results_to_str collate_tensor VidDset finished_watcher vid_len FeatureExtractor read_to_imgs Reconstructor saver batch run Embeddings load use_gpu old_style_vocab update_model_opts build_base_model ckpt_model_opts validate_model_opts load_old_vocab fp32 data_type eval float gpu CopyGenerator share_embeddings Sequential xavier_uniform_ build_encoder device Cast pre_word_vecs_dec hasattr attention_dropout NMTModel LogSoftmax dec_rnn_size pre_word_vecs_enc half load_state_dict encoder share_decoder_embeddings param_init to vocab LogSparsemax load_pretrained_vectors param_init_glorot uniform_ info base_field Linear decoder float32 parameters build_embeddings weight build_decoder len use_gpu build_base_model info add add_argument_group add add_argument_group add add_argument_group add add_argument_group add list keys accum_count average_every build_loss_compute accum_steps world_size dropout_steps dropout gpu_verbose_level build_report_manager average_decay Trainer truncated_decoder normalization base_field bw_adv_w_clip gm_iter_count fw_adv_w_clip noise_l2 noise_lambda wh_sample_num wh_disturb_ratio fgsm_alpha save_model dirname abspath makedirs named_parameters seed set_device set_random_seed data gpu_ranks build_trainer use_vocab build_model_saver warning log_file train_steps build_dataset_iter_multiple update_model_opts validate_model_opts load_old_vocab model_type init_logger iter append _train_iter build_model train_from ckpt_model_opts close from_opt data_ids info load _tally_parameters old_style_vocab _check_save_model_path build_dataset_iter configure_process train len join save_model dirname abspath makedirs g_train_from _get_data_iter Noise cuda _get_step2_valid_iter n_train_from format m_train_from join _new_check_save_model_path learning_rate enc_rnn_size _train_iter data_ids build_dataset_iter append build_dataset_iter_multiple build_dataset_iter new_train _get_step1_valid_iter build_dataset_iter format save_data glob overwrite warning update config list defaultdict items examples zip format save_data collect iter info save Dataset load _load_vocab tgt_words_min_frequency tgt_vocab info src_vocab vocab_size_multiple defaultdict save_data tgt_words_min_frequency train_src data_type _build_fields_vocab train_align train_ids shard_iterator share_vocab tgt_vocab_size src_vocab_size train_tgt save src_words_min_frequency maybe_load_vocab check_existing_pt_files tgt_words_min_frequency save_data tgt_vocab data_type tgt_vocab_size save share_vocab src_vocab_size src_vocab src_words_min_frequency build_vocab seed build_save_dataset validate_preprocess_args manual_seed info zip train_src data_type from_opt init_logger log_file train_tgt get_fields config_opts ArgumentParser preprocess_opts parse_args preprocess _get_parser TranslationServer prefix_route Flask route run add_argument start config list validate_translate_opts src zip shard_size build_translator tgt split_corpus info init_logger log_file enumerate translate_opts translate EnsembleModel items list models dict avg_raw_probs iter append AudioSeqField unk_token LongTensor Counter Vocab pad_token tokenize size max fill_ enumerate Field update defaultdict stoi zeros max enumerate len long max enumerate append split AlignField RawField Field items list _old_style_nesting _old_style_vocab from_iterable dict iter sum get_fields values _old_style_field_list len int extend Counter Vocab ceil len vocab _pad_vocab_to_multiple vocab_cls _read_vocab_file enumerate info len _build_field_vocab info vocab defaultdict _build_fv_from_multifield _merge_field_vocabs dict info base_field len load update _load_vocab defaultdict list items zip examples collect _build_fields_vocab iter info enumerate _pad_vocab_to_multiple sum Vocab Counter format info batch_size_fn warning append enumerate len sorted list batch_iter random_shuffler batch max len sorted list data glob hasattr split get partial TextMultiField Field append range VecSeqField save_model keep_checkpoint ModelSaver check_output compile getenv load check_sru_requirement Module bytes namedtuple stream Program device encode to compile get_function linear size view data size type_as index_select index_fill_ append index_add_ range len size dim arange cumsum sort _make_ix_like unsqueeze gather getattr append get_var_maybe_avg topk view lt div Multinomial masked_fill sample gather float argmax join import_module getattr from_opt load_test_model output open load n_model_load_path cuda threshold ones div_ to_dense sum view size zip append sum enumerate str sort tolist append argmax enumerate sort list subword_map_by_joiner subword_map_by_spacer list endswith len accumulate startswith enumerate accumulate list world_size get_rank format init_process_group all_reduce_buffer element_size numel all_reduce zero_ div_ append list bytes tolist dumps get_world_size _out_buffers ByteTensor loads all_gather item append _in_buffer cuda range len append early_stopping_criteria set RotatingFileHandler setFormatter getLogger addHandler StreamHandler Formatter setLevel INFO NLLLoss vocab NewNMTLossCompute SparsemaxLoss isinstance CopyGeneratorLoss copy_attn_force copy_loss_by_seqlength CopyGeneratorLossCompute copy_attn LabelSmoothingLoss device label_smoothing to len items requires_grad list isinstance clone append Tensor split items list backward filter_shard_state extend dict zip split NMTLossCompute next numel list view size contiguous range len seed manual_seed clamp transpose unsqueeze arange reshape transpose permute matmul format replace index zip max len endswith join list items initialize Adagrad loss_scale Adadelta MultipleOptimizer Adam SGD named_parameters FusedAdam append FP16_Optimizer AdaFactor ReportMgr tensorboard_log_dir SummaryWriter report_every SRU add_argument ArgumentParser add set get_pairs endswith tuple min extend index check_vocab_and_split append append recursive_split int split add set split open zip append enumerate split itos print add_argument _old_style_vocab file read_files_batch ArgumentParser load vocab _old_style_vocab info append next len dict items list itervalues zeros next Tensor len set keys len read_embeddings emb_file_enc emb_file_dec set keys calc_vocab_load_stats output_file save dict_file convert_to_torch_tensor emb_file_both get_vocabs model output_dir build_base_model set_device tolist encoder vocab use_gpu write_embeddings __dict__ decoder model_opts gpu int Counter split defaultdict index defaultdict enumerate join list items replace tuple escape sub iter append compile split items list items sorted list get_pair_statistics deepcopy replace_pair prune_stats write get_vocabulary dict update_pair_statistics max range values format Rouge155 output_to_dict strftime localtime convert_and_evaluate mkdir range len VideoCapture read cvtColor COLOR_BGR2RGB stack append collate_tensor sum model VidDset put eval FeatureExtractor to get put Reconstructor push flush
# AMI Implementations of the paper [Adversarial Mutual Information for Text Generation](https://proceedings.icml.cc/paper/2020/file/85ea6fd7a2ca3960d0cf5201933ac998-Paper.pdf). The code is based on the [OpenNMT](https://github.com/OpenNMT/OpenNMT-py). ## Required All dependencies can be installed by: ```bash pip install -r requirements.opt.txt ``` ## Data We support dialogue generation and neural machine translation datasets, and the datasets we used in the paper are [PersonaChat](https://github.com/facebookresearch/ParlAI/tree/master/projects/personachat) and [WMT translation dataset](http://www.statmt.org/wmt14/translation-task.html). ## Preprocessing
1,212
ZJULearning/RMI
['semantic segmentation']
['Region Mutual Information Loss for Semantic Segmentation']
model/deeplab.py model/sync_batchnorm/batchnorm.py model/sync_batchnorm/replicate.py dataloaders/custom_transforms.py utils/model_init.py dataloaders/datasets/pascal.py utils/metrics.py losses/affinity/utils.py model/backbone/resnet_v1.py losses/pyramid_loss.py model/__init__.py utils/model_store.py crf/crf_refine.py model/net_factory.py model/sync_bn/functions.py utils/files.py train.py dataloaders/factory.py model/sync_bn/src/gpu/setup.py dataloaders/__init__.py losses/normal_loss.py inference.py dataloaders/datasets/camvid.py model/sync_bn/parallel_apply.py model/sync_bn/syncbn.py model/sync_batchnorm/comm.py dataloaders/datasets/cityscapes.py model/psp.py model/sync_bn/src/__init__.py full_model.py model/sync_bn/__init__.py crf/crf_refine_test.py losses/rmi/rmi_utils.py utils/train_utils.py model/backbone/__init__.py model/sync_bn/parallel.py model/sync_bn/src/cpu/setup.py model/sync_batchnorm/__init__.py eval.py losses/rmi/rmi.py model/sync_batchnorm/batchnorm_reimpl.py model/sync_bn/comm.py losses/loss_factory.py model/sync_batchnorm/unittest.py parser_params.py utils/loss.py dataloaders/utils.py crf/crf.py losses/affinity/aaf.py main Trainer FullModel main Trainer save_hp_to_json add_parser_params main Trainer dense_crf decode_labels main Trainer main Trainer FixedResize RandomRotate ToTensor_Image ToTensor RandomGaussianBlur RandomPadOrCrop Normalize RandomHorizontalFlip FixScaleCrop Normalize_Image RandomRescale get_data_loader get_dataset decode_seg_map_sequence encode_segmap decode_segmap get_pascal_labels get_cityscapes_labels CamVidSegmentation CityscapesSegmentation VOCSegmentation criterion_choose BCECrossEntropyLoss PyramidLoss AffinityLoss edges_from_label eightcorner_activation RMILoss map_get_pairs_region batch_cholesky_inverse batch_low_tri_inv log_det_by_cholesky batch_inv_test map_get_pairs log_det_by_cholesky_test mean_var_test _ASPPModule DeepLabv3 Decoder DeepLabv3Plus ASPP get_backbone_net PSPModule PSPNet conv1x1 ResNet resnet50 Bottleneck resnet152 conv3x3 resnet101 _resnet _sum_ft convert_model SynchronizedBatchNorm2d _unsqueeze_ft _SynchronizedBatchNorm SynchronizedBatchNorm1d SynchronizedBatchNorm3d BatchNorm2dReimpl SyncMaster FutureResult SlavePipe execute_replication_callbacks CallbackContext DataParallelWithCallback patch_replication_callback TorchTestCase SyncMaster FutureResult SlavePipe _batchnormtrain batchnormtrain _sum_square sum_square CallbackContext allreduce AllReduce DataParallelModel execute_replication_callbacks Reduce patch_replication_callback get_a_var parallel_apply BatchNorm3d SharedTensor _SyncBatchNorm BatchNorm1d BatchNorm2d download save_checkpoint mkdir check_sha1 CrossEntropyLoss SegmentationLosses Evaluator seg_model_get_optim_params init_weights __init_weights group_weight __group_weight get_model_file short_hash purge pretrained_model_list lr_scheduler visualize_image seed validation time format print Trainer ArgumentParser manual_seed add_parser_params int str batch_size accumulation_steps rmi_pool_size add_argument parse_known_args seg_model cuda backbone gpu_ids len vars join model_dir train_epochs save_hp_to_json close training start_epoch range proc_name setproctitle addPairwiseGaussian DenseCRF2D reshape transpose addPairwiseBilateral inference unary_from_softmax setUnaryEnergy load new shape zeros array range enumerate format print NUM_CLASSES DistributedSampler VOCSegmentation DataLoader CityscapesSegmentation CamVidSegmentation format print VOCSegmentation CamVidSegmentation CityscapesSegmentation append transpose decode_segmap from_numpy show copy imshow get_pascal_labels get_cityscapes_labels zeros range zeros astype get_pascal_labels enumerate print format pad size range append pad size range append append stack size range type_as clone conv2d stack append range cholesky batch_low_tri_inv cholesky clone range zeros_like logdet print randn transpose squeeze log_det_by_cholesky matmul batch_cholesky_inverse randn print transpose matmul inverse randn print matmul mean t sum load update get_model_file ResNet load_url load_state_dict state_dict eps num_features affine isinstance named_children momentum running_mean add_module DataParallel DataParallelWithCallback zip running_var module sync_module detach list hasattr __data_parallel_replicate__ modules enumerate len replicate items list isinstance map Tensor get join list isinstance _worker get_context start is_grad_enabled Queue append range len copyfile save makedirs get join isdir print dirname abspath expanduser makedirs sha1 makedirs __init_weights fill_ isinstance weight modules zero_ kaiming_normal_ isinstance bias modules append weight append dict __group_weight group_weight get join remove format print check_sha1 expanduser download exists makedirs join remove endswith expanduser listdir data make_grid decode_seg_map_sequence numpy add_image
# Region Mutual Information Loss for Semantic Segmentation ## Table of Contents <!--ts--> * [Introduction](#Introduction) * [Features and TODO](#Features-and-TODO) * [Installation](#Installation) * [Training](#Training) * [Evaluation and Inference](#Evaluation-and-Inference) * [Experiments](#Experiments) * [Citations](#Citations)
1,213
ZJULearning/SSG
['information retrieval']
['High Dimensional Similarity Search with Satellite System Graph: Efficiency, Scalability, and Unindexed Query Compatibility']
setup.py tests/test_python_query.py CMakeExtension CMakeBuild setup_args load_vecs add_argument ArgumentParser view astype float32 int32 splitext fromfile
SSG : Satellite System Graph For Approximate Nearest Neighbor Search ====== SSG is a graph-based approximate nearest neighbor search (ANNS) algorithm. It provides a flexible and efficient solution for the metric-free large-scale ANNS on dense real vectors. It implements the algorithm of our paper: [Satellite System Graph: Towards the Efficiency Up-Boundary of Graph-Based Approximate Nearest Neighbor Search](https://arxiv.org/abs/1907.06146) Benchmark datasets ------ | Data set | Download | dimension | nb base vectors | nb query vectors | original website | |-----------|--------------------------|-----------|-----------------|------------------|----------------------------------------------------------------| | SIFT1M |[original website](http://corpus-texmex.irisa.fr/)| 128 | 1,000,000 | 10,000 | [original website](http://corpus-texmex.irisa.fr/) | | GIST1M |[original website](http://corpus-texmex.irisa.fr/)| 128 | 1,000,000 | 1,000 | [original website](http://corpus-texmex.irisa.fr/) |
1,214
ZJULearning/pixel_link
['scene text detection', 'text classification', 'instance segmentation', 'semantic segmentation']
['PixelLink: Detecting Scene Text via Instance Segmentation']
tf_extended/bboxes.py datasets/icdar2015_to_tfrecords.py tf_extended/__init__.py preprocessing/tf_image.py test_pixel_link.py nets/vgg.py pixel_link.py preprocessing/preprocessing_factory.py datasets/synthtext_to_tfrecords.py tf_extended/math.py datasets/dataset_utils.py test_pixel_link_on_any_image.py nets/pixel_link_symbol.py visualize_detection_result.py train_pixel_link.py tf_extended/metrics.py preprocessing/ssd_vgg_preprocessing.py datasets/dataset_factory.py config.py _set_batch_size _set_train_with_ignored _set_seg_th init_config _set_image_shape print_config _set_weight_decay load_config decode_batch mask_to_bboxes is_valid_cord tf_decode_score_map_to_mask_in_batch rect_to_xys get_neighbours_fn cal_gt_for_single_image get_neighbours min_area_rect get_neighbours_4 get_neighbours_8 tf_cal_gt_for_single_image decode_image main config_initialization to_txt test main config_initialization test config_initialization create_clones create_dataset_batch_queue sum_gradients main train draw_bbox visualize DatasetConfig get_dataset image_to_tfexample convert_to_example int64_feature bytes_feature float_feature get_split cvt_to_tfrecords cvt_to_tfrecords SynthTextDataFetcher PixelLinkNet basenet get_preprocessing tf_image_unwhitened distorted_bounding_box_crop np_image_unwhitened tf_rotate_image tf_summary_image preprocess_for_train rotate_image preprocess_for_eval preprocess_image tf_image_whitened distort_color apply_with_random_selector _assert _Check3DImage bboxes_crop_or_pad fix_image_flip_shape random_flip_left_right rotate90 tf_rotate_point_by_90 _ImageDimensions random_rotate90 _is_tensor resize_image draw_bbox resize_image_bboxes_with_crop_or_pad np_bboxes_jaccard bboxes_matching bboxes_filter_overlap bboxes_jaccard bboxes_intersection bboxes_filter_by_shorter_side bboxes_resize safe_divide _create_local streaming_tp_fp_arrays precision_recall fmean _set_batch_size _set_seg_th _set_image_shape _set_weight_decay get_available_gpus len mkdir join_path do_print train_dir join_path get_dir copy info exists load_mod_from_path pixel_neighbour_type pixel_neighbour_type num_neighbours set_shape py_func score_map_shape background_label where ignore_label pixel_cls_border_weight_lambda draw_contours list pixel_cls_weight_method num_neighbours ones get_neighbours score_map_shape append bbox_border_width sum find_contours points_to_contours text_label asarray copy zip enumerate zeros as_list set_shape int32 py_func pixel_conf_threshold decode_image append link_conf_threshold range decode_image_by_join minAreaRect get_valid_y BoxPoints reshape get_valid_x int0 enumerate train_image_shape find_contours rect_to_xys min_area_rect min_height resize append min_area max range dataset_name checkpoint_path set_proc_name init_config set_verbosity DEBUG load_config shape mask_to_bboxes write_result_as_txt checkpoint_path get_dir moving_average_decay dataset_split_name Saver variables_to_restore str dataset_name get_filename join_path using_moving_average cmd dataset_dir ls ConfigProto print sort gpu_memory_fraction ExponentialMovingAverage get_variables_to_restore config_initialization test trainable_variables get_or_create_global_step batch_size get_dataset batch_size_per_gpu dataset_split_name print_config init_logger dataset_dir scalar train_dir append add_n zip trainable_variables gpus using_moving_average moving_average_decay with_dependencies apply apply_gradients sum_gradients get_update_op ExponentialMovingAverage info append scalar enumerate get_init_fn gpu_memory_fraction merge_all Saver ConfigProto create_dataset_batch_queue train create_clones draw_contours remove_all reshape points_to_contours split read_det_file imwrite read_image_file print join_path copy read_gt_file ls draw_bbox enumerate file_pattern print Example asarray TFRecordReader join_path TFExampleDecoder contains get_absolute_path ls print str list text_label read TFRecordWriter convert_to_example shuffle num_images ignore_label write shape SerializeToString fetch_record append SynthTextDataFetcher range constant constant cast int32 uint8 astype copy tf_image_unwhitened expand_dims image draw_bounding_boxes random_uniform set_shape py_func uint8 asarray transpose min rotate_xys uniform randint max rotate_about_center _is_tensor as_list shape unstack is_fully_defined any with_rank get_shape set_shape minimum tf_rotate_point_by_90 transpose maximum stack rectangle set_shape float32 py_func draw_contours black reshape transpose copy zip zeros sum max points_to_contours enumerate list
Code for the AAAI18 paper [PixelLink: Detecting Scene Text via Instance Segmentation](https://arxiv.org/abs/1801.01315), by Dan Deng, Haifeng Liu, Xuelong Li, and Deng Cai. Contributions to this repo are welcome, e.g., some other backbone networks (including the model definition and pretrained models). PLEASE CHECK EXSITING ISSUES BEFORE OPENNING YOUR OWN ONE. IF A SAME OR SIMILAR ISSUE HAD BEEN POSTED BEFORE, JUST REFER TO IT, AND DO NO OPEN A NEW ONE. # Installation ## Clone the repo ``` git clone --recursive [email protected]:ZJULearning/pixel_link.git ``` Denote the root directory path of pixel_link by `${pixel_link_root}`. Add the path of `${pixel_link_root}/pylib/src` to your `PYTHONPATH`:
1,215
ZM7/A-PGNN
['session based recommendations', 'machine translation']
['Personalized Graph Neural Networks with Attention Mechanism for Session-Aware Recommendation']
model_last.py transformer.py train_last.py record.py normalize decoder feedforward multihead_attention pos_encoding encoder to_float exp concat log expand_dims float range
# A-PGNN The code and dataset for our TKDE paper: Personalized Graph Neural Networks with Attention Mechanism for Session-Aware Recommendation (https://ieeexplore.ieee.org/abstract/document/9226110). We have implemented our methods in Tensorflow. Here are two datasets we used in our paper. * Xing http://2016.recsyschallenge.com/ * Reddit https://www.kaggle.com/colemaclean/subreddit-interactions The processed data can be downloaded: https://www.dropbox.com/sh/hwx2347ir1worag/AABJK6IBXHNBlbvrvKqw94YKa?dl=0 ## Usage ### Generate data You need to run the file ```record.py``` first to preprocess the data to generate the tf.record formart data for training and test. For example:
1,216
ZM7/Personalizing-Graph-Neural-Networks-for-Session-basedRecommendation
['session based recommendations', 'machine translation']
['Personalized Graph Neural Networks with Attention Mechanism for Session-Aware Recommendation']
model_last.py transformer.py train_last.py record.py normalize decoder feedforward multihead_attention pos_encoding encoder to_float exp concat log expand_dims float range
# A-PGNN The code and dataset for our TKDE paper: Personalized Graph Neural Networks with Attention Mechanism for Session-Aware Recommendation (https://ieeexplore.ieee.org/abstract/document/9226110). We have implemented our methods in Tensorflow. Here are two datasets we used in our paper. * Xing http://2016.recsyschallenge.com/ * Reddit https://www.kaggle.com/colemaclean/subreddit-interactions The processed data can be downloaded: https://www.dropbox.com/sh/hwx2347ir1worag/AABJK6IBXHNBlbvrvKqw94YKa?dl=0 ## Usage ### Generate data You need to run the file ```record.py``` first to preprocess the data to generate the tf.record formart data for training and test. For example:
1,217
ZackHodari/average_prosody
['speech synthesis']
['Using generative modelling to produce varied intonation for speech synthesis']
f0_RNN_scaled.py f0_MDN.py misc.py f0_VAE.py f0_RNN.py main F0_MDN main F0_RNN main F0_RNN_Scaled main _Encoder VAE batch_synth VAEExperimentBuilder GaussianMixtureModel get_experiment_args run_experiment ExperimentBuilder manual_seed VAEExperimentBuilder join save_wav exp format detach_batched_seqs savgol_filter synthesis enumerate makedirs
# average_prosody Code for paper titled "Using generative modelling to produce varied intonation for speech synthesis" submitted to the Speech Synthesis Workshop. Speech samples are available at [zackhodari.github.io/SSW_2019_average_prosody](http://zackhodari.github.io/SSW_2019_average_prosody.html). The models defined in this repo should be run using the [`Morgana`](https://github.com/ZackHodari/morgana) toolkit. # Data setup Extraction with [`tts_data_tools`](https://github.com/ZackHodari/tts_data_tools) currently requires wavfiles at the desired frame-rate (16kHz in the paper), and label files with time alignments (label_state_align). If you want to prepare your own data to use with [`Morgana`](https://github.com/ZackHodari/morgana) you will need a
1,218
Zelgunn/MANN_tf_keras
['one shot learning']
['One-shot Learning with Memory-Augmented Neural Networks']
datasets/omniglot/OmniglotGenerator.py training/omniglot_training.py layers/DeepLayer.py datasets/omniglot/OmniglotRawDataset.py layers/ExternalMemoryCell.py layers/utils.py main.py layers/MemoryAugmentedLayer.py training/train_utils.py OmniglotGenerator OmniglotRawDataset dirs_in flatten_list entries_in files_in LayerWeights DeepLayer ExternalMemoryCell MemoryAugmentedLayer top_k_mask interpolate bot_k_mask acc_at_10th acc_at_5th accuracy_at_n acc_at_1st train save_model_info save_model_json get_log_dir save_model_summary append join listdir condition_fn sparse_reorder ones reshape shape stack int64 top_k cast SparseTensor ones_like top_k_mask join MemoryAugmentedLayer initial_state OmniglotRawDataset print mann save_model_info TensorBoard OmniglotGenerator fit_generator Model get_log_dir Input compile constant transpose range reduce_mean cast zeros expand_dims argmax equal name join format name join format join format name plot_model save_model_json save_model_summary makedirs
### One-shot MANN using Tensorflow and Keras #### Original paper Santoro, Adam, et al. "[One-shot learning with memory-augmented neural networks.](https://arxiv.org/abs/1605.06065)" _arXiv preprint arXiv:1605.06065_ (2016).
1,219
Zernach/Fashion-MNIST
['data augmentation']
['DENSER: Deep Evolutionary Network Structured Representation']
utils/helper.py configs.py benchmark/convnet.py app.py benchmark/runner.py utils/argparser.py utils/mnist_reader.py visualization/project_zalando.py start_s3_sync get_json_logger touch touch_dir _get_logger main cnn_model_fn PredictJob JobWorker JobManager get_args_request parse_arg get_args_cli now_int upload_result_s3 get_sprite_image invert_grayscale create_sprite_image vector_to_matrix_mnist UploadS3Thread load_mnist UploadS3Thread start Event dirname makedirs makedirs setFormatter touch_dir DEBUG getLogger addHandler StreamHandler Formatter touch setLevel INFO FileHandler setFormatter getLogger addHandler Formatter touch setLevel INFO FileHandler dense max_pooling2d dropout one_hot minimize reshape GradientDescentOptimizer conv2d softmax_cross_entropy asarray evaluate print Estimator shuffle labels images numpy_input_fn train range read_data_sets int append items list defaultdict utcfromtimestamp info int isinstance ones sqrt ceil array range vector_to_matrix_mnist invert_grayscale join
# Fashion-MNIST [![GitHub stars](https://img.shields.io/github/stars/zalandoresearch/fashion-mnist.svg?style=flat&label=Star)](https://github.com/zalandoresearch/fashion-mnist/) [![Gitter](https://badges.gitter.im/zalandoresearch/fashion-mnist.svg)](https://gitter.im/fashion-mnist/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link) [![Readme-CN](https://img.shields.io/badge/README-中文-green.svg)](README.zh-CN.md) [![Readme-JA](https://img.shields.io/badge/README-日本語-green.svg)](README.ja.md) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Year-In-Review](https://img.shields.io/badge/%F0%9F%8E%82-Year%20in%20Review-orange.svg)](https://hanxiao.github.io/2018/09/28/Fashion-MNIST-Year-In-Review/) <details><summary>Table of Contents</summary><p> * [Why we made Fashion-MNIST](#why-we-made-fashion-mnist) * [Get the Data](#get-the-data)
1,220
ZerojumpLine/OverfittingUnderClassImbalance
['data augmentation', 'semantic segmentation']
['Overfitting of neural nets under class imbalance: Analysis and improvements for segmentation', 'Analyzing Overfitting under Class Imbalance in Neural Networks for Image Segmentation']
Unet/nnunet/dataset_conversion/BraTS_2019.py Unet/nnunet/training/network_training/nnUNet_variants/nnUNetTrainerCE.py Unet/nnunet/evaluation/metrics.py DeepMedic/deepmedic/neuralnet/cost_functions.py Unet/nnunet/training/data_augmentation/pyramid_augmentations.py DeepMedic/deepmedic/neuralnet/ops.py Unet/nnunet/__init__.py Unet/nnunet/evaluation/add_mean_dice_to_json.py Unet/nnunet/experiment_planning/common_utils.py DeepMedic/plotTrainingProgress.py Unet/nnunet/training/loss_functions/ND_Crossentropy.py Unet/nnunet/training/data_augmentation/custom_transforms.py DeepMedic/deepmedic/frontEnd/configParsing/config.py Unet/nnunet/dataset_conversion/AutomaticCardiacDetectionChallenge.py Unet/nnunet/evaluation/add_dummy_task_with_mean_over_all_tasks.py Unet/nnunet/paths.py DeepMedic/deepmedic/image/processing.py Unet/nnunet/experiment_planning/summarize_plans.py DeepMedic/deepmedic/frontEnd/session.py Unet/nnunet/utilities/tensor_utilities.py DeepMedic/deepmedic/frontEnd/configParsing/trainConfig.py Unet/nnunet/evaluation/model_selection/collect_all_fold0_results_and_summarize_in_one_csv.py DeepMedic/deepmedic/frontEnd/sessHelpers.py Unet/nnunet/training/data_augmentation/default_data_augmentation.py DeepMedic/deepmedic/frontEnd/configParsing/trainSessionParams.py Unet/nnunet/dataset_conversion/ISBI_MSLesionSegmentationChallenge.py DeepMedic/deepmedic/neuralnet/trainer.py Unet/nnunet/run/run_training.py DeepMedic/deepmedic/neuralnet/utils.py Unet/nnunet/training/network_training/network_trainer.py DeepMedic/deepmedic/neuralnet/layers.py Unet/nnunet/experiment_planning/DatasetAnalyzer.py DeepMedic/deepmedic/frontEnd/trainSession.py DeepMedic/deepmedic/neuralnet/wrappers.py Unet/nnunet/utilities/online_evaluation_metrics.py Unet/nnunet/training/loss_functions/dice_loss.py Unet/nnunet/experiment_planning/experiment_planner_baseline_2DUNet.py Unet/nnunet/training/loss_functions/advND_Crossentropy.py DeepMedic/deepmedic/neuralnet/pathways.py Unet/nnunet/experiment_planning/find_classes_in_slice.py DeepMedic/deepmedic/logging/utils.py Unet/nnunet/evaluation/evaluator.py Unet/nnunet/evaluation/collect_results_files.py DeepMedic/deepmedic/dataManagement/samplingType.py Unet/nnunet/preprocessing/cropping.py Unet/nnunet/inference/predict.py Unet/nnunet/dataset_conversion/KidneyTumorSegmentationChallenge.py DeepMedic/deepmedic/logging/accuracyMonitor.py Unet/nnunet/training/model_restore.py DeepMedic/deepmedic/frontEnd/configParsing/testConfig.py Unet/nnunet/utilities/nd_softmax.py DeepMedic/deepmedic/neuralnet/pathwayTypes.py Unet/setup.py DeepMedic/deepmedic/neuralnet/cnn3d.py DeepMedic/deepmedic/frontEnd/configParsing/testSessionParams.py DeepMedic/deepmedic/frontEnd/configParsing/modelParams.py DeepMedic/deepmedic/neuralnet/optimizers.py Unet/nnunet/preprocessing/preprocessing.py Unet/nnunet/inference/segmentation_export.py Unet/nnunet/training/dataloading/dataset_loading.py DeepMedic/deepmedic/frontEnd/configParsing/modelConfig.py DeepMedic/setup.py Unet/nnunet/training/loss_functions/mixND_Crossentropy.py Unet/nnunet/experiment_planning/experiment_planner_baseline_3DUNet.py Unet/nnunet/utilities/one_hot_encoding.py DeepMedic/deepmedic/frontEnd/testSession.py DeepMedic/deepmedic/routines/training.py Unet/nnunet/network_architecture/initialization.py Unet/nnunet/dataset_conversion/BeyondCranialVaultAbdominalOrganSegmentation.py Unet/nnunet/experiment_planning/configuration.py DeepMedic/deepmedic/image/io.py Unet/nnunet/network_architecture/neural_network.py Unet/nnunet/dataset_conversion/Promise2012.py DeepMedic/deepmedic/logging/loggers.py DeepMedic/deepmedic/routines/testing.py Unet/nnunet/inference/predict_simple.py Unet/nnunet/evaluation/model_selection/summarize_results_with_plans.py DeepMedic/deepmedic/dataManagement/sampling.py Unet/nnunet/training/network_training/nnUNetTrainerCascadeFullRes.py Unet/nnunet/evaluation/model_selection/ensemble.py Unet/nnunet/training/loss_functions/mND_Crossentropy.py Unet/nnunet/training/loss_functions/TopK_loss.py Unet/nnunet/training/cascade_stuff/predict_next_stage.py Unet/nnunet/evaluation/model_selection/figure_out_what_to_submit.py Unet/nnunet/run/default_configuration.py Unet/nnunet/network_architecture/generic_UNet.py Unet/nnunet/dataset_conversion/LiverTumorSegmentationChallenge.py DeepMedic/deepmedic/frontEnd/configParsing/utils.py Unet/nnunet/evaluation/model_selection/summarize_results_in_one_json.py Unet/nnunet/experiment_planning/plan_and_preprocess_task.py Unet/nnunet/inference/ensemble_predictions.py Unet/nnunet/training/network_training/nnUNetTrainer.py getNameOfLogFileWithoutEnding parseDetailedMetricsFromThisLog plotProgressBasic getIntFromStr parseVariablesOfTrainingSessionsFromListOfLogs getEpochsBetweenFullInf movingAverageConv optimizedParseMetricsFromLogs getListOfAccNumbersFromListOfStrNumbersAvoidingNotAppl getStringOfTheListThatForSureStartsInThisLineButMayEndInAnother getAListOfStringNumbersAfterSplittingThemFromAStringListWithStringNumbers parseLogFileAndGetVariablesOfInterest makeHelperVariablesPerExperiment getRegExprForParsingMetric setupArgParser getFloatFromStr getFirstLineInLogWithCertainPattern applyMovingAverageToAllButDscFullSeg plotProgressDetailed parseBasicMetricsFromThisLog movingAverage checkIfLineMatchesAnyRegExpr getSubepochsPerEpoch getNumberOfClasses makeLegendList read init_sampling_proc extractDataOfASegmentFromImagesUsingSampledSliceCoords extractDataOfSegmentsUsingSampledSliceCoords getSampledDataAndLabelsForSubepoch load_subj_and_get_samples getNumberOfSegmentsToExtractPerCategoryFromEachSubject check_gt_vs_num_classes getCoordsOfAllSegmentsOfAnImage load_imgs_of_subject shuffleSegmentsOfThisSubepoch getImagePartFromSubsampledImageForTraining get_random_subjects_to_train_subep sample_coords_of_segments SamplingType makeFoldersNeededForCreateModelSession createLogsFolder makeFoldersNeededForTrainingSession createFolderForPredictions createMainOutputFolder handle_exception_tf_restore createFolderForCnnModels createFolderForFeatures makeFoldersNeededForTestingSession createFolderForSegmAndProbMaps createFolderForSessionCnnModels createFolderForSessionResults Session TestSession TrainSession Config ModelConfig ModelParameters TestConfig TestSessionParameters TrainConfig TrainSessionParameters checkIfAllElementsOfAListAreFilesAndExitIfNot checkListContainsCorrectNumberOfCasesOtherwiseExitWithError parseAbsFileLinesInList parseFileLinesInList getAbsPathEvenIfRelativeIsGiven checkThatAllEntriesOfAListFollowNameConventions check_and_adjust_path_to_ckpt save4DImgWithAllFmsToNiiWithOriginalHdr loadVolume saveFmImgToNiiWithOriginalHdr savePredImgToNiiWithOriginalHdr saveImgToNiiWithOriginalHdr padCnnInputs getSuggestedStdForSubsampledImage calculateTheZeroIntensityOf3dImage reflectImageArrayIfNeeded unpadCnnOutputs AccuracyOfEpochMonitorSegmentation Logger strListFl5fNA strFlXfNA strFl5Dec strFl5fNA strListFl4fNA getMeanOfListExclNA datetimeNowAsStr strFlListXDec strFlList4Dec getMeanPerColOf2dListExclNA strFl4fNA strListFlXfNA strFlXDec strFl4Dec Cnn3d padImageWithMirroring get_normalized_vector x_entr focaloneside iou dsc Block SoftmaxLayer TargetLayer ConvLayer LowRankConvLayer applyPrelu pool3dMirrorPad applyRelu applySelu applyBn applySoftmaxToFmAndReturnProbYandPredY makeBiasParamsAndApplyToFms applyElu convolveWithGivenWeightMatrix createAndInitializeWeightsTensor applyDropout mirrorFinalBordersOfImage AdamOptimizer Optimizer RmsPropOptimizer SgdOptimizer FcPathway cropRczOf5DimArrayToMatchOther NormalPathway getMiddlePartOfFms Pathway upsampleRcz5DimArrayAndOptionalCrop SubsampledPathway makeResidualConnectionBetweenLayersAndReturnOutput repeatRcz5DimArrayByFactor PathwayTypes Trainer checkSubsampleFactorEven checkRecFieldVsSegmSize calcRecFieldFromKernDimListPerLayerWhenStrides1 calculateSubsampledImagePartDimensionsFromImagePartSizePatchSizeAndSubsampleFactor checkKernDimPerLayerCorrect3dAndNumLayers CnnWrapperForSampling PathwayWrapperForSampling inferenceWholeVolumes calculateDiceCoefficient printExplanationsAboutDice trainOrValidateForSubepoch get_normalized_vector do_training convert_to_submission copy_nifti_modify_labels convert_for_submission rename_files convert_to_nii_gz load_save_train load_save_test export_segmentations export_segmentations_postprocess load_save_train load_save_test export_segmentations export_segmentations_postprocess export_for_submission foreground_mean run_in_folder crawl_and_copy aggregate_scores_for_experiment evaluate_folder aggregate_scores Evaluator run_evaluation NiftiEvaluator negative_predictive_value ConfusionMatrix avg_surface_distance_symmetric hausdorff_distance precision total_positives_reference hausdorff_distance_95 false_positive_rate jaccard true_negative_rate total_negatives_test sensitivity false_negative_rate fscore total_negatives_reference assert_shape dice false_discovery_rate recall avg_surface_distance false_omission_rate accuracy specificity total_positives_test merge copy_nifti_and_convert_to_uint8 summarize write_plans_to_file list_to_string get_shape_must_be_divisible_by get_network_numpool get_pool_and_conv_props split_4d_nifti get_pool_and_conv_props_poolLateV2 pad_shape DatasetAnalyzer ExperimentPlanner2D ExperimentPlanner add_classes_in_slice_info plan_and_preprocess analyze_dataset get_caseIDs_from_splitted_dataset_folder split_4d create_lists_from_splitted_dataset_folder create_lists_from_splitted_dataset crop write_plans_to_file summarize_plans merge_files merge preprocess_multithreaded predict_cases predict_save_to_queue predict_from_folder save_segmentation_nifti_from_softmax StackedConvLayers Upsample ConvDropoutNormNonlin print_module_training_status Generic_UNet InitWeights_He InitWeights_XavierUniform NeuralNetwork SegmentationNetwork get_case_identifier_from_npz crop_to_bbox crop_to_nonzero get_case_identifier get_patient_identifiers_from_cropped_files ImageCropper load_case_from_list_of_files get_bbox_from_mask create_nonzero_mask resample_patient PreprocessorFor2D get_do_separate_z GenericPreprocessor get_lowres_axis resample_data_or_seg get_default_configuration get_configuration_from_output_folder get_output_folder load_model_and_checkpoint_files load_best_model_for_inference recursive_find_trainer restore_model predict_next_stage resample_and_save unpack_dataset get_case_identifiers_from_raw_folder DataLoader3D delete_npy DataLoader2D get_case_identifiers crop_2D_image_force_fg save_as_npz pack_dataset load_dataset convert_to_npy Convert3DTo2DTransform convert_2d_to_3d_generator MaskTransform ConvertSegmentationToRegionsTransform convert_3d_to_2d_generator Convert2DTo3DTransform RemoveKeyTransform get_default_augmentation get_patch_size MoveSegAsOneHotToData RemoveRandomConnectedComponentFromOneHotEncodingTransform ApplyRandomBinaryOperatorTransform advCrossentropyND mSoftDiceLoss get_tp_fp_fn SoftDiceLoss DC_and_CE_loss mget_tp_fp_fn DC_and_topk_loss mCE_loss mixCE_loss advCE_loss mixCrossentropyND mCrossentropyND CrossentropyND TopKLoss NetworkTrainer nnUNetTrainer nnUNetTrainerCascadeFullRes nnUNetTrainerCE softmax_helper to_one_hot hard_dice flip mean_tensor sum_tensor add_argument ArgumentParser basename splitext getFirstLineInLogWithCertainPattern getFirstLineInLogWithCertainPattern getFirstLineInLogWithCertainPattern getNameOfLogFileWithoutEnding getSubepochsPerEpoch getEpochsBetweenFullInf str parseLogFileAndGetVariablesOfInterest append range len append str range len append range len readline strip find lstrip rstrip strip split readline close open str append strip cumsum range len int list asarray ones min float range len movingAverageConv range len M match I range len readline getStringOfTheListThatForSureStartsInThisLineButMayEndInAnother getAListOfStringNumbersAfterSplittingThemFromAStringListWithStringNumbers close checkIfLineMatchesAnyRegExpr getRegExprForParsingMetric getListOfAccNumbersFromListOfStrNumbersAvoidingNotAppl append range open readline getStringOfTheListThatForSureStartsInThisLineButMayEndInAnother M len getAListOfStringNumbersAfterSplittingThemFromAStringListWithStringNumbers checkIfLineMatchesAnyRegExpr getRegExprForParsingMetric close getListOfAccNumbersFromListOfStrNumbersAvoidingNotAppl match I append range open parseDetailedMetricsFromThisLog parseBasicMetricsFromThisLog applyMovingAverageToAllButDscFullSeg range len subplots grid linspace tick_params show str legendHandles basename set_title set_xlabel set_window_title set_linewidth savefig legend range set_dpi plot set_xlim set_size_inches suptitle subplots_adjust set_ylabel set_ylim len subplots grid linspace tick_params show str legendHandles basename set_title set_xlabel set_window_title set_linewidth savefig legend range set_dpi plot set_xlim set_size_inches suptitle subplots_adjust set_ylabel set_ylim len cpu_count print3 shuffleSegmentsOfThisSubepoch Pool str getNumPathwaysThatRequireInput apply_async append range get getPercentOfSamplesPerCategoryToSample format asarray close join time min load_subj_and_get_samples getNumberOfSegmentsToExtractPerCategoryFromEachSubject get_random_subjects_to_train_subep len SIGINT signal SIG_IGN list min shuffle range len int choice zeros range len str extractDataOfASegmentFromImagesUsingSampledSliceCoords append logicDecidingAndGivingFinalSamplingMapsForEachCategory getNumPathwaysThatRequireInput reflectImageArrayIfNeeded shape getpid print3 load_imgs_of_subject randint getNumberOfCategoriesToSample range sample_coords_of_segments len str list dtype ones zeros astype reflectImageArrayIfNeeded loadVolume shape check_gt_vs_num_classes print3 append randint range len str list asarray size choice flatten shape getpid print3 floor unravel_index zeros sum range len int ones min calculateTheZeroIntensityOf3dImage shape ceil max range len list shuffle zip len pathways normal subsFactor ones copy append getImagePartFromSubsampledImageForTraining range len list ndarray isinstance min shape print3 append range len pathways append getImagePartFromSubsampledImageForTraining range len str getpid max print3 print mkdir print mkdir print mkdir print mkdir print mkdir print mkdir print createLogsFolder createFolderForPredictions createMainOutputFolder createFolderForFeatures createFolderForSegmAndProbMaps createFolderForSessionResults print mkdir print mkdir print createLogsFolder createFolderForPredictions createMainOutputFolder createFolderForCnnModels createFolderForFeatures createFolderForSegmAndProbMaps createFolderForSessionCnnModels createFolderForSessionResults print createLogsFolder createMainOutputFolder createFolderForCnnModels createFolderForSessionCnnModels format_exc print3 exit isdir print exit dirname isfile isabs print exit dirname len str rfind eval print3 input load expand_dims uncache get_data load set_zooms list affine str print set_data_dtype header Nifti1Image shape print3 abspath save uncache len str isdir print endswith print3 saveImgToNiiWithOriginalHdr str dtype print endswith float32 print3 saveImgToNiiWithOriginalHdr str dtype print endswith float32 print3 saveImgToNiiWithOriginalHdr mean asarray print exit maximum shape asarray str str str str range len append len range getMeanOfListExclNA replace str now int one_hot reshape reduce_prod shape cast log one_hot reduce_sum reduce_mean cast less reduce_mean one_hot reduce_sum where reduce_prod floor abs log ones transpose reduce_sum shape cast less one_hot softmax tile cond equal constant reshape float32 floor Variable reshape ones sqrt reduce_mean zeros tiny moments Variable zeros reshape maximum ones reshape Variable maximum abs elu elu normal sqrt asarray Variable transpose conv3d reshape transpose argmax softmax concat range transpose pool mirrorFinalBordersOfImage reshape tile print cropRczOf5DimArrayToMatchOther repeatRcz5DimArrayByFactor exit shape str concat exit getMiddlePartOfFms print3 zeros int ceil range append len range len print exit range len range len getMeanPerColOf2dListExclNA calculateDiceCoefficient print3 load_imgs_of_subject argmax max savePredImgToNiiWithOriginalHdr run str list dtype ndarray num_classes recFieldCnn extractDataOfSegmentsUsingSampledSliceCoords transpose get_main_feeds shape getNumberOfFeatureMaps NA_PATTERN strListFl4fNA getLayers range pathways update int16 format saveFmImgToNiiWithOriginalHdr save4DImgWithAllFmsToNiiWithOriginalHdr time isinstance min float32 get_main_ops repeat getCoordsOfAllSegmentsOfAnImage printExplanationsAboutDice zeros len sum print3 range get_normalized_vector rand print3 max run str updateMonitorAccuraciesWithNewSubepochEntries reportAccuracyForLastSubepoch get_main_feeds shape append range update updateMatricesOfBnMovingAvForInference numSubsPaths zeros int reshape get_main_ops beta randint inferenceWholeVolumes CnnWrapperForSampling ThreadPool print3 save run_updates_end_of_ep str num_classes apply_async getpid reportMeanAccyracyOfEpoch range get format eval datetimeNowAsStr time trainOrValidateForSubepoch getSampledDataAndLabelsForSubepoch AccuracyOfEpochMonitorSegmentation len maybe_mkdir_p join subfiles sort copy unique zeros_like CopyInformation WriteImage GetImageFromArray ReadImage GetArrayFromImage ReadImage remove WriteImage maybe_mkdir_p join int subfiles WriteImage ReadImage split subfiles join rename range str join subfiles WriteImage ReadImage argmax maybe_mkdir_p join str subfiles print CopyInformation astype WriteImage GetImageFromArray ReadImage GetArrayFromImage append label sum range join ReadImage WriteImage join ReadImage WriteImage maybe_mkdir_p join subfiles WriteImage ReadImage zip get pop list keys OrderedDict nanmean array subfiles foreground_mean join subfiles copy subdirs evaluate set_test construct_labels set_reference Pool evaluator str list map OrderedDict save_json append range set_labels close today mean zip float join items nanmean len load str list dump close map today mean OrderedDict open append float range enumerate subfiles aggregate_scores get_matrix ConfusionMatrix get_existence get_matrix ConfusionMatrix get_existence get_matrix ConfusionMatrix get_existence get_matrix ConfusionMatrix get_existence get_matrix ConfusionMatrix get_existence get_matrix ConfusionMatrix recall precision get_matrix ConfusionMatrix get_existence get_matrix ConfusionMatrix get_matrix ConfusionMatrix get_matrix ConfusionMatrix get_matrix ConfusionMatrix get_existence ConfusionMatrix get_existence ConfusionMatrix get_existence ConfusionMatrix get_existence ConfusionMatrix mean load_pickle save_segmentation_nifti_from_softmax uint8 CopyInformation astype WriteImage GetImageFromArray ReadImage maybe_mkdir_p list join print foreground_mean subfolders OrderedDict mean save_json startswith subdirs append keys range load_pickle list str sort write list_to_string keys join list GetSpacing reshape tuple SetSpacing GetDimension WriteImage copy GetImageFromArray ReadImage GetArrayFromImage SetOrigin GetOrigin SetDirection range enumerate deepcopy all get_shape_must_be_divisible_by pad_shape append max range get_network_numpool len deepcopy list get_shape_must_be_divisible_by min append range pad_shape len astype range len astype print tuple OrderedDict sum range join maybe_mkdir_p starmap list isdir sort close copy rmtree mkdir zip append Pool copytree join list append keys range len append subfiles get_caseIDs_from_splitted_dataset_folder subfiles unique join maybe_mkdir_p copy ImageCropper rmtree create_lists_from_splitted_dataset run_cropping join DatasetAnalyzer join maybe_mkdir_p list print ExperimentPlanner run_preprocessing subfiles close map copy array plan_experiment zip append ExperimentPlanner2D Pool print load_pickle range len mean load_pickle vstack save_segmentation_nifti_from_softmax maybe_mkdir_p join list close map unique zip append Pool len print astype preprocess_fn float32 put shape ReadImage GetArrayFromImage save to_one_hot resize_segmentation enumerate get Process list num_classes start Queue append range len vstack save Pool transpose append starmap_async preprocess_multithreaded get load_model_and_checkpoint_files mean splitext load maybe_mkdir_p join remove isinstance load_checkpoint_ram print empty_cache split maybe_mkdir_p join get_caseIDs_from_splitted_dataset_folder subfiles copy argmax save_pickle savez_compressed resample_data_or_seg shape range get SetSpacing astype copy WriteImage enumerate load deepcopy remove uint8 seg_postprogess_fn isinstance print min GetImageFromArray SetOrigin any get_do_separate_z get_lowres_axis zeros SetDirection print zeros binary_fill_holes range int min max where GetSpacing astype float32 OrderedDict GetDirection ReadImage vstack GetOrigin crop_to_bbox astype vstack append get_bbox_from_mask create_nonzero_mask range astype shape get_do_separate_z get_lowres_axis array resample_data_or_seg dtype resize_fn print astype OrderedDict shape stack any vstack map_coordinates unique append zeros float round array range enumerate startswith split join list load_pickle print keys recursive_find_trainer summarize_plans hasattr iter_modules import_module getattr load_pickle join print load_checkpoint process_plans tr recursive_find_trainer join join initialize isinstance update_fold print restore_model subfolders argmax savez_compressed resample_data_or_seg join maybe_mkdir_p list output_folder print patch_size keys append predict_preprocessed_data_return_softmax Pool starmap_async pardir unique save load savez_compressed join list subfiles close map zip Pool len join list subfiles close map zip Pool len get_case_identifiers remove get_case_identifiers sort join OrderedDict max min where choice shape any unique array range len shape reshape shape reshape isinstance min pi copy array vstack abs max MaskTransform DataChannelSelectionTransform max MirrorTransform Convert3DTo2DTransform GammaTransform NumpyToTensor MoveSegAsOneHotToData Convert2DTo3DTransform append get RenameTransform RemoveRandomConnectedComponentFromOneHotEncodingTransform Compose MultiThreadedAugmenter RemoveLabelTransform ApplyRandomBinaryOperatorTransform SegChannelSelectionTransform SpatialTransform tuple size shape stack sum_tensor range len tuple size reshape transpose shape stack sum_tensor range len exp size repeat zeros unique enumerate sum arange isinstance numpy append Tensor argmax range int sorted sum astype mean int sorted astype size dim arange
# Introduction We find neural network is prone to overfit the foreground samples because of class imbalance, especially in medical image segmentation. Empirically, we find that when training with limited data and strong class imbalance, at test time the distribution of logit activations may shift across the decision boundary, while samples of the well-represented class seem unaffected. In our study, we explore some asymmetric techiniques which are explicitly designed to counter logit shift of the under-represented classes. We find these techiques can improve segmentation by regularizing the logit distribution. The methods are summarized here: <br/> <div align=center><img src="figs/MethodOverview.png" width="700px"/></div> We implemented our proposed techiques with DeepMedic (Tensorflow) and a 3D U-Net (Pytorch), please find details in either subfolders. ## Acknowledgement This code based on the standardized baselines provided by [DeepMedic](https://github.com/deepmedic/deepmedic) and [nnUNet](https://github.com/MIC-DKFZ/nnUNet). ## Note - We test the fundamental functions of the code, but there maybe some issues taking considering that there are quite a few functions. Please let me know if you figure out something unexpected, thanks ([email protected]).
1,221
Zeyuan-Wang/AMI-Netv2
['medical diagnosis']
['AMI-Net+: A Novel Multi-Instance Neural Network for Medical Diagnosis from Incomplete and Imbalanced Data']
config.py load_data.py main.py utils.py model.py config bin_gen data_preparation bin_pad_convert test_step train_step Graph MultiHeadAttention MIL_gated_attention focal_loss columns replace bin_gen nan read_excel bin_pad_convert append array read_csv drop append array range len dict zeros max enumerate trainable_variables list gradient apply_gradients train_loss zip focal_loss test_loss model clip_by_value log
# AMI-Net+ This is the source code of our ICONIP 2019 submitted paper: "[AMI-Net+: A Novel Multi-Instance Neural Network for Medical Diagnosis from Incomplete and Imbalanced Data](https://arxiv.org/abs/1907.01734)". Please cite it if you use AMI-Net+ for your research. ## Introduction AMI-Net+ is the improvement of our previous work, AMI-Net, to further resolve the incomplete and imbalanced data. We change the cross-entropy to the focal loss and propose a self-adaptive pooling on the instance-level. The overall architecture shows here. Enjoy. <br/> <div align="middle"><img src="https://github.com/Zeyuan-Wang/AMI-Netv2/blob/master/img/AMI-Net+.png"width="70%"></div>
1,222
Zhang-Jack/adversarial_yolo2
['human detection']
['Fooling automated surveillance cameras: adversarial patches to attack person detection']
models/caffe_net.py debug.py tools/lmdb/create_dataset.py oude versies/craft_adv_draaien_scalen_plaatsen_werkt.py train_patch.py tools/lmdb/train_lmdb.py valid.py darknet.py detect.py oude versies/rotate2.py test_patch.py from_notebook.py region_loss.py train.py batch_rotate.py FocalLoss.py models/tiny_yolo.py dataset.py recall.py partial.py utils.py oude versies/rotate.py layers/batchnorm/bn.py oude versies/craft_adv_patch_plaatsen_werkt.py cfg.py patch_config.py tools/lmdb/lmdb_utils.py scripts/voc_label.py image.py batch_detect.py load_data.py tools/lmdb/plot_lmdb.py demo.py layers/batchnorm/bn_lib/__init__.py craft_adv.py eval.py median_pool.py scripts/voc_eval.py scripts/eval_widerface.py layers/batchnorm/build.py models/resnet.py PatchApplier PatchTransformer InriaDataset load_fc save_fc save_conv_bn load_conv parse_cfg save_conv print_cfg load_conv_bn get_max_probability read_and_size_image calc_nps transform_patch total_variation apply_patch get_printability_array EmptyModule MaxPoolStride1 Darknet Reorg GlobalAvgPool2d listDataset extract demo detect_cv2 detect detect_skimage test FocalLoss distort_image random_distort_image load_data_detection scale_image_channel data_augmentation fill_truth_detection rand_scale NPSCalculator PatchTransformer TotalVariation MaxProbExtractor InriaDataset PatchApplier MedianPool2d partial Experiment3LowRes ReproducePaperObj Experiment4ClassOnly BaseConfig Experiment1 Experiment2HighRes Experiment1Desktop eval_list RegionLoss build_targets train adjust_learning_rate test main PatchTrainer scale_bboxes logging do_detect read_truths get_image_size read_truths_args plot_boxes nms convert2cpu bbox_ious load_class_names file_lines convert2cpu_long softmax image2torch plot_boxes_cv2 read_data_cfg sigmoid bbox_iou get_region_boxes valid BN2dFunc BN2d_slow BN2d _import_symbols Scale Concat CaffeNet Eltwise parse_prototxt ResNet Bottleneck conv3x3 Resnet101 BasicBlock TinyYoloNet get_max_probability read_and_size_image calc_nps transform_patch total_variation apply_patch get_printability_array get_max_probability read_and_size_image calc_nps total_variation apply_patch get_printability_array transform_patch th_affine2d th_iterproduct th_bilinear_interp2d getRotationMatrix eval_widerface save_boxes parse_rec voc_eval _do_python_eval voc_ap convert_annotation convert createDataset writeCache checkImageIsValid lmdbDataset lmdb_nsamples train adjust_learning_rate test readline rstrip strip close dict open append split print int append split copy_ from_numpy reshape numel tofile is_cuda copy_ from_numpy reshape numel tofile is_cuda copy_ from_numpy numel tofile view print size contiguous sigmoid shape unsqueeze max list asarray float32 append full sqrt sum prod abs sum numel view size convert from_buffer contiguous ByteTensor div resize tobytes grid_sample FloatTensor ones abs size rand ConstantPad2d mypad pi affine_grid sqrt uniform sin ceil zeros round max int size ConstantPad2d mypad sqrt transform_patch data convert2cpu load_class_names VideoCapture read print exit plot_boxes_cv2 do_detect waitKey Darknet imshow load_weights resize print_network cuda load_class_names time print convert do_detect Darknet load_weights resize print_network plot_boxes cuda load_class_names time COLOR_BGR2RGB print plot_boxes_cv2 do_detect Darknet load_weights resize print_network imread cuda range cvtColor load_class_names time print plot_boxes_cv2 do_detect Darknet load_weights resize print_network imread cuda range data nms num_classes view logging Variable get_region_boxes num_anchors anchors size eval bbox_iou truths_length cuda range enumerate len list point tuple merge split mode list point tuple convert mode split merge randint uniform uniform distort_image rand_scale int FLIP_LEFT_RIGHT height random_distort_image resize transpose width randint float crop getsize loadtxt reshape min zeros max range height replace convert width data_augmentation fill_truth_detection print Darknet save_weights load_weights print_network max height rstrip replace resize print do_detect Darknet read_truths_args eval load_weights bbox_iou width plot_boxes cuda range len int bbox_ious fill_ ones size log t pow repeat zero_ bbox_iou zeros max range len param_groups range len logging model zero_grad listDataset DataLoader adjust_learning_rate save_weights dataset cuda region_loss seen module size enumerate time backward print zeros step len module print train PatchTrainer patch_configs sum exp max min max min max sort append zeros range len data max time exp view LongTensor print convert2cpu size contiguous convert2cpu_long sigmoid index_select unsqueeze append cuda range len int imwrite FloatTensor print putText FONT_HERSHEY_SIMPLEX rectangle get_color round range len height Draw get_color FloatTensor print text rectangle save width range len getsize size loadtxt reshape append range read_truths append rstrip height view contiguous from_buffer ByteTensor div width tobytes Image div unsqueeze forward cuda nms view exit width height ByteTensor eval tobytes time isinstance print Variable contiguous from_buffer dict strip split deepcopy range len read close open print data get_image_size listDataset Darknet DataLoader cuda open nms num_classes range load_class_names num_anchors anchors size close eval load_weights mkdir enumerate Variable print write read_data_cfg print_network get_region_boxes len append dir getattr _wrap_function readline line_type strip dict split parse_layer_block append open data print shape print item print shape show squeeze shape interpolate to_pil_image mul view print clamp size stride gather add floor tensor long print pi FloatTensor bmm th_bilinear_interp2d print th_nearest_interp2d size transpose contiguous unsqueeze repeat expand_as float th_iterproduct basename height write close width open round len load_class_names join int basename height save_boxes resize print convert do_detect Darknet load_weights mkdir width plot_boxes round cuda walk int parse findall text append find arange concatenate size maximum sum max range parse_rec cumsum argmax max sum range eps format astype mkdir float enumerate minimum join print sort maximum voc_ap argsort zeros bool array len join format print mean mkdir voc_eval enumerate int str parse join text convert write index getroot iter open find imdecode fromstring IMREAD_COLOR join str rstrip replace print len writeCache range open open logging write lmdbDataset max
# Adversarial YOLO This repository is based on the marvis YOLOv2 inplementation: https://github.com/marvis/pytorch-yolo2 This work corresponds to the following paper: https://arxiv.org/abs/1904.08653: ``` @inproceedings{thysvanranst2019, title={Fooling automated surveillance cameras: adversarial patches to attack person detection}, author={Thys, Simen and Van Ranst, Wiebe and Goedem\'e, Toon}, booktitle={CVPRW: Workshop on The Bright and Dark Sides of Computer Vision: Challenges and Opportunities for Privacy and Security}, year={2019} }
1,223
ZhaoJ9014/shallower-wider-ResNet-Model-A-SW-ResNet-A
['semantic segmentation']
['Wider or Deeper: Revisiting the ResNet Model for Visual Recognition']
models.py sw_resnet_a Input
# shallower wider ResNet Model A (SW ResNet-A) - A Keras implementation of shallower &amp; wider ResNet Model A: SW-ResNet-A (https://arxiv.org/pdf/1611.10080.pdf).
1,224
Zhiwei-Z/pba_experiment
['data augmentation', 'image augmentation']
['Population Based Augmentation: Efficient Learning of Augmentation Policy Schedules']
autoaugment/wrn.py autoaugment/shake_shake.py autoaugment/shake_drop.py autoaugment/helper_utils.py pba/train.py pba/resnet.py pba/search.py autoaugment/data_utils.py pba/setup.py pba/wrn.py pba/data_utils.py pba/utils.py autoaugment/custom_ops.py pba/augmentation_transforms.py pba/policies.py pba/model.py autoaugment/policies.py pba/helper_utils.py autoaugment/train_cifar.py autoaugment/augmentation_transforms.py pba/augmentation_transforms_hp.py cutout_numpy _translate_y_impl random_flip create_cutout_mask _cutout_pil_impl TransformFunction _rotate_impl _shear_x_impl float_parameter _posterize_impl zero_pad_and_crop apply_policy _enhancer_impl _translate_x_impl _solarize_impl pil_wrap _crop_impl TransformT _shear_y_impl int_parameter pil_unwrap zero_pad global_avg_pool batch_norm stride_arr fc variable conv2d avg_pool unpickle DataSet run_epoch_training setup_loss cosine_lr eval_child_model decay_weights get_lr good_policies bottleneck_layer build_shake_drop_model round_int shortcut calc_prob _shake_shake_layer _shake_shake_block _shake_shake_skip_connection _shake_shake_branch build_shake_shake_model CifarModel setup_arg_scopes build_model CifarModelTrainer main _res_add residual_block build_wrn_model cutout_numpy _translate_y_impl random_flip create_cutout_mask _cutout_pil_impl TransformFunction _rotate_impl _shear_x_impl float_parameter _posterize_impl zero_pad_and_crop apply_policy _enhancer_impl _translate_x_impl _solarize_impl pil_wrap _crop_impl TransformT _shear_y_impl pil_unwrap int_parameter TransformT apply_policy parse_policy shuffle_data DataSet get_lr step_lr run_epoch_training eval_child_model setup_arg_scopes Model ModelTrainer build_model good_policies_svhn _building_block_v2 build_resnet_model _building_block_v1 batch_norm _bottleneck_block_v2 _bottleneck_block_v1 conv2d_fixed_padding fixed_padding block_layer main create_parser create_hparams main RayModel parse_log parse_log_schedule build_wrn_model zeros randint ones randint zeros create_cutout_mask reshape where pil_wrap pil_transformer xform_fn int_parameter int_parameter float_parameter float_parameter int_parameter int_parameter crop resize int_parameter load create_cutout_mask range int_parameter get_variable pad reshape load format close Open info softmax softmax_cross_entropy append trainable_variables l2_loss int format batch_size val_labels val_images eval_op info run test_images range test_labels len float int batch_size train_size cosine_lr lr num_epochs load int global_step format hparams batch_size train_size accuracy info next_batch get_lr range run pad int avg_pool int bottleneck_layer global_avg_pool batch_norm round_int relu fc conv2d calc_prob range int batch_norm stride_arr concat conv2d avg_pool stop_gradient conv2d batch_norm relu list _shake_shake_skip_connection add_n zip enumerate range shake_shake_widen_factor int global_avg_pool batch_norm relu fc conv2d append arg_scope setup_arg_scopes add_hparam HParams run_model CifarModelTrainer avg_pool zero_pad _res_add prod range format print shuffle copy choice append NUM_HP_TRANSFORM HP_TRANSFORM_NAMES enumerate seed arange shuffle len predictions log_first_n WARN step_lr pad fixed_padding conv2d_fixed_padding batch_norm projection_shortcut relu conv2d_fixed_padding projection_shortcut batch_norm relu conv2d_fixed_padding batch_norm projection_shortcut relu conv2d_fixed_padding projection_shortcut batch_norm relu block_fn range dense num_filters max_pooling2d batch_norm relu squeeze identity reduce_mean block_layer enumerate resnet_size create_parser restore list PopulationBasedTraining run_experiments init create_hparams values str add_argument ArgumentParser info parse_args flatten hp_policy_epochs use_hp_policy weight_decay_rate append range format set_hparam no_aug lr info add_hparam num_epochs data_path randint HParams epochs hp_policy split isinstance readlines loads append range len int format parse_log debug info append range len
# Population Based Augmentation (PBA) <b><i>New: Visualize PBA and applied augmentations with the notebook `pba.ipynb`!</b></i> <b><i>Now with Python 3 support.</b></i> ### Table of Contents 1. [Introduction](#introduction) 2. [Getting Started](#getting-started) 3. [Reproduce Results](#reproduce-results) 4. [Run PBA Search](#run-pba-search) 5. [Citation](#citation) ### Introduction
1,225
ZiangYan/subspace-attack.pytorch
['adversarial attack']
['Subspace Attack: Exploiting Promising Subspaces for Query-Efficient Black-box Attacks']
models/cifar/gdas/lib/nas/SE_Module.py models/cifar/gdas/lib/nas/head_utils.py models/cifar/vgg.py models/cifar/gdas/lib/nas_rnn/__init__.py models/cifar/gdas/lib/datasets/LanguageDataset.py models/cifar/wrn.py models/cifar/gdas/lib/datasets/test_NLP.py models/cifar/gdas/lib/nas/CifarNet.py models/imagenet/senet.py models/cifar/gdas/lib/nas_rnn/model_search.py models/cifar/gdas/lib/utils/model_utils.py models/cifar/gdas/lib/utils/__init__.py models/cifar/gdas/lib/scheduler/__init__.py models/imagenet/utils.py models/cifar/utils.py models/cifar/gdas/__init__.py models/cifar/gdas/lib/nas/operations.py models/cifar/gdas/lib/utils/save_meta.py models/cifar/gdas/lib/nas_rnn/genotypes.py models/cifar/gdas/lib/utils/evaluation_utils.py models/__init__.py models/cifar/gdas/lib/nas/genotypes.py models/cifar/gdas/lib/utils/gpu_manager.py models/cifar/gdas/lib/datasets/get_dataset_with_transform.py models/cifar/gdas/lib/utils/utils.py models/cifar/pyramidnet.py models/cifar/gdas/lib/datasets/MetaBatchSampler.py models/cifar/gdas/lib/nas/model_search.py models/cifar/gdas/lib/datasets/__init__.py models/imagenet/resnet.py models/imagenet/pnasnet.py models/imagenet/vgg.py models/imagenet/torchvision_models.py models/cifar/gdas/lib/nas/construct_utils.py models/cifar/gdas/lib/scheduler/utils.py models/cifar/gdas/lib/datasets/TieredImageNet.py models/cifar/gdas/lib/scheduler/scheduler.py models/cifar/gdas/lib/nas/ImageNet.py loaders.py models/imagenet/__init__.py models/cifar/gdas/lib/nas_rnn/basemodel.py models/cifar/gdas/lib/utils/draw_pts.py attack.py models/cifar/alexnet.py models/cifar/gdas/lib/datasets/test_dataset.py models/cifar/gdas/lib/utils/flop_benchmark.py models/cifar/gdas/lib/nas/__init__.py models/cifar/__init__.py models/cifar/gdas/lib/nas_rnn/utils.py cw_loss l2_proj_step StandardModel norm gd_prior_step eg_prior_step l2_image_step momentum_prior_step linf_proj_step set_log_file print_args get_random_dir_name linf_image_step main parse_args xent_loss CIFAR10IDDataset make_loader ImageNetIDDataset make_model load_weight_from_pth_checkpoint alexnet_bn AlexNet alexnet Bottleneck conv3x3 pyramidnet272 PyramidNet calc_prob DropoutConv2d vgg19 VGG vgg16_bn vgg19_bn vgg11_bn make_layers vgg11 vgg13 vgg13_bn vgg16 wrn BasicBlock NetworkBlock WideResNet gdas get_datasets Dictionary BatchSentLoader Corpus SentCorpus MetaBatchSampler decompress TieredImageNet AuxiliaryHeadCIFAR NetworkCIFAR Transition random_select Cell drop_path all_select return_alphas_str CifarHEAD ImageNetHEAD NetworkImageNet AuxiliaryHeadImageNet Cell MixedOp Network Zero FactorizedReduce SepConv Conv717 ReLUConvBN Identity DilConv SqEx RNNModel DARTSCell none_func DARTSCellSearch RNNModelSearch repackage_hidden get_batch embedded_dropout LockedDropout mask2d batchify MultiStepLR obtain_scheduler load_config convert_param draw_points obtain_accuracy add_batch_counter_hook_function add_flops_counting_methods add_flops_counter_hook_function conv_flops_counter_hook fc_flops_counter_hook compute_average_flops_cost pool_flops_counter_hook batch_counter_hook print_FLOPs add_flops_counter_variable_or_reset GPUManager Cutout count_parameters_in_MB tensor2np Save_Meta time_file_str RecorderMeter time_string AverageMeter convert_secs2time print_log test_imagenet_data ReluConvBn pnasnet5large PNASNet5Large MaxPool Cell SeparableConv2d BranchSeparables CellStem0 CellBase FactorizedReduction 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 vgg19 inceptionv3 load_pretrained resnet34 vgg11_bn resnet152 squeezenet1_1 vgg11 modify_alexnet modify_densenets vgg16 densenet161 modify_squeezenets vgg19_bn resnet101 resnet18 vgg13_bn resnet50 vgg16_bn vgg13 modify_vggs densenet169 densenet201 modify_resnets update_state_dict alexnet densenet121 squeezenet1_0 DropoutConv2d vgg19 VGG vgg16_bn vgg19_bn vgg11_bn make_layers vgg11 vgg13 vgg13_bn vgg16 add_argument exit print_help ArgumentParser view exp clamp eg_clip float sort eq long calc_ref_grad epsilon prior_lr num_class arange zeros_like batch_size model ref_arch_train_data proj_step loss_func ref_arch_epoch save arch dataset argmax fix_direction_seed seed str get_state exp view norm_type argmin image_lr OrderedDict eq image_step dirname ref_arch_drop_gamma to sum range detach format astype randn_like ascontiguousarray max_query ref_arch mean upsampler eval set_state ref_arch_init_drop fd_eta prior_update info item softmax float prior_step phase make_loader enumerate num_image join norm int clamp makedirs clone dict exp_dir exploration cpu zeros ref_arch_max_drop loss len fileno dup2 Popen sorted format __getattribute__ keys info max len join strftime ascii_lowercase digits ascii_uppercase DataLoader CIFAR10IDDataset ImageNetIDDataset items list format replace dict load_state_dict info join format gdas vgg16_bn wrn alexnet_bn eval pyramidnet272 vgg19_bn load_weight_from_pth_checkpoint vgg11_bn vgg13_bn AlexNet AlexNet DropoutConv2d make_layers VGG make_layers VGG make_layers VGG make_layers VGG make_layers VGG make_layers VGG make_layers VGG make_layers VGG WideResNet load join auxiliary layers Network load_config dirname load_state_dict init_channels model_config join Compose ImageFolder Normalize CIFAR10 CIFAR100 zeros imdecode savez enumerate append randint range size new_zeros mul_ div_ bernoulli_ format hasattr softmax alphas_reduce alphas_normal Tensor isinstance size narrow contiguous min clone len embedding max_norm sparse padding_idx norm_type scale_grad_by_freq requires_grad_ expand_as weight rand floor MultiStepLR CosineAnnealingLR epochs int str bool isinstance append float str list join namedtuple Arguments close keys format print rainbow tolist close scatter savefig figure linspace zip append legend len topk size t eq mul_ expand_as append sum max deepcopy format model add_flops_counting_methods print_log eval compute_average_flops_cost empty_cache cuda add_batch_counter_hook_function apply __batch_counter__ modules kernel_size size size kernel_size size out_channels groups in_channels register_forward_hook register_forward_hook Linear isinstance Conv2d Module isinstance cpu ndarray is_cuda isinstance print format write flush gmtime format time strftime gmtime format time strftime int print split range len PNASNet5Large in_features load_url load_state_dict Linear 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 list group match keys compile load_url update_state_dict load_state_dict features MethodType modify_alexnet load_pretrained classifier MethodType modify_densenets load_pretrained load_pretrained modify_densenets load_pretrained modify_densenets modify_densenets load_pretrained fc MethodType inception_v3 load_pretrained fc MethodType modify_resnets load_pretrained modify_resnets load_pretrained modify_resnets load_pretrained modify_resnets load_pretrained modify_resnets load_pretrained MethodType load_pretrained modify_squeezenets modify_squeezenets load_pretrained features MethodType modify_vggs load_pretrained load_pretrained modify_vggs modify_vggs load_pretrained modify_vggs load_pretrained modify_vggs load_pretrained modify_vggs load_pretrained modify_vggs load_pretrained modify_vggs load_pretrained load_url load_state_dict load_url load_state_dict load_url load_state_dict load_url load_state_dict load_url load_state_dict load_url load_state_dict load_url load_state_dict load_url load_state_dict
# subspace-attack.pytorch Code for our NeurIPS 2019 paper [Subspace Attack: Exploiting Promising Subspaces for Query-Efficient Black-box Attacks](https://papers.nips.cc/paper/8638-subspace-attack-exploiting-promising-subspaces-for-query-efficient-black-box-attacks). Our paper is also available on [arxiv](https://arxiv.org/pdf/1906.04392.pdf). ## Environments * Python 3.5 * PyTorch 1.1.0 * torchvision 0.2.2 * glog 0.3.1 ## Datasets and Reference Models We use CIFAR-10 and ImageNet in our experiment, and these two datasets should be prepared into the following structure:
1,226
ZiningZhu/feng-hirst-rst-parser
['discourse segmentation']
['Two-pass Discourse Segmentation with Pairing and Global Features']
src/test_feng.py src/imdb_script.py src/trees/lexicalized_tree.py src/classifiers/crf_classifier.py tools/crfsuite/crfsuite-0.12/swig/python/setup.py src/utils/serialize.py src/utils/treebank_parser.py tools/crfsuite/crfsuite-0.12/example/chunking.py src/document/dependency.py src/document/constituent.py tools/crfsuite/crfsuite-0.12/example/ner.py src/utils/utils.py tools/crfsuite/crfsuite-0.12/example/pos.py src/parsers/base_parser.py src/paths.py src/logs/log_writer.py src/features/tree_feature_writer.py src/imdb_preprocess.py src/sanity_check.py src/parser_wrapper.py src/document/token.py src/utils/cue_phrases.py tools/crfsuite/crfsuite-0.12/swig/python/crfsuite.py src/features/segmenter_feature_writer.py src/prep/preprocesser.py src/utils/rst_lib.py src/parse.py src/document/base_representation.py src/parsers/multi_sentential_parser.py src/prep/prep_utils.py src/segmenters/crf_segmenter.py src/parsers/intra_sentential_parser.py src/utils/RST_Classes.py src/utils/yappsrt.py tools/crfsuite/crfsuite-0.12/example/crfutils.py tools/crfsuite/crfsuite-0.12/swig/python/sample_train.py src/document/sentence.py tools/crfsuite/crfsuite-0.12/example/template.py src/treebuilder/build_tree_CRF.py src/prep/syntax_parser.py tools/crfsuite/crfsuite-0.12/swig/python/sample_tag.py src/utils/Stanford_Deps.py src/document/doc.py src/trees/parse_tree.py replace_br preprocess_imdb add_space_after_sentence parse_imdb main DiscourseParser parse_args get_parser_stdout main get_output_filepath ParserException check_CRFSuite check_ssplit check_syntax_parser test_feng_fail parse_file test_feng_short test_feng_long CRFClassifier BaseRepresentation Constituent Dependency Document Sentence Token SegmenterFeatureWriter CRFTreeFeatureWriter LogWriter BaseParser IntraSententialParser MultiSententialParser Preprocesser create_lexicalized_tree get_parsed_trees_from_string replace_words SyntaxParser CRFSegmenter CRFTreeBuilder LexicalizedTree ParseTree loadData saveData parse Treebank TreebankScanner print_error scan wrap_error_reporter __repr__ Parser Scanner SyntaxError token NoMoreTokens feature_extractor readiter to_crfsuite apply_templates escape main output_features get_shape get_all_other observation contains_digit get_4d get_capperiod disjunctive contains_symbol get_2d contains_alpha feature_extractor contains_upper degenerate contains_lower b get_dand get_da get_type feature_extractor _swig_repr swig_import_helper _swig_setattr_nondynamic _swig_getattr StringList Attribute Tagger Trainer SwigPyIterator version _swig_setattr Item ItemSequence instances instances Trainer get_librarydir get_rootdir get_includedir join time format print add_space_after_sentence replace_br listdir makedirs sub startswith split append range len join remove format time replace flush communicate print write close split listdir exists Popen open join parse logging print unload strip readlines write LOGS_PATH filelist output_dir append DiscourseParser exists enumerate open add_option OptionParser exit print_help read close open basename stdout feng_main remove get_output_filepath exit __repr__ isfile parse_args communicate print extend split Popen enumerate unload SyntaxParser parse_sentence enumerate join print unload CRFSUITE_PATH CRFClassifier classify split parse_file parse_file join map compile escape append fromstring strip lexicalize copy join dump close open load join close open Treebank TreebankScanner scan pos join group patterns match input append len pos print rfind repr msg find max count append apply_templates append join range len strip split append range len isinstance write escape range len isinstance escape Attribute append Item ItemSequence stdin model Tagger to_crfsuite add_option separator range readiter OptionParser tag output_features feature_extractor split len islower isdigit isupper discard len set islower range isupper isalpha isdigit isdigit isalnum get_capperiod get_shape get_2d islower get_all_other isupper isdigit contains_digit lower degenerate b get_dand get_da contains_upper get_4d contains_symbol contains_alpha contains_lower get_type append range observation disjunctive range len find_module load_module get get __repr__ delete_SwigPyIterator delete_Item delete_ItemSequence delete_StringList Attribute_value_get _swig_property Attribute_value_set delete_Attribute Attribute_attr_get Attribute_attr_set delete_Trainer delete_Tagger rfind float strip ItemSequence Attribute append Item split StringList
## DEVELOPERS * Original author: [Vanessa Wei Feng](mailto:[email protected]), Department of Computer Science, University of Toronto, Canada * [Arne Neumann](mailto:[email protected]) updated it to use nltk 3.4 on [this github repo](https://github.com/arne-cl/feng-hirst-rst-parser), and created a Dockerfile. * [Zining Zhu](mailto:[email protected]) updated the scripts to use Python 3. ## TODO - [ ] update Dockerfile to use Python 3. ## REFERENCES * Vanessa Wei Feng and Graeme Hirst, 2014. Two-pass Discourse Segmentation with Pairing and Global Features. arXiv:1407.8215v1. http://arxiv.org/abs/1407.8215 * Vanessa Wei Feng and Graeme Hirst, 2014. A Linear-Time Bottom-Up Discourse Parser with Constraints and Post-Editing. In Proceedings of the 52th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies (ACL-2014), Baltimore, USA. http://aclweb.org/anthology/P14-1048 ## GENERAL INFOMRATION
1,227
ZitengWang/nn_mask
['speech recognition']
['Rank-1 Constrained Multichannel Wiener Filter for Speech Recognition in Noisy Environments']
nn_models.py fgnt/chainer_extensions/links/sequence_lstms.py fgnt/chainer_extensions/sequenze_batch_normalization.py fgnt/utils.py fgnt/chainer_extensions/sequence_lstm.py fgnt/mask_estimation.py fgnt/chainer_extensions/mse.py train.py fgnt/beamforming_orig.py beamform.py nn_models_sa.py fgnt/chainer_extensions/weight_init.py fgnt/chainer_extensions/links/sequence_linear.py fgnt/chainer_extensions/links/sequence_batch_norm.py extention/beamforming.py train_sa.py chime_data.py fgnt/signal_processing.py extention/beamform.py fgnt/chainer_extensions/sequence_linear.py fgnt/chainer_extensions/binary_cross_entropy.py fgnt/beamforming.py gen_flist_simu prepare_training_data get_audio_data_2ch get_audio_data_with_context gen_part_flist_real get_audio_data_after_corr_check get_audio_data gen_flist_real get_audio_data_with_context_2ch gen_part_flist_simu SimpleFWMaskEstimator BLSTMMaskEstimator MaskEstimator SimpleFWMaskEstimator BLSTMMaskEstimator MaskEstimator _create_batch _create_batch apply_beamforming_vector gev_wrapper_on_masks get_pca_vector get_power_spectral_density_matrix get_gev_vector get_mvdr_vector blind_analytic_normalization simple_ideal_soft_mask estimate_IBM _voiced_unvoiced_split_characteristic quantile_mask _samples_to_stft_frames _stft_frames_to_samples stft audioread _biorthogonal_window_loopy audiowrite istft mkdir_p segment_axis Timer BinaryCrossEntropy binary_cross_entropy mean_squared_error MeanSquaredError sequence_linear_function SequenceLinearFunction _as_mat _sigmoid sequence_lstm_function _extract_gates _grad_sigmoid SequenceLSTMFunction _grad_tanh _make_initial_state sequence_batch_normalization_function SequenceBatchNormalizationFunction normal uniform eye orthogonal SequenceBatchNorm SequenceLinear SequenceLSTM SequenceBLSTM join list format lower append append list list format concatenate astype float32 append exists pop list concatenate astype float32 append randint len list format concatenate astype float32 append max exists list concatenate astype float32 append max list remove concatenate astype float32 append max range gen_flist_simu list join transpose tqdm real get_audio_data append abs estimate_IBM Variable to_gpu gpu ones maximum shape sum einsum conj reshape shape eigh argmax array solve swapaxes expand_dims einsum conj shape empty range eigh dot shape sqrt zeros abs range conj apply_beamforming_vector T get_power_spectral_density_matrix get_gev_vector blind_analytic_normalization clip int arange ones cos pi concatenate cumsum squeeze min len real conjugate sum max range split cumsum min sum conj logical_and logical_or _voiced_unvoiced_split_characteristic conjugate power ones zeros kron range len load _samples_to_stft_frames _stft_frames_to_samples window ndim segment_axis shape pad ascii_lowercase argmax window len pad _biorthogonal_window_loopy zeros range enumerate int16 format print min astype copy wav_write start float sum max clip list copy shape empty swapaxes ravel makedirs reshape data get_array_module Variable _make_initial_state minimum normal svd permutation zeros range sqrt sum
# Neural network based beamformers fork from https://github.com/fgnt/nn-gev personal use only extentions: beamformers used to generated the results in Rank-1 Constrained Multichannel Wiener Filter for Speech Recognition in Noisy Environments
1,228
Zymrael/PAC-Adasampling
['generalization bounds']
['A PAC-Bayesian Analysis of Randomized Learning with Application to Stochastic Gradient Descent']
data_utils/__init__.py data_utils/dataloader.py preprocessCWRU CWRU readFromFolder append listdir loadmat concat floor DataFrame cuda ones squeeze len TensorDataset append readFromFolder range format sample full empty int index zeros array drop
# PAC-Adasampling An implementation of the algorithm proposed in 'A PAC-Bayesian Analysis of Randomized Learning with Application to Stochastic Gradient Descent', Ben London (NIPS 2017) A faster way for your neural nets to converge. Based on a PAC-Bayesian analysis of generalization bounds. ![algo](resources/algo1.png) From the paper at (https://arxiv.org/abs/1709.06617) ## Dataset The tests are performed on the Case Western Reserve University (CWRU) fault classification dataset. Slightly more challenging than MNIST: [link](https://csegroups.case.edu/bearingdatacenter/pages/welcome-case-western-reserve-university-bearing-data-center-website)
1,229
Zymrael/wattnet-fx-trading
['time series']
['WATTNet: Learning to Trade FX via Hierarchical Spatio-Temporal Representation of Highly Multivariate Time Series']
torchNDF/models/data/pandas_utils.py torchNDF/models/data/datahandler.py torchNDF/models/wattnet.py torchNDF/models/data/torch_utils.py torchNDF/data/datahandler.py torchNDF/models/mlp.py torchNDF/data/torch_utils.py setup.py torchNDF/metrics.py scripts/dtcc_records_collector.py torchNDF/utils.py torchNDF/script_utils.py scripts/spot_rates_collector.py torchNDF/data/pandas_utils.py torchNDF/vis.py torchNDF/models/modules.py torchNDF/models/recurrent_wrapper.py scripts/features.py main parse_run get_args_parser process_chunk OandaRunner cross_entropy_accuracy positive_return_accuracy weighted_cross_entropy_accuracy returns_and_activity ensemble_single_model_returns BaselinePerfContainer remove_dissemination_id_changes augment_with_pluses split_timestamp to_int amounts_to_ndf_rate augment_with_delta masked_temperature_softmax one_hot seq_normalization expert_risk_aware_loss risk_penalty scaled_cross_entropy probabilistic_expert_guided_loss expert_guided_loss plot_cumsum_explained_variance plot_activity plot_explaining_currency plot_trade_mode_embeddings FXDataHandler spotrate_lookup augment_with_technical_indicators mu_law_encode augment_with_spot_rate augment_with_arima_features as_dateindex_filled n_step_returns arima_forecasts ensemble_predictions RegularFinancialData Hook MLP GatedBlock AttentionBlock RecurrentWrapper WATTNet FXDataHandler spotrate_lookup augment_with_technical_indicators mu_law_encode augment_with_spot_rate augment_with_arima_features as_dateindex_filled n_step_returns arima_forecasts ensemble_predictions RegularFinancialData Hook NDF_CATEGORY_COLUMNS_DTCC NDF_BOOL_COLUMNS_DTCC drop split_timestamp to_int rename fillna remove_dissemination_id_changes augment_with_pluses augment_with_spot_rate augment_with_delta amounts_to_ndf_rate isin debug NDF_DATE_COLUMNS_DTCC astype info NDF_CURRENCIES_DTCC to_datetime NDF_CONT_COLUMNS_DTCC NDF_TIMESTAMP_COLUMNS_DTCC len sum basicConfig format NDF_COLUMNS_DTCC COLUMNS_SPOT merge_from_folder to_datetime process_chunk index Formatter round mkdir Path info to_pickle read_csv add_argument ArgumentParser main parse_args get_args_parser mean max to sum max apply_ range len int sum max arange std positive_return_accuracy numel choice nonzero return_list item append to BaselinePerfContainer array enumerate len model seq_normalization iter append to next max enumerate int iterrows print drop append len replace astype fillna apply to_datetime apply unsqueeze data size new_ones range sum argmax max abs type_as sign sum argmax max argmax masked_temperature_softmax transpose sample sum max reshape size min unsqueeze append zeros range cat plot cumsum xlabel ylabel explained_variance_ratio_ subplot concatenate xlabel ylabel scatter savefig figure legend range subplot list arange matshow set_yticklabels set_yticks set_xlabel colorbar title scatter savefig figure numpy range len subplot pcolor plot index colorbar title numpy scatter figure item tick_params xticks abs range yticks month argmin day abs array spotrate_lookup iterrows Series index any item append date drop int16 min astype sign log1p abs max join ffill columns DataFrame drop append timedelta iterrows int list ARIMA concatenate len append range fit columns values arima_forecasts mean std model min cpu to max cat mode
# wattnet-fx-trading WATTNet: Learning to Trade FX with Hierarchical Spatio-Temporal Representations of Highly Multivariate Time Series: [paper](https://arxiv.org/abs/1909.10801), [article](https://medium.com/neuri-ai/wattnet-learning-to-trade-fx-with-hierarchical-spatio-temporal-representations-of-highly-bbd0f02c812f) <p align="center"> <img src="fig/WATTNet.JPG" width="550" height="400"> </p> > Finance is a particularly challenging application area for deep learning models due to low noise-to-signal ratio, non-stationarity, and partial observability. Non-deliverable-forwards (NDF), a derivatives contract used in foreign exchange (FX) trading, presents additional difficulty in the form of long-term planning required for an effective selection of start and end date of the contract. In this work, we focus on tackling the problem of NDF tenor selection by leveraging high-dimensional sequential data consisting of spot rates, technical indicators and expert tenor patterns. To this end, we construct a dataset from the Depository Trust & Clearing Corporation (DTCC) NDF data that includes a comprehensive list of NDF volumes and daily spot rates for 64 FX pairs. We introduce WaveATTentionNet (WATTNet), a novel temporal convolution (TCN) model for spatio-temporal modeling of highly multivariate time series, and validate it across NDF markets with varying degrees of dissimilarity between the training and test periods in terms of volatility and general market regimes. The proposed method achieves a significant positive return on investment (ROI) in all NDF markets under analysis, outperforming recurrent and classical baselines by a wide margin. Finally, we propose two orthogonal interpretability approaches to verify noise stability and detect the driving factors of the learned tenor selection strategy. ## Installation ``` pip install git+https://github.com/Zymrael/wattnet-fx-trading ``` ## Code availability
1,230
a-jahani/semiDepth
['depth estimation', 'monocular depth estimation']
['Semi-Supervised Monocular Depth Estimation with Left-Right Consistency Using Deep Neural Network']
utils/evaluate_kitti_depth.py monodepth_dataloader.py average_gradients.py utils/evaluation_utils.py utils/evaluate_make3D.py utils/evaluate_kitti.py monodepth_main.py unflow.py monodepth_simple.py bilinear_sampler.py monodepth_model.py average_gradients bilinear_sampler_1d_h string_length_tf MonodepthDataloader save_official count_text_lines train test post_process_disparity main visualize_colormap save_visualized_results MonodepthModel post_process_disparity main test_simple ternary_loss create_mask charbonnier_loss visualize_colormap filter_prediction_to_652 visualize_colormap visualize_colormap sub2ind lin_interp convert_disps_to_depths_kitti read_depth_data read_calib_file generate_depth_map compute_errors read_file_data load_gt_depth_make3D read_text_lines read_ground_truth_depth load_gt_disp_kitti load_velodyne_points get_focal_length_baseline concat reduce_mean zip append expand_dims uint8 applyColorMap astype amin amax checkpoint_path imwrite print zfill resize visualize_colormap makedirs shape linspace meshgrid fliplr clip readlines close open checkpoint_path save_official filenames_file Saver MonodepthDataloader save dataset save_visualized Session run restore squeeze log_directory strftime MonodepthModel shape dirname imread save_visualized_results range start_queue_runners format latest_checkpoint right_image_batch post_process_disparity ConfigProto zeros local_variables_initializer join print count_text_lines makedirs data_path Coordinator output_directory model_name split global_variables_initializer left_image_batch mode test train monodepth_parameters Saver save resize Session run restore COLOR_BGR2RGB squeeze placeholder MonodepthModel image_path shape dirname imread imsave start_queue_runners format astype stack ConfigProto local_variables_initializer join print float32 Coordinator global_variables_initializer cvtColor test_simple print zeros range len reciprocal maximum mean sqrt abs log astype float32 zfill append imread range join sorted glob print append range len shape resize append range len readlines close open astype float32 open print format append isfile format print int32 isfile append split reshape T arange LinearNDInterpolator reshape meshgrid set reshape read_calib_file int T sub2ind lin_interp read_calib_file reshape hstack min dot shape vstack round eye zeros load_velodyne_points
a-jahani/semiDepth
1,231
a-wozniakowski/scikit-physlearn
['few shot learning', 'multi target regression']
['Boosting on the shoulders of giants in quantum device calibration']
tests/test_catboost.py tests/test_xgboost.py examples/paper_results/learning_curve.py examples/paper_results/boost_wout_prior_knowledge_xgboost.py physlearn/supervised/utils/_estimator_checks.py tests/test_lightgbm.py physlearn/datasets/google/model_persistence/_paper_params.py examples/basics/model_search.py physlearn/datasets/google/utils/_helper_functions.py examples/paper_results/main_body.py tests/test_baseboost.py physlearn/supervised/utils/_data_checks.py physlearn/supervised/interpretation/__init__.py physlearn/supervised/model_selection/learning_curve.py physlearn/loss.py physlearn/datasets/__init__.py examples/paper_results/boost_wout_prior_knowledge.py examples/paper_results/summary_plot.py physlearn/pipeline.py physlearn/__init__.py physlearn/supervised/interface.py physlearn/supervised/model_selection/cv_comparison.py examples/paper_results/improved_main_body.py examples/basics/introduction.py physlearn/datasets/google/base.py examples/paper_results/supplementary.py examples/paper_results/benchmark.py physlearn/supervised/interpretation/interpret_regressor.py docs/source/conf.py physlearn/supervised/model_selection/__init__.py physlearn/datasets/google/_google.py physlearn/base.py physlearn/supervised/utils/_search.py examples/basics/multi_target.py tests/test_basic.py physlearn/supervised/utils/__init__.py physlearn/supervised/utils/_definition.py physlearn/supervised/regression.py examples/basics/pipeline_transform.py setup.py tests/test_mlxtend.py physlearn/supervised/__init__.py physlearn/datasets/google/__init__.py AbstractEstimatorDictionaryInterface AdditionalRegressorMixin QuantileLossFunction HuberLossFunction LeastAbsoluteError _difference LeastSquaresError make_pipeline ModifiedPipeline AbstractDataFrame BaseDataFrame load_benchmark GoogleDataFrame GoogleData supplementary_params additional_paper_params paper_params xgb_paper_params _path_to_google_data _json_dump _shuffle _train_test_split _json_load _iqr_outlier_mask _path_to_google_json_folder RegressorDictionaryInterface Regressor BaseRegressor ShapInterpret plot_cv_comparison plot_learning_curve LearningCurve _n_features _n_targets _check_X _validate_data _check_X_y _n_samples _check_y _check_stacking_layer _check_estimator_choice _check_search_method _preprocess_hyperparams _basic_autocorrect _check_bayesoptcv_param_type _check_line_search_options _search_method _bayesoptcv TestBaseBoost TestBasic TestCatBoost TestLightGBM TestMlxtend TestXGBoost subtract hasattr isinstance values pop isinstance PowerTransformer MultiOutputRegressor RegressorChain append StandardScaler QuantileTransformer isoformat format read_json train_test_split quantile replace replace show subplot list plot print xlabel ylabel mean title bar savefig figure legend std range arange grid around max yticks show ylabel title savefig legend _modified_learning_curve plot LearningCurve mean xlabel min repeat figure fill_between std dropna _check_X type_of_target _check_y _check_X_y _check_X _check_y distance inf warn _basic_autocorrect _check_estimator_choice items list items list int list items list items match maximize BayesianOptimization RandomizedSearchCV GridSearchCV _bayesoptcv
# Scikit-physlearn [![SOTA](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/boosting-on-the-shoulders-of-giants-in/multi-target-regression-on-google-5-qubit)](https://paperswithcode.com/sota/multi-target-regression-on-google-5-qubit?p=boosting-on-the-shoulders-of-giants-in) [![Documentation Status](https://readthedocs.org/projects/scikit-physlearn/badge/?version=latest)](https://scikit-physlearn.readthedocs.io/en/latest/?badge=latest) [![PyPI](https://badge.fury.io/py/scikit-physlearn.svg)](https://badge.fury.io/py/scikit-physlearn) [Documentation](https://scikit-physlearn.readthedocs.org) | [Base boosting](https://iopscience.iop.org/article/10.1088/2632-2153/ac1ee9) **Scikit-physlearn** amalgamates [Scikit-learn](https://scikit-learn.org/), [LightGBM](https://lightgbm.readthedocs.org), [XGBoost](https://xgboost.readthedocs.org),
1,232
a554b554/kWTA-Activation
['adversarial defense']
['Enhancing Adversarial Defense by k-Winners-Take-All']
config/CIFAR/cifar_job_gen.py kWTA/attack.py kWTA/mnist_model.py kWTA/resnet_new.py kWTA/training.py kWTA/vgg.py kWTA/attack_foolbox.py kWTA/resnetP.py kWTA/wideresnet.py kWTA/models.py kWTA/othernets.py kWTA/resnet.py kWTA/densenet.py kWTA/activation.py config/SVHN/svhn_job_gen.py kWTA/utilities.py config/mnist/mnist_job_gen.py spwidereg spnet1 regularnet sp_adv spwideresnet reg_adv CNN spCNN spDNN DNN sp_adv spnet1 regadv compute_networkmask activation_pattern_cross activation_counts kNN get_mask_size dist_stats2 append_activation_list compute_networkmask_adv compute_mask cross_diff_test dist_stats1 register_layers pgd_l2_untargeted pgd_linf_untargeted2 pgd_linf_untargeted_maxce pgd_linf_targ3 one_pixel_attack pgd_linf_targ2 pgd_linf_targ gen_least_likely_labels pgd_linf_untargeted_mostlikely pgd_linf_targ4 one_pixel_perturb one_pixel_evolve pgd_linf_untargeted gen_rand_labels norms deepfool fgsm_linf_untargeted epoch_foolbox isnotebook DenseNet201 DenseNet161 DenseNet121 Transition DenseNet SparseDenseNet201 SparseDenseNet169 SparseBottleneck Bottleneck SparseDenseNet121 DenseNet169 SparseDenseNet SparseDenseNet161 SparseTransition SparseMNIST_CNN_BN PartialMNIST_CNN SparseDNN SparseMNIST_CNN DNN MNIST_CNN Flatten Sparsify1D_kactive SparsifyBase Sparsify1D Sparsify2D_invabs Sparsify2D_abs Sparsify2D_kactive breakReLU Flatten SmallCNN Sparsify2D_vol Sparsify2D breakReLU LeNet VGG AlexNet SparseAlexNet SparseSmall_CNN DNN SparseVGG Small_CNN Flatten SparseLeNet SparseResNet18 ResNet ResNet18 SparseBottleneck Bottleneck SparseResNet SparseResNet_ImageNet ResNet34 ResNet101 SparseResNet34 ResNet50 SparseResNet101 SparseBasicBlock SparseResNet152 SparseResNet152_ImageNet BasicBlock SparseResNet50 ResNet152 SparseResNetP SparseBottleneckP SparseBasicBlockP getSparseResNet_basic SparseBottleneck SparseResNet getSparseResNet_bottle SparseBasicBlock validate register_layer epoch_func epoch_imagenet_adversarial epoch_ALP squared_l2_norm epoch_imagenet epoch_trade trades_loss epoch_transfer_attack epoch_distill_func epoch epoch_adversarial get_activation epoch_distill AverageMeter l2_norm isnotebook accuracy epoch_free_adversarial activation_counts gen_rand_labels pgd_linf feature_diff count_feature_stats draw_loss append_activation_list visualize_prediction_trajectory compare_imgs show_batch_img register_layers feature_diff_stats perturb_network isnotebook accuracy showimg fgsm adversarial_network showallimg vgg19 VGG vgg16_bn vgg19_bn vgg11_bn make_layers vgg11 vgg13 vgg13_bn vgg16 WideResNet NetworkBlock SparseBasicBlock BasicBlock SparseNetworkBlock SparseWideResNet append format dumps enumerate append format dumps append format dumps append format dumps enumerate append format dumps append format dumps enumerate append int format dumps int format dumps linspace append append format array dumps append format array dumps append format dumps enumerate enumerate record_activation update zeros_like model act tqdm append to sum enumerate isinstance SparsifyBase modules append enumerate view act cat view act model model print get_mask_size dataset copy_ item zeros to compute_mask enumerate cat len model print get_mask_size dataset copy_ attack item zeros to compute_mask enumerate cat len topk norm print to range int norm model print get_mask_size append compute_mask range enumerate int norm model print get_mask_size attack append compute_mask range enumerate norm item append zeros to compute_mask range activation_pattern_cross FloatTensor clamp attack item device cpu rand_like range append randint randint_like range len model backward zeros_like model zeros_like backward model min zero_ max range detach data zeros_like backward model clamp zero_ rand_like range data zeros_like model backward clamp zero_ sum rand_like range data zeros_like backward model clamp zero_ rand_like range data zeros_like model backward log_softmax clamp softmax zero_ rand_like range detach data zeros_like isinstance model backward clamp zero_ gen_rand_labels sum rand_like range gen_least_likely_labels data zeros_like isinstance model backward clamp zero_ gen_rand_labels sum rand_like range gen_least_likely_labels data zeros_like isinstance model backward clamp zero_ gen_rand_labels sum rand_like range gen_least_likely_labels data zeros_like isinstance model backward clamp zero_ gen_rand_labels range rand_like CrossEntropyLoss gen_least_likely_labels norm inf zeros_like model backward clamp clone flatten requires_grad_ eval zero_ item abs range size __name__ update norm tqdm attack append sum max update model backward zero_grad tqdm eval train step update topk model backward zero_grad tqdm t eval to step update topk model tqdm t attack to update criterion model backward zero_grad tqdm to step update model backward log_softmax zero_grad tqdm softmax to step detach update model backward log_softmax zero_grad tqdm softmax to step detach update tqdm eval attack to detach update zeros_like model backward clamp zero_grad tqdm sign zero_ train step range update model backward zero_grad tqdm eval attack train step update model backward zero_grad tqdm eval attack train step register_forward_hook get_activation topk size t eq mul_ expand_as append sum max data update time format criterion model print size AverageMeter accuracy eval item to enumerate len view KLDivLoss model zero_grad sign max criterion_kl range cross_entropy detach log_softmax requires_grad_ eval softmax Variable clamp min l2_norm train len backward zero_grad trades_loss train step enumerate imshow transpose numpy make_grid figure showimg detach make_grid figure showimg permute detach make_grid figure showimg zeros range detach seed zeros_like randn print tensor view cpu astype float32 reshape sign shape linspace meshgrid grad_at_delta to numpy zeros backward zeros_like model data zeros_like backward model clamp zero_ rand_like range print item print data rand_like modules plot model clamp numpy array attack iter figure append linspace to next rand_like range deepcopy backward zero_grad SGD gen_rand_labels parameters numpy item append to step array range adv_model Conv2d
# Resisting Adversarial Attacks by k-Winners-Take-All This is the code for the paper "[Enhancing Adversarial Defense by *k*-Winners-Take-All](https://arxiv.org/abs/1905.10510)" by [Chang Xiao](http://chang.engineer), [Peilin Zhong](http://www.cs.columbia.edu/~peilin/) and [Changxi Zheng](http://www.cs.columbia.edu/~cxz/index.htm) (Columbia University). ## Requirements * pytorch (1.0.0) * torchvision (0.2.1) * foolbox (1.9.0) * numpy * matplotlib * tqdm ## k-Winners-Take-All (*k*-WTA): A New Activation Function for Resisting Adversarial Attack
1,233
aAbdz/CylShapeDecomposition
['semantic segmentation']
['Cylindrical Shape Decomposition for 3D Segmentation of Tubular Objects']
CSD/skeleton3D.py CSD/unit_tangent_vector.py CSD/polar_interpolation.py CSD/shape_decomposition.py CSD/plane_rotation.py CSD/coord_conv.py CSD/polar_parametrization.py CSD/hausdorff_distance.py CSD/skeleton_decomposition.py pol2cart cart2pol hausdorff_distance angle unit_normal_vector rotation_matrix_3D rotate_vector polar_interpolation polar_parametrization tangent_planes_to_zone_of_interest maximal_inner_sphere object_analysis corresponding_skel test_boundary_parametrization detect_main_obj interpolated_super_tube curve_interp filling_cross_sections obj_ends_conditions mean_curve find_junction_in_skeleton boundary_parametrization object_decomposition zone_of_interest junction_correction crop_image skeleton discrete_shortest_path get_line_length organize_skeleton euler_shortest_path Euler_path pointmin cyclic_graph skeleton_main_branch detect_fully_connected_graph breadth_first_search fully_connected_tree pair_dec_nodes form_graph rearrange_graph update_graphs tangent_vector_sum path_to_leaf detect_junction_coordinates detect_next_node branch_endpoints_inx detect_decomposing_nodes end_points_cross_distance unique skeleton_info order_branch skeleton_parametrization unit_tangent_vector sqrt pi arctan2 cos pi sin max astype dot array cos sin cross array_equal sqrt dot array max dot sqrt arccos list T f interp1d cart2pol flip pol2cart append array range T delete cart2pol pol2cart append range diff rotation_matrix_3D zeros_like roll hausdorff_distance true_divide abs max regionprops rotate_vector count_nonzero angle squeeze unit_tangent_vector array_equal shape unit_normal_vector pad sum astype boundary_parametrization unique label interpolating_func int T rgi reshape mean_curve centroid array len polar_parametrization cart2pol append min max array maximal_inner_sphere argmin min mean sqrt array linspace sum max len argmin min append abs max len int ones_like tuple argmin astype min mean sqrt distance travel_time sum range crop_image len append int astype int astype unique T mod shape any unravel_index zeros argmax array range append subplots polar_parametrization plot set_xlim polar_interpolation true_divide sum set_ylim linspace append sum range len list f interp1d shape linspace append expand_dims empty range len int T rotation_matrix_3D zeros_like angle len astype unit_tangent_vector array_equal shape unit_normal_vector ravel array range rotate_vector reshape hstack contains_points Path append array int tangent_planes_to_zone_of_interest polar_parametrization ones interpolated_super_tube astype polar_interpolation zone_of_interest append array skeleton_main_branch zeros detect_main_obj filling_cross_sections copy coords shape object_decomposition append label array junction_correction regionprops T inf all argmin where shape append array ones shape array zeros max range min Euler_path append sum array pointmin T squeeze astype shape zeros sum array sum sorted asarray reshape argmin get_line_length repeat any append zeros max range len append ones print min astype get_line_length organize_skeleton distance shape travel_time unravel_index euler_shortest_path argmax array filled update path_to_leaf list skeleton_info skeleton_parametrization set add detect_decomposing_nodes rearrange_graph update_graphs append pair_dec_nodes form_graph argmax array range len append add pop add set order_branch append empty update set keys set detect_next_node list append set list tangent_vector_sum arccos pi add dot set order_branch append clip append array set append get_line_length empty append expand_dims sum len inf detect_fully_connected_graph shape end_points_cross_distance range T inf min where set fully_connected_tree append empty update breadth_first_search append popleft append add len set sum flip append norm gradient repeat expand_dims sum expand_dims sum gradient repeat
# Cylindrical Shape Decomposition We develop the cylindrical shape decomposition (CSD) algorithm to decompose an object, a union of several tubular structures, into its semantic components. We decompose the object using its curve skeleton and translational sweeps. CSD partitions the object curve skeleton into maximal-length sub-skeletons over an orientation cost, each sub-skeleton corresponds to a semantic component. To find the intersection of the tubular components, CSD translationally sweeps the object in decomposition intervals to identify critical points at which the object's shape changes substantially. CSD cuts the object at critical points and assigns the same label to parts along the same sub-skeleton, thereby constructing a semantic component. CSD further reconstructs the semantic components between parts using generalized cylinders. If you use any part of the cylindrical shape decomposition algorithm in your research, please cite: Abdollahzadeh, A., Sierra, A. & Tohka, J. Cylindrical Shape Decomposition for 3D Segmentation of Tubular Objects. IEEE Access 9, 23979–23995 (2021). The outline of the CSD algorithm: <img src="figs/outline.png" width="750" height="150" /> If you had the "RuntimeError: Negative discriminant in time marcher quadratic" error in the skeletonization, you may install an older version of skfmm, e.g., 0.0.8. ## Installation The CSD algorithm requires no installation. To install the necessary dependencies, run: ```python
1,234
aAbdz/DeepACSON
['semantic segmentation']
['Cylindrical Shape Decomposition for 3D Segmentation of Tubular Objects']
CSD/skeleton3D.py train.py CSD/unit_tangent_vector.py CSD/polar_interpolation.py CSD/shape_decomposition.py CSD/plane_rotation.py CSD/coord_conv.py inference.py models/model.py CSD/polar_parametrization.py CSD/hausdorff_distance.py CSD/skeleton_decomposition.py create_model pol2cart cart2pol hausdorff_distance angle unit_normal_vector rotation_matrix_3D rotate_vector polar_interpolation polar_parametrization tangent_planes_to_zone_of_interest maximal_inner_sphere object_analysis corresponding_skel test_boundary_parametrization detect_main_obj interpolated_super_tube curve_interp filling_cross_sections obj_ends_conditions mean_curve find_junction_in_skeleton boundary_parametrization object_decomposition zone_of_interest junction_correction crop_image skeleton discrete_shortest_path get_line_length organize_skeleton euler_shortest_path Euler_path pointmin cyclic_graph skeleton_main_branch detect_fully_connected_graph breadth_first_search fully_connected_tree pair_dec_nodes form_graph rearrange_graph update_graphs tangent_vector_sum path_to_leaf detect_junction_coordinates detect_next_node branch_endpoints_inx detect_decomposing_nodes end_points_cross_distance unique skeleton_info order_branch skeleton_parametrization unit_tangent_vector resBlock up down UNet3D basicBlock Softmax MultinoulliNLL AggregateLoss Input_like Errors getmodel Conv designate_nodes Input sqrt pi arctan2 cos pi sin max astype dot array cos sin cross array_equal sqrt dot array max dot sqrt arccos list T f interp1d cart2pol flip pol2cart append array range T delete cart2pol pol2cart append range diff rotation_matrix_3D zeros_like roll hausdorff_distance true_divide abs max regionprops rotate_vector count_nonzero angle squeeze unit_tangent_vector array_equal shape unit_normal_vector pad sum astype boundary_parametrization unique label interpolating_func int T rgi reshape mean_curve centroid array len polar_parametrization cart2pol append min max array maximal_inner_sphere argmin min mean sqrt array linspace sum max len argmin min append abs max len int ones_like tuple argmin astype min mean sqrt distance travel_time sum range crop_image len append int astype int astype unique T mod shape any unravel_index zeros argmax array range append subplots polar_parametrization plot set_xlim polar_interpolation true_divide sum set_ylim linspace append sum range len list f interp1d shape linspace append expand_dims empty range len int T rotation_matrix_3D zeros_like angle len astype unit_tangent_vector array_equal shape unit_normal_vector ravel array range rotate_vector reshape hstack contains_points Path append array int tangent_planes_to_zone_of_interest polar_parametrization ones interpolated_super_tube astype polar_interpolation zone_of_interest append array skeleton_main_branch zeros detect_main_obj filling_cross_sections copy coords shape object_decomposition append label array junction_correction regionprops T inf all argmin where shape append array ones shape array zeros max range min Euler_path append sum array pointmin T squeeze astype shape zeros sum array sum sorted asarray reshape argmin get_line_length repeat any append zeros max range len append ones print min astype get_line_length organize_skeleton distance shape travel_time unravel_index euler_shortest_path argmax array filled update path_to_leaf list skeleton_info skeleton_parametrization set add detect_decomposing_nodes rearrange_graph update_graphs append pair_dec_nodes form_graph argmax array range len append add pop add set order_branch append empty update set keys set detect_next_node list append set list tangent_vector_sum arccos pi add dot set order_branch append clip append array set append get_line_length empty append expand_dims sum len inf detect_fully_connected_graph shape end_points_cross_distance range T inf min where set fully_connected_tree append empty update breadth_first_search append popleft append add len set sum flip append norm gradient repeat expand_dims sum expand_dims sum gradient repeat
# DeepACSON Automated Segmentation of White Matter in 3D Electron Microscopy [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4384624.svg)](https://doi.org/10.5281/zenodo.4384624) Flowchart of the DeepACSON segmentation of myelinated axons: <img src="figs/flowchart_g.png" width="260" height="200" /> DeepACSON was developed by Ali Abdollahzadeh at the University of Eastern Finland to trace the entirety of myelinated axons in low-resolution, large field-of-view, 3D electron microscopy images of white matter. A. Abdollahzadeh, I. Belevich, E. Jokitalo, A. Sierra, J. Tohka, DeepACSON: Automated Segmentation of White Matter in 3D Electron Microscopy, bioRxivdoi:https://doi.org/10.1101/828541. A. Abdollahzadeh, A. Sierra, J. Tohka, Cylindrical shape decomposition for 3D segmentation of tubular objects, arXiv:1911.00571v2 [cs.CV] (2019). URL http://arxiv.org/abs/1911.00571. ## BM4D denoising
1,235
aAbdz/cylindrical_shape_decomposition
['semantic segmentation']
['Cylindrical Shape Decomposition for 3D Segmentation of Tubular Objects']
CSD/skeleton3D.py CSD/unit_tangent_vector.py CSD/polar_interpolation.py CSD/shape_decomposition.py CSD/plane_rotation.py CSD/coord_conv.py CSD/polar_parametrization.py CSD/hausdorff_distance.py CSD/skeleton_decomposition.py pol2cart cart2pol hausdorff_distance angle unit_normal_vector rotation_matrix_3D rotate_vector polar_interpolation polar_parametrization tangent_planes_to_zone_of_interest maximal_inner_sphere object_analysis corresponding_skel test_boundary_parametrization detect_main_obj interpolated_super_tube curve_interp filling_cross_sections obj_ends_conditions mean_curve find_junction_in_skeleton boundary_parametrization object_decomposition zone_of_interest junction_correction crop_image skeleton discrete_shortest_path get_line_length organize_skeleton euler_shortest_path Euler_path pointmin cyclic_graph skeleton_main_branch detect_fully_connected_graph breadth_first_search fully_connected_tree pair_dec_nodes form_graph rearrange_graph update_graphs tangent_vector_sum path_to_leaf detect_junction_coordinates detect_next_node branch_endpoints_inx detect_decomposing_nodes end_points_cross_distance unique skeleton_info order_branch skeleton_parametrization unit_tangent_vector sqrt pi arctan2 cos pi sin max astype dot array cos sin cross array_equal sqrt dot array max dot sqrt arccos list T f interp1d cart2pol flip pol2cart append array range T delete cart2pol pol2cart append range diff rotation_matrix_3D zeros_like roll hausdorff_distance true_divide abs max regionprops rotate_vector count_nonzero angle squeeze unit_tangent_vector array_equal shape unit_normal_vector pad sum astype boundary_parametrization unique label interpolating_func int T rgi reshape mean_curve centroid array len polar_parametrization cart2pol append min max array maximal_inner_sphere argmin min mean sqrt array linspace sum max len argmin min append abs max len int ones_like tuple argmin astype min mean sqrt distance travel_time sum range crop_image len append int astype int astype unique T mod shape any unravel_index zeros argmax array range append subplots polar_parametrization plot set_xlim polar_interpolation true_divide sum set_ylim linspace append sum range len list f interp1d shape linspace append expand_dims empty range len int T rotation_matrix_3D zeros_like angle len astype unit_tangent_vector array_equal shape unit_normal_vector ravel array range rotate_vector reshape hstack contains_points Path append array int tangent_planes_to_zone_of_interest polar_parametrization ones interpolated_super_tube astype polar_interpolation zone_of_interest append array skeleton_main_branch zeros detect_main_obj filling_cross_sections copy coords shape object_decomposition append label array junction_correction regionprops T inf all argmin where shape append array ones shape array zeros max range min Euler_path append sum array pointmin T squeeze astype shape zeros sum array sum sorted asarray reshape argmin get_line_length repeat any append zeros max range len append ones print min astype get_line_length organize_skeleton distance shape travel_time unravel_index euler_shortest_path argmax array filled update path_to_leaf list skeleton_info skeleton_parametrization set add detect_decomposing_nodes rearrange_graph update_graphs append pair_dec_nodes form_graph argmax array range len append add pop add set order_branch append empty update set keys set detect_next_node list append set list tangent_vector_sum arccos pi add dot set order_branch append clip append array set append get_line_length empty append expand_dims sum len inf detect_fully_connected_graph shape end_points_cross_distance range T inf min where set fully_connected_tree append empty update breadth_first_search append popleft append add len set sum flip append norm gradient repeat expand_dims sum expand_dims sum gradient repeat
# Cylindrical Shape Decomposition We develop the cylindrical shape decomposition (CSD) algorithm to decompose an object, a union of several tubular structures, into its semantic components. We decompose the object using its curve skeleton and translational sweeps. CSD partitions the object curve skeleton into maximal-length sub-skeletons over an orientation cost, each sub-skeleton corresponds to a semantic component. To find the intersection of the tubular components, CSD translationally sweeps the object in decomposition intervals to identify critical points at which the object's shape changes substantially. CSD cuts the object at critical points and assigns the same label to parts along the same sub-skeleton, thereby constructing a semantic component. CSD further reconstructs the semantic components between parts using generalized cylinders. If you use any part of the cylindrical shape decomposition algorithm in your research, please cite: Abdollahzadeh, A., Sierra, A. & Tohka, J. Cylindrical Shape Decomposition for 3D Segmentation of Tubular Objects. IEEE Access 9, 23979–23995 (2021). The outline of the CSD algorithm: <img src="figs/outline.png" width="750" height="150" /> If you had the "RuntimeError: Negative discriminant in time marcher quadratic" error in the skeletonization, you may install an older version of skfmm, e.g., 0.0.8. ## Installation The CSD algorithm requires no installation. To install the necessary dependencies, run: ```python
1,236
aRI0U/music-source-separation
['music source separation']
['Improving DNN-based Music Source Separation using Phase Features']
train.py utils/summary.py data.py utils/compute_stats.py model.py _augment_channelswap Compose _augment_gain data_loaders MUSDBDataset AmplitudeEstimator2 STFT BiasLayer AmplitudeEstimator MSS main debug train val Writer rand instrument Compose dict DataLoader MUSDBDataset seed set_detect_anomaly manual_seed criterion model tqdm eval transform to criterion model backward zero_grad tqdm transform to step device runs_dir dataset max list load_model name Adam MSELoss load_state_dict to nfft glob lr mkdir data_loaders load print parameters istft
# Improving DNN-based Music Source Separation using Phase Features This repository contains the implementation of [Improving DNN-based Music Source Separation using Phase Features](http://arxiv.org/abs/1807.02710), from Muth *et al*. ## Preparation 1. Clone this repository ```sh git clone https://github.com/aRI0U/music-source-separation ``` 2. Install all Python dependencies ```sh cd music-source-separation
1,237
aaaasssddf/PIP-experiments
['word embeddings']
['On the Dimensionality of Word Embedding']
sts/plot_tfidf.py PIP_upper_bound/plot_upper_bd.py word2vec/plot.py word2vec/word2vec_eval.py word2vec/__init__.py Wiki_corpus/split_counting_all_data.py forward_stability/cross_comparison.py word2vec/word2vec.py forward_stability/plot_pairwase.py text8/PMI.py text8/noise_est_pmi.py text8/readstat.py glove/glove_analogy_test.py text8/log_count.py robustness_to_overfitting/PPMI.py Wiki_corpus/wiki_process.py PIP_upper_bound/upper_bd_est.py Wiki_corpus/PPMI.py text8/PPMI.py optimal_dimensionality/glove/upper_bd_est.py word2vec/word2vec_test.py Wiki_corpus/log_count.py word2vec/word2vec_optimized.py optimal_dimensionality/word2vec/noise_est_pmi.py word2vec/plot_sim.py optimal_dimensionality/glove/noise_est_log_count.py word2vec/word2vec_optimized_test.py forward_stability/pairwise_comparison.py optimal_dimensionality/glove/log_count.py Wiki_corpus/counting_all_data.py text8/noise_est_log_count.py optimal_dimensionality/word2vec/upper_bd_est.py Wiki_corpus/noise_est_logcount.py text8/plot.py sts/noise_est.py PIP_upper_bound/plot.py PIP_upper_bound/upper_bd_est_alpha_0.py optimal_dimensionality/word2vec/pmi.py forward_stability/plot_cross.py sts/test_dimensionality.py sts/tfidf.py robustness_to_overfitting/plot.py Wiki_corpus/noise_est.py glove/glove_sim_test.py PIP test PIP_loss load_data load_test_file PIP test PIP_loss load_data load_test_file eval read_analogies load_data predict test load_data load_test_file build_cooccurance_dict build_dataset read_data build_cooccurance_dict build_dataset read_data generate_random_orthogonal_matrix soft_threshold build_cooccurance_dict build_dataset read_data build_cooccurance_dict build_dataset read_data generate_random_orthogonal_matrix soft_threshold generate_random_orthogonal_matrix soft_threshold generate_random_orthogonal_matrix soft_threshold generate_random_orthogonal_matrix soft_threshold read_data build_cooccurance_dict test build_dataset load_test_file maybe_download charFilter read_data build_dictionary build_cooccurance_dict tf_idf_matrix build_dataset test charFilter read_data build_dictionary build_cooccurance_dict tf_idf_matrix build_dataset read_data build_cooccurance_dict test build_dataset load_test_file maybe_download plot_with_labels build_cooccurance_dict maybe_download plot_with_labels build_cooccurance_dict maybe_download build_cooccurance_dict build_dataset read_data maybe_download read_data build_cooccurance_dict test build_dataset load_test_file maybe_download plot_with_labels read_test_sets build_dataset read_data build_cooccurance_dict read_test_sets build_dataset read_data build_cooccurance_dict make_corpus main _start_shell Options Word2Vec main _start_shell Options Word2Vec main _start_shell Options Word2Vec Word2VecTest Word2VecTest T norm dot append float enumerate int format print OrderedDict walk T print dot sqrt mean sum norm list format print reversed print dot shape T print items list format print range predict list permutation extend dict zip append most_common keys values len defaultdict len Counter range enumerate normal svd print urlretrieve st_size stat list permutation extend Counter dict zip append most_common keys values len zeros count_nonzero format print shape expand_dims log len items list print format show scatter savefig figure annotate enumerate close format endswith print listdir len Counter format print decode str WikiCorpus print write close get_texts open update start_ipython globals print exit Options join format emb_dim
# PIP-experiments ## Tool for word embedding dimensionality selection We have cleaned all experimental code to provide a unified tool in the following repo https://github.com/aaaasssddf/word-embedding-dimensionality-selection ## Experiments in this repo This is the source code for all experiments of the paper, "Understand Functionality and Dimensionality of Vector Embeddings: the Distributional Hypothesis, the Pairwise Inner Product Loss and Its Bias-Variance Trade-off". The paper is publicly available at https://arxiv.org/abs/1803.00502 The NIPS paper can be found here https://nips.cc/Conferences/2018/Schedule?showEvent=12567 ```
1,238
aaaasssddf/word-embedding-dimensionality-selection
['word embeddings']
['On the Dimensionality of Word Embedding']
matrix/word2vec_matrix.py matrix/ppmi_lsa_matrix.py matrix/signal_matrix_factory.py test/test_tokenizer.py matrix/glove_matrix.py utils/reader.py utils/tokenizer.py matrix/PIP_loss_calculator.py main.py matrix/signal_matrix.py GloVeMatrix MonteCarloEstimator LSAMatrix SignalMatrixFactory Word2VecMatrix TestRawTextReader TestTokenizer ZipFileReader ReaderFactory RawTextReader _lower SimpleTokenizer
# Word Embedding Dimensionality Selection This repo implements the dimensionality selection procedure for word embeddings. The procedure is proposed in the following papers, based on the notion of Pairwise Inner Produce (PIP) loss. No longer pick 300 as your word embedding dimensionality! - Paper: * Conference Version: https://nips.cc/Conferences/2018/Schedule?showEvent=12567 * arXiv: https://arxiv.org/abs/1812.04224 - Slides: https://www.dropbox.com/s/9tix9l4h39k4agn/main.pdf?dl=0 - Video of Neurips talk: https://www.facebook.com/nipsfoundation/videos/vb.375737692517476/745243882514297/?type=2&theater ``` @inproceedings{yin2018dimensionality,
1,239
aadarshjha/Detect-Then-Segment
['instance segmentation', 'semantic segmentation']
['Instance Segmentation for Whole Slide Imaging: End-to-End or Detect-Then-Segment']
manual-detection/prediction-pipeline/u-net-prediction/unet/unet_model.py manual-detection/segmentation-pipeline/deeplab-segmentation/utils/dataset.py automatic-detection/dsc-evaluation/mask-rcnn-evaluation/utils/dataset.py automatic-detection/deep-prediction/eval.py manual-detection/prediction-pipeline/deep-prediction/utils/dataset.py manual-detection/prediction-pipeline/u-net-prediction/train.py manual-detection/segmentation-pipeline/u-net-segmentation/train.py automatic-detection/dsc-evaluation/deeplab-evaluation/dice_loss.py manual-detection/segmentation-pipeline/u-net-segmentation/unet/unet_model.py automatic-detection/deep-prediction/dice_loss.py automatic-detection/dsc-evaluation/mask-rcnn-evaluation/utils/data_vis.py automatic-detection/dsc-evaluation/mask-rcnn-evaluation/dice_loss.py manual-detection/prediction-pipeline/u-net-prediction/unet/unet_parts.py automatic-detection/dsc-evaluation/mask-rcnn-evaluation/eval.py manual-detection/segmentation-pipeline/u-net-segmentation/unet/__init__.py automatic-detection/dsc-evaluation/deeplab-evaluation/train.py automatic-detection/deep-prediction/utils/dataset.py manual-detection/segmentation-pipeline/u-net-segmentation/dice_loss.py manual-detection/segmentation-pipeline/u-net-segmentation/eval.py manual-detection/dsc-evaluation/general-evaluation/train.py manual-detection/segmentation-pipeline/u-net-segmentation/unet/unet_parts.py automatic-detection/dsc-evaluation/mask-rcnn-evaluation/train.py manual-detection/prediction-pipeline/deep-prediction/eval.py manual-detection/prediction-pipeline/u-net-prediction/dice_loss.py manual-detection/dsc-evaluation/general-evaluation/dice_loss.py automatic-detection/deep-prediction/train.py manual-detection/prediction-pipeline/u-net-prediction/eval.py manual-detection/segmentation-pipeline/deeplab-segmentation/dice_loss.py manual-detection/dsc-evaluation/general-evaluation/utils/dataset.py manual-detection/prediction-pipeline/deep-prediction/utils/data_vis.py manual-detection/prediction-pipeline/deep-prediction/train.py manual-detection/prediction-pipeline/u-net-prediction/unet/__init__.py manual-detection/segmentation-pipeline/u-net-segmentation/utils/dataset.py automatic-detection/deep-prediction/utils/data_vis.py automatic-detection/dsc-evaluation/deeplab-evaluation/utils/dataset.py manual-detection/prediction-pipeline/u-net-prediction/utils/dataset.py manual-detection/prediction-pipeline/deep-prediction/dice_loss.py automatic-detection/dsc-evaluation/deeplab-evaluation/utils/data_vis.py manual-detection/prediction-pipeline/u-net-prediction/utils/data_vis.py manual-detection/dsc-evaluation/general-evaluation/eval.py manual-detection/segmentation-pipeline/deeplab-segmentation/eval.py manual-detection/segmentation-pipeline/deeplab-segmentation/predict.py automatic-detection/dsc-evaluation/deeplab-evaluation/eval.py manual-detection/segmentation-pipeline/deeplab-segmentation/train.py dice_coeff DiceCoeff eval_net convert_result_to_csv dice_loss cfg_from_file train_net cross_entropy2d BasicDataset plot_img_and_mask dice_coeff DiceCoeff eval_net BasicDataset plot_img_and_mask dice_coeff DiceCoeff eval_net BasicDataset plot_img_and_mask dice_coeff DiceCoeff eval_net BasicDataset dice_coeff DiceCoeff eval_net convert_result_to_csv dice_loss cfg_from_file train_net cross_entropy2d BasicDataset plot_img_and_mask dice_coeff DiceCoeff eval_net convert_result_to_csv dice_loss cfg_from_file train_net cross_entropy2d UNet Up OutConv DoubleConv Down BasicDataset plot_img_and_mask dice_coeff DiceCoeff eval_net mask_to_image get_args get_output_filenames predict_img convert_result_to_csv dice_loss cfg_from_file train_net cross_entropy2d BasicDataset dice_coeff DiceCoeff eval_net convert_result_to_csv dice_loss cfg_from_file train_net cross_entropy2d UNet Up OutConv DoubleConv Down BasicDataset zero_ zip forward is_cuda enumerate join float makedirs float32 eval unsqueeze save to numpy range len log_softmax size nll_loss view size sum softmax to_csv DataFrame read_csv len DataLoader colormap dir_externaltestmask eval_net Adam load_state_dict dir_checkpoint CrossEntropyLoss dir_valimg SummaryWriter dir_mask eval scale info dir_testimg dir_valmask load join print BasicDataset __len__ dir_testmask parameters expname dir_img dir_externaltestimg show subplots set_title imshow range str print item append sigmoid BCEWithLogitsLoss from_numpy preprocess eval unsqueeze to add_argument ArgumentParser format error output splitext input append convert_result_to_csv add_images unsqueeze save range state_dict format replace add_histogram close mkdir makedirs named_parameters train numpy add_scalar
# Instance Segmentation for Whole Slide Imaging: End-to-End or Detect-Then-Segment This repository contains both code and data relating to the experimentation performed to better understand effective segmentation methodologies utilizing deep learning techniques that improve glomeruli characterization on high-resolution Whole Slide Imaging. ### To Apply Our Model 1. Download the model and a test image from: [Google Drive](https://drive.google.com/drive/folders/123qruJKe8pXGy48M91lqPZW0_xhl1w3U?usp=sharing) 2. Download the test image, provided in Google Drive. 3. Navigate to `segment/automatic-detection/deep-prediction` 4. Set up the enviornment as described below 5. `!python train.py` 6. Evaluate results in `../dsc-evaluation` via `!python train.py` Please let me know if you have any questions @ [email protected]
1,240
aadeshnpn/OSDN
['open set learning']
['Towards Open Set Deep Networks']
utils/openmax_utils.py utils/openmax.py utils/evt_fitting.py utils/compute_openmax.py utils/nepali_characters.py main.py main recalibrate_scores main computeOpenMaxProbability query_weibull weibull_tailfitting conv_labels one_hot_encoding output_labels read_data get_label shuffled_data data_class_length pre_process normalize_data split create_model compute_openmax compute_distances get_correct_classified compute_activation process_input get_activations build_weibull seperate_data openmax_known_class image_show compute_feature get_train_test compute_mean_vector getlabellist parse_synsetfile compute_distance seed T create_model load_model print compute_activation to_categorical image_show split randint range get_train_test compute_openmax len exp asarray tolist mean sum range query_weibull asarray w_score compute_distance computeOpenMaxProbability zeros ravel range len list recalibrate_scores add_argument mean_files_path weibull_tailfitting loadmat keys image_arrname ArgumentParser parse_args getlabellist distance_path synsetfname fit_high MR array len loadmat astype divide mean nan_to_num std range len append range output_labels delete vstack array range len output_labels read_data normalize_data int shuffled_data data_class_length delete pre_process vstack zeros argsort append array range len get_activations reshape to_categorical astype load_data function all concatenate print get_correct_classified compute_distances seperate_data compute_feature compute_mean_vector save append argmax range predict len range weibull_tailfitting len load recalibrate_scores build_weibull show reshape squeeze imshow compute_feature reshape compute_feature array resize show str squeeze imshow title print process_input randint range compute_openmax len join readlines readlines print reshape cosine euclidean array
# OSDN Keras implementation for the research paper "Towards Open Set Deep Networks" A Bendale, T Boult, CVPR 2016 Original Implementation: https://github.com/abhijitbendale/OSDN This repo has Keras wrapper for the above research paper. Full code plus ipython notebook is also avaliable. ``` jupyter notebook Softmax.ipynb ``` or open notebook with nbviewer by clicking on this link https://nbviewer.jupyter.org/github/aadeshnpn/OSDN/blob/master/Softmax.ipynb
1,241
aam-at/adversary_critic
['adversarial attack']
['Improved Network Robustness with Adversary Critic']
generate_script.py carlini/__init__.py test.py models.py carlini/l2_attack.py attack.py utils.py test_carlini.py train_critic.py high_confidence_attack high_confidence_attack_unrolled deepfool find_next_target generate_test get_tmpl_str generate_test_carlini generate_critic concat_commands mlp create_model lenet5 critic_mlp _get_w_init register_model_flags _get_activation_fn main setup_experiment main setup_experiment non_converged_indices filter_non_coverged main prepare_dir save_images silence_stderr get_sha l2_normalize NanError print_results_str register_experiment_flags jacobian batch_compute_ssim binary_accuracy save_checkpoint with_end_points norm_penalty lrelu redirect_stdout AttributeDict load_training_params batch_iterator lr_decay batch_compute_psnr load_params random_targets register_metrics prediction select_balanced_subset gaussian_noise find_cluster_centers setup_experiment redirect_stderr CarliniL2 from_carlini_images to_carlini_images jacobian where top_k gather abs log dtype list argmin reduce_sum cast expand_dims range random_targets ones_like inf one_hot multinomial sqrt tile equal reshape float32 bool ndims int constant zeros_like model prediction stop_gradient bool ndims range argmax int list constant one_hot zeros_like model sqrt confidence cast int32 stop_gradient callable bool ndims range find_next_target zeros_like model sign confidence stop_gradient argmax abs log find_next_target list ones reduce_sum cast range one_hot log_softmax sqrt softmax int reshape int32 ndims callable print join f getargspec list locals insert write import_module append keys StringIO args seed locals get_tmpl_str randint range join locals get_tmpl_str sorted replace glob abspath pardir join sorted get_tmpl_str replace glob abspath pardir DEFINE_string DEFINE_integer getattr _get_w_init _get_activation_fn get_sha getLogger Exists samples_dir set_random_seed set_verbosity DEBUG setLevel seed basename load_training_params addHandler normpath working_dir MakeDirs info INFO FileHandler join load_dir DeleteRecursively sort_labels attack_box_clip hc_confidence stop_gradient dataset abs GPUOptions py_func num_classes data_dir test_model placeholder reduce_sum OrderedDict getattr softmax_cross_entropy create_model one_hot register_metrics sqrt total_variation float deepfool high_confidence_attack float32 accuracy argsort reduce_mean int32 setup_experiment read_data_sets adv_data_dir append enumerate format warn zip append asanyarray AttributeDict labels images generator trainable_variables unsorted_segment_mean bool apply_regularization save_images zeros_like model boolean_mask samples_dir where binary_accuracy gather norm_penalty list l2_regularizer ones transpose get_collection shape local_variables critic range sigmoid_cross_entropy lmbd ones_like variables_initializer test_generator test set select_balanced_subset lr ConfigProto zeros validation model_variables val_attack_confidence join attack_confidence Variable not_equal reshape assign_moving_average minimize lmbd_grad AdamOptimizer add_to_collection critic_lr histogram train ndims scalar __setitem__ __getitem__ join makedirs str items list aggregate_metrics scalar join Saver save info train_dir isnan format write zip from_numpy int save_image sqrt DEFINE_string DEFINE_integer prepare_dir name dumps chks_dir train_dir list permutation slice transpose range list RandomState shuffle zeros range asarray mean unique append sum zeros range nan compare_psnr zeros transpose range greater_equal float32 cast bool equal dtype ones_like one_hot reshape where multinomial cast range equal eval assign getattr list square reduce_sum sqrt ndims range check_output transpose transpose
# Improved Network Robustness with Adversary Critic [Alexander Matyasko](https://github.com/aam-at), Lap-Pui Chau, **Improved Network Robustness with Adversary Critic**. Advances in Neural Information Processing Systems (NIPS), 2018. Ideally, what confuses neural network should be confusing to humans. However, recent experiments have shown that small, imperceptible perturbations can change the network prediction. To address this gap in perception, we propose a novel approach for learning robust classifier. Our main idea is: adversarial examples for the robust classifier should be indistinguishable from the regular data of the adversarial target. We formulate a problem of learning robust classifier in the framework of Generative Adversarial Networks (GAN), where the adversarial attack on classifier acts as a generator, and the critic network learns to distinguish between regular and adversarial images. The classifier cost is augmented with the objective that its adversarial examples should confuse the adversary critic. To improve the stability of the adversarial mapping, we introduce adversarial cycle-consistency constraint which ensures that the adversarial mapping of the adversarial examples is close to the original. In the experiments, we show the effectiveness of our defense. Our method surpasses in terms of robustness networks trained with adversarial training. Additionally, we verify in the experiments with human annotators on MTurk that adversarial examples are indeed visually confusing. ```txt @inproceedings{matyasko2018adversarycritic, title = {Improved Network Robustness with Adversary Critic}, author = {Matyasko, Alexander and Chau, Lap-Pui}, booktitle = {NIPS}, year = 2018 }
1,242
aamir-mustafa/pcl-adversarial-defense
['adversarial defense']
['Adversarial Defense by Restricting the Hidden Space of Deep Neural Networks']
pcl_training_adversarial_pgd.py contrastive_proximity.py softmax_training.py robustness.py pcl_training.py robust_ml.py resnet_model.py utils.py proximity.py pcl_training_adversarial_fgsm.py Con_Proximity adjust_learning_rate_prox test adjust_learning_rate main train adjust_learning_rate_conprox FGSM adjust_learning_rate_prox test adjust_learning_rate main un_normalize normalize train adjust_learning_rate_conprox adjust_learning_rate_prox test adjust_learning_rate main attack un_normalize normalize train adjust_learning_rate_conprox Proximity ResNet Bottleneck conv3x3 resnet BasicBlock un_normalize normalize attack normalize Model main train adjust_learning_rate test AverageMeter save_checkpoint Logger mkdir_if_missing SGD DataLoader adjust_learning_rate Logger save adjust_learning_rate_conprox save_dir round cuda seed str adjust_learning_rate_prox Proximity max_epoch load_state_dict CrossEntropyLoss range manual_seed_all format Compose test timedelta CIFAR10 manual_seed is_available load join time Con_Proximity print parameters resnet use_cpu train gpu model zero_grad update val format size avg item criterion_conprox_256 enumerate criterion_prox_1024 backward print criterion_conprox_1024 AverageMeter parameters criterion_prox_256 criterion_xent step len eval param_groups param_groups param_groups data criterion backward model clone sign clamp_ zero_ un_normalize cuda FGSM uniform normalize cat eval data criterion backward model clone grad where sign mean clamp_ zero_ un_normalize abs range detach attack normalize criterion makedirs join copy dirname save mkdir_if_missing
# Adversarial Defense by Restricting the Hidden Space of Deep Neural Networks (ICCV'19) ![Figure 1](Mapping_Function.png) This repository is an PyTorch implementation of the ICCV'19 paper [Adversarial Defense by Restricting the Hidden Space of Deep Neural Networks](https://arxiv.org/abs/1904.00887). To counter adversarial attacks, we propose Prototype Conformity Loss to class-wise disentangle intermediate features of a deep network. From the figure, it can be observed that the main reason for the existence of such adversarial samples is the close proximity of learnt features in the latent feature space. We provide scripts for reproducing the results from our paper. ## Clone the repository Clone this repository into any place you want. ```bash git clone https://github.com/aamir-mustafa/pcl-adversarial-defense cd pcl-adversarial-defense
1,243
aarthipriyar/GAN
['semi supervised anomaly detection', 'anomaly detection']
['GANomaly: Semi-Supervised Anomaly Detection via Adversarial Training']
options.py Options
# GANomaly This repository contains PyTorch implementation of the following paper: GANomaly: Semi-Supervised Anomaly Detection via Adversarial Training [[1]](#reference) ## Table of Contents - [GANomaly](#ganomaly) - [Table of Contents](#table-of-contents) - [Prerequisites](#prerequisites) - [Experiment](#experiment) - [Training](#training) - [Training on MNIST](#training-on-mnist) - [Training on CIFAR10](#training-on-cifar10)
1,244
aayushjr/ssa2d
['action detection']
["We don't Need Thousand Proposals$\\colon$ Single Shot Actor-Action Detection in Videos"]
utils/video_utils.py utils/logger.py utils/metrics_util.py utils/directory_utils.py utils/video_test.py utils/output_visualizer.py model_i3d_flow.py utils/callbacks.py utils/numpy_utils.py model_params.py dataloader_vidor.py custom_metric_losses.py train_ssa2d_vidor.py custom_categorical_accuracy custom_miou_sig custom_miou jaccard_distance_loss soft_dice_loss dice_coef_loss custom_miou_fg_img selective_dice_coef_loss dice_coef selective_dice_coef custom_miou_img custom_miou_fg selective_cross_entropy_loss cross_entropy_with_dice VidORDataloaderV1 extract_and_clamp_bbox save_vis between_inclusive_exclusive populate_centroid_grid _obtain_input_shape adjust Inception_Inflated3d_full_cls conv3d_bn list_to_index_dictionary ModelParameters OutputBranch Classes RunModes Paths instance_weighted_bce dice_coef_loss instance_weighted_cce main dice_coef train cross_entropy_with_dice dice_coef_per_class LogHistory assert_existence try_makedir Logger precision_threshold recall_threshold precision f1_score recall debug add_at_center make_gaussian display_one_hot display_img display_centroids construct_out_path display_binary VideoLoader categorical_accuracy argmax one_hot stack any cast sum epsilon argmax one_hot stack any cast sum epsilon greater stack any cast sum epsilon argmax one_hot stack any cast sum argmax one_hot stack any cast sum abs sum tuple square mean shape sum range len abs epsilon sum square abs multiply expand_dims sum epsilon greater where log reduce_mean gather_nd sum clip dice_coef categorical_crossentropy add_at_center bounding_boxes enumerate min max range len str warn resize_volumes repeat_elements concatenate Input Model conv3d_bn dict enumerate list sorted list_to_index_dictionary append categorical action_to_id act_rel_to_id relation_to_id binary object_to_id len mean sum square expand_dims abs epsilon str VidORDataloaderV1 TensorBoard exit Adam format fit_generator load_weights print_summary compile join time int print EarlyStopping CSVLogger Inception_Inflated3d_full_cls ModelCheckpoint len int float train makedirs epsilon sum round clip epsilon sum round clip epsilon sum round clip shape array maximum arange print int asarray Patch astype set Resize add display_img resizer append argmax range len asarray transpose copy set Resize add display_img resizer append Patch range len show imshow construct_out_path savefig legend mkdir display_img squeeze asarray
# SSA2D Code for Single Shot Actor-Action Detection in Videos (SSA2D). Paper accessible at [WACV 2021 Proceedings] (https://openaccess.thecvf.com/content/WACV2021/papers/Rana_We_Dont_Need_Thousand_Proposals_Single_Shot_Actor-Action_Detection_in_WACV_2021_paper.pdf) ## Description This is an implementation of SSA2D on A2D and VidOR datasets. It is built using the Keras library. The datasets have to be downloaded separately. ### Setup Download the dataset and assign their paths in respective dataloader. For VidOR, assign data and annotation path in dataloader_vidor.py file. VidOR uses some processed annotation files, available in data folder. ### Training Run train_ssa2d_vidor.py to train SSA2D on VidOR. The trained models and log files will be saved in specified folders.
1,245
ababier/open-kbp
['semantic segmentation']
['Enhancing Organ at Risk Segmentation with Improved Deep Neural Networks']
provided_code/network_functions.py provided_code/general_functions.py provided_code/data_loader.py provided_code/network_architectures.py provided_code/dose_evaluation_class.py main.py DataLoader EvaluateDose make_directory_and_return_path sparse_vector_function get_paths load_file get_paths_from_sub_directories DefineDoseFromCT PredictionModel loadtxt squeeze any read_csv str format glob Path append listdir get_paths format extend makedirs
# OpenKBP Grand Challenge ![](read-me-images/aapm.png) The _open-kbp_ repository provides code that was intended to help get participants started with developing dose prediction models for the OpenKBP Challenge, which is summarized in our [paper](https://aapm.onlinelibrary.wiley.com/doi/epdf/10.1002/mp.14845). This repository has been repurposed to provide our community with an open framework for developing dose prediction methods. Note that researchers who are interested in developing their own plan optimization methods should refer to the [open-kbp-opt repository](https://github.com/ababier/open-kbp-opt). ![](read-me-images/pipeline.png) **Advice**: The repository can be used on either a local machine or in the cloud (for free) using [Google Colab](https://colab.research.google.com). Google Colab is a great way to compete in OpenKBP without putting a burden on your existing hardware. The service provides high-quality CPUs and GPUs for free, however, your sessions are limited to consecutive 12 hours [[Frequently asked questions]](https://research.google.com/colaboratory/faq.html). ## Citation Please use our paper as the citation for this dataset or code repository: A. Babier, B. Zhang, R. Mahmood, K.L. Moore, T.G. Purdie, A.L. McNiven, T.C.Y. Chan, "[OpenKBP: The open-access knowledge-based planning grand challenge and dataset](https://aapm.onlinelibrary.wiley.com/doi/epdf/10.1002/mp.14845)," _Medical Physics_, Vol. 48, pp. 5549-5561, 2021. # Table of Contents
1,246
abailoni/GASP
['instance segmentation', 'graph partitioning', 'semantic segmentation']
['A Generalized Framework for Agglomerative Clustering of Signed Graphs applied to Instance Segmentation']
GASP/affinities/__init__.py test/test_GASP_on_graph.py experiments/CREMI/run_GASP.py GASP/segmentation/__init__.py GASP/utils/various.py GASP/__version__.py examples/run_GASP_from_affinities.py GASP/utils/graph.py GASP/segmentation/GASP/core.py examples/run_GASP_from_graph.py GASP/segmentation/watershed_from_DT.py GASP/affinities/utils.py GASP/segmentation/utils.py GASP/segmentation/watershed.py setup.py GASP/affinities/accumulator.py test/GASP_from_affinities.py GASP/segmentation/GASP/run_from_affinities.py GASP/segmentation/GASP/__init__.py load_cremi_dataset str2bool run_GASP_on_affinities AccumulatorLongRangeAffs probs_to_costs size_filter superpixel_stacked from_affinities_to_hmap IntersectWithBoundaryPixels WatershedFromAffinities SizeThreshAndGrowWithWS SeededWatershedOnAffinities WatershedOnDistanceTransform WatershedOnDistanceTransformFromAffinities run_GASP GaspFromAffinities SegmentationFeeder build_pixel_long_range_grid_graph_from_offsets from_foreground_mask_to_edge_mask edge_mask_from_offsets_prob build_lifted_graph_from_rag get_rag parse_data_slice find_indices_direct_neighbors_in_offsets check_offsets run_GASP_from_pixel_affinities TestGASP WatershedOnDistanceTransformFromAffinities format print gasp_instance GaspFromAffinities join max list isinstance tuple pad append array range enumerate shape zeros log max mask copy watershedsNew unique relabelConsecutive zeros astype roll shape components time get_GASP_policy print compute_mws_clustering agglomerativeClustering result buildFromEdgeLabels componentLabels numberOfNodes exportAgglomerationData uvIds run min max copy undirectedGraph numberOfEdges compute_lifted_edges_from_rag_and_offsets zeros numberOfNodes uvIds insertEdges append require logical_and stack compute_affinities tolist astype arange relabelConsecutive applyMapping numberOfEdges ones from_foreground_mask_to_edge_mask projectNodeIdsToPixels edge_mask_from_offsets_prob warn check_offsets UndirectedGraph flatten insertEdges compute_grid_graph_affinity_features find_indices_direct_neighbors_in_offsets isin numberOfNodes undirectedGridGraph array isinstance append empty enumerate check_offsets append slice replace split
# GASP [comment]: <> ([![Build Status]&#40;https://travis-ci.com/abailoni/GASP.svg?branch=master&#41;]&#40;https://travis-ci.com/abailoni/GASP&#41;) [comment]: <> ([![Build Status]&#40;https://github.com/constantinpape/nifty/workflows/build/badge.svg&#41;]&#40;https://github.com/constantinpape/nifty/actions&#41;) Generalized Algorithm for Signed graph Partitioning ## Installation - On Linux and Mac, the package can be easily installed via conda: - `conda create -n GASP -c conda-forge -c abailoni gasp` - Activate your new environment: `conda activate GASP` <!-- - Create conda environment and install the `nifty` and `vigra` packages with: `conda create -n GASP -c abailoni -c conda-forge nifty=1.0.9 vigra affogato=0.2.2`. The source code for the `nifty` package can also be found here: https://github.com/abailoni/nifty
1,247
abdulrafae/normalization
['lexical normalization']
['A Clustering Framework for Lexical Normalization of Roman Urdu']
UrduPhone/main.py UrduPhone/UrduPhone.py get_wordslist get_words_and_write_UrduPhone isAlphNum words_ids _5NextList getWordsIds PreProcess5FilesForUrduPhone getText Write_words_IDs getUrduPhoneEncodings WordList BigramWords _5PrevList getUrduPhoneIds PreProcess5Files sound_codes is_ascii write_UrduPhone_clusters find22 UrduPhone find remove1st read list print sort close set open intersection append split dict UrduPhone str get_wordslist list write close dict UrduPhone sound_codes keys open lower read close open str list items replace write close sent_tokenize dict getText tokenize open dict int read get_wordslist sorted list items str print isalpha close write dict open words_ids split int read get_wordslist sorted list items str print isalpha close write dict open words_ids split str get_wordslist list items write close words_ids open read write close open split read close dict open split read remove close dict open split read close dict open split read getWordsIds close write getUrduPhoneEncodings getUrduPhoneIds split open items list get_wordslist write close sound_codes open items list replace write close sent_tokenize dict getText tokenize open replace upper remove1st range len replace upper find22 range len
# Introduction This project finds lexical variations within a dataset and evaluates the performance compared to a gold standard lexicon. # Preprocessing and Normalization Preprocess the raw data using the gold standard file. ``` mkdir -p UrduPhone/Input\ Files/ mkdir -p UrduPhone/Output\ Files/ cp gold_standard UrduPhone/Input\ Files/Gold\ Standard.txt cp raw_data UrduPhone/Input\ Files/Dataset.txt cd UrduPhone
1,248
abdulwaheedsoudagar/ImageTextTranslation
['optical character recognition', 'scene text recognition']
['An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition']
utils.py My_Generator cleanEnglishVocab cleankannadaVocab word_rep pre_process_image image_text_model gt_rep ctc_lambda_func infer language_translation encode_to_labels predict_output Transliteration_EncoderDecoder_Attention append index enumerate sorted Input Model COLOR_BGR2GRAY ones concatenate expand_dims shape resize imread cvtColor array get_value predict upper sub replace to enumerate to enumerate word_rep topk to infer
# ImageTextTranslation ![io1](https://user-images.githubusercontent.com/20552376/102013812-74360800-3d78-11eb-9b00-e0921528701f.jpg)<br> ![io2](https://user-images.githubusercontent.com/20552376/102013849-b19a9580-3d78-11eb-8d69-c3a7d1fd2002.jpg) **Task here is to transliteration of english words present in images.**<br><br> It consists of three sub-task:-<br><br> 1. Detection of english words in an image.<br> 2. Converting the detected word(crop images) in image to text.<br> 3. Transliteration of each text word from above step. *Step 1* # Detection of english words in image.<br>
1,249
abenbihi/hed
['boundary detection', 'edge detection']
['Holistically-Nested Edge Detection']
python/caffe/io.py python/caffe/test/test_python_layer.py scripts/download_model_binary.py python/caffe/net_spec.py examples/hed/solve.py python/caffe/test/test_net.py tools/extra/resize_and_crop_images.py python/draw_net.py python/caffe/test/test_net_spec.py src/caffe/test/test_data/generate_sample_data.py python/caffe/draw.py python/caffe/pycaffe.py tools/extra/extract_seconds.py scripts/cpp_lint.py python/classify.py examples/hed/run.py python/caffe/test/test_solver.py examples/hed/time_perf.py python/caffe/classifier.py python/caffe/test/test_python_layer_with_param_str.py tools/extra/parse_log.py python/caffe/__init__.py python/caffe/test/test_layer_type_list.py scripts/copy_notebook.py examples/hed/add_semantic.py python/caffe/detector.py python/detect.py examples/hed/convert2tf.py examples/hed/run_cmu.py plot_single_scale assemble_multiscale main plot_single_scale assemble_multiscale interp_surgery upsample_filt plot_single_scale assemble_multiscale main main main parse_args Classifier Detector get_edge_label draw_net get_layer_label get_pydot_graph choose_color_by_layertype get_pooling_types_dict draw_net_to_file Transformer blobproto_to_array datum_to_array array_to_blobproto arraylist_to_blobprotovecor_str array_to_datum resize_image blobprotovector_str_to_arraylist load_image oversample Layers Function Parameters Top NetSpec assign_proto param_name_dict to_proto _Net_blobs _Net_forward_all _Net_set_input_arrays _Net_backward _Net_params _Net_forward _Net_outputs _Net_forward_backward_all _Net_blob_loss_weights _Net_batch _Net_inputs TestLayerTypeList simple_net_file TestNet lenet TestNetSpec silent_net anon_lenet exception_net_file parameter_net_file SimpleLayer TestPythonLayer ParameterLayer python_net_file ExceptionLayer SimpleParamLayer TestLayerWithParam python_param_net_file TestSolver ParseNolintSuppressions CheckVlogArguments CheckSectionSpacing FindNextMultiLineCommentEnd ReplaceAll CheckForFunctionLengths _SetOutputFormat _IsTestFilename _VerboseLevel CheckBraces RemoveMultiLineComments ResetNolintSuppressions CheckForNonStandardConstructs _SetVerboseLevel PrintUsage _NestingState CheckIncludeLine CheckAccess _CppLintState Search CheckInvalidIncrement RemoveMultiLineCommentsFromRange CleansedLines CheckForBadCharacters UpdateIncludeState FindPreviousMatchingAngleBracket CheckEmptyBlockBody FindNextMultiLineCommentStart Match _NamespaceInfo CheckMakePairUsesDeduction CheckCheck IsBlankLine _SetFilters ProcessLine _FunctionState CheckPosixThreading GetLineWidth GetHeaderGuardCPPVariable IsCppString _IncludeState CheckSpacing _ClassInfo CheckForCopyright IsErrorSuppressedByNolint ProcessFileData CheckForMultilineCommentsAndStrings CloseExpression _PreprocessorInfo _OutputFormat CheckForIncludeWhatYouUse CheckSpacingForFunctionCall FindEndOfExpressionInLine FindNextMatchingAngleBracket _SetCountingStyle ProcessFile _IncludeError CleanseRawStrings CheckAltTokens CheckForNewlineAtEOF ParseArguments CheckForNonConstReference PrintCategories _Filters main FilesBelongToSameModule CheckCStyleCast FileInfo _BlockInfo CheckForHeaderGuard CheckCaffeDataLayerSetUp ReverseCloseExpression CleanseComments _DropCommonSuffixes _ClassifyInclude CheckStyle CheckCaffeAlternatives FindStartOfExpressionInLine _ShouldPrintError CheckComment Error _GetTextInside CheckLanguage CheckCaffeRandom GetPreviousNonBlankLine reporthook parse_readme_frontmatter model_checks_out valid_dirname get_start_time extract_seconds extract_datetime_from_line get_log_created_year write_csv parse_log fix_initial_nan_learning_rate save_csv_files main parse_args parse_line_for_net_output ResizeCropImagesMapper PILResizeCrop OpenCVResizeCrop subplot set_xticklabels set_yticklabels print close imshow set_ticks_position figure savefig range len uint8 print hstack astype vstack max enumerate imwrite res_dir model forward exists pycaffe_folder set_device transpose imread TEST insert astype Net enumerate time uint8 print loadtxt reshape float32 set_mode_gpu prototxt gpu makedirs print shape upsample_filt model_def endswith ArgumentParser save mean_file channel_swap output_file dirname expanduser parse_args input_file predict Classifier set_mode_cpu load isdir add_argument pretrained_model len DataFrame Detector format to_hdf detect_selective_search mean set_index to_csv detect_windows read_csv add_argument ArgumentParser read NetParameter output_image_file rankdir Merge draw_net_to_file items list DESCRIPTOR batch_size str num_output get_pooling_types_dict add_edge get_edge_label list Dot get_layer_label values name choose_color_by_layertype Edge Node bottom append type layer add_node top shape BlobProto extend flat extend BlobProtoVector ParseFromString BlobProtoVector extend tostring shape Datum flat data len astype float32 tile zoom tuple resize fill empty array concatenate shape tile empty array LayerParameter list NetParameter _to_proto extend Counter OrderedDict values iteritems isinstance extend add getattr setattr items list layers index set outputs _forward len items list _backward layers inputs index set len items list asarray extend copy next _batch iter forward values len items list asarray backward extend next _batch zip_longest zip iter forward values len ascontiguousarray list concatenate iter num zeros next range values len NamedTemporaryFile str close write data Pooling pool1 conv2 pool2 ip1 relu1 SoftmaxWithLoss Convolution NetSpec DummyData ip2 ReLU InnerProduct label conv1 Pooling SoftmaxWithLoss Convolution DummyData ReLU InnerProduct data NetSpec DummyData Silence data2 error search add group clear compile compile compile SetOutputFormat SetCountingStyle SetFilters _Filters startswith IsErrorSuppressedByNolint _ShouldPrintError write IncrementErrorCount replace append Match group find startswith endswith range error FindNextMultiLineCommentEnd RemoveMultiLineCommentsFromRange FindNextMultiLineCommentStart rstrip find range len FindEndOfExpressionInLine range len FindStartOfExpressionInLine error min search I range len FileInfo RepositoryName sep sub ParseNolintSuppressions error startswith split GetHeaderGuardCPPVariable enumerate error enumerate error len error replace count error find error find error find error find error Search error match InnermostClass replace error escape Match Search error group Search Check error lines Count End group Begin NumLines Match raw_lines range Search error match group error Match group pop group append Search pop group append Search elided replace CheckSpacingForFunctionCall rfind error len group min CloseExpression NumLines sub find CheckComment Match range Search lines_without_raw_strings error group starting_linenum Match range Search error rfind len group ReverseCloseExpression Search Match CloseExpression find error Match CloseExpression find elided error strip group FindEndOfExpressionInLine find Match range CloseExpression len error Match finditer normalize isinstance GetLineWidth int InnermostClass CheckCheck error CheckAltTokens CheckBraces CheckSpacing CheckSectionSpacing CheckEmptyBlockBody CheckAccess GetHeaderGuardCPPVariable lines_without_raw_strings _DropCommonSuffixes RepositoryName match split CheckNextIncludeOrder CanonicalizeAlphabeticalOrder FileInfo error search group SetLastHeader match _ClassifyInclude Match pop end search set append values M rstrip replace CheckCStyleCast error _GetTextInside CheckIncludeLine search group lstrip startswith Match ResetSection Search split rfind error group ReverseCloseExpression lstrip findall Match range Search ReplaceAll error Match Search endswith replace setdefault group search CleanseComments open list FilesBelongToSameModule error search copy sub NumLines FullName keys range error search CheckPosixThreading ParseNolintSuppressions CheckVlogArguments CheckMakePairUsesDeduction CheckCaffeDataLayerSetUp CheckLanguage CheckInvalidIncrement CheckCaffeRandom CheckForNonConstReference check_fn Update CheckForNonStandardConstructs CheckStyle raw_lines CheckForMultilineCommentsAndStrings CheckCaffeAlternatives CheckForFunctionLengths CleansedLines _NestingState CheckForBadCharacters CheckForNewlineAtEOF _IncludeState RemoveMultiLineComments CheckForCopyright ResetNolintSuppressions CheckForHeaderGuard NumLines CheckCompletedBlocks CheckForIncludeWhatYouUse range ProcessLine _FunctionState Error rstrip endswith len write ProcessFileData _SetVerboseLevel range split write exit join write exit _VerboseLevel int getopt _SetOutputFormat set _SetVerboseLevel PrintCategories _SetFilters _OutputFormat PrintUsage _SetCountingStyle split getreader ParseArguments ResetErrorCounts stderr exit verbose_level PrintErrorCounts StreamReaderWriter ProcessFile getwriter int time write flush load join index int rfind datetime split getctime year strip extract_datetime_from_line get_start_time total_seconds strip write get_log_created_year close extract_datetime_from_line open float get_log_created_year compile fix_initial_nan_learning_rate search group OrderedDict append float join basename write_csv print excel parse_log save_csv_files output_dir logfile_path
## Added by Assia ### Install git clone https://github.com/assiaben/hed.git cd hed make -j12 all tools pycaffe ### Run Change data path in `run.py` DATA_ROOT_DIR = '/home/gpu_user/assia/ws/datasets/kitti' Run it python run.py
1,250
abenbihi/wasabi
['image retrieval']
['Image-Based Place Recognition on Bucolic Environment Across Seasons From Semantic Edge Description']
datasets/survey.py plots/fig3.py plots/fig_perf_cmu.py tools/semantic_proc.py plots/tab2latex.py tools/edge_descriptor.py tools/edge_proc.py methods/random/cmu.py datasets/retrieval.py tools/metrics.py methods/netvlad/retrieve.py meta/words/delf/codebook_tf2np.py tools/cst.py methods/netvlad/test_rep.py tools/tools_agg.py plots/casenet_plots.py methods/wasabi/retrieve.py methods/wasabi/test_retrieve.py methods/delf/retrieve.py plots/fig1.py plots/fig8.py methods/vlad_bow/retrieve.py tools/seg.py plots/fig4.py test_get_retrieval_rank Retrieval test_show_retrieval SymphonySurvey CMUSurvey SurveyFactory Survey bench main describe_img describe_survey bench main describe_survey test random_retrieval bench_random_retrieval_cmu MSERFeatureExtractor describe_img describe_survey SURFFeatureExtractor FeatureExtractorFactory gen_codebook fvecs_read bench DelfFeatureExtractor OpenCVFeatureExtractor ORBFeatureExtractor SIFTFeatureExtractor get_img_des_dim AKAZEFeatureExtractor retrieve_one describe_img get_img_des_parallel collect_result describe_img_from_survey retrieve_parallel bench test gen_hsv_class_cityscape vis_multilabel get_class_name_cityscape contour2prob draw DesParams extract_semantic_contour draw DesParams proc fig9 perf_rec_avg_slices perf_rec_avg_surveys fig5 perf2latex log_cmu wavelet_chuang96 contour2tangeant fourier_granlund72 fourier_opencv angle_tangeant describe_semantic_edge fourier_zahn72 contours2curve draw_semantic_curves contour2patch fuse_patches gen_patches get_order score_ap_from_ranks_1 parse_results_from_list parse_results_from_file recallN mAP col2lab merge_small_blobs extract_semantic_edge lab2col load_cbk_Flickr100k Codebook normalise_vlad lf2vlad lf2bow load_cbk_delf_par1024 create WS_DIR Retrieval show_retrieval SurveyFactory recallN open create Retrieval get_size append hstack astype close get_retrieval_rank mAP SurveyFactory enumerate join WS_DIR print write get_gt_rank int32 extractor_fn lf2vlad vlad_norm get_img describe_img print get_size empty range data top_k recallN exists create Retrieval trial savetxt expand_dims get_retrieval_rank get_q_survey mAP SurveyFactory dist_pos enumerate int time norm print loadtxt get_gt_rank argsort array write_retrieval describe_survey DelfConfig mean_fn loadtxt astype float32 resize expand_dims run abs loadtxt sum enumerate sum print get_gt_rank get_retrieval_rank trial repeat top_k mAP recallN vstack append range write_retrieval enumerate create Retrieval ones print random_retrieval perf2latex trial savetxt zip range enumerate SurveyFactory dist_pos fromfile reshape copy get_local_features lf2bow agg_mode get_img_des_dim lf_mode FeatureExtractorFactory describe_semantic_edge extract_semantic_edge get_semantic_img describe_semantic_edge extract_semantic_edge append join sort get_size cpu_count apply_async close Pool range list norm ones float linear_sum_assignment keys argsort expand_dims array range len join print sort cpu_count apply_async close Pool range len get_img_des_parallel retrieve_parallel data linear_sum_assignment vstack _gen_game get_semantic_img create list Retrieval exit shape trial imshow expand_dims range describe_semantic_edge extract_semantic_edge hstack astype draw_semantic_curves keys gen_patches SurveyFactory dist_pos get_img time uint8 norm join print argsort fuse_patches zeros array len uint8 COLOR_HSV2BGR astype maximum float32 zeros range cvtColor uint8 findContours astype where col2lab imshow vstack unique append merge_small_blobs CHAIN_APPROX_NONE RETR_CCOMP lab2col list uint8 drawContours squeeze astype float32 stack GaussianBlur LABEL_NUM append zeros expand_dims sum keys range get_img norm create uint8 list items pose_v extract_semantic_contour gen_hsv_class_cityscape astype waitKey imshow contour2prob LABEL_NUM get_semantic_img expand_dims vis_multilabel SurveyFactory imwrite vstack resize append hstack zip enumerate zeros resize imwrite axis vstack xticks values list std ones waitKey ylabel shape title imshow savefig legend append ceil imread range plot hstack close mean zip enumerate int uint8 print xlabel int32 figure zeros fill_between array len imwrite axis vstack xticks values list std ones waitKey ylabel shape title imshow savefig legend append ceil imread range plot hstack close mean enumerate int uint8 print xlabel figure zeros fill_between array len ones makedirs perf_rec_avg_slices flatten int32 tile array enumerate ones makedirs perf_rec_avg_slices flatten int32 tile array enumerate print write close shape zip open range enumerate exists ones loadtxt perf2latex savetxt zip range enumerate append wavelet_chuang96 list items uint8 drawContours contourSampling findContours fourierDescriptor shape flatten unique append zeros CHAIN_APPROX_NONE max range RETR_CCOMP enumerate arctan2 print exit pi float int line contourSampling tuple squeeze t arcLength angle_tangeant append expand_dims range circle int uint8 drawContours contour2tangeant print dft squeeze zeros enumerate int uint8 drawContours contourSampling print dft squeeze astype float32 fourierDescriptor sqrt append zeros sum range enumerate uint8 drawContours contourSampling print squeeze hstack exit log wavedec Wavelet zeros expand_dims contour_sample_num int uint8 drawContours squeeze min astype float32 where mean tile unique zeros expand_dims max contour2patch append hstack range len ones items uint8 list vstack CHAIN_APPROX_NONE max squeeze waitKey exit imshow append expand_dims findContours copy RETR_CCOMP enumerate pop norm uint8 drawContours print zeros expand_dims tile where len any in1d append zeros enumerate open split float linspace enumerate pop print sort score_ap_from_ranks_1 copy parse_results_from_list append len LABEL_IGNORE uint8 astype enumerate uint8 astype unique minimum uint8 NearestNeighbors T squeeze min astype maximum copy where floodFill unique LABEL_IGNORE kneighbors sum max fit items uint8 list contours2curve findContours astype where col2lab imshow vstack unique append merge_small_blobs CHAIN_APPROX_NONE RETR_CCOMP lab2col sum ones size sign flatten sqrt dot abs T norm argmin normalise_vlad expand_dims sum norm argmin normalise_vlad unique zeros expand_dims
If you use the code, cite the following paper: ```bash @article{benbihi2019image, title={Image-Based Place Recognition on Bucolic Environment Across Seasons From Semantic Edge Description}, author={Benbihi, Assia and Geist, Matthieu and Pradalier, C{\'e}dric}, journal={Preprint}, year={2019} } ```
1,251
abewley/sort
['multiple object tracking']
['Simple Online and Realtime Tracking']
sort.py KalmanBoxTracker iou_batch linear_assignment Sort convert_bbox_to_z associate_detections_to_trackers convert_x_to_bbox parse_args lapjv minimum expand_dims maximum float sqrt iou_batch linear_assignment concatenate reshape astype where stack int32 append empty enumerate add_argument ArgumentParser
SORT ===== A simple online and realtime tracking algorithm for 2D multiple object tracking in video sequences. See an example [video here](https://alex.bewley.ai/misc/SORT-MOT17-06-FRCNN.webm). By Alex Bewley ### Introduction SORT is a barebones implementation of a visual multiple object tracking framework based on rudimentary data association and state estimation techniques. It is designed for online tracking applications where only past and current frames are available and the method produces object identities on the fly. While this minimalistic tracker doesn't handle occlusion or re-entering objects its purpose is to serve as a baseline and testbed for the development of future trackers. SORT was initially described in [this paper](http://arxiv.org/abs/1602.00763). At the time of the initial publication, SORT was ranked the best *open source* multiple object tracker on the [MOT benchmark](https://motchallenge.net/results/2D_MOT_2015/). **Note:** A significant proportion of SORT's accuracy is attributed to the detections. For your convenience, this repo also contains *Faster* RCNN detections for the MOT benchmark sequences in the [benchmark format](https://motchallenge.net/instructions/). To run the detector yourself please see the original [*Faster* RCNN project](https://github.com/ShaoqingRen/faster_rcnn) or the python reimplementation of [py-faster-rcnn](https://github.com/rbgirshick/py-faster-rcnn) by Ross Girshick.
1,252
abhi-iyer/visual-question-answering
['visual question answering']
['Stacked Attention Networks for Image Question Answering']
nntools.py train.py preprocess.py models.py VGGNet LSTM AttentionNet StatsManager NeuralNetwork Experiment process_sentence process_answer myimshow MSCOCODataset SANExperiment collate_fn join replace UNICODE strip sub enumerate compile split append process_sentence setdefault split moveaxis axis imshow figure numpy sort
# Visual Question Answering with Stacked Attention Networks (CNN, LSTM, and Attention Nets) #### Abhiram Iyer, Aravind Mahadevan, Neil Sengupta ##### UC San Diego ### Description Based off of the paper on VQA here: https://arxiv.org/pdf/1511.02274.pdf Link to Google Drive folder, containing logs and checkpoints for various experiments run on VQA model: https://drive.google.com/drive/folders/1HFTv1vd2nEoso_5tEEbKR1YlrdylhKp0?usp=sharing Please note: logs_batch200 and exp_batch200 are the logs and checkpoint files to load and run the best trained model (includes proper parameter initializations; trained with RMSprop). Download the checkpoint file and run demo.ipynb to see results. logs_batch150 and logs_batch250 describe 2 different experiments run with Adam. exp_batch250 is the checkpoint file for the experiment corresponding to logs_batch250. Both experiments are highly prone to overfitting, and do not contain proper parameter weight initializations.
1,253
abhi1nandy2/GE_healthcare_prec_challenge
['anomaly detection']
['An Adaptive Anaphylaxis Detection and Emergency Response System']
anomaly_detection_no_sys.py adversarial.py anomaly_detection_2_no_sys.py anomaly_detection.py nandu.py adv_adaptable.py time.py dat_read.py adversarial_myo_2.py gui.py plot.py const_data.py anomaly_detection_2.py adversarial_myo.py SegNet_enc SegNet_dec cervical_cancer cat_discr latent_discr train_and_val_net load_data SegNet_enc SegNet_dec cervical_cancer cat_discr latent_discr train_and_val_net load_data SegNet_enc SegNet_dec cervical_cancer cat_discr latent_discr train_and_val_net load_data SegNet_enc SegNet_dec cervical_cancer cat_discr latent_discr train_and_val_net load_data train_model bn_var_create_cnn bn_var_deconv_block bn_var_conv_block train_model bn_var_create_cnn bn_var_deconv_block bn_var_conv_block train_model bn_var_create_cnn bn_var_deconv_block bn_var_conv_block train_model bn_var_create_cnn bn_var_deconv_block bn_var_conv_block Data GUI train_model bn_var_create_cnn bn_var_deconv_block bn_var_conv_block cervical_cancer train_test_split DataLoader data cat_disc zero_grad numpy save dataset cuda max str adversarial_loss append encoder range state_dict format cl_loss eval softmax recon_loss float enumerate time decoder backward Variable print confusion_matrix randint train step len long mean int array add add bn_var_deconv_block bn_var_conv_block Adam Model Input range compile len ModelCheckpoint fit CSVLogger int
# GE Healthcare Precision Challenge 2018
1,254
abhi4ssj/few-shot-segmentation
['few shot learning', 'semantic segmentation']
["'Squeeze & Excite' Guided Few-Shot Segmentation of Volumetric Images"]
other_experiments/more/few_shot_segmentor_model5.py other_experiments/more/few_shot_segmentor_model4.py other_experiments/spatial_sne_all_with_skip_connections(Copy over effect)/few_shot_segmentor_sne_position_all_type_spatial_skipconn_baseline.py other_experiments/spatial_sne_encoder/few_shot_segmentor_sne_position_encoder_type_spatial.py other_experiments/spatial_sne_decoder/few_shot_segmentor_sne_position_decoder_type_spatial.py other_experiments/channel_sne_decoder/few_shot_segmentor_sne_position_decoder_type_channel.py other_experiments/channel_sne_encoder/few_shot_segmentor_sne_position_encoder_type_channel.py other_experiments/spatial_sne_all_without_skip_connections/few_shot_segmentor_sne_position_all_type_spatial_ch64.py other_experiments/spatial_sne_all_with_skip_connections(Copy over effect)/few_shot_segmentor_sne_position_all_type_spatial_skipconn_conditioner_baseline.py other_experiments/more/few_shot_segmentor_model6_uncertainty.py other_experiments/shaban and rakelly (channel weight regression)/few_shot_segmentor_feature_fusion_weightRegShaban_baseline.py other_experiments/more/few_shot_segmentor_model3.py other_experiments/more/few_shot_segmentor_model9.py other_experiments/more/few_shot_segmentor_unet.py run.py utils/shot_batch_sampler.py utils/evaluator_slow.py few_shot_segmentor.py utils/evaluator.py other_experiments/rakelly/few_shot_segmentor_feature_fusion_baseline.py solver.py other_experiments/channel_and_spatial_sne_all/few_shot_segmentor_sne_position_all_type_both.py other_experiments/solver_oneshot.py other_experiments/more/few_shot_segmentor_model2.py other_experiments/pretraining/few_shot_segmentor_pretrained.py other_experiments/shaban and rakelly (spatial weight regression)/few_shot_segmentor_sne_position_all_type_spatial_weightRegShaban_baseline.py other_experiments/solver_pretrained.py other_experiments/more/few_shot_segmentor_model10.py other_experiments/more/few_shot_segmentor_model8.py utils/log_utils.py settings.py other_experiments/more/few_shot_segmentor_model6.py utils/evaluator_multi_volume_support.py other_experiments/more/few_shot_segmentor_model11.py other_experiments/run_oneshot_pretrained_baseline.py other_experiments/more/few_shot_segmentor_dense_blocks.py other_experiments/channel_sne_bottleneck/few_shot_segmentor_sne_position_bn_type_channel.py other_experiments/spatial_sne_all_without_skip_connections/few_shot_segmentor_sne_position_all_type_spatial_ch32.py utils/data_utils.py other_experiments/solver_oneshot_singleOpti.py other_experiments/more/few_shot_segmentor_baseline.py other_experiments/more/few_shot_segmentor_model7.py utils/common_utils.py utils/evaluator_finetuning.py utils/evaluator_kshot.py other_experiments/channel_sne_all/few_shot_segmentor_sne_position_all_type_channel.py utils/convert_h5.py utils/preprocessor.py other_experiments/more/few_shot_segmentor_model1.py other_experiments/shaban/few_shot_segmentor_shaban_baseline.py other_experiments/solver_oneshot_multiOpti.py other_experiments/solver_oneshot_shaban_baseline.py other_experiments/spatial_sne_all_with_skip_connections(Copy over effect)/few_shot_segmentor_sne_position_all_type_spatial_skipconn_segmenter_baseline.py utils/evaluator_hack.py other_experiments/spatial_sne_bottleneck/few_shot_segmentor_sne_position_bn_type_spatial.py other_experiments/spatial_sne_all_without_skip_connections/few_shot_segmentor_sne_position_all_type_spatial_ch8.py FewShotSegmentorDoubleSDnet to_cuda SDnetConditioner SDnetSegmentor train load_data evaluate Identity _parse_values Settings Solver evaluate load_data _get_lab_list Identity train Solver Solver Solver Solver Solver FewShotSegmentorDoubleSDnet to_cuda SDnetConditioner SDnetSegmentor FewShotSegmentorDoubleSDnet to_cuda SDnetConditioner SDnetSegmentor FewShotSegmentorDoubleSDnet to_cuda SDnetConditioner SDnetSegmentor FewShotSegmentorDoubleSDnet to_cuda SDnetConditioner SDnetSegmentor FewShotSegmentorDoubleSDnet to_cuda SDnetConditioner SDnetSegmentor Segmentor FewShotSegmentorBaseLine to_cuda Conditioner Segmentor FewShotSegmentor to_cuda Conditioner FewShotSegmentorDoubleSDnet to_cuda SDnetConditioner SDnetSegmentor FewShotSegmentorDoubleSDnet to_cuda SDnetConditioner SDnetSegmentor FewShotSegmentorDoubleSDnet to_cuda SDnetConditioner SDnetSegmentor FewShotSegmentorDoubleSDnet to_cuda SDnetConditioner SDnetSegmentor FewShotSegmentorDoubleSDnet to_cuda SDnetConditioner SDnetSegmentor FewShotSegmentorDoubleSDnet to_cuda SDnetConditioner SDnetSegmentor FewShotSegmentorDoubleSDnet to_cuda SDnetConditioner SDnetSegmentor FewShotSegmentorDoubleSDnet to_cuda SDnetConditioner SDnetSegmentor FewShotSegmentorDoubleSDnet to_cuda SDnetConditioner SDnetSegmentor FewShotSegmentorDoubleSDnet to_cuda SDnetConditioner SDnetSegmentor FewShotSegmentorDoubleSDnet to_cuda SDnetConditioner SDnetSegmentor FewShotSegmentorDoubleSDnet to_cuda SDnetConditioner SDnetSegmentor FewShotSegmentorDoubleSDnet to_cuda SDnetConditioner SDnetSegmentor FewShotSegmentorDoubleSDnet to_cuda SDnetConditioner SDnetSegmentor FewShotSegmentorDoubleSDnet to_cuda SDnetConditioner SDnetSegmentor FewShotSegmentorDoubleSDnet to_cuda SDnetConditioner SDnetSegmentor FewShotSegmentorDoubleSDnet to_cuda SDnetConditioner SDnetSegmentor FewShotSegmentorDoubleSDnet to_cuda SDnetConditioner SDnetSegmentor FewShotSegmentorDoubleSDnet to_cuda SDnetConditioner SDnetSegmentor FewShotSegmentorDoubleSDnet to_cuda SDnetConditioner SDnetSegmentor FewShotSegmentorDoubleSDnet to_cuda SDnetConditioner SDnetSegmentor FewShotSegmentorDoubleSDnet to_cuda SDnetConditioner SDnetSegmentor FewShotSegmentorDoubleSDnet to_cuda SDnetConditioner SDnetSegmentor FewShotSegmentorDoubleSDnet to_cuda SDnetConditioner SDnetSegmentor FewShotSegmentorDoubleSDnet to_cuda SDnetConditioner SDnetSegmentor FewShotSegmentorDoubleSDnet to_cuda SDnetConditioner SDnetSegmentor FewShotSegmentorDoubleSDnet to_cuda SDnetConditioner SDnetSegmentor create_if_not _write_h5 apply_split convert_h5 load_data_mat ImdbData split_batch load_file_paths_brain preprocess load_data load_file_paths load_dataset get_imdb_dataset load_and_preprocess evaluate_dice_score_3view evaluate_dice_score dice_score_perclass get_range dice_confusion_matrix dice_score_binary evaluate_dice_score_2view binarize_label evaluate_dice_score_3view evaluate_dice_score dice_score_perclass get_range dice_confusion_matrix dice_score_binary evaluate_dice_score_2view binarize_label evaluate_dice_score_3view evaluate_dice_score dice_score_perclass get_range dice_confusion_matrix dice_score_binary evaluate_dice_score_2view binarize_label evaluate_dice_score_3view evaluate_dice_score dice_score_perclass get_range dice_confusion_matrix dice_score_binary evaluate_dice_score_2view binarize_label evaluate_dice_score_3view evaluate_dice_score dice_score_perclass get_range dice_confusion_matrix dice_score_binary IOU_Single evaluate_dice_score_2view IoU binarize_label CV evaluate_dice_score_3view evaluate_dice_score dice_score_perclass get_range dice_confusion_matrix dice_score_binary evaluate_dice_score_2view binarize_label LogWriter remap_labels remove_black reduce_slices rotate_orientation estimate_weights_mfb get_index_dict OneShotBatchSampler get_class_slices get_lab_list cuda print get_imdb_dataset len join str y print OneShotBatchSampler DataLoader load_data save_best_model FewShotSegmentorDoubleSDnet Solver join close evaluate_dice_score LogWriter get_lab_list log len items list sections literal_eval load ones_like ClassifierBlock FloatTensor ImdbData size astype parameters numpy type load_and_preprocess _get_lab_list makedirs int print len choice load_file_paths array split shape apply_split print load_file_paths_brain load_dataset _write_h5 join File print append load_and_preprocess print preprocess load_data_mat min max rotate_orientation loadmat max rotate_orientation min remap_labels estimate_weights_mfb reduce_slices remove_black FloatTensor type LongTensor len sum mul FloatTensor choice type len mul choice mean div diagflat zeros float sum range len list LongTensor size Tensor type range mul choice div zeros float sum range len list LongTensor FloatTensor size Tensor type range cat load print create_if_not eval load_file_paths is_available empty_cache cuda load print create_if_not eval load_file_paths is_available empty_cache cuda load print create_if_not eval load_file_paths is_available empty_cache cuda size squeeze item item size cuda item zeros_like gradient unique median zeros enumerate len isinstance zeros_like enumerate shape zeros reshape append unique enumerate shape squeeze sum
# 'Squeeze \& Excite' Guided Few-Shot Segmentation of Volumetric Images The paper is published at the journal Medical Image Analysis. Link to arxiv: https://arxiv.org/abs/1902.01314. This project contains the source code for training and evaluation for all the experiments of the aforementioned work. Root directory contains the neural network file 'few_shot_segmentaion.py' and the relevant 'solver.py' for the proposed method. ## Getting Started ### Pre-requisites You need to have following in order for this library to work as expected 1. python >= 3.5 2. pip >= 19.0 3. pytorch >= 1.0.0 4. numpy >= 1.14.0
1,255
abhi4ssj/relaynet_pytorch
['semantic segmentation']
['ReLayNet: Retinal Layer and Fluid Segmentation of Macular Optical Coherence Tomography using Fully Convolutional Network']
build/lib/relaynet_pytorch/net_api/sub_module.py relaynet_pytorch/data_utils.py relaynet_pytorch/solver.py build/lib/relaynet_pytorch/relay_net.py build/lib/relaynet_pytorch/data_utils.py build/lib/relaynet_pytorch/net_api/losses.py setup.py relaynet_pytorch/relay_net.py relaynet_pytorch/net_api/sub_module.py build/lib/relaynet_pytorch/solver.py relaynet_pytorch/net_api/losses.py ImdbData get_imdb_data ReLayNet per_class_dice create_exp_directory Solver CrossEntropyLoss2d dice_coeff DiceLoss CombinedLoss DiceCoeff DecoderBlock EncoderBlock BasicBlock ClassifierBlock ImdbData get_imdb_data ReLayNet per_class_dice create_exp_directory Solver CrossEntropyLoss2d dice_coeff DiceLoss CombinedLoss DiceCoeff DecoderBlock EncoderBlock BasicBlock ClassifierBlock list asarray reshape squeeze File shape tile sum numpy range matmul makedirs Variable zero_ zip forward is_cuda enumerate
# relaynet_pytorch PyTorch Implementation of ReLayNet. There are still some bugs and issues in the code, we are working on fixing them. Coded by Abhijit Guha Roy and Shayan Siddiqui (https://github.com/shayansiddiqui) If you use this code for any academic purpose, please cite: A. Guha Roy, S. Conjeti, S.P.K.Karri, D.Sheet, A.Katouzian, C.Wachinger, and N.Navab, "ReLayNet: retinal layer and fluid segmentation of macular optical coherence tomography using fully convolutional networks," Biomed. Opt. Express 8, 3627-3642 (2017) Link: https://arxiv.org/abs/1704.02161 Enjoy!! :)
1,256
abhineet123/river_ice_segmentation
['semantic segmentation']
['River Ice Segmentation with Deep Learning']
new_deeplab/datasets/build_ctc_data.py old_deeplab/datasets/build_617_data.py new_deeplab/utils/train_utils.py image-segmentation-keras/deeplab_keras/load_weights.py unet/split_merge_tif.py new_deeplab/utils/__init__.py video/videoseg/lib/kts/cpd_auto.py video/videoseg/lib/kts/demo.py new_deeplab/eval.py new_deeplab/export_model.py new_deeplab/core/preprocess_utils.py new_deeplab/core/resnet_v1_beta.py densenet/utils.py auto_deeplab_/genotypes.py video/videoseg/lib/pydensecrf/tests/test_utils.py selectiveDataset.py old_deeplab/utils/train_utils.py video/videoseg/lib/pyflow/demo.py video/videoseg/src/crf.py image-segmentation-keras/deeplab_keras/dl_keras_predict_test.py pytorch_deeplab/modeling/backbone/xception.py pytorch_deeplab/mypath.py densenet/DenseNet2.py video/NonLocalVideoSegmentation_release_v2/external_code/vlfeat-0.9.14/CRF_code/blocks/libsvm-3.12/tools/grid.py new_deeplab/evaluation/eval_coco_format_test.py tf_unet/tf_unet/__init__.py new_deeplab/common.py video/videoseg/src/dm_tracker.py subPatchBatch.py new_deeplab/evaluation/panoptic_quality_test.py new_deeplab/utils/save_annotation.py old_deeplab/common.py image-segmentation-keras/Models/Segnet.py old_deeplab/model_test.py densenet/densenet_predict.py new_deeplab/core/resnet_v1_beta_test.py video/NonLocalVideoSegmentation_release_v2/external_code/vlfeat-0.9.14/CRF_code/blocks/clusterrun.py new_deeplab/core/preprocess_utils_test.py video/videoseg/src/vid2shots.py video/videoseg/lib/pydensecrf/setup.py auto_deeplab_/dataloaders/__init__.py new_deeplab/core/nas_network_test.py old_deeplab/deeplab_vis.py auto_deeplab_/cocoapi/PythonAPI/setup.py new_deeplab/datasets/build_cityscapes_data.py tf_unet/tf_unet/util.py image-segmentation-keras/Models/PSPNet.py auto_deeplab_/operations.py pytorch_deeplab/modeling/deeplab.py pytorch_deeplab/ptd_utils/loss.py auto_deeplab_/dataloaders/custom_transforms.py video/videoseg/lib/pydensecrf/pydensecrf/tests/test_dcrf.py pytorch_deeplab/dataloaders/utils.py pytorch_deeplab/doc/deeplab_resnet.py auto_deeplab_/cocoapi/PythonAPI/pycocotools/__init__.py image-segmentation-keras/Models/Deeplabv3.py tf_unet/scripts/ufig_launcher.py video/videoseg/src/run_full.py unet/unet.py image-segmentation-keras/img_keras_train.py densenet/evaluation/eval_segm.py new_deeplab/datasets/data_generator_test.py image-segmentation-keras/LoadBatches.py subPatchDataset.py tf_unet/scripts/radio_util.py new_deeplab/model_test.py old_deeplab/export_model.py old_deeplab/core/xception_test.py new_deeplab/utils/get_dataset_colormap.py old_deeplab/utils/get_dataset_colormap_test.py visDataset.py new_deeplab/evaluation/parsing_covering_test.py old_deeplab/core/preprocess_utils.py video/NonLocalVideoSegmentation_release_v2/external_code/vlfeat-0.9.14/CRF_code/blocks/libsvm-3.12/tools/checkdata.py image-segmentation-keras/Models/FCN32.py densenet/indicator_learning/IndicatorLearning.py pytorch_deeplab/modeling/sync_batchnorm/__init__.py video/videoseg/lib/kts/cpd_nonlin.py pytorch_deeplab/modeling/backbone/resnet.py pytorch_deeplab/dataloaders/datasets/cityscapes.py mergeDatasets.py pytorch_deeplab/modeling/sync_batchnorm/unittest.py new_deeplab/new_deeplab_vis.py pytorch_deeplab/dataloaders/datasets/sbd.py video/videoseg/src/deepmatch.py new_deeplab/datasets/build_utils.py new_deeplab/deprecated/segmentation_dataset.py old_deeplab/datasets/segmentation_dataset.py pytorch_deeplab/modeling/sync_batchnorm/batchnorm.py new_deeplab/evaluation/parsing_covering.py stitchMultipleResults.py new_deeplab/evaluation/panoptic_quality.py pytorch_deeplab/modeling/backbone/__init__.py video/videoseg/lib/pydensecrf/pydensecrf/utils.py pytorch_deeplab/train.py auto_deeplab_/dataloaders/datasets/cityscapes.py image-segmentation-keras/img_keras_predict.py video/videoseg/src/utils.py new_deeplab/core/feature_extractor.py new_deeplab/evaluation/base_metric.py new_deeplab/core/nas_cell.py video/NonLocalVideoSegmentation_release_v2/external_code/vlfeat-0.9.14/CRF_code/blocks/libsvm-3.12/python/svm.py video/videoseg/lib/mr_saliency/MR.py tf_unet/scripts/rfi_launcher.py video/videoseg/lib/pydensecrf/tests/issue29.py video/videoseg/lib/pydensecrf/tests/issue26.py stitchSubPatchDataset.py old_deeplab/datasets/build_cityscapes_data.py pytorch_deeplab/modeling/backbone/drn.py new_deeplab/new_deeplab_train_params.py evolutionary_assignment.py new_deeplab/evaluation/test_utils.py new_deeplab/core/dense_prediction_cell.py pytorch_deeplab/ptd_utils/calculate_weights.py new_deeplab/core/utils_test.py new_deeplab/datasets/data_generator.py random_assignment_old.py video/NonLocalVideoSegmentation_release_v2/external_code/vlfeat-0.9.14/docsrc/wikidoc.py image-segmentation-keras/visualizeDataset.py new_deeplab/model.py new_deeplab/core/dense_prediction_cell_test.py video/OSVOS-TensorFlow/osvos.py new_deeplab/core/xception.py old_deeplab/utils/save_annotation.py auto_deeplab_/train_autodeeplab.py video/videoseg/src/_init_paths.py new_deeplab/evaluation/test_utils_test.py old_deeplab/eval.py new_deeplab/datasets/build_ipsc_data.py pytorch_deeplab/doc/deeplab_xception.py old_deeplab/utils/get_dataset_colormap.py new_deeplab/evaluation/streaming_metrics.py old_deeplab/core/feature_extractor.py pytorch_deeplab/dataloaders/custom_transforms.py tf_unet/tf_unet/layers.py video/OSVOS-TensorFlow/dataset.py auto_deeplab_/AutoDeeplabParams.py pytorch_deeplab/modeling/backbone/mobilenet.py new_deeplab/common_test.py auto_deeplab_/cocoapi/PythonAPI/pycocotools/coco.py new_deeplab/evaluation/eval_coco_format.py old_deeplab/datasets/build_data.py image-segmentation-keras/Models/__init__.py auto_deeplab_/dataloaders/datasets/coco.py video/videoseg/src/epic_flow.py tf_unet/setup.py video/OSVOS-TensorFlow/osvos_demo.py pytorch_deeplab/modeling/aspp.py tf_unet/scripts/ufig_util.py pytorch_deeplab/modeling/sync_batchnorm/replicate.py video/videoseg/lib/pydensecrf/examples/inference.py new_deeplab/utils/get_dataset_colormap_test.py evolutionary_assignment_multi_type.py auto_deeplab_/model_search.py tf_unet/tf_unet/image_gen.py video/videoseg/src/eval_seg.py old_deeplab/input_preprocess.py pytorch_deeplab/ptd_utils/metrics.py image-segmentation-keras/Models/Unet_rp.py video/NonLocalVideoSegmentation_release_v2/external_code/vlfeat-0.9.14/CRF_code/blocks/libsvm-3.12/tools/easy.py new_deeplab/new_deeplab_train.py pytorch_deeplab/dataloaders/__init__.py pytorch_deeplab/ptd_utils/lr_scheduler.py densenet/densenet_train.py image-segmentation-keras/deeplab_keras/extract_weights.py video/NonLocalVideoSegmentation_release_v2/external_code/vlfeat-0.9.14/docsrc/mdoc.py plotIceConcentration.py video/OSVOS-TensorFlow/osvos_parent_demo.py image-segmentation-keras/Models/VGGUnet.py new_deeplab/core/nas_network.py pytorch_deeplab/dataloaders/datasets/pascal.py auto_deeplab_/mypath.py image-segmentation-keras/deeplab_keras/__init__.py tf_unet/tf_unet/unet.py new_deeplab/core/utils.py pytorch_deeplab/ptd_utils/summaries.py tf_unet/scripts/ultrasound_launcher.py image-segmentation-keras/Models/Utils.py auto_deeplab_/dataloaders/datasets/sbd.py auto_deeplab_/cocoapi/PythonAPI/pycocotools/cocoeval.py ctc_info.py new_deeplab/datasets/build_data.py video/unsupervised-video/image_transform_layer.py video/videoseg/lib/pyflow/setup.py new_deeplab/datasets/remove_gt_colormap.py auto_deeplab_/auto_deeplab.py tf_unet/docs/conf.py random_assignment.py image-segmentation-keras/Models/VGGSegnet.py new_deeplab/datasets/build_voc2012_data.py old_deeplab/core/preprocess_utils_test.py tf_unet/scripts/ultrasound_util.py video/NonLocalVideoSegmentation_release_v2/external_code/vlfeat-0.9.14/CRF_code/blocks/libsvm-3.12/python/svmutil.py tf_unet/docs/check_sphinx.py old_deeplab/datasets/remove_gt_colormap.py unet/data.py old_deeplab/model.py old_deeplab/utils/input_generator.py pytorch_deeplab/dataloaders/datasets/combine_dbs.py tf_unet/tf_unet/image_util.py new_deeplab/new_deeplab_vis_params.py pytorch_deeplab/modeling/sync_batchnorm/comm.py pytorch_deeplab/modeling/decoder.py auto_deeplab_/dataloaders/datasets/combine_dbs.py old_deeplab/datasets/build_voc2012_data.py new_deeplab/datasets/build_ade20k_data.py pytorch_deeplab/dataloaders/datasets/coco.py old_deeplab/core/xception.py pytorch_deeplab/ptd_utils/saver.py auto_deeplab_/architect.py image-segmentation-keras/Models/Unet.py new_deeplab/datasets/ipsc_info.py video/NonLocalVideoSegmentation_release_v2/external_code/vlfeat-0.9.14/CRF_code/blocks/libsvm-3.12/tools/subset.py new_deeplab/evaluation/streaming_metrics_test.py new_deeplab/new_deeplab_run.py unet/test_predict.py auto_deeplab_/dataloaders/utils.py video/NonLocalVideoSegmentation_release_v2/external_code/vlfeat-0.9.14/docsrc/formatter.py tf_unet/scripts/launcher.py new_deeplab/core/nas_genotypes.py densenet/evaluation/unit_tests.py video/videoseg/lib/pydensecrf/pydensecrf/tests/test_eigen.py densenet/DenseNet.py new_deeplab/input_preprocess.py video/videoseg/src/nlc.py cs_rbm.py video/videoseg/lib/mr_saliency/live_demo.py auto_deeplab_/cocoapi/PythonAPI/pycocotools/mask.py image-segmentation-keras/Models/FCN8.py old_deeplab/deeplab_train.py auto_deeplab_/dataloaders/datasets/pascal.py video/NonLocalVideoSegmentation_release_v2/external_code/vlfeat-0.9.14/docsrc/webdoc.py new_deeplab/core/xception_test.py irange CTCInfo main get_metrics save_matrix count_pairwise_assignments generate_random_assignment_matrix get_metrics save_matrix main count_pairwise_assignments main str_to_list getPlotImage main count_pairwise_assignments main count_pairwise_assignments StitchParams run Params run get_vis_image Params run VisParams run Architect AutoDeeplabParams main AutoDeeplab Cell MixedOp Path Zero FactorizedReduce SepConv ReLUConvBN FactorizedIncrease Identity DilConv ASPP main Trainer COCO _isArrayLike Params COCOeval encode decode area toBbox FixedResize RandomRotate ToTensor RandomGaussianBlur Normalize RandomHorizontalFlip FixScaleCrop RandomScaleCrop decode_seg_map_sequence encode_segmap decode_segmap get_pascal_labels get_cityscapes_labels make_data_loader CityscapesSegmentation RandomCrop sp FixedResize COCOSegmentation CombineDBs VOCSegmentation SBDSegmentation DenseNet DenseNet2 sort_key resize_ar getDateTime linux_path read_data processArguments resize_ar_old LogWriter put_text_with_background print_and_write extract_classes segm_size union_classes extract_both_masks extract_masks check_size EvalSegErr frequency_weighted_IU get_pixel_area mean_IU pixel_accuracy mean_accuracy frequency_weighted_IU_UnitTests mean_IU_UnitTests pixel_accuracy_UnitTests mean_accuracy_UnitTests getDateTime selective_categorical_crossentropy delete_weights_and_model save_weights_and_model LogWriter printStatus getSegmentationArr getImageArr imageSegmentationGenerator imageSegmentationGenerator get_xception_filename get_mobilenetv2_filename extract_tensors_from_checkpoint_file Deeplabv3 preprocess_input BilinearUpsampling relu6 _xception_block SepConv_BN _make_divisible _inverted_res_block _conv2d_same FCN32 crop FCN8 segnet Unet Unet loadWeightsPartial VGGSegnet VGGUnet2 VGGUnet ModelOptions CommonTest main main _create_input_tensors preprocess_image_and_label _get_logits multi_scale_logits predict_labels refine_by_decoder predict_labels_multi_scale get_branch_logits extract_features get_extra_layer_scopes DeeplabModelTest main Phases NewDeeplabParams _build_deeplab _average_gradients _tower_loss _log_summaries _train_deeplab_model run NewDeeplabTrainParams _convert_train_id_to_eval_id _process_batch run NewDeeplabVisParams DensePredictionCell dense_prediction_cell_hparams DensePredictionCellTest get_network _preprocess_subtract_imagenet_mean _preprocess_zero_mean_unit_range _mobilenet_v2 extract_features mean_pixel NASBaseCell PNASCell config hnasnet nas_arg_scope _build_nas_base _nas_stem pnasnet NASNetworkTest create_test_input pad_to_bounding_box random_crop resize_to_range get_random_scale flip_dim _crop randomly_scale_image_and_label resolve_shape _image_dimensions PreprocessUtilsTest resnet_v1_beta resnet_v1_101_beta resnet_v1_beta_block resnet_v1_101 resnet_v1_50_beta bottleneck resnet_v1_50 root_block_fn_for_beta_variant ResnetCompleteNetworkTest create_test_input scale_dimension resize_bilinear split_separable_conv2d UtilsTest Block xception_module xception_arg_scope separable_conv2d_same xception xception_71 fixed_padding xception_65 stack_blocks_dense xception_block xception_41 UtilityFunctionTest XceptionNetworkTest create_test_input main _convert_dataset main _get_files _convert_dataset linux_path create_tfrecords irange seg_to_png _convert_dataset main Params _int64_list_feature image_seg_to_tfexample _bytes_list_feature ImageReader linux_path create_tfrecords _convert_dataset main Params resize_ar read_class_info remove_fuzziness_in_mask convert_to_raw_mask undo_resize_ar main _convert_dataset get_cityscapes_dataset_name Dataset _get_attributes_of_image DatasetTest IPSCInfo irange IPSCPatchesInfo main _save_annotation _remove_colormap get_cityscapes_dataset_name get_dataset SegmentationMetric realdiv_maybe_zero _compute_metric _is_thing_array _open_panoptic_id_image _run_metrics_worker _split_panoptic main eval_coco_format _iterate_work_queue _matched_annotations _build_metric _category_and_instance_from_annotation EvalCocoFormatTest PanopticQuality _ids_to_counts PanopticQualityTest ParsingCovering CoveringConveringTest _panoptic_quality_helper streaming_parsing_covering _parsing_covering_helper _running_total _realdiv_maybe_zero streaming_panoptic_quality StreamingPanopticQualityTest StreamingParsingCoveringTest panoptic_segmentation_with_class_map read_test_image read_segmentation_with_rgb_color_map TestUtilsTest get_cityscapes_name create_pascal_label_colormap create_cityscapes_label_colormap create_ade20k_label_colormap get_pascal_name get_ade20k_name create_label_colormap label_to_color_image get_mapillary_vistas_name get_dataset_colormap_max_entries bit_get create_mapillary_vistas_label_colormap VisualizationUtilTest save_annotation get_model_gradient_multipliers get_model_learning_rate _div_maybe_zero add_softmax_cross_entropy_loss_for_each_scale get_model_init_fn linux_path ModelOptions _build_deeplab main main _convert_train_id_to_eval_id _process_batch main main _create_input_tensors preprocess_image_and_label scale_dimension _extract_features multi_scale_logits _get_logits predict_labels refine_by_decoder predict_labels_multi_scale _split_separable_conv2d _get_branch_logits get_extra_layer_scopes DeeplabModelTest get_network _preprocess_subtract_imagenet_mean _preprocess_zero_mean_unit_range _mobilenet_v2 extract_features mean_pixel pad_to_bounding_box random_crop resize_to_range get_random_scale flip_dim _crop randomly_scale_image_and_label resolve_shape PreprocessUtilsTest Block xception_module xception_arg_scope separable_conv2d_same xception fixed_padding xception_65 stack_blocks_dense xception_block UtilityFunctionTest XceptionNetworkTest create_test_input main _convert_dataset main _get_files _convert_dataset _int64_list_feature image_seg_to_tfexample _bytes_list_feature ImageReader main _convert_dataset main _save_annotation _remove_colormap get_cityscapes_dataset_name get_dataset get_cityscapes_name create_pascal_label_colormap create_cityscapes_label_colormap get_pascal_name create_label_colormap label_to_color_image bit_get VisualizationUtilTest get _get_data save_annotation add_softmax_cross_entropy_loss_for_each_scale get_model_init_fn get_model_gradient_multipliers get_model_learning_rate Path main Trainer FixedResize RandomRotate ToTensor RandomGaussianBlur Normalize RandomHorizontalFlip FixScaleCrop RandomScaleCrop decode_seg_map_sequence encode_segmap decode_segmap get_pascal_labels get_cityscapes_labels make_data_loader CityscapesSegmentation COCOSegmentation CombineDBs VOCSegmentation SBDSegmentation ResNet DeepLabv3_plus get_1x_lr_params Bottleneck get_10x_lr_params ASPP_module ResNet101 Block DeepLabv3_plus get_1x_lr_params get_10x_lr_params SeparableConv2d SeparableConv2d_same ASPP_module fixed_padding Xception build_aspp _ASPPModule ASPP Decoder build_decoder DeepLab drn_d_54 drn_c_58 drn_d_40 drn_d_38 drn_c_26 Bottleneck drn_d_105 DRN_A drn_d_22 conv3x3 DRN drn_a_50 drn_d_24 drn_c_42 BasicBlock fixed_padding InvertedResidual conv_bn MobileNetV2 ResNet ResNet101 Bottleneck fixed_padding Block AlignedXception SeparableConv2d build_backbone _sum_ft SynchronizedBatchNorm2d _unsqueeze_ft _SynchronizedBatchNorm SynchronizedBatchNorm1d SynchronizedBatchNorm3d SyncMaster FutureResult SlavePipe execute_replication_callbacks CallbackContext DataParallelWithCallback patch_replication_callback TorchTestCase as_numpy calculate_weigths_labels SegmentationLosses LR_Scheduler Evaluator Saver TensorboardSummary test_linkcheck test_build_docs DataProvider launch create_training_path launch create_training_path DataProvider launch create_training_path DataProvider RgbDataProvider create_image_and_label to_rgb GrayScaleDataProvider SimpleDataProvider BaseDataProvider ImageDataProvider pixel_wise_softmax pixel_wise_softmax_2 crop_and_concat max_pool deconv2d conv2d weight_variable_devonc bias_variable cross_entropy weight_variable error_rate Trainer get_image_summary _update_avg_gradients Unet create_conv_net combine_img_prediction to_rgb crop_to_shape plot_prediction save_image myAugmentation dataProcess merge_img split_img myUnet waitAllHosts Host Job printDebug findFreeHost jobStatusToString fillprototype print_null svm_parameter svm_problem svm_node svm_model gen_svm_nodearray genFields toPyModel svm_train svm_load_model svm_read_problem svm_save_model svm_predict evaluations main my_float err process_options LocalWorker redraw calculate_jobs permute_sequence TelnetWorker SSHWorker main WorkerStopToken range_f Worker exit_with_help main process_options Terminal Lexer B PL L lex Formatter DL BL E extract towiki depth_first breadCrumb MFile Node runcmd xscan wikidoc usage Dataset osvos_arg_scope upsample_filt load_vgg_imagenet osvos _train train_finetune test preprocess_img load_caffe_weights interp_surgery crop_features class_balanced_cross_entropy_loss train_parent parameter_lr preprocess_labels class_balanced_cross_entropy_loss_theoretical TorchImageTransformLayer estimate_vmax cpd_auto eval_score eval_cost centering calc_scatters cpd_nonlin gen_data ButtonPanel ShowSaliency Main_Window main ShowCapture MR_debuger MR_saliency _create_pairwise_bilateral_2d create_pairwise_bilateral softmax_to_unary compute_unary create_pairwise_gaussian unary_from_labels unary_from_softmax _create_pairwise_gaussian_2d _get_simple_unary test_call_dcrf_eq_dcrf2d test_call_dcrf2d test_call_dcrf test_compact_wrong _get_simple_img test_wrong_type test_matrix_conversion test_vector_conversion test_wrong_dims test_none_type TestUnary parse_args demo_image refine_crf run_deepmatch get_examples run_epicFlow_sequence demo_videos demo_imagenet match_sequence run_epicFlow_pair run_dm_pair run_dm_sequence read_dmOutput shot_homography run_pre_homography frame_homography parse_args read_flo compute_flow save_flow_all parse_args seg_tests compute_hist fast_hist superpixels salScore2votes compute_nn nlc parse_args demo_images consensus_vote demo_videos votes2mask normalize_nn compute_saliency color_hist get_region_boxes remove_low_energy_blobs compute_descriptor demo_images parse_args draw_point_im rmdir_f refine_blobs my_accumarray mkdir_p vid2im im2vid read_r demo_images vid2shots compute_features color_hist parse_args add_path mean shape append range len join format savetxt strftime int list values shape unique sum count_pairwise_assignments count_nonzero int list format inf all get_metrics print loadtxt makedirs copy save_matrix zeros float range enumerate len list permutation zeros range enumerate len generate_random_assignment_matrix permutation sorted append concatenate get_dpi int set_title plot reshape set_xlabel grid draw subplots_adjust gca set_ylabel legend Figure get_size_inches range FigureCanvas set_ylim len out_ext ArgumentParser abs stitch_seg resize_ar basename stitch squeeze transpose waitKey meshgrid parse_args plot_changed_seg_count mean labels_ext join time uint8 not_equal labels_col seg_labels median seg_ext release show_img imshow savetxt dirname images_ext asarray calcOpticalFlowFarneback save_stitched ice_type mse seg_paths add_argument seg_root_dir imwrite out_path to_clipboard tuple images_path VideoWriter VideoWriter_fourcc shape put_text_with_background imread end_id getPlotImage astype normalize_labels stack flush seg_cols write enable_plotting tabulate mae n_classes labels_path read_data euclidean out_size selective_mode pformat start_id fps load_ice_conc_diff codec count_pairwise_assignments values strftime tqdm unique out_ext patch_seq_path imwrite patch_seq_name n_classes db_root_dir VideoWriter resize VideoWriter_fourcc destroyAllWindows release n_frames show_img list basename read_data labels_path resize_ar stitched_seq_path squeeze waitKey exit shape seq_name normalize_patches imshow dirname width mean_IU imread patch_seq_type range patch_ext end_id pixel_accuracy format read_class_info height concatenate astype copy patch_width mean src_path del_patch_seq start_id fps flush class_info_path labels_ext join getDateTime int uint8 mean_accuracy print sort makedirs write rmtree rectangle patch_height frequency_weighted_IU zeros print_and_write stacked method len min_stride check_call py_exe out_labels_ext Popen open out_img_ext strftime log_to_file append max_stride parallel img_ext replace min_rot enable_flip float n_rot log_dir linux_path split max_rot COLOR_GRAY2BGR imwrite cvtColor concatenate out_seq_name allow_missing_labels rotate_bound enable_rot get_vis_image flipud splitext vis_ext proc_labels enable_labels save_vis int32 randint fliplr remove_fuzziness_in_mask images_path seg_path max values stitch extract_classes multi_sequence_db images_ext __dict__ asarray save_path save_stitched sequences stack enumerate no_labels genotype ones decode_network AutoDeeplab tensor seed str validation batch_size close training Trainer epochs start_epoch AutoDeeplabParams manual_seed process backbone gpu_ids shape append transpose decode_segmap from_numpy show copy imshow get_pascal_labels get_cityscapes_labels zeros range zeros astype get_pascal_labels enumerate NUM_CLASSES VOCSegmentation COCOSegmentation SBDSegmentation DataLoader sp CombineDBs CityscapesSegmentation use_sbd join db_root_dir shuffle int format isinstance print len startswith append range split int shape resize zeros float write flush format FILLED putText tuple rectangle any int shape resize float full print sort format len extract_classes check_size extract_both_masks enumerate len list extract_classes logical_and check_size extract_both_masks mean sum enumerate len list extract_classes logical_and union_classes extract_both_masks check_size sum enumerate len list logical_and union_classes extract_both_masks check_size get_pixel_area sum enumerate len extract_masks unique len extract_classes union1d len zeros segm_size enumerate segm_size join remove format exists join save_weights format save float format write flush epsilon format greater_equal zeros_like write clip rollaxis astype float32 resize imread reshape astype resize zeros imread range resize list ones squeeze shape pprint getSegmentationArr append imread next range flatnonzero format concatenate glob zip getImageArr flush print sort write cycle bool len zeros_like imshow unique str replace str replace join NewCheckpointReader get_tensor print get_mobilenetv2_filename get_xception_filename save get_variable_to_shape_map makedirs format add SepConv_BN _conv2d_same range int max int format _make_divisible join format _xception_block get_source_inputs output_shape SepConv_BN _make_divisible Model load_weights dirname abspath _inverted_res_block Input _conv2d_same range print Model Input output_shape abs output_shape output_shape Model load_weights Input crop UpSampling2D Permute Reshape Sequential add ZeroPadding2D MaxPooling2D Convolution2D Activation BatchNormalization compile Layer Model Input compile merge File close range set_weights Model Input load_weights output_shape concatenate output_shape Model load_weights Input concatenate output_shape Model load_weights Input eval_logdir MakeDirs set_verbosity Dataset INFO uint8 preprocess_image_and_label squeeze placeholder expand_dims pad_to_bounding_box resize_to_range random_crop get_random_scale reshape float32 identity maximum flip_dim shape randomly_scale_image_and_label warning int32 cast set_shape mean_pixel dtype sorted reverse_v2 concat reduce_mean softmax _resize_bilinear append expand_dims argmax enumerate dtype sorted multi_scale_logits squeeze _resize_bilinear resize_nearest_neighbor prediction_with_upsampled_logits expand_dims argmax scale_dimension max dtype sorted _get_logits concat min _replace crop_size image_pooling_crop_size merge_fn set_shape _resize_bilinear output_stride outputs_to_num_classes decoder_output_stride print build_cell DensePredictionCell atrous_rates sorted refine_by_decoder get_branch_logits outputs_to_num_classes extract_features list range map raw_vis train vis phases NewDeeplabParams gpu run iteritems add_softmax_cross_entropy_loss_for_each_scale ModelOptions multi_scale_logits identity get_next set_shape _log_summaries name get_losses get_regularization_loss add_n scalar list reduce_mean stack zip append concat reduce_max image add_n resize argmax list name multiply squeeze shape cast append expand_dims format size stack unique equal model_variables items uint8 print reshape OUTPUT_TYPE histogram reduce_min scalar create_training_graph get_or_create_global_step get_model_learning_rate learning_power learning_rate_decay_step base_learning_rate MomentumOptimizer slow_start_step momentum range num_clones learning_rate_decay_factor learning_policy train_steps slow_start_learning_rate scalar to_flags Graph train_split FLAGS dataset copy enumerate join list basename as_str_any imwrite zeros_like items concatenate squeeze makedirs min dirname undo_resize_ar max range run vis_split set_verbosity dataset_dir Dataset vis_logdir INFO reshape concat to_float startswith variance_scaling_initializer l2_regularizer append conv2d batch_norm relu drop_path_keep_prob config print set_hparam total_training_steps PNASCell num_conv_filters len drop_path_keep_prob config print set_hparam total_training_steps NASBaseCell num_conv_filters len append less_equal cond random_uniform as_list shape unstack is_fully_defined greater_equal to_int32 reshape logical_and Assert shape stack rank set_shape equal greater_equal logical_and extend Assert rank random_uniform append range equal len int lin_space random_shuffle squeeze resize_bilinear float32 shape cast int32 resize_nearest_neighbor expand_dims conv2d_same partial conv2d_same Tensor isinstance separable_conv2d pad fixed_padding _split_separable_conv2d _separable_conv2d l2_regularizer join int ImageReader Glob write shuffle ceil output_dir append float range flush len val_image_label_folder _convert_dataset output_dir train_image_label_folder train_image_folder val_image_folder glob join cityscapes_root _get_files uint8 astype imwrite two_classes imwrite exists db_split use_tif imread update format num_shards seg_to_png IMREAD_UNCHANGED enumerate linux_path root_dir create_tfrecords print sort makedirs int join ImageReader format print makedirs ceil float range len Params update output_root_dir remove_fuzziness_in_mask n_classes disable_seg list waitKey imshow read_class_info amax train_ratio preprocess unique multi class_info_path reshape patches tqdm amin fuzziness append index split resize_ar int uint8 astype resize float items list zeros_like logical_and waitKey copy imshow amin range zeros amax list reshape unique zeros enumerate len squeeze fill Glob list_folder fromarray astype original_gt_folder _save_annotation glob _remove_colormap segmentation_format join num_classes TFExampleDecoder ignore_label splits_to_sizes warning defaultdict uint16 shape zeros equal join _open_panoptic_id_image ignored_label compare_and_accumulate _category_and_instance_from_annotation get _iterate_work_queue _compute_metric put iteritems iterkeys set difference viewkeys warning zeros bool max range get Process join replace _compute_metric _is_thing_array cpu_count put print_detailed_results start Queue info append _matched_annotations _build_metric range merge normalize_by_image_size print_digits gt_json_file metric num_workers gt_folder pred_json_file num_categories eval_coco_format ignored_label pred_folder intersection_offset max_instances_per_category unique compare_and_accumulate PanopticQuality executing_eagerly compare_and_accumulate ParsingCovering executing_eagerly join iteritems read_test_image reshape unique empty array iteritems read_test_image empty_like zeros list arange reversed zeros range create_label_colormap fromarray astype label_to_color_image amin amax to_float iteritems one_hot not_equal reshape resize_bilinear resize_nearest_neighbor softmax_cross_entropy get_or_create_global_step print latest_checkpoint extend get_variables_to_restore assign_from_checkpoint model_variables to_float polynomial_decay get_or_create_global_step exponential_decay items list dequeue train_split get_dataset num_clones DeploymentConfig dataset train_batch_size train_logdir uint8 also_save_vis_predictions COLOR_GRAY2BGR astype _convert_train_id_to_eval_id save_annotation cvtColor vis_split Graph vis_logdir eval_split resize_bilinear resize_bilinear resize_bilinear warning enumerate extract_features scale_dimension _extract_features _get_branch_logits decoder_output_stride separable_conv2d greater_equal logical_and Assert shape stack rank pad equal to_float to_int32 image_format db_root_dir shape imsave glob label_format create_dummy_labels zeros db_dir asarray get constant preprocess_image_and_label _get_data warning set_shape DatasetDataProvider expand_dims items list one_hot_encoding get_model_variables cuda ResNet parameters requires_grad range len parameters requires_grad range len load_url load_state_dict DRN_A load_url DRN load_state_dict load_url DRN load_state_dict load_url DRN load_state_dict load_url DRN load_state_dict load_url DRN load_state_dict load_url DRN load_state_dict load_url DRN load_state_dict load_url DRN load_state_dict load_url DRN load_state_dict list hasattr __data_parallel_replicate__ modules enumerate len replicate data isinstance sum uint8 join print astype close tqdm db_root_dir save bincount zeros numpy array log append join check_call join check_call join format exists format print glob crop_to_shape error_rate Trainer shape Unet data_provider train predict DataProvider ones randint logical_or zeros range reshape stack fabs clip truncated_normal constant shape stack slice shape exp reverse add tile stack exp reduce_sum crop_and_concat image bias_variable list OrderedDict conv2d append range format relu sqrt stack info keys enumerate constant reshape max_pool get_image_summary deconv2d weight_variable_devonc histogram weight_variable range len slice reshape stack transpose show atleast_2d subplots set_title crop_to_shape tight_layout colorbar imshow shape savefig range atleast_3d tile concatenate save str write_image read_image range open str write_image read_image append range open sleep sleep print debug genFields list sorted isinstance keys range enumerate len genFields genFields genFields contents open float split print toPyModel len zip svm_set_print_string_function svm_cross_validation isinstance print svm_parameter svm_problem print_func svm_check_parameter cross_validation x_space toPyModel evaluations n int get_svr_probability print get_svm_type len svm_predict_probability get_nr_class is_probability_model svm_predict_values gen_svm_nodearray evaluations split print format pop err exit open my_float split stdin join list format print exit map append split append pop int append len all sort write encode round max flush permute_sequence append float range_f range len appendleft get process_options getuser calculate_jobs redraw put getpass start Queue print format exit int exit_with_help len Label sort label bullet indent inner_content PL group match DL BL len pid Popen waitpid children group lstrip match startswith append open join addMFile addChildNode print sort MFile Node match listdir __next__ prev runcmd join wikidoc print print insert print readlines close len writelines append range exists open subtract shape div slice shape get_shape int upsample_filt print transpose assign append zeros subtract expand_dims array open max expand_dims array greater dict assign_from_checkpoint_fn NewCheckpointReader get_variable_to_shape_map exp greater_equal multiply float32 greater reduce_sum cast log multiply float32 greater reduce_sum sigmoid cast less log dict item dict join load_vgg_imagenet merge_all float32 placeholder sigmoid image set_verbosity global_variables_initializer ConfigProto INFO _train _train Variable float32 placeholder sigmoid Saver set_verbosity ConfigProto INFO arange argmin zeros float log cpd_nonlin centering trace list range len float log len list T cumsum reshape astype zeros diag int inf calc_scatters print ones reshape min argmin copy shape zeros max range seed list sort rand zeros range Main_Window MainLoop App Show flatten full warning ones shape clip warning meshgrid array enumerate isinstance concatenate astype float32 meshgrid array enumerate zeros range zeros range zeros sum vstack zeros _get_simple_unary _get_simple_img DenseCRF2D reshape addPairwiseBilateral setUnaryEnergy _get_simple_unary _get_simple_img create_pairwise_bilateral reshape DenseCRF addPairwiseEnergy setUnaryEnergy _get_simple_unary setUnaryEnergy create_pairwise_bilateral DenseCRF2D reshape addPairwiseBilateral DenseCRF addPairwiseEnergy _get_simple_img setUnaryEnergy ones DenseCRF2D array vectorXf astype float32 matrixXf astype float32 astype float32 float64 astype setUnaryEnergy addPairwiseGaussian print DenseCRF2D reshape addPairwiseBilateral astype ascontiguousarray set compute_unary shape unique inference zeros flat len add_argument ArgumentParser seed outIm relabel_sequential inIm refine_crf save inL parse_args array open max normalize cartToPolar zeros_like print NORM_MINMAX COLOR_HSV2BGR astype pi call getenv resize zeros imread array cvtColor join format imwrite print sort run_deepmatch copyfile choice mkdir listdir enumerate len RANSAC astype findHomography print RANSAC astype findHomography range uint8 normalize imwrite calcOpticalFlowFarneback reshape rgb2gray NORM_MINMAX astype COLOR_HSV2BGR pi savetxt OPTFLOW_FARNEBACK_GAUSSIAN zeros cartToPolar cvtColor isdir print float write run_epicFlow_pair call mkdir_p read_r range flush len minimum int print astype maximum array calc_match ones float print write copy read_dmOutput append read_r range flush len read_dmOutput save open fromarray call savetxt frame_homography read_r range draw_point_im rmdir_f mkdir_p float flush minimum print write maximum array len call getenv shot_homography save open fromarray run_epicFlow_sequence transpose run_dm_pair call read_r range draw_point_im rmdir_f size copy mkdir_p float flush isdir nditer print write match_sequence run_pre_homography array len seed join postTrackHomTh dmThresh cpysrc print outdir run_dm_sequence shotFrac matchNbr frameGap vizFlow imdir parse_args read_r use_epic preTrackHomTh vizTr cpysrc postTrackHomTh use_epic preTrackHomTh seed len parse_args read_r range run_dm_sequence shotFrac frameGap mkdir_p vizTr join dmThresh print vizFlow matchNbr split join T uint8 normalize cartToPolar imwrite reshape NORM_MINMAX read_flo astype COLOR_HSV2BGR pi call convolve2d zeros max range cvtColor join format print compute_flow mkdir range len uint8 print ncl exit astype fast_hist len flatten shape resize zeros sum array range flush open print ncl compute_hist zeros sum range time print astype write save slic zeros float range flush arange reshape my_accumarray hstack meshgrid max reshape range histogram zeros max ones shape range hstack astype sqrt hog color_hist float flush minimum int time print rgb2gray write maximum zeros get_region_boxes time print KDTree write query shape zeros float max range flush dot reshape exp ones imwrite COLOR_HSV2BGR pi save cartToPolar shape MR_saliency normalize range imresize concatenate NORM_MINMAX astype isDominant float flush saliency int time uint8 print min write coarse2fine_flow zeros cvtColor ones reshape my_accumarray shape zeros max range time print dot max range reshape shape zeros max range time uint8 concatenate ones print my_accumarray astype shape label max range superpixels load salScore2votes compute_nn int setrecursionlimit consensus_vote print votes2mask normalize_nn save compute_saliency range remove_low_energy_blobs compute_descriptor nlc outdir save open seed call shape parse_args read_r range remove_low_energy_blobs rmdir_f imresize astype frameGap mkdir_p join int uint8 print min imdir zeros array len nlc outdir save call shape remove_low_energy_blobs rmdir_f imresize astype vid2im im2vid int uint8 min zeros dosave doload exit baseOutdir sleep refine_blobs refine_crf im2vid float flush load time write vid2shots bool split VideoCapture read concatenate append open CV_FOURCC COLOR_BGR2GRAY print write copy shape VideoWriter zeros release range cvtColor makedirs rmtree sorted range copy concatenate ones my_accumarray shape label max range ndarray isinstance ones shape at isscalar tile color_hist T cpd_auto concatenate print dot compute_features zeros range fromarray Draw text insert
abhineet123/river_ice_segmentation
1,257
abhmalik/Exoplanet-Vetting-Tool
['time series analysis', 'time series']
['Exoplanet Detection using Machine Learning']
functions.py plot_selected plot_shap_values next_button_clicked refresh_button_clicked prev_button_clicked show_global_view show_local_view clear_output printmd plot_shap_values show_global_view LightCurve show_local_view title plot show_inline_matplotlib_plots title plot show_inline_matplotlib_plots plot title figure show_inline_matplotlib_plots sort_values
# Exoplanet-Vetting-Tool [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/abhmalik/Exoplanet-Vetting-Tool/master) The vetting tool is to help people explore the results from our exoplanet detection model from the paper: [Exoplanet Detection using Machine Learning](https://arxiv.org/abs/2011.14135) With the tool you can explore some of the predicted planet cases in an interactive way without any knowledge of the underlying machine learning methods and the feature calculation techniques. ## How to run the tool: 1. [open binder](https://mybinder.org/v2/gh/abhmalik/Exoplanet-Vetting-Tool/master) and run `Vetting-Tool.ipynb` 2. Run both the code blocks and the tools will initiate. After you successfully start the tool you should see the following buttons: ![preview](./data/tool.png) ## Structure of the tool: - Global View: Full view of the lightcurve - Folded View: Folded or local view i.e. lightcurve shown in phase
1,258
abhmalik/timeseries-clustering-vae
['time series']
['Variational Recurrent Auto-Encoders']
vrae/vrae.py vrae/utils.py vrae/vrae_old.py vrae/base.py BaseEstimator plot_clustering open_data Lambda Decoder Encoder _assert_no_grad VRAE Lambda Decoder Encoder _assert_no_grad VRAE print plot_clustering_plotly plot_clustering_matplotlib int permutation concatenate loadtxt shape expand_dims
TL;DR: To get started with the code, jump to Timeseries_clustering-Main.ipynb. To view a quick demo of outliers check out: Outlier_demo.ipynb. This code is originally taken from @tejaslodaya. # What is it? We present variational recurrent auto-encoder that learns the structure in the timeseries. Training is unsupervised. When we color the latent vectors with the actual labels, we show that the structure makes sense. # Results: In this project, algorithm is able to identify regions where the account behaviour differes from expected behviour and is able to identify the transaction where it was changed. For example: In the case below, we can see sudden increse in reconstruction error when account activity increases beyond its baseline. ![](./images/outlier.png) Few more cases can are saved for demostration and can be viewed at: [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/abhmalik/timeseries-clustering-vae/master) We used [Real anonymized Czech bank data](https://data.world/lpetrocelli/czech-financial-dataset-real-anonymized-transactions) for this project.
1,259
abiy-tasissa/VAE-LAND
['active learning']
['Deep Diffusion Processes for Active Learning of Hyperspectral Images']
Hyperspectral_VAE.py compute_apply_gradients log_normal_pdf VAE compute_loss log pi decode reparameterize sigmoid_cross_entropy_with_logits log_normal_pdf encode trainable_variables list gradient apply_gradients zip
# VAE-LAND VAE-LAND is an algorithm that combines diffusion process on graphs with variational autoencoders (VAE). It enjoys the mathematical tractability of diffusion process on graphs and the useful low dimensional features obtained from an optimized VAE. Formally, consider a hyperspectral image (HSI) for which we are interested to consider the task of clustering. VAE-LAND first applies VAE to extract latent features. The latent features are an input to the LAND algorithm. LAND is a provable diffusion based algorithm that is robust to different cluster geometries and noise. ## Files description `Hyperspectral_VAE.py`: This is the script that extracts the latent features of HSI using a VAE. The user can change architecture as needed. `VAE-LAND.m`: This is the main script that runs LAND on the input data obtained from running `hyperspectral_VAE.py'. ## List of data files * `salinas_train_dim40.csv`: By applying the VAE on the Salinas A dataset, with latent dimension set to 40, we obtain this dataset. * `salinas_train_label_dim40.csv`: This is the ground label of the Salinas A dataset. It can be used for evaluating the accuracy of VAE-LAND.
1,260
ablancha/gpsearch
['active learning', 'experimental design', 'anomaly detection']
['Output-Weighted Optimal Sampling for Bayesian Experimental Design and Uncertainty Quantification', 'Informative Path Planning for Extreme Anomaly Detection in Environment Exploration and Monitoring']
gpsearch/tests/testpdf.py gpsearch/tests/testIVR.py gpsearch/benchmarks/oscillator/run_benchmark.py gpsearch/core/acquisitions/base.py gpsearch/core/acquisitions/q.py gpsearch/core/kernels/__init__.py gpsearch/examples/test_funcs/main.py gpsearch/core/acquisitions/ints.py gpsearch/core/__init__.py gpsearch/core/blackbox.py gpsearch/benchmarks/benchmarker.py gpsearch/core/inputs.py gpsearch/core/acquisitions/bo.py gpsearch/core/utils.py gpsearch/core/acquisitions/lcb.py gpsearch/examples/oscillator/__init__.py gpsearch/plotting/plot_pdf.py gpsearch/tests/old_tests/testTMap.py gpsearch/examples/precursor/__init__.py gpsearch/benchmarks/precursor/run_benchmark.py gpsearch/core/acquisitions/check_acquisition.py gpsearch/core/acquisitions/pi.py gpsearch/benchmarks/brach/run_benchmark.py gpsearch/examples/__init__.py gpsearch/examples/oscillator/main.py gpsearch/core/minimizers.py gpsearch/core/likelihood.py gpsearch/core/metrics.py gpsearch/examples/test_funcs/__init__.py gpsearch/core/acquisitions/ei.py gpsearch/core/acquisitions/ivr.py gpsearch/tests/testQ.py gpsearch/benchmarks/__init__.py gpsearch/benchmarks/brach/brachistochrone.py gpsearch/__init__.py gpsearch/plotting/plot_error.py gpsearch/tests/plt_fig1.py gpsearch/tests/test_blackbox.py gpsearch/tests/testAcq.py gpsearch/examples/test_funcs/test_funcs.py gpsearch/tests/test_likelihood.py gpsearch/tests/test_sample.py gpsearch/examples/precursor/precursor.py gpsearch/core/acquisitions/us.py gpsearch/examples/oscillator/oscillator.py gpsearch/plotting/plot_smp.py gpsearch/tests/testKDE.py gpsearch/core/acquisitions/__init__.py setup.py gpsearch/tests/testIVR_LW.py gpsearch/tests/testGMM.py gpsearch/examples/precursor/main.py gpsearch/benchmarks/borehole/run_benchmark.py gpsearch/benchmarks/test_funcs/run_benchmark.py gpsearch/examples/precursor/pre_plotting.py gpsearch/core/optimaldesign.py gpsearch/core/kernels/rbf.py gpsearch/plotting/__init__.py gpsearch/tests/testUS_LW.py BenchmarkerLHS Benchmarker main map_def CustomInputs restore_X travel_time cycloid main map_def main map_def main map_def main BlackBox GaussianInputs UniformInputs Inputs LogNormalInputs Likelihood distmin_model regret_tmap mll log_pdf regret_model regret_obs recommend rmse distmin_obs funmin OptimalDesign true_pdf fix_dim_gmm grid_nint add_xnew set_worker_env process_parameters custom_KDE compute_mean_jac jacobian_fdiff compute_mean get_standard_normal_pdf_cdf comp_pca model_pdf AcquisitionWeighted Acquisition IVR_BO US_LWBO US_BO EDToBO IVR_LWBO check_acquisition EI IVR_LWInt IVRInt QInt IVR IVR_LW LCB LCB_LW PI Q US US_LW RBF main map_def Noise Oscillator ODESolver main map_def PRE ODESolver Arrow3D plot_indicator plot_trajectory plot_observable latexify plot_dangermap main Branin RosenbrockModified Ackley Michalewicz BraninModified OakleyOHagan UrsemWaves TestFunction Himmelblau Bird Bukin Hartmann6 latexify plot_error get_color get_cases latexify plot_pdf Arrow3D plot_smp3D plot_smp2D latexify plot_smp plot_likelihood_ratio main map_def main map_def main map_def main map_def compare_pdf_Oscillator benchmark_gumbel main main map_def main map_def1D map_def2D test_blackbox_shape_1D test_blackbox_shape_2D test_likelihood_gradients_nominal map_def test_likelihood_gradients_importance test_predictive_gradients_with_normalizer test_posterior_covariance_between_points_with_normalizer main map_def1D map_def2D shape atleast_2d zeros range pi log restore_X seed genfromtxt format BlackBox Benchmarker CustomInputs print BenchmarkerLHS custom_KDE run_benchmark pdf cos pi linspace sin newton sqrt diff hstack interp1d UniformInputs travel_time linspace cycloid mean solve GaussianInputs Oscillator Noise dot int PRE int solve PRE zeros comp_pca diag Ackley pi predict_noiseless mean accumulate zeros log enumerate len square flatten mean sqrt accumulate zeros enumerate len custom_KDE min isfinite pdf trapz flatten accumulate linspace zeros abs max clip enumerate len evaluate len recommend accumulate zeros enumerate recommend accumulate compute_mean zeros abs enumerate len zeros min enumerate len min len recommend accumulate zeros enumerate zeros min enumerate len set_worker_env funmin atleast_2d min argmin fun dict argsort lower input_dim draw_samples x str T mean eigh sqrt dot diag einsum T range trapz n_components range shape covariances_ precisions_ eye empty diag precisions_cholesky_ asarray diag eye atleast_2d copy set_XY vstack predict genfromtxt custom_KDE pdf int custom_KDE pdf sqrt draw_samples predict atleast_2d predict atleast_2d predictive_gradients cdf pdf atleast_2d evaluate eye zeros range flatten gaussian_kde issubclass US_LWBO isinstance US_LW LCB_LW IVR_LW lower Likelihood optimize OptimalDesign evaluate plot_pdf arange draw_samples model_pdf plot_smp plot_trajectory plot_observable plot set_xticklabels axes xlabel set_yticks set_yticklabels close ylabel ylim set_xticks tick_params figure savefig latexify xlim set_label_coords set_constrained_layout_pads plot set_xticklabels axes xlabel set_yticks set_yticklabels close ylabel ylim set_xticks tick_params figure savefig latexify xlim set_label_coords set_constrained_layout_pads plot Arrow3D view_init grid axis set_edgecolor set_xlim add_artist add_axes dict text set_zlim savefig figure set_alpha close set_ylim grid axis tick_params set_edgecolor colorbar savefig latexify plot set_xticklabels Arrow3D view_init scatter3D set_xlim close add_artist add_axes set_zlim set_alpha text dict figure set_ylim show semilogy regret_model Michalewicz arange set_yticklabels tend_fun tick_params gmean ylabel ylim log10 savefig legend latexify gstd plot set_xticklabels close accumulate mean disp_fun get_color xlim enumerate set_constrained_layout_pads median_absolute_deviation axes xlabel set_yticks set_xticks figure median fill_between std list map zip set_yticklabels linspace tick_params abs max semilogy ylabel ylim savefig latexify set_xticklabels close xlim set_constrained_layout_pads evaluate axes xlabel set_yticks min set_xticks figure fill_between plot_smp3D plot_smp2D set_yticklabels flatten tick_params list ylabel colorbar map ylim scatter savefig draw_samples latexify plot set_xticklabels close zip xlim set_constrained_layout_pads axes xlabel set_yticks set_xticks figure set_yticklabels grid set_xlabel set_edgecolor scatter savefig set_xticklabels view_init set_xlim set_zticks tight_layout close set_zlim set_zlabel set_alpha set_zticklabels axes set_yticks set_ylabel set_xticks figure set_ylim randn rand interp1d gradient flatten show GradientChecker fnTn_dx semilogy fnTn exit domain spl _evaluate_raw predictive_gradients draw_samples Likelihood InterpolatedUnivariateSpline _jacobian_raw plot input_dim T evaluate GaussianInputs print figure GPRegression model jacobian set_domain atleast_2d Acq get_eigenvalues Likelihood inputs type isinstance AcqInt flatten jacobian_fdiff subplot GradientChecker colorbar scatter title dict figure IVR IVRInt IVR_LWInt IVR_LW int time bw evaluate ones print gumbel min fit shape linspace abs max range KDEUnivariate genfromtxt show pdf_numba semilogy GaussianInputs gaussian_kde fit pdf pdf_kdepy get_eigenvalues pdf_scipy ylim linspace Noise zeros xlim diag KDE_Numba randn rand tolist abs QInt Q RBF LCB_LW GPRegression range draw_samples UniformInputs assert_allclose evaluate draw_samples UniformInputs assert_allclose evaluate atleast_2d OptimalDesign GradientChecker evaluate model inputs dict draw_samples Likelihood atleast_2d OptimalDesign GradientChecker evaluate model inputs dict draw_samples Likelihood rand GradientChecker GPRegression assert_allclose rand GPRegression posterior_covariance_between_points
# gpsearch Source code for Bayesian optimization and active learning with likelihood-weighted acquisition functions. ## Installation Execute `pip install .` from the master directory. ## Notes Beware of [this issue](https://github.com/SheffieldML/GPy/issues/802) if you are using the `devel` version of `GPy`. The acquisition functions available in `gpsearch` are compatible with the `deploy` branch of `GPy`. ## Benchmarks The following benchmarks are included: * stochastic oscillator (used [here](https://arxiv.org/abs/2006.12394)) * extreme-event precursor (used [here](https://arxiv.org/abs/2004.10599) and [here](https://arxiv.org/abs/2006.12394))
1,261
aboulch/snapnet
['semantic segmentation']
['Unstructured point cloud semantic labelingusing deep segmentation networks']
python/pytorch/pytorch_tester_backprojeter.py sem3d_test_backproj.py python/pytorch/pytorch_tester_fusion.py python/imageGenerator.py python/pytorch/pytorch_trainer_fusion.py python/tf/models/tensorflow_unet.py python/tf/models/tensorflow_residual_fusion.py python/tf/tensorflow_trainer.py python/tf/tensorflow_trainer_fusion.py sem3d_test_to_sem3D_labels.py python/tf/tensorflow_tester_backprojeter.py python/pytorch/models/net_unet.py python/tf/tensorflow_tester_fusion.py python/pytorch/models/net_fusion.py sem3d_gen_images.py python/pytorch/metrics.py sem3d_train.py python/viewGenerator.py python/pytorch/pytorch_trainer.py semantic3D_utils/setup.py label2color ImageGenerator ViewGenerator ViewGeneratorNoDisplay ViewGeneratorLauncher ViewGeneratorBase stats_accuracy_per_class stats_overall_accuracy stats_pfa_per_class stats_iou_per_class stats_f1score_per_class SnapNetDataset BackProjeter TesterFusion SnapNetDataset Trainer SnapNetDataset TrainerFusion FusionNet fusion_net unet Unet BackProjeter TesterFusion Trainer TrainerFusion model VGG16_net print_activations model array mean sum diag mean sum diag mean sum diag mean sum diag FusionNet load_pretrained_weights Unet append stop_gradient convolution2d print batch_norm VGG16_net concat convolution2d_transpose print_activations
# SnapNet: point cloud semantization using deep segmentation network ![SnapNet products](./doc/snapnet_00.png) ## Paper Please acknowledge the authors and the following research paper: "Unstructured point cloud semantic labeling using deep segmentation networks", A.Boulch and B. Le Saux and N. Audebert, Eurographics Workshop on 3D Object Retrieval 2017 Abstract and paper [here](https://boulch.eu/publications/2018_cag_snapnet). ### Project This work is part of two projects: - [INACHUS](www.inachus.eu) is European FP7 project that aims to achieve a significant time reduction related to Urban Search and Rescue (USaR) phase by providing wide-area situation awareness solutions for improved detection and localisation of the trapped victims assisted by simulation tools for predicting structural failures and a holistic decision support mechanism incorporating operational procedures and resources of relevant actors. - [DeLTA](delta-onera.github.io) is a research project hosted at ONERA, The French Aerospace Lab. Among its objectives are the development and the promotion of innovative machine learning based approaches for aerospace applications.
1,262
acbull/GPT-GNN
['graph generation']
['GPT-GNN: Generative Pre-Training of Graph Neural Networks']
GPT_GNN/model.py example_OAG/finetune_OAG_AD.py example_OAG/GPT_GNN/data.py example_OAG/finetune_OAG_PV.py example_reddit/GPT_GNN/model.py example_reddit/finetune_reddit.py example_OAG/GPT_GNN/model.py example_OAG/GPT_GNN/conv.py example_reddit/preprocess_reddit.py example_OAG/finetune_OAG_PF.py example_OAG/preprocess_OAG.py example_reddit/.ipynb_checkpoints/pretrain_reddit-checkpoint.py GPT_GNN/data.py example_OAG/pretrain_OAG.py example_reddit/GPT_GNN/data.py GPT_GNN/conv.py GPT_GNN/utils.py example_reddit/GPT_GNN/utils.py example_reddit/pretrain_reddit.py example_OAG/GPT_GNN/utils.py example_reddit/GPT_GNN/conv.py prepare_data node_classification_sample prepare_data node_classification_sample GPT_sample prepare_data GeneralConv RelTemporalEncoding HGTConv to_torch Graph RenameUnpickler renamed_load sample_subgraph GNN GPT_GNN Classifier Matcher RNNModel ndcg_at_k normalize feature_reddit sparse_mx_to_torch_sparse_tensor randint dcg_at_k load_gnn args_print mean_reciprocal_rank feature_OAG prepare_data node_classification_sample GPT_sample prepare_data GPT_sample prepare_data GeneralConv RelTemporalEncoding HGTConv Graph to_torch sample_subgraph GNN GPT_GNN Classifier Matcher RNNModel ndcg_at_k normalize feature_reddit sparse_mx_to_torch_sparse_tensor randint dcg_at_k load_gnn args_print mean_reciprocal_rank feature_OAG Graph to_torch sample_subgraph GNN GPT_GNN Classifier Matcher RNNModel ndcg_at_k normalize feature_reddit sparse_mx_to_torch_sparse_tensor randint dcg_at_k mean_reciprocal_rank feature_OAG seed str list to_torch arange batch_size print choice zeros keys enumerate sample_subgraph append n_batch apply_async arange index seed list defaultdict T concatenate len array sample_subgraph pop list defaultdict arange edge_list add_budget keys choice feature_extractor sum array range len LongTensor FloatTensor get_types len t enumerate print draw vars Texttable add_row size sorted dcg_at_k diags flatten dot sum array data Size astype float32 from_numpy shape int64 list concatenate keys zeros array list array keys
# GPT-GNN: Generative Pre-Training of Graph Neural Networks <p align="center"> <img src="images/gpt-intro.png" width="600"> <br /> <br /> </p> GPT-GNN is a pre-training framework to initialize GNNs by generative pre-training. It can be applied to large-scale and heterogensous graphs. You can see our KDD 2020 paper [“**Generative Pre-Training of Graph Neural Networks**”](https://arxiv.org/abs/2006.15437) for more details. ## Overview The key package is GPT_GNN, which contains the the high-level GPT-GNN pretraining framework, base GNN models, and base graph structure and data loader.
1,263
achaitu/SpeechDenoisingDNN
['speech enhancement']
['A Fully Convolutional Neural Network for Speech Enhancement']
codes/babble/cnn1000_withBN.py codes/babble/babblecnn.py
# Speech Enhancement using Deep Neural Networks ## Introduction Whenever we work with real time speech signals, we need to keep in mind about various types of noises that gets added to the original noise and hence resulting in corruption of noise. Therefore, in order to make a better sense of the signals, it is very much necessary to enhance the speech signals by removing the noises present in them. ## Applications: - Automatic speech recognition - Speaker recognition - Mobile communication - Hearing aids ## DNN based architectures
1,264
acm-uiuc/racerbot.rl
['imitation learning']
['End-to-end Driving via Conditional Imitation Learning']
conditional_imitation/config/racecar/scripts/listener.py self_imitation/resnet_util.py self_imitation/pretrained_cifar100.py conditional_imitation/scripts/train.py conditional_imitation/scripts/preprocess.py conditional_imitation/scripts/convert.py conditional_imitation/config/racecar/scripts/talker.py conditional_imitation/scripts/dataloader.py callback listener frames_to_mp4 rosbag_to_frames read_video AVData getFrames playFile Net get_dataset_from_loader create_val_folder get_MC_accuracy_loss plot_sync_accuracies upsample_resnet ResNet tinyimagenet_loader cifar100_loader resnet18 cifar10_loader BasicBlock load_cifar100_numpy get_accuracy_loss print reshape D array imgmsg_to_cv2 undistort ApproximateTimeSynchronizer init_node registerCallback spin Subscriber load str CvBridge read_messages message imwrite encoding print len close Bag imgmsg_to_cv2 range enumerate str print write shape VideoWriter append imread listdir range release len join read imwrite VideoCapture VideoCapture read COLOR_BGR2GRAY destroyAllWindows imshow release cvtColor VideoCapture read isOpened COLOR_BGR2GRAY destroyAllWindows imshow release cvtColor item item DataLoader Compose CIFAR10 DataLoader Compose CIFAR100 join list items readlines close makedirs rename open exists split ImageFolder create_val_folder DataLoader load_url ResNet BasicBlock load_state_dict Sequential in_features Upsample resnet18 Linear print shape vstack append to array get_dataset_from_loader DataLoader Compose CIFAR100 show reset_index plot savefig read_csv drop
# racerbot.rl autonomous racecar minimizing lap time using reinforcement learning https://github.com/acm-uiuc/racerbot.rl <Author: Kazuki Shin> # Scripts <preprocess.py> - mp4 video to frames - data parsing (parse out crash footage) - data augmenting (flip, rotate, etc) <dataloader.py>
1,265
adam-katona/dota2_death_prediction
['dota 2']
['Time to Die: Death Prediction in Dota 2 using Deep Learning']
train.py cluster_scripts/parse_job.py clean_results.py testing/load_predictions.py testing/get_test_file_list.py models.py preprocess.py test_model.py cluster_scripts/randomize_file_list.py testing/parse_whole_match.py train_scripts/run_experiment.py cluster_scripts/submit_parse_job.py data_loader.py testing/predict_on_testset.py tail postprocess_data getLabelIndicies_die_in_20 getBatchNaive getLabelIndicies_die_in_5 getBatchBalanced load_data_from_file getLabelIndicies_die_in_n getFeatureCorrectMinimal getBalancedBatchForPlayer normalize_data load_data_chunk run_cluster_randomize getFeatureCorrectAll getLabelIndicies_die_in_10 getLableIndiciesWhoDiesNext load_all_data getFeatureIndicies getLabelIndicies_die_in_15 getSequencialNaive get_h5_file_list run_cluster_calculate_norm_stats run_cluster_normalize calculate_normalization_stats getFeatureCorrectMedium SharedHeroWeightsFF LinearRegression SimpleFF add_historical_visibility_features labels_to_indicies remove_paused_datapoints add_rate_of_change_features life_state_to_times_of_death create_who_dies_next_labels create_time_until_next_death_stats hero_id_to_roles bytes_to_float read_and_preprocess_data addHeroOneHotEncoding str_to_float add_game_name_hash select_features_by_name addPositionFeaturesTower create_die_within_x_sec_feature select_features_of_hero addPositionFeatures remove_features_by_name addHeroProximities sample_data addClosestAliveTowers add_hero_role_features load_pytorch_model get_config ModelData make_predictions modelPred averagePred PlotValues DotaDataset load_pytorch_model get_config train_pytorch get_average make_predictions calculate_detailed_accuracies PlotWithStd split_chunks worker_init_fn generate_job_file load_all_presictions generate_job_file_sge generate_job_file generate_random_config time get_h5_file_list print choice calculate_normalization_stats load_data_chunk flush int time str get_h5_file_list print to_hdf shuffle load_data_chunk range flush int time str get_h5_file_list print to_hdf shuffle create_who_dies_next_labels normalize_data load_data_chunk range flush get_h5_file_list int print concat read_hdf any ceil float enumerate flush len addHeroOneHotEncoding append append postprocess_data labels_to_indicies sample range select_features_of_hero append sample labels_to_indicies postprocess_data select_features_by_name sample labels_to_indicies postprocess_data select_features_by_name sample labels_to_indicies postprocess_data select_features_by_name sample labels_to_indicies postprocess_data select_features_by_name sample labels_to_indicies postprocess_data select_features_by_name sample labels_to_indicies postprocess_data select_features_by_name str replace print calculate_normalization_stats assign range enumerate drop int str replace min assign floor append float max range enumerate postprocess_data astype float32 sample range append len postprocess_data astype float32 append range int postprocess_data labels_to_indicies concat astype float32 select_features_by_name sample range append int postprocess_data labels_to_indicies concat astype float32 select_features_by_name sample range append str drop values diff int str ceil mean append randint range zeros values len insert range append diff str min len full range enumerate str concatenate labels_to_indicies argmin astype float32 select_features_by_name range str len astype float32 zeros range enumerate astype float32 select_features_by_name values drop str astype float32 range values drop minimum str int labels_to_indicies select_features_by_name sqrt range minimum str labels_to_indicies min select_features_by_name sqrt zeros range values drop str int rint repeat zeros range insert extend select_features_by_name zip values diff float32 astype str_to_float print where str print reshape flatten repeat zeros range read_csv enumerate len addHeroProximities add_historical_visibility_features addPositionFeatures remove_paused_datapoints add_rate_of_change_features print addClosestAliveTowers add_game_name_hash life_state_to_times_of_death create_who_dies_next_labels addPositionFeaturesTower create_die_within_x_sec_feature create_time_until_next_death_stats read_csv str print concat logical_or sample sum array range values load getSequencialNaive print locate get_label_indicies_fn Adam SGD model_type load_state_dict get_feature_indicies_fn len sigmoid numpy model modelPred model labels_to_indicies save load_data_from_file values str load_pytorch_model squeeze modelPred select_features_by_name append expand_dims range get_config astype fullGameLabels swapaxes print float32 sigmoid numpy array len seed realpath dirname str __next__ final_layers argmax str print squeeze zfill colored append sum max subplot shape savefig plot get_feature_indicies_fn pop getSequencialNaive locate get_label_indicies_fn get_average mean append enumerate PlotValues model zero_grad SGD calculate_detailed_accuracies DataLoader binary_classification_loss device load_data_from_file save roc_auc_score seed str std DotaDataset PrettyPrinter step final_layers Adam logical_and pprint model_type dirname append to OptimizerType CrossEntropyLoss range state_dict glob astype mean realpath get_feature_indicies_fn type BCELoss PlotWithStd flush enumerate int time criterion backward print reshape locate get_label_indicies_fn float32 extend average_precision_score sigmoid parameters numpy array len plot xlabel ylabel clf savefig legend list errorbar xlabel ylabel clf savefig legend range len append join replace glob print len extend append range enumerate split append format format int copy choice append range
This repository contains code used for creating a model to predict which hero will die in the near future in a DOTA 2 match. The input of the model is a large number of features (2800+): for example the position, health, mana of the heroes, the cooldowns on their abilities and items, the health of the towers, etc. The output of the model is a probability estimate of each player dying in the next 5 seconds. The model is described in the paper: Adam Katona, Ryan Spick, Victoria Hodge, Simon Demediuk, Florian Block, Anders Drachen and James Alfred Walker Time to Die: Death Prediction in Dota 2 using Deep Learning, (accepted) IEEE Conference on Games (CoG) 2019 https://arxiv.org/abs/1906.03939 ``` @article{katona2019time, title={Time to Die: Death Prediction in Dota 2 using Deep Learning},
1,266
adambielski/perturbed-seg
['unsupervised object segmentation', 'semantic segmentation']
['Emergence of Object Segmentation in Perturbed Generative Models']
train.py renderer.py loss.py data.py perturber.py perturber_utils.py stylegan.py prepare_processed_lmdb.py utils.py model.py DsWrapper MultiResolutionDataset DsResizedWrapper sample_data MaskLoss min_mask_loss binarization_loss min_permask_loss min_mask_loss_batch get_masks BgFgMaskSharedStyle SimpleBgFgMask BgFgMask RandomShift BgContrastJitter AbstractPerturber CompositePerturber LayeredPerturber shift contrast_jitter random_contrast_jitter resize_and_convert resize_multiple prepare ResizeWorker resize_worker ModelWrapper LayeredRenderer equal_lr Blur BlurFunction ConvBlock StyledConvBlock init_conv PixelNorm Generator StyledGenerator Discriminator EqualConv2d StyledGenerators AdaptiveInstanceNorm init_linear NoiseInjection GeneratorNOutputs FusedUpsample FusedDownsample EqualLinear BlurFunctionBackward EqualLR ConstantInput requires_grad train accumulate log_real_images adjust_lr save get_first_n_images log_params LogThread LSUNClass NormalNoiseSampler MLFlowLogger ImageSampler CombinedLogger TensorboardLogger UniformNoiseSampler LogArtifactThread log_file RealImageSampler FakeImageSampler int Compose extend Resize DataLoader append mean size view size rand zeros_like size zip append range getvalue BytesIO save resize append resize_and_convert resize_multiple list partial range len weight zero_ xavier_normal weight zero_ kaiming_normal apply parameters data list add_ named_parameters dict keys get param_groups append iter get_first_n_images log_images data generator zero_grad perturbs log_real_images log2 set_description save tensor same_mixing used_sample list NormalNoiseSampler real_penalty lr_disc_mult discriminator iter append to next module range init_size get size chunk batch_default mean accumulate eval item log_metrics get_first_n_images mask_loss_fn int requires_grad sample_data backward extend tqdm adjust_lr step log_images vars getattr log_param start
# Emergence of Object Segmentation in Perturbed Generative Models Code for NeurIPS 2019 paper [Emergence of Object Segmentation in Perturbed Generative Models](https://arxiv.org/abs/1905.12663). ![Architecture](imgs/gen-arch.png) ![Samples](imgs/generated-samples.png) ## Usage Tested with PyTorch version 1.2.0. Download [LSUN object dataset](https://www.yf.io/p/lsun). Sample train command for the layered generative model: ``` python train.py --max_size 128 --location_jitter 0.125 --min_mask_coverage 0.25 --mask_alpha 2.0 --mixing -d lsun /path/to/lmdb/ --bg_contrast_jitter 0.3 --org_to_crop 1.125 --sched
1,267
adamjeanlaurent/Book-Recommender
['genre classification']
['Judging a Book By its Cover']
scripts/download_images.py download_image join read output_dirpath write close urlopen mkdir open
# Book Cover Dataset This dataset contains 207,572 books from the Amazon.com, Inc. marketplace. ## Challenges [Results and related papers](docs/results.md) ### Task 1: Classification #### A. Book Cover Image to Genre (BookCover30) The purpose of this task is to classify the books by the cover image. The BookCover30 dataset contains 57,000 book cover images divided into 30 classes. The training set and test set is split into 90% - 10% respectively. [Technical details](./Task1) ### Task 2: Data Mining #### Data Mining (Book32)
1,268
adamklec/copynet
['text summarization']
['Incorporating Copying Mechanism in Sequence-to-Sequence Learning']
train.py model/encoder.py dataset.py model/copynet_decoder.py evaluate.py utils.py model/attention_decoder.py model/encoder_decoder.py SequencePairDataset Language main evaluate print_output main train contains_digit trim_seqs DecoderBase largest_indices get_seq_lengths seq_to_string tokens_to_seq to_one_hot to_np AttentionDecoder CopyNetDecoder EncoderRNN EncoderDecoder NLLLoss list corpus_bleu trim_seqs view Variable sort len extend tqdm loss_function encoder_decoder sum enumerate to_np max_length join list view print float idx_to_tok seq_to_string encoder_decoder sum load sum evaluate print_output choice DataLoader split cpu SequencePairDataset cuda range interactive data corpus_bleu zero_grad add_embedding save get_response list view add_text Adam sum to_np replace trim_seqs add_histogram grad encoder_decoder keys enumerate NLLLoss evaluate backward print sort Variable named_parameters tqdm parameters loss_function step add_scalar lang isdir print mkdir save train EncoderDecoder max_length append join sum len flatten view scatter_ get dict next long enumerate len append to_np append list to_np
# CopyNet This is an implementation of CopyNet https://arxiv.org/abs/1603.06393 CopyNet extends the functionality of encoder-decoder models to allow the generation of output sequences that contain "out of vocabulary" tokens that appeared in the input sequence. Dependencies: pytorch numpy tensorboardX (for logging) tqmd (for logging) spacy (for tokenization)
1,269
addy369/AnimalAI
['unity']
['Unity: A General Platform for Intelligent Agents']
stable_baselines/her/utils.py stable_baselines/deepq/experiments/run_atari.py stable_baselines/gail/dataset/record_expert.py stable_baselines/deepq/experiments/train_cartpole.py examples/animalai_train/animalai_train/trainers/bc/online_trainer.py examples/trainCurriculum.py animalai/animalai/communicator_objects/__init__.py stable_baselines/acer/acer_simple.py stable_baselines/common/vec_env/dummy_vec_env.py stable_baselines/sac/sac.py animalai/animalai/envs/environment.py examples/animalai_train/animalai_train/trainers/meta_curriculum.py stable_baselines/acktr/run_atari.py animalai/animalai/communicator_objects/unity_rl_reset_input_pb2.py examples/animalai_wrapper.py examples/animalai_train/animalai_train/trainers/A2C.py examples/animalai_train/animalai_train/trainers/buffer.py stable_baselines/ppo1/pposgd_simple.py stable_baselines/td3/__init__.py examples/animalai_train/animalai_train/trainers/bc/models.py stable_baselines/common/base_class.py stable_baselines/common/vec_env/util.py stable_baselines/ddpg/__init__.py stable_baselines/common/vec_env/vec_video_recorder.py stable_baselines/common/noise.py stable_baselines/common/misc_util.py stable_baselines/common/running_mean_std.py animalai/animalai/communicator_objects/unity_input_pb2.py stable_baselines/common/vec_env/vec_frame_stack.py stable_baselines/common/schedules.py stable_baselines/ppo1/run_atari.py stable_baselines/ppo1/run_robotics.py stable_baselines/trpo_mpi/run_mujoco.py stable_baselines/common/callbacks.py stable_baselines/trpo_mpi/utils.py examples/animalai_train/animalai_train/trainers/bc/trainer.py animalai/animalai/communicator_objects/space_type_proto_pb2.py stable_baselines/common/env_checker.py animalai/animalai/communicator_objects/unity_message_pb2.py examples/animalai_train/animalai_train/trainers/policy.py examples/visualizeLightsOff.py stable_baselines/common/vec_env/subproc_vec_env.py stable_baselines/deepq/experiments/enjoy_mountaincar.py examples/animalai_train/animalai_train/trainers/players.py stable_baselines/her/__init__.py animalai/animalai/communicator_objects/arena_parameters_proto_pb2.py stable_baselines/td3/policies.py stable_baselines/common/identity_env.py stable_baselines/gail/dataset/dataset.py stable_baselines/ddpg/main.py stable_baselines/acktr/kfac.py animalai/animalai/communicator_objects/unity_rl_input_pb2.py examples/animalai_train/animalai_train/trainers/cnn_lstm.py stable_baselines/deepq/policies.py stable_baselines/common/bit_flipping_env.py stable_baselines/common/__init__.py stable_baselines/logger.py animalai/animalai/envs/arena_config.py stable_baselines/common/vec_env/base_vec_env.py stable_baselines/acktr/kfac_utils.py stable_baselines/deepq/dqn.py animalai/animalai/communicator_objects/unity_rl_output_pb2.py stable_baselines/common/policies.py animalai/animalai/communicator_objects/brain_parameters_proto_pb2.py examples/hyperparameters.py examples/animalai_train/setup.py examples/animalai_train/animalai_train/trainers/learn.py examples/animalai_train/animalai_train/trainers/exception.py stable_baselines/acktr/__init__.py animalai/animalai/envs/__init__.py examples/submission/agent.py stable_baselines/deepq/experiments/custom_cartpole.py examples/trainMLAgents.py examples/animalai_train/animalai_train/trainers/bc/offline_trainer.py examples/animalai_train/animalai_train/trainers/trainer_controller.py animalai/animalai/envs/socket_communicator.py stable_baselines/ppo1/__init__.py stable_baselines/common/cmd_util.py stable_baselines/common/dataset.py stable_baselines/acer/buffer.py agent.py stable_baselines/ppo2/run_atari.py examples/animalai_train/animalai_train/trainers/__init__.py stable_baselines/common/vec_env/vec_normalize.py stable_baselines/trpo_mpi/trpo_mpi.py stable_baselines/sac/policies.py stable_baselines/her/her.py examples/unity_loop.py examples/trainDopamine.py animalai/animalai/communicator_objects/unity_rl_reset_output_pb2.py stable_baselines/ppo2/run_mujoco.py examples/custom_network_policy_final.py stable_baselines/common/console_util.py stable_baselines/common/distributions.py animalai/animalai/envs/brain.py examples/trainAgent.py stable_baselines/ppo2/ppo2.py stable_baselines/sac/__init__.py examples/animalai_train/animalai_train/trainers/layers.py stable_baselines/acer/run_atari.py animalai/animalai/envs/communicator.py stable_baselines/ppo1/experiments/train_cartpole.py stable_baselines/gail/__init__.py stable_baselines/common/math_util.py stable_baselines/ddpg/policies.py examples/animalai_train/animalai_train/trainers/curriculum.py examples/animalai_train/animalai_train/trainers/ppo.py stable_baselines/deepq/experiments/enjoy_cartpole.py stable_baselines/common/evaluation.py stable_baselines/gail/adversary.py stable_baselines/acer/__init__.py stable_baselines/td3/td3.py examples/animalai_train/animalai_train/trainers/barracuda.py stable_baselines/common/vec_env/__init__.py examples/animalai_train/animalai_train/trainers/ppo/models.py animalai/animalai/envs/gym/environment.py examples/animalai_train/animalai_train/__init__.py stable_baselines/common/mpi_adam.py animalai/animalai/communicator_objects/unity_to_external_pb2.py stable_baselines/common/segment_tree.py stable_baselines/her/replay_buffer.py animalai/setup.py examples/animalai_train/animalai_train/trainers/trainer.py stable_baselines/common/runners.py stable_baselines/common/tf_layers.py animalai/animalai/communicator_objects/header_pb2.py animalai/animalai/communicator_objects/agent_action_proto_pb2.py stable_baselines/results_plotter.py animalai/animalai/communicator_objects/command_proto_pb2.py stable_baselines/common/vec_env/vec_check_nan.py stable_baselines/ppo2/__init__.py stable_baselines/gail/model.py examples/visualizeArena.py examples/animalai_train/animalai_train/trainers/bc/policy.py examples/animalai_train/animalai_train/trainers/ppo/policy.py stable_baselines/trpo_mpi/run_atari.py stable_baselines/deepq/build_graph.py stable_baselines/a2c/__init__.py stable_baselines/deepq/__init__.py stable_baselines/common/tile_images.py stable_baselines/common/mpi_moments.py animalai/animalai/communicator_objects/unity_rl_initialization_output_pb2.py examples/animalai_train/animalai_train/trainers/ppo/trainer.py examples/animalai_train/animalai_train/dopamine/animalai_lib.py stable_baselines/common/save_util.py stable_baselines/a2c/run_atari.py animalai/animalai/communicator_objects/agent_info_proto_pb2.py examples/animalai_train/animalai_train/trainers/models.py stable_baselines/__init__.py stable_baselines/trpo_mpi/__init__.py animalai/animalai/communicator_objects/unity_output_pb2.py stable_baselines/ppo1/run_mujoco.py stable_baselines/common/mpi_running_mean_std.py stable_baselines/deepq/experiments/train_mountaincar.py stable_baselines/acktr/acktr.py stable_baselines/ddpg/ddpg.py animalai/animalai/__init__.py examples/submission/test_submission/testDocker.py stable_baselines/bench/monitor.py animalai/animalai/communicator_objects/demonstration_meta_proto_pb2.py examples/animalai_train/animalai_train/trainers/bc/__init__.py animalai/animalai/communicator_objects/unity_rl_initialization_input_pb2.py animalai/animalai/communicator_objects/unity_to_external_pb2_grpc.py stable_baselines/common/tf_util.py stable_baselines/common/cg.py stable_baselines/bench/__init__.py animalai/animalai/envs/exception.py stable_baselines/a2c/a2c.py stable_baselines/common/buffers.py animalai/animalai/envs/rpc_communicator.py stable_baselines/common/atari_wrappers.py animalai/animalai/communicator_objects/engine_configuration_proto_pb2.py examples/animalai_train/animalai_train/trainers/tensorflow_to_barracuda.py examples/gym_loop.py stable_baselines/common/input.py stable_baselines/ddpg/noise.py examples/animalai_train/animalai_train/trainers/demo_loader.py animalai/animalai/communicator_objects/resolution_proto_pb2.py examples/animalai_train/animalai_train/trainers/ppo/__init__.py Agent UnityToExternalServicer UnityToExternalStub add_UnityToExternalServicer_to_server Vector3 ArenaConfig constructor_item RGB constructor_arena Item Arena BrainInfo BrainParameters Communicator UnityEnvironment UnityWorkerInUseException UnityException UnityTimeOutException UnityEnvironmentException UnityActionException RpcCommunicator UnityToExternalServicerImplementation SocketCommunicator AnimalAIEnv UnityGymException ActionFlattener AnimalWrapper AnimalSkip ActionFlattenerVec calc_rewards_v2 AnimalStack calc_rewards_v1 residual_block_fixup_attention lstm animal_conv_residual_fixup_attention LstmPolicy create_env_fn create_agent_fn create_env_fn dataset_concatenation create_env_fn create_agent_fn init_environment load_config init_environment run_step_imshow initialize_animation rainbow_network nature_dqn_network implicit_quantile_network ModelA2C BaseModel LSTMModelA2C BarracudaWriter compress Build sort lstm write fuse_batchnorm_weights trim gru Model summary Struct parse_args to_json rnn BufferException Buffer seq_to_batch animal_conv_net animal_conv_residual_fixup_attention animal_a2c_network_lstm6 batch_to_seq residual_block_fixup_attention ortho_init openai_lstm Curriculum make_demo_buffer load_demonstration demo_to_buffer CurriculumError MetaCurriculumError TrainerError run_training prepare_for_docker_run init_environment try_create_meta_curriculum main load_config MetaCurriculum LearningModel rescale_actions BasePlayer PpoPlayerDiscrete Policy UnityPolicyException PPO get_layer_shape pool_to_HW flatten process_layer process_model basic_lstm get_attr ModelBuilderContext order_by get_epsilon get_tensor_dtype replace_strings_in_list get_tensor_dims by_op remove_duplicates_from_list by_name convert strides_to_HW get_tensor_data gru UnityTrainerException Trainer TrainerController BehavioralCloningModel OfflineBCTrainer OnlineBCTrainer BCPolicy BCTrainer PPOModel PPOPolicy PPOTrainer get_gae discount_rewards Agent main valid_float_value dumpkvs HumanOutputFormat SeqWriter get_dir read_json warn set_level Logger CSVOutputFormat log logkvs make_output_format JSONOutputFormat read_tb getkvs configure TensorBoardOutputFormat debug ScopedConfigure logkv info KVWriter _demo summary_val error ProfileKV get_level logkv_mean reset profile read_csv plot_results rolling_window window_func ts2xy main plot_curves A2CRunner discount_with_dones A2C main train q_retrace strip _Runner ACER EpisodeStats get_by_index Buffer main train ACKTR KfacOptimizer factor_reshape clipout_neg gmatmul detect_min_val main train LoadMonitorResultsError load_results Monitor get_monitor_files WarpFrame LazyFrames make_atari FireResetEnv EpisodicLifeEnv ScaledFloatFrame wrap_deepmind NoopResetEnv FrameStack MaxAndSkipEnv ClipRewardEnv SetVerbosity BaseRLModel OffPolicyRLModel _UnvecWrapper TensorboardWriter ActorCriticRLModel BitFlippingEnv PrioritizedReplayBuffer ReplayBuffer EveryNTimesteps CheckpointCallback ConvertCallback BaseCallback StopTrainingOnRewardThreshold EvalCallback EventCallback CallbackList conjugate_gradient atari_arg_parser make_robotics_env mujoco_arg_parser arg_parser make_atari_env make_vec_env robotics_arg_parser make_mujoco_env fmt_row colorize fmt_item Dataset iterbatches shape_el ProbabilityDistribution MultiCategoricalProbabilityDistributionType CategoricalProbabilityDistributionType DiagGaussianProbabilityDistributionType ProbabilityDistributionType MultiCategoricalProbabilityDistribution BernoulliProbabilityDistributionType CategoricalProbabilityDistribution BernoulliProbabilityDistribution make_proba_dist_type DiagGaussianProbabilityDistribution _check_image_input _check_unsupported_obs_spaces _check_returned_values _check_obs _enforce_array_obs _check_render _check_nan check_env _check_spaces evaluate_policy IdentityEnvBox IdentityEnvMultiBinary IdentityEnv IdentityEnvMultiDiscrete observation_input unscale_action safe_mean explained_variance_2d explained_variance flatten_arrays scale_action discount_with_boundaries unflatten_vector discount boolean_flag set_global_seeds flatten_lists zipsame mpi_rank_or_zero MpiAdam test_mpi_adam _helper_runningmeanstd mpi_moments mpi_mean test_dist RunningMeanStd OrnsteinUhlenbeckActionNoise ActionNoise AdaptiveParamNoiseSpec NormalActionNoise BasePolicy CnnLstmPolicy nature_cnn CnnLnLstmPolicy MlpLstmPolicy register_policy MlpPolicy get_policy_from_name mlp_extractor ActorCriticPolicy CnnPolicy RecurrentActorCriticPolicy FeedForwardPolicy MlpLnLstmPolicy LstmPolicy traj_segment_generator AbstractEnvRunner RunningMeanStd bytes_to_params is_json_serializable params_to_bytes data_to_json json_to_data constfn linear_interpolation constant Schedule double_middle_drop double_linear_con ConstantSchedule linear_schedule PiecewiseSchedule middle_drop Scheduler get_schedule_fn LinearSchedule SegmentTree MinSegmentTree unique SumSegmentTree mlp conv_to_fc linear lstm lnlstm ortho_init conv _ln function GetFlat get_globals_vars batch_to_seq total_episode_reward_logger calc_entropy huber_loss outer_scope_getter single_threaded_session q_explained_variance seq_to_batch initialize gradient_add is_image check_shape numel get_trainable_vars intprod SetFromFlat make_session avg_norm mse in_session sample _Function var_shape flatgrad tile_images VecEnvWrapper AlreadySteppingError VecEnv NotSteppingError CloudpickleWrapper DummyVecEnv _worker _flatten_obs SubprocVecEnv obs_space_info copy_obs_dict dict_to_obs VecCheckNan VecFrameStack VecNormalize VecVideoRecorder sync_envs_normalization unwrap_vec_normalize denormalize get_target_updates reduce_std get_perturbable_vars get_perturbed_actor_updates DDPG normalize reduce_var parse_args run DDPGPolicy LnMlpPolicy LnCnnPolicy MlpPolicy CnnPolicy FeedForwardPolicy default_param_noise_filter build_act_with_param_noise build_train absolute_scope_name build_act scope_name scope_vars DQN LnMlpPolicy LnCnnPolicy MlpPolicy DQNPolicy CnnPolicy FeedForwardPolicy wrap_atari_dqn main CustomPolicy main main main main callback main TransitionClassifier logit_bernoulli_entropy logsigmoid GAIL DataLoader ExpertDataset generate_expert_traj HER HindsightExperienceReplayWrapper GoalSelectionStrategy HERGoalEnvWrapper PPO1 main train main train main train Runner swap_and_flatten PPO2 main train main train clip_but_pass_gradient apply_squashing_func gaussian_entropy gaussian_likelihood SACPolicy LnMlpPolicy LnCnnPolicy MlpPolicy CnnPolicy FeedForwardPolicy SAC TD3Policy LnMlpPolicy LnCnnPolicy MlpPolicy CnnPolicy FeedForwardPolicy TD3 main train main train TRPO add_vtarg_and_adv Agent UnityToExternalServicer UnityToExternalStub add_UnityToExternalServicer_to_server Vector3 ArenaConfig constructor_item RGB constructor_arena Item Arena BrainInfo BrainParameters Communicator UnityEnvironment UnityWorkerInUseException UnityException UnityTimeOutException UnityEnvironmentException UnityActionException RpcCommunicator UnityToExternalServicerImplementation SocketCommunicator AnimalAIEnv UnityGymException ActionFlattener AnimalWrapper AnimalSkip ActionFlattenerVec calc_rewards_v2 AnimalStack calc_rewards_v1 residual_block_fixup_attention lstm animal_conv_residual_fixup_attention LstmPolicy create_env_fn create_agent_fn create_env_fn dataset_concatenation create_env_fn create_agent_fn init_environment load_config init_environment run_step_imshow initialize_animation rainbow_network nature_dqn_network implicit_quantile_network ModelA2C BaseModel LSTMModelA2C BarracudaWriter compress Build sort lstm write fuse_batchnorm_weights trim gru Model summary Struct parse_args to_json rnn BufferException Buffer seq_to_batch animal_conv_net animal_conv_residual_fixup_attention animal_a2c_network_lstm6 batch_to_seq residual_block_fixup_attention ortho_init openai_lstm Curriculum make_demo_buffer load_demonstration demo_to_buffer CurriculumError MetaCurriculumError TrainerError run_training prepare_for_docker_run init_environment try_create_meta_curriculum main load_config MetaCurriculum LearningModel rescale_actions BasePlayer PpoPlayerDiscrete Policy UnityPolicyException PPO get_layer_shape pool_to_HW flatten process_layer process_model basic_lstm get_attr ModelBuilderContext order_by get_epsilon get_tensor_dtype replace_strings_in_list get_tensor_dims by_op remove_duplicates_from_list by_name convert strides_to_HW get_tensor_data gru UnityTrainerException Trainer TrainerController BehavioralCloningModel OfflineBCTrainer OnlineBCTrainer BCPolicy BCTrainer PPOModel PPOPolicy PPOTrainer get_gae discount_rewards Agent main valid_float_value dumpkvs HumanOutputFormat SeqWriter get_dir read_json warn set_level Logger CSVOutputFormat log logkvs make_output_format JSONOutputFormat read_tb getkvs configure TensorBoardOutputFormat debug ScopedConfigure logkv info KVWriter _demo summary_val error ProfileKV get_level logkv_mean reset profile read_csv plot_results rolling_window window_func ts2xy main plot_curves A2CRunner discount_with_dones A2C main train q_retrace strip _Runner ACER EpisodeStats get_by_index Buffer main train ACKTR KfacOptimizer factor_reshape clipout_neg gmatmul detect_min_val main train LoadMonitorResultsError load_results Monitor get_monitor_files WarpFrame LazyFrames make_atari FireResetEnv EpisodicLifeEnv ScaledFloatFrame wrap_deepmind NoopResetEnv FrameStack MaxAndSkipEnv ClipRewardEnv SetVerbosity BaseRLModel OffPolicyRLModel _UnvecWrapper TensorboardWriter ActorCriticRLModel BitFlippingEnv PrioritizedReplayBuffer ReplayBuffer EveryNTimesteps CheckpointCallback ConvertCallback BaseCallback StopTrainingOnRewardThreshold EvalCallback EventCallback CallbackList conjugate_gradient atari_arg_parser make_robotics_env mujoco_arg_parser arg_parser make_atari_env make_vec_env robotics_arg_parser make_mujoco_env fmt_row colorize fmt_item Dataset iterbatches shape_el ProbabilityDistribution MultiCategoricalProbabilityDistributionType CategoricalProbabilityDistributionType DiagGaussianProbabilityDistributionType ProbabilityDistributionType MultiCategoricalProbabilityDistribution BernoulliProbabilityDistributionType CategoricalProbabilityDistribution BernoulliProbabilityDistribution make_proba_dist_type DiagGaussianProbabilityDistribution _check_image_input _check_unsupported_obs_spaces _check_returned_values _check_obs _enforce_array_obs _check_render _check_nan check_env _check_spaces evaluate_policy IdentityEnvBox IdentityEnvMultiBinary IdentityEnv IdentityEnvMultiDiscrete observation_input unscale_action safe_mean explained_variance_2d explained_variance flatten_arrays scale_action discount_with_boundaries unflatten_vector discount boolean_flag set_global_seeds flatten_lists zipsame mpi_rank_or_zero MpiAdam test_mpi_adam _helper_runningmeanstd mpi_moments mpi_mean test_dist RunningMeanStd OrnsteinUhlenbeckActionNoise ActionNoise AdaptiveParamNoiseSpec NormalActionNoise BasePolicy CnnLstmPolicy nature_cnn CnnLnLstmPolicy MlpLstmPolicy register_policy MlpPolicy get_policy_from_name mlp_extractor ActorCriticPolicy CnnPolicy RecurrentActorCriticPolicy FeedForwardPolicy MlpLnLstmPolicy LstmPolicy traj_segment_generator AbstractEnvRunner RunningMeanStd bytes_to_params is_json_serializable params_to_bytes data_to_json json_to_data constfn linear_interpolation constant Schedule double_middle_drop double_linear_con ConstantSchedule linear_schedule PiecewiseSchedule middle_drop Scheduler get_schedule_fn LinearSchedule SegmentTree MinSegmentTree unique SumSegmentTree mlp conv_to_fc linear lstm lnlstm ortho_init conv _ln function GetFlat get_globals_vars batch_to_seq total_episode_reward_logger calc_entropy huber_loss outer_scope_getter single_threaded_session q_explained_variance seq_to_batch initialize gradient_add is_image check_shape numel get_trainable_vars intprod SetFromFlat make_session avg_norm mse in_session sample _Function var_shape flatgrad tile_images VecEnvWrapper AlreadySteppingError VecEnv NotSteppingError CloudpickleWrapper DummyVecEnv _worker _flatten_obs SubprocVecEnv obs_space_info copy_obs_dict dict_to_obs VecCheckNan VecFrameStack VecNormalize VecVideoRecorder sync_envs_normalization unwrap_vec_normalize denormalize get_target_updates reduce_std get_perturbable_vars get_perturbed_actor_updates DDPG normalize reduce_var parse_args run DDPGPolicy LnMlpPolicy LnCnnPolicy MlpPolicy CnnPolicy FeedForwardPolicy default_param_noise_filter build_act_with_param_noise build_train absolute_scope_name build_act scope_name scope_vars DQN LnMlpPolicy LnCnnPolicy MlpPolicy DQNPolicy CnnPolicy FeedForwardPolicy wrap_atari_dqn main CustomPolicy callback TransitionClassifier logit_bernoulli_entropy logsigmoid GAIL DataLoader ExpertDataset generate_expert_traj HER HindsightExperienceReplayWrapper GoalSelectionStrategy HERGoalEnvWrapper PPO1 main train Runner swap_and_flatten PPO2 main train clip_but_pass_gradient apply_squashing_func gaussian_entropy gaussian_likelihood SACPolicy LnMlpPolicy LnCnnPolicy MlpPolicy CnnPolicy FeedForwardPolicy SAC TD3Policy LnMlpPolicy LnCnnPolicy MlpPolicy CnnPolicy FeedForwardPolicy TD3 main train TRPO add_vtarg_and_adv method_handlers_generic_handler add_generic_rpc_handlers construct_mapping construct_mapping value sqrt conv2d elu channel_attention get_variable residual_block_fixup_attention conv2d elu max_pooling2d tanh value batch_to_seq concat matmul sigmoid _ln zip enumerate split AnimalAIEnv ArenaConfig load sorted savez concatenate glob print reshape replace zeros set_data range str suptitle set_data randint step range fully_connected float32 flatten div conv2d cast variance_scaling_initializer fully_connected reshape float32 reduce_sum flatten conv2d div cast softmax variance_scaling_initializer constant fully_connected multiply cos float32 pi flatten conv2d div cast tile random_uniform range join isdir print replaceFilenameExtension add_argument exit verbose source_file ArgumentParser target_file sqrt topologicalSort list hasattr layers addEdge Graph print inputs set len list hasattr layers print filter match trim_model compile data layers print tensors float16 replace layers dumps layers isinstance print tensors inputs zip to_json globals Build tanh mad tanh mul Build concat add sigmoid sub mad _ mul Build add mad reshape as_list value to_float seq_to_batch as_list value batch_to_seq zeros print conv2d Buffer reset_local_buffers number_visual_observations append_update_buffer append range enumerate make_demo_buffer load_demonstration number_steps read suffix BrainParametersProto from_agent_proto DemonstrationMetaProto ParseFromString AgentInfoProto append from_proto _DecodeVarint32 start_learning int str format external_brain_names TrainerController put init_environment try_create_meta_curriculum load_config list MetaCurriculum keys chmod format basename isdir glob copyfile copytree prepare_for_docker_run int Process getLogger print run_training start Queue info append randint docopt range endswith len HasField hasattr get_attr tensor_shape ndarray isinstance shape int_val bool_val float_val ListFields name ndarray isinstance str tensor_content ndarray product isinstance get_tensor_dtype print get_tensor_dims unpack int_val bool_val array float_val enter append add set name find_tensor_by_name split name lstm find_tensor_by_name find_forget_bias split get_layer_shape id Struct tensor hasattr name patch_data input_shapes out_shapes input get_attr append replace_strings_in_list tensors astype op zip enumerate print float32 patch_data_fn model_tensors map_ignored_layer_to_its_input co_argcount len items list get_tensors hasattr name print process_layer eval ModelBuilderContext layers verbose Struct process_model open compress node GraphDef Model dims_to_barracuda_shape insert get_tensor_dims inputs ParseFromString cleanup_layers read memories print sort write trim summary list zeros_like size reversed range asarray tolist discount_rewards Agent exec_module format ArenaConfig AnimalAIEnv module_from_spec resolution t reset spec_from_file_location step float makedirs items list logkv log log log log join strftime gettempdir getenv mpi_rank_or_zero Logger split log makedirs close log DEFAULT logkvs configure dumpkvs debug error logkv_mean warn rmtree set_level reset logkv info exists join sorted defaultdict value isdir glob keys empty nan startswith append step max enumerate summary_iterator strides rolling_window func cumsum arange values len plot xlabel ylabel tight_layout mean window_func scatter title figure xlim max enumerate append load_results plot_curves show dirs add_argument num_timesteps plot_results xaxis ArgumentParser parse_args task_name append zip A2C learn close VecFrameStack make_atari_env atari_arg_parser configure train env gather range reshape batch_to_seq minimum seq_to_batch batch_to_seq check_shape append range format warn ACER logdir get_shape list remove insert reshape transpose matmul range len cast float32 clipout_neg reduce_max greater logical_or less reduce_min cond get_shape reshape len ACKTR join reset_index get_monitor_files glob concat append sort_values NoopResetEnv make MaxAndSkipEnv WarpFrame EpisodicLifeEnv FireResetEnv ScaledFloatFrame FrameStack ClipRewardEnv f_ax callback zeros_like print copy dot range set_global_seeds seed make join set_global_seeds get_dir mpi_rank_or_zero Monitor FilterObservation make seed set_global_seeds Monitor FlattenObservation add_argument arg_parser add_argument arg_parser add_argument arg_parser join len str ndarray isinstance item abs append str asarray arange array_split tuple shuffle map Box isinstance MultiDiscrete Discrete MultiBinary warn isinstance warn Tuple VecCheckNan step range DummyVecEnv Discrete _enforce_array_obs isinstance isinstance _check_obs reset sample GoalEnv step get remove close warn render _check_image_input _check_unsupported_obs_spaces _check_returned_values _enforce_array_obs action_space warn observation_space _check_render _check_nan _check_spaces callback locals std isinstance mean render reset append step globals range predict one_hot isinstance high concat float32 placeholder cast low n var var append reshape prod range zeros_like len seed hasattr spaces set_random_seed add_argument replace seed MpiAdam update function lossandgrad minimize Variable print astype square reduce_sum set_random_seed sin global_variables_initializer range run COMM_WORLD dtype asarray zeros_like size Allreduce ravel zeros sum asarray reshape square sqrt mpi_mean COMM_WORLD seed concatenate print mpi_moments zipsame seed update initialize COMM_WORLD RunningMeanStd concatenate conv activ conv_to_fc relu format act_fun isinstance linear zip_longest enumerate issubclass __subclasses__ get on_rollout_end Box initial_state isinstance reshape high action_space low get_reward array sample zeros step on_rollout_start clip append dumps decode list str items item_generator dumps is_json_serializable items list b64decode loads encode BytesIO savez getvalue load BytesIO OrderedDict constfn float isinstance append dense layer_norm activ_fn enumerate value sqrt moments reshape prod print zip shape random_uniform exp reduce_max reduce_sum print check_shape moments int ConfigProto cpu_count getenv update variables_initializer global_variables get_default_session set run list _Function isinstance values as_list gradients int list asarray reshape transpose shape sqrt ceil float array seed var recv step close render reset getattr send setattr method isinstance Tuple spaces Dict len Dict isinstance Tuple dtype list items isinstance Tuple spaces shape append Dict venv isinstance venv deepcopy isinstance obs_rms reduce_mean square format zip name assign info append format get_globals_vars zip name shape assign info append random_normal strip get_dir set_level DISABLED Monitor AdaptiveParamNoiseSpec reset_default_graph seed set_global_seeds NormalActionNoise OrnsteinUhlenbeckActionNoise Get_rank format learn close info make join time DDPG split boolean_flag vars function q_func where stack assign random_uniform q_values argmax cond get_variable argmax perturb_vars function q_func float32 placeholder reduce_sum where reduce_mean assign softmax cond random_uniform stack bool q_values log get_variable function apply_gradients merge_all load make no_render render predict sample seed wrap_atari_dqn partial set_global_seeds learn make_atari get_dir close DQN Monitor mean float round save sigmoid logsigmoid imwrite model warn COLOR_RGB2BGR list get_env Box shape dirname append predict format learn close Discrete join items isinstance savez print reshape action_space observation_space reset zeros step array cvtColor makedirs seed configure set_global_seeds make_atari wrap_deepmind Monitor PPO1 Get_rank make_mujoco_env shape PPO2 VecNormalize DummyVecEnv zeros shape play log exp log pi cast float32 tanh TRPO list reversed append float empty range len
# Animal-AI Olympics ## The competition is now over Congratulations to our winners! 1st: Trrrrr 2nd: ironbar 3rd: sirius Results [here](http://animalaiolympics.com) Full paper, release of testing configurations, results analsysis and write-up and WBA prize announcment to come. We will also reopen submissions in the coming days in order to allow you to keep working on the Animal-AI Olympics until we disclose the test sets, these new submissions will not count as part of the competition. <p align="center">
1,270
adelabdelli/DzSentiA
['sentiment analysis']
['Sentiment Analysis of Arabic Algerian Dialect Using a Supervised Method']
Cleaning_data.py TensorFlow_model/Test_model.py Word2Vec/Train_word2vec.py SVM_model/Train_model.py TensorFlow_model/Train_model.py SVM_model/Test_model.py clean process main testModel predict getTrainingAndTestData readData classifier main predict main getSentenceMatrix getTestBatch predict getTrainBatch readData build_idsMatrix main trainModel getTestBatch replace compile join sub strip_tashkeel split print load predict testModel reader open append range len train_test_split dump LinearSVC TfidfVectorizer Pipeline fit getTrainingAndTestData time readData print classification_report classifier ravel predict load randint append zeros range print index split zeros enumerate Saver gather reset_default_graph argmax run restore BasicLSTMCell transpose tolist placeholder matmul cast append range getSentenceMatrix getTestBatch embedding_lookup latest_checkpoint DropoutWrapper equal InteractiveSession dynamic_rnn int constant truncated_normal Variable print float32 reduce_mean int32 zeros ravel len split len index save open zeros range split load randint append zeros range Saver save gather reset_default_graph argmax Session run softmax_cross_entropy_with_logits BasicLSTMCell transpose merge_all placeholder matmul strftime cast append range embedding_lookup getTrainBatch global_variables_initializer close FileWriter DropoutWrapper equal InteractiveSession dynamic_rnn int time constant truncated_normal Variable minimize graph print float32 reduce_mean int32 add_summary zeros scalar build_idsMatrix trainModel
# DzSenti Sentiment analysis on Algerian and modern standard Arabic using deep learning and SVM. In this work, we used the SVM and LSTM techniques to perform sentiment analysis on the Algerian and the modern standard Arabic, where we used two techniques of word embedding the Tf-IDF and the Word2Vec (CBOW model). In this repository, you will find the Python source code used in our research and you will find also the Word2vec text corpus, our dataset and our saved models (the Word2Vec, SVM and LSTM model). For the library and the environment that we used (Requirements) : + Python 3.6 + TensorFlow + Scikit learn + Gensim + Anaconda environment
1,271
adelra/query-expansion
['information retrieval']
['Improving Information Retrieval Results for Persian Documents using FarsNet']
hazm/BijankhanReader.py output in pickle.py hazm/SentiPersReader.py hazm/TreebankReader.py hazm/PersicaReader.py hazm/DependencyParser.py hazm/SequenceTagger.py hazm/SentenceTokenizer.py hazm/WikipediaReader.py hazm/WordTokenizer.py hazm/Chunker.py hazm/HamshahriReader.py hazm/__init__.py hazm/Normalizer.py hazm/InformalNormalizer.py hazm/Lemmatizer.py 1.py hazm/PeykareReader.py hazm/POSTagger.py main.py send to elasti.py hazm/Stemmer.py hazm/DadeganReader.py hazm/utils.py hazm/VerbValencyReader.py BijankhanReader tree2brackets Chunker RuleBasedChunker coarse_pos_e DadeganReader TurboParser DependencyParser MaltParser HamshahriReader InformalLemmatizer InformalNormalizer Lemmatizer Normalizer PersicaReader join_verb_parts coarse_pos_e PeykareReader StanfordPOSTagger POSTagger SentenceTokenizer SentiPersReader IOBTagger SequenceTagger Stemmer TreebankReader coarse_pos_e VerbValencyReader WikipediaReader WordTokenizer word_tokenize sent_tokenize tree2conlltags append WordTokenizer reversed SentenceTokenizer WordTokenizer
**Query Expansion via thesaurus** *Introduction:* Query expansion in a big part in information retrieval. It’s a big part of query understanding. Query understanding is done by inferring what does the user want from the query so that most related documents will be retrieved. In this project, I used several packages and several libraries for query expansion. NLP packages like Hazm. *Methods:* Query expansion uses several processes from Natural Language Processing. In most cases when implementing query understanding systems, a simple or sometimes very complex spell checker is used. In this project; however, our first step in this project is normalization. In normalization process we use Hazm library normalizer. The output undergoes a stemming algorithm which is partly from Hazm algorithm used with some modifications. Some suffixes were removed from the algorithm. Then a simple tokenizer is applied to the output so that tokens will be divided. The most important part of the research is the lexicon. I extracted the vocabularies and their synonyms from the book: فرهنگ جامع واژگان مترادف و متضاد زبان فارسي written by: فرجاالله خداپرستي After preprocessing of the texts from the book, and cleaning the data I dumped the words and their synonyms into a python pickle file. Python pickle is a module for serializing and de-serializing python objects. With pickle python objects will be converted into byte streams. Then I wrote a module to load this pickle file and get the input query. It will then process the input query and find the synonyms and show the nearest queries in the sense of meaning. ![Alt text](Picture.png?raw=true "diagram") *Paper:* https://arxiv.org/pdf/1811.00854.pdf
1,272
aditya-grover/bias-correction-generative
['data augmentation']
['Bias Correction of Learned Generative Models using Likelihood-Free Importance Weighting']
run.py uncertainty_utils.py dataset.py utils.py sampling_metrics.py CriticDataset3 get_gen_data CriticDataset2 get_loaders get_real_data get_eval_loaders test test_calibration main train FeatureCritic get_activation_stats compute_bv compute_bias_variance compute_iw_scores calculate_mmd calculate_inception_score check_or_download_inception get_kernel_matrices distance get_activations compute_train_test_scores create_inception_graph _get_inception_layer calculate_bv_components calculate_frechet_distance compute_scores_tf plot_calibration extended_calibration_curve plot_calibration_curve softmax from_numpy random_split transpose CIFAR10 load join cr_ds get_gen_data Compose get_real_data DataLoader cr_ds get_gen_data Compose get_real_data DataLoader format backward print squeeze dataset zero_grad binary_cross_entropy_with_logits item step enumerate len format print eval dataset len join extended_calibration_curve print plot_calibration sampledir eval mean_squared_error numpy modeldir SGD bias_variance ArgumentParser device save seed list compute_iw_scores compute_train_test_scores use_mlp test_calibration load_state_dict reference parse_args to range state_dict get_loaders format test manual_seed load join compute_bias_variance print calibration add_argument parameters train epochs view size resize_ transpose expand copy_ sqrt zeros mm print urlretrieve Path get_shape TensorShape get_operations outputs append get_tensor_by_name enumerate atleast_2d abs iscomplexobj mean average atleast_1d cov sqrtm dot eye real trace sum max imag from_numpy exp numpy mean ones outer mean sqrt average sum average exp sum log print reshape _get_inception_layer empty range run print shape get_activations model check_or_download_inception get_kernel_matrices device calculate_frechet_distance str exp getcwd calculate_mmd logsumexp load_state_dict create_inception_graph append to sum concatenate calculate_inception_score softmax power ConfigProto enumerate load join print maximum len print sem transpose len choice mean eval get_real_data datadir append array range compute_scores_tf flatten clip compute_scores_tf transpose self_norm sampledir append range sem concatenate mean eval datadir enumerate print extend get_eval_loaders numpy array mean sum average str ones_like exp print maximum logsumexp check_or_download_inception create_inception_graph power ConfigProto sum calculate_bv_components len flatten abs clip compute_bv transpose self_norm sampledir shape append range sem use_half concatenate square mean eval datadir enumerate var print extend get_eval_loaders numpy array len percentile digitize column_or_1d min linspace unique bincount max show set_title plot axes set_xlabel close set_ylabel savefig figure legend f1_score show brier_score_loss join calibration_curve set_title plot print axes recall_score set_xlabel close precision_score set_ylabel figure legend savefig mean_squared_error sum atleast_2d exp float flatten expand_dims next max
# Bias Correction of Learned Generative Models using Likelihood-Free Importance Weighting This repository provides a reference implementation for debiased evaluation of generative models as described in the paper: > Bias Correction of Learned Generative Models using Likelihood-Free Importance Weighting > [Aditya Grover](https://aditya-grover.github.io), Jiaming Song, Alekh Agarwal, Kenneth Tran, Ashish Kapoor, Eric Horvitz, Stefano Ermon. > Advances in Neural Information Processing Systems (NeurIPS), 2019. > Paper: https://arxiv.org/abs/1906.09531 > Blog: https://www.microsoft.com/en-us/research/blog/are-all-samples-created-equal-boosting-generative-models-via-importance-weighting/?OCID=msr_blog_genmodels_neurips_tw ## Requirements The codebase is implemented in Python 3.7. To install the necessary requirements, run the following commands: ```
1,273
adityashukla17/Video-Summarization
['video summarization']
['Video Summarization using Deep Semantic Features']
script/summarize.py func/sampling/vsum.py func/dataset/summe.py script/evaluate.py script/uniform_smpl.py func/nets/vid_enc.py func/nets/vid_enc_vgg19.py SUMME Model Model representativeness encodeSeg uniformity VSUM eval_human_summary eval_summary_ eval_f1 get_flabel uniform_sampling feat reduce sampleFrame model mean getChrDistances mean getDistances int astype load get T format eval_f1 loadmat open load get T format sum len min delete eval_f1 append loadmat max range open zeros list map zip print zeros float floor
The implementation of the paper "Video Summarization using Deep Semantic Features" in ACCV'16 [[arXiv](arxiv.org/abs/1609.08758)] ### Install dependency Requirements: - numpy=1.11 - scipy - scikit learn - chainer=2.0 Optional: - scikit video ( for exporting video )
1,274
adri-romsor/iterative_inference_segm
['denoising', 'semantic segmentation']
['Image Segmentation by Iterative Inference from Conditional Score Estimation']
models/fcn_resunet_unet.py models/FCDenseNet.py layers/mylayers.py test_segm_net.py crf_inference.py data_loader.py iterative_inference_valid.py models/fcn_resunet_preprocessing.py metrics.py train_fcn8.py helpers.py models/model_helpers.py models/fcn_down.py models/fcn8_dae.py models/contextmod_dae.py models/fcn8.py train_dae.py models/DAE_h.py models/fcn_resunet_model.py models/fcn_resunet_blocks.py models/fcn_up.py iterative_inference.py models/fcn8_void.py main inference load_data my_label2rgboverlay save_img build_experiment_name print_results my_label2rgb main inference main inference entropy dice_loss squared_error jaccard accuracy crossentropy binary_crossentropy squared_error_h main test main train main train DePool2D CroppingLayer GaussianNoiseLayerClip GaussianNoiseLayerSoftmax RGBtoBGRLayer buildDAE_contextmod buildDAE Network build_fcdensenet buildFCN8 buildFCN8_DAE buildFCN8 buildFCN_down _shortcut basic_block_mp basic_block bottleneck _l2 residual_block _bn_relu_conv _softmax _make_long_skip assemble_model _layer_tracker _l2 build_preprocessing _softmax build_unet UnpoolNet buildFCN_up concatenate_end2end softmax4D concatenate freezeParameters unfreezeParameters non_void_nclasses function buildFCN8 str addPairwiseGaussian dimshuffle transpose addPairwiseBilateral jaccard len pred_fcn_fn shape build_fcdensenet tensor4 unary_from_softmax next range DenseCRF2D asarray format cmap concatenate astype val_fn void_labels join mask_labels nbatches savez print reshape accuracy copy_tree nanmean load_data setUnaryEnergy makedirs join savez print add_argument shape which_set segmentation_net ArgumentParser inference parse_args dataset zeros enumerate Polyps912Dataset IsbiEmStacksDataset CamvidDataset zeros len range shape img_as_float my_label2rgb gray2rgb join str my_label2rgb gray2rgb my_label2rgboverlay savez concatenate transpose squeeze any save append argmax range print join nanmean str print squared_error build_experiment_name buildDAE_contextmod clip de_fn buildDAE buildFCN8_DAE update pred_dae_fn mean print_results get_output int float num_iter step argmax max zeros str argmax max sum set_subtensor eq cast diagonal zeros argmax range sum ones_like set_subtensor astype any nonzero argmax categorical_crossentropy ones_like set_subtensor sum astype argmax clip flatten cast nonzero sum range len clip clip mean neq sum isinstance non_void_nclasses function squared_error buildFCN8 dimshuffle jaccard pred_fcn_fn shape build_fcdensenet tensor4 next range cmap astype val_fn mean void_labels mask_labels nbatches print reshape accuracy load_data zeros len test non_void_nclasses function squared_error build_experiment_name get_value buildDAE_contextmod buildFCN8 dimshuffle set_value jaccard rmsprop shape buildDAE adam build_fcdensenet buildFCN8_DAE shared tensor4 next range update format astype fcn_fn copy val_fn void_labels float enumerate join time get_output train_fn nbatches savez print reshape get_all_params makedirs float32 copy_tree load_data get_all_layers len train ivector set_all_param_values prod regularize_network_params mean crossentropy l2 accuracy zeros penal_cst learning_rate max_patience num_epochs list Conv2DLayer concatenate print set_all_param_values freezeParameters PadLayer DimshuffleLayer shape NonlinearityLayer DilatedConv2DLayer InputLayer ReshapeLayer keys GaussianNoiseLayer buildFCN_up update int set_all_param_values freezeParameters buildFCN_down restore hidden_outputs Network DropoutLayer endswith get_value ElemwiseSumLayer ReshapeLayer DeconvLayer set_value set_all_param_values squeeze ConvLayer shape NonlinearityLayer range ElemwiseMergeLayer freezeParameters DimshuffleLayer swapaxes InputLayer T PoolLayer loadmat DropoutLayer endswith ElemwiseSumLayer ReshapeLayer GaussianNoiseLayer DeconvLayer set_value set_all_param_values squeeze ConvLayer shape NonlinearityLayer range concatenate ElemwiseMergeLayer freezeParameters DimshuffleLayer swapaxes get_params InputLayer enumerate T print loadmat PoolLayer get_all_layers ConcatLayer any zeros int str input_shape DropoutLayer concatenate BatchNormLayer freezeParameters print ConvLayer PoolLayer InputLayer range GaussianNoiseLayer sum exp max merge update format record print name _keras_shape _make_long_skip get_repetitions _layer_tracker Model prev_layer Input range print Model build_unet Input range print Model Input merge str InverseLayer DePool2D input_shape DropoutLayer DeconvLayer print BatchNormLayer input_layer ConvLayer ElemwiseSumLayer CroppingLayer list print UnpoolNet shape DimshuffleLayer NonlinearityLayer keys range ReshapeLayer get_params get_all_layers remove get_params get_all_layers add max exp zero_grad print InputLayer output_shape ConcatLayer print output_shape ConcatLayer
# Image Segmentation by Iterative Inference from Conditional Score Estimation ## Abstract Inspired by the combination of feedforward and iterative computations in the visual cortex, and taking advantage of the ability of denoising autoencoders to estimate the score of a joint distribution, we propose a novel approach to iterative inference for capturing and exploiting the complex joint distribution of output variables conditioned on some input variables. This approach is applied to image pixel-wise segmentation, with the estimated conditional score used to perform gradient ascent towards a mode of the estimated conditional distribution. This extends previous work on score estimation by denoising autoencoders to the case
1,275
adrienPoulenard/SPHnet
['data augmentation']
['Effective Rotation-invariant Point CNN with Spherical Harmonics kernels']
SPHnet/networks/seg_network.py SPHnet/utils/batch_norm.py SPHnet/data_providers/classifiaction_provider.py SPHnet/layers/kd_tree_pooling.py SPHnet/utils/confusion_matrix.py SPHnet/utils/save_model.py SPHnet/methods/classification3_methods.py SPHnet/layers/kd_tree_deconv.py SPHnet/train_segmentation.py SPHnet/spherical_harmonics/higher_clebsh_gordan.py SPHnet/networks/classification_network.py SPHnet/data_providers/classification_datasets.py SPHnet/spherical_harmonics/tf_spherical_harmonics.py SPHnet/utils/pointclouds_utils.py SPHnet/data_providers/seg_provider.py SPHnet/spherical_harmonics/wigner_matrix.py SPHnet/spherical_harmonics/np_spherical_harmonics.py SPHnet/data_providers/segmentation_datasets.py SPHnet/networks/conv_net.py SPHnet/utils/sh_conv.py SPHnet/utils/conv_kernel.py SPHnet/layers/kd_tree_conv_layer.py SPHnet/utils/data_prep_utils.py SPHnet/spherical_harmonics/clebsh_gordan_decomposition.py SPHnet/methods/segmentation_methods.py SPHnet/utils/patches_builder.py SPHnet/train_classification.py save_results test save_model_ load_dataset train save_test_results save_results_ train test IoU__ save_model_ save_train_results load_dataset save_part_labels ClassificationProvider load_h5_data_multires_ ClassificationProvider2 index_points kdtree_index tile eigen_tree_index_2_ load_h5_data_multires SegmentationProvider b_tree_sh_inv_conv_params BinaryTreeShInvariantConvLayer BinaryTreeShConv BinaryTreeConvElements BinaryTreeShInvariantConv get_b_tree_conv_elems_params BinaryTreeShConvLayer kd_tree_upsample KdTreeDeconv KdTreePooling pool1d pool_input_kd ClassNetwork ConvNet DeconvNetBis DeconvNet SegmentationNetwork tf_clebsh_gordan_matrices__ higher_tensor_decomposition_unit_test complex_conj real_Q_from_cb_ tensor_decomposition_unit_test npClebshGordanMatrices unit_test5 real_tensor_decomposition_unit_test tf_clebsh_gordan_matrices_ higher_product higher_product_matrix clebsch_gordan_ tensor_decomposition_unit_test___ unit_test4 np_clebsh_gordan_matrices__ Q_from_cb_ real_conj unit_test6 Q_from_cb np_clebsh_gordan_matrix invariant_feature tensor_decomposition_unit_test__ real_tensor_decomposition_unit_test__ real_Q_from_cb tf_clebsh_gordan_matrices clebsch_gordan tfClebshGordanMatrices list_increasing_indices_recursive_ list_to_string_ list_increasing_indices_recursive list_irreducible_invariants_recursive list_irreducible_invariants_recursive_q_ multi_index_ monomial_index_ string_to_list_ npInvariantPolynomials list_irreductible_invariants_recursive_q npHigherClebshGordan sh_to_global_index_conversion_ npClebshGordanPolynomial list_increasing_indices_recursive__ global_to_sh_index_conversion_ orthonormalize_polynomials np_unnormalized_real_sh np_normalized_real_sh normalized_sh unnormalized_complex_sh unnormalized_sh unnormalized_real_sh complex_wigner_ complex_D_wigner y_rot real_D_wigner_ real_D_wigner_from_euler complex_wigner_1_ euler_rot_zyz wigner_d_matrix complex_wigner_2_ complex_to_real_sh real_D_wigner_from_quaternion wigner_d_matrix_coeffs real_to_complex_sh z_rot diag_exp batch_norm_template MyLayer get_confusion_matrix_one_hot confusion_mat plot_confusion_matrix_ plot_confusion_mat plot_confusion_matrix plot_confusion_mat_ ConvKernel read_and_sample_off nn_correspondance save_h5 load_h5_files uniform_mesh_sampling pad_arr_rows hdf5_seg_dataset save_h5_data_label_normal sample_points load_ply_normal load_h5_data_label_seg save_h5_datset read_off np_mat_to_pandas load_ply_data sample_faces load_h5_data_label_normal load_h5 load_dense_matrix BuildPatches save_model save_training_acc save_tensor create_dir save_list save_matrix tf_segment_indicator_ tf_segment_indictor tf_hat tf_gaussian tf_zero tf_sh_sinusoid_kernel sh_norm sh_invar_conv_ sh_eqvar_conv_1 sh_invar_conv ShKernel tf_sh_kernel_ tf_heaviside tf_sh_kernel ClassificationProvider categorical_crossentropy get_network_model fit_generator n_classes load_weights summary compile print reshape predict_generator astype float32 confusion_matrix get_data mean argmax equal join save_model join save_matrix array SegmentationProvider n_parts ones multiply maximum where divide zeros sum join File close create_dataset rotate_point_cloud_batch to_categorical get_batch_size values list predict_on_batch cat_to_labels get_preprocess append sum range pc_batch_preprocess concatenate get_num_classes get_num_parts copy seg_parts float keys T get_num_points divide dot zeros array len join save_matrix array save_training_acc join save_matrix array save_training_acc join save_matrix array cKDTree take range indices eigen_tree_index_2 range zeros range eigen_tree_index_2 append File range len join load_h5_data_multires_ concatenate append range len dict dict list tuple ndim tile int_shape expand_dims expand_dims pool2d list pool3d pool2d int_shape pool_func len min float max range factorial clebsch_gordan zeros range clebsch_gordan zeros range T matmul complex_to_real_sh conjugate clebsch_gordan zeros kron range T asarray reshape matmul complex_to_real_sh Q_from_cb_ conjugate kron convert_to_tensor str abs append range Q_from_cb convert_to_tensor str Q_from_cb_ append abs range real_Q_from_cb_ Q_from_cb Q_from_cb_ real_Q_from_cb str print abs real append range imag np_clebsh_gordan_matrix convert_to_tensor int concatenate abs min append range Q_from_cb complex_wigner_ T norm print asmatrix rand matmul kron Q_from_cb complex_wigner_ abs asmatrix print rand sqrt kron range complex_wigner_ norm print asmatrix rand real_conj kron Q_from_cb T complex_D_wigner norm print real_conj kron Q_from_cb T complex_D_wigner norm print abs range real_conj zeros kron Q_from_cb tensor_decomposition_unit_test__ rand range abs reshape print transpose matmul real npClebshGordanMatrices getMatrix eye kron T print asmatrix rand complex_sh_ getMatrix abs range einsum len print asmatrix size rand euler_rot_zyz higher_product npClebshGordanMatrices append zeros array range len T norm print abs real_Q_from_cb complex_conj real_D_wigner conjugate zeros kron range real_tensor_decomposition_unit_test__ rand range sqrt multiply floor abs range len int multi_index_ sort sh_to_global_index_conversion_ abs range len copy append max range len zeros list_increasing_indices_recursive__ range list_increasing_indices_recursive_ range min copy append abs max range len zeros list_irreducible_invariants_recursive_q_ len list_increasing_indices_recursive print list_irreductible_invariants_recursive_q append array range len pop index set dict add copy append zeros orth range len list multiply pi sqrt take tile append full norm maximum divide list constant complex multiply pi sqrt tile append gather conj list constant multiply pi sqrt tile append gather l2_normalize zeros flip sqrt range cos sin cos sin T exp asmatrix cos sqrt real sin imag T exp asmatrix cos sqrt sin min cos sqrt sin max range factorial zeros wigner_d_matrix_coeffs range zeros exp range range wigner_d_matrix diag_exp complex_to_real_sh complex_D_wigner zeros range real_D_wigner_ as_euler Rotation zeros argmax confusion_matrix print xlabel astype tight_layout colorbar ylabel imshow title max arange print yticks xlabel astype tight_layout colorbar ylabel imshow title xticks max len show get_confusion_matrix_one_hot set_printoptions plot_confusion_matrix figure show get_confusion_matrix_one_hot set_printoptions plot_confusion_matrix_ figure save get_input squeeze predict stack get_shapes_names plot_confusion_mat_ get_pred range append len File close create_dataset File close create_dataset File close create_dataset range len File File print File join concatenate load_h5 append range len read array read array join int normalize_point_cloud arange rotate_point_cloud print loadtxt shuffle repeat take save_h5 zeros range len int float repeat shuffle genfromtxt expand_dims tuple strip astype stack int32 append array range open rand astype choice cross sqrt zeros sum enumerate get_sample PyntCloud sample_faces add_structure np_mat_to_pandas as_matrix sample_points read_off cKDTree query print join to_json save_weights flatten savetxt savetxt astype int32 mkdir multiply reshape subtract reduce_max lin_space divide maximum multiply normalized_sh sqrt radial_weights_fn expand_dims reshape subtract reduce_max lin_space maximum divide multiply normalized_sh sqrt reduce_mean reduce_sum radial_weights_fn expand_dims exp ones reshape multiply reduce_max lin_space divide maximum pi normalized_sh sqrt cos concat sin expand_dims multiply reduce_sum stack gather_nd expand_dims multiply maximum reduce_sum sqrt stack append range multiply maximum reduce_sum sqrt stack gather_nd append range einsum sh_invar_conv_
# [SPHNet](https://arxiv.org/abs/1906.11555) This is our implementation of SPHNet, a rotation invariant deep learning architecture for point clouds analysis. ## Prerequisites * CUDA and CuDNN * Python >= 3.5 * Tensorflow 1.8 * Keras ## How to train ? The code proposes two settings: classification and segmentation # Classification
1,276
aflorial/DeepDayTrade
['stock price prediction']
['Neural networks for stock price prediction']
stock_mlp.py
# DeepDayTrade In this implementation, we are using a Multilayer Perceptron (MLP) for predicting the stock price of a company based on the historical prices available. Here we are using day-wise closing price of two different stock markets, Standard & Poor's 500 (S&P) and the New York Stock Exchange (NYSE) as well as several companies: Apple (AAPL), IBM, General Mills, Nike, Goldman. The network was trained with the historical stock prices of the indexes and companies. The results obtained were compared with an ARIMA model and it has been observed that the neural networks are outperforming the existing linear model (ARIMA). ## Data Set and Training & Parameters Historical stock price information is collected over a 2-year time period. Every Fifth week is used as validation data to test the prediction of our neural network. The validation set is a segmented portion of the dataset that is not used for training the neural network and has effectively never been seen by the model. This allows us to see how well our machine learning method generalizes it’s learning. Generalization refers to your model's ability to adapt properly to new, previously unseen data, drawn from the same distribution as the one used to create the model. ## Performance Assessment To assess performance, we use several measures to indicate the significance of our findings. A straight forward method of prediction is to look at the absolute difference our prediction is from the actual value and calculate the percentage of chance. While this is useful for noting generalize how close our predictions, it doesn’t describe all the important elements of the problem. Capital gain is an underlying incentive in stock price prediction, so it is not only necessary to predict the price accurately in relative amount, but directional correctness is desirable as well. This is because trades are profitable when bought low and sold high. To be able to profit from stock price changes, it is necessary to know which direction the stock will move in the future. ## References
1,277
agiletechvn/moran_v2_text_recognition
['scene text recognition']
['A Multi-Object Rectified Attention Network for Scene Text Recognition']
tools/dataset.py demo.py models/moran.py models/morn.py test.py models/asrn_res.py inference.py tools/utils.py main.py models/fracPickup.py Recognizer val trainBatch ResNet BidirectionalLSTM ASRN AttentionCell Attention Residual_block fracPickup MORAN MORN lmdbDataset randomSequentialSampler resizeNormalize averager loadData strLabelConverterForAttention get_torch_version data decode DataLoader max view add iter append encode next range cat BidirDecoder averager loadData size MORAN zip float criterion print min len criterion backward loadData MORAN zero_grad step encode next cat BidirDecoder copy_ get_torch_version split
# MORAN: A Multi-Object Rectified Attention Network for Scene Text Recognition ![](https://img.shields.io/badge/version-v2-brightgreen.svg) | <center>Python 2.7</center> | <center>Python 3.6</center> | | :---: | :---: | | <center>[![Build Status](https://travis-ci.org/Canjie-Luo/MORAN_v2.svg?branch=master)](https://travis-ci.org/Canjie-Luo/MORAN_v2)</center> | <center>[![Build Status](https://travis-ci.org/Canjie-Luo/MORAN_v2.svg?branch=master)](https://travis-ci.org/Canjie-Luo/MORAN_v2)</center> | MORAN is a network with rectification mechanism for general scene text recognition. The paper (accepted to appear in Pattern Recognition, 2019) in [arXiv](https://arxiv.org/abs/1901.03003), [final](https://www.sciencedirect.com/science/article/pii/S0031320319300263) version is available now. [Here is a brief introduction in Chinese.](https://mp.weixin.qq.com/s/XbT_t_9C__KdyCCw8CGDVA) ![](demo/MORAN_v2.gif) ## Recent Update - 2019.03.21 Fix a bug about Fractional Pickup.
1,278
agusdmb/Active-Learning-Framework
['active learning']
['Active Learning Using Uncertainty Information']
code/auxfunc.py code/querys.py code/test.py code/core.py vstack ActiveLearner Model Selector Dataset Oracle MinDiffSelector EntropySelector UncertaintySelector RandomSelector CertaintySelector TestSelectors Model TestDataset csr_vstack
agusdmb/Active-Learning-Framework
1,279
ahaque/twitch-troll-detection
['anomaly detection']
['Twitch Plays Pokemon, Machine Learns Twitch: Unsupervised Context-Aware Anomaly Detection for Identifying Trolls in Streaming Data']
python/Message.py python/Enumerations.py RawToXML.py python/FeatureExtractor.py python/Globals.py python/User.py python/CalculateContextSize.py python/Context.py python/ComputePCA.py python/Goal.py main main PcaCalculator Context Mode Button Label main FeatureExtractor Goal Message User int str list readlines write close dict round keys open writeSVDtoFile calculateSVD PcaCalculator readFeatureMatrix list range list range list range readFrequencyFile FeatureExtractor extractFeatures dict
Twitch Plays Pokemon, Machine Learns Twitch -------- [![arXiv](https://img.shields.io/badge/arXiv-1902.06208-b31b1b.svg)](https://arxiv.org/abs/1902.06208) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3932957.svg)](https://doi.org/10.5281/zenodo.3932957) The dataset, titled the Twitch Plays Pokemon Dataset (TPP), contains 37.8 million IRC chat messages. It contains IRC chat log data for messages made between February 2, 2014 and April 23, 2014 (68 days). Each line denotes a single IRC chat message. :point_right: Download link: [https://zenodo.org/record/3932957](https://zenodo.org/record/3932957) (534 MB compressed, 3.4 GB uncompressed)
1,280
ahare63/categorical-to-latent
['word embeddings']
["On Extending NLP Techniques from the Categorical to the Latent Space: KL Divergence, Zipf's Law, and Similarity Search"]
code/utils.py survey_app/choose-3/utils.py survey_app/choose-3/survey.py survey_app/head-to-head/utils.py code/similarity_search/similarity_search.py code/process_sentences.py code/process_words.py code/divergence_estimation/kl_divergence.py survey_app/head-to-head/survey.py code/zipfs_law/plot_pos_functions.py get_sentence_mappings get_sentence_embedding check_and_add get_tokenized_sentences recover_misses remove_misses get_raw_words check_and_add recover_misses get_pos embed_query get_words get_dicts jaccard_similarity get_index make_stopwords_list wmdistance get_kl_divs B get_article_dicts gammadiv estimate_JS_divergence save_distances get_word_2_ind get_intersection estimate_KL_divergence first SimilarSentences do_plot get_response_results update_database ask_query_question ask_demo_question generate_variable_questions jaccard_similarity avg_questions_answered unique_sentences avg_jaccard update_database get_response_results make_stopwords_list join list replace glob startswith read_csv isnan any astype append pop replace lower check_and_add append split astype isnan mean any append recover_misses get_sentence_embedding join list word_tokenize replace glob dict most_common startswith sents read_csv items list get_pos remove set add list astype isnan any get_pos append keys remove_misses get_raw_words get_dicts print dict most_common word_tokenize get_dicts IndexFlatL2 astype add index_cpu_to_gpu StandardGpuResources items list asarray nbow set sqrt zeros Dictionary sum emb len list words print len intersection set append zip IndexFlatL2 B print min astype len log index_cpu_to_gpu add StandardGpuResources append kneighbors sum range fit concatenate print zip append estimate_KL_divergence FastTextEmbedding get_dicts join list word_tokenize remove_misses sum items glob print dict get_word_2_ind FastTextEmbedding startswith most_common float get_dicts make_stopwords_list values len items list asarray kneighbors values fit jensenshannon items list asarray entropy estimate_JS_divergence print isinf estimate_KL_divergence mean get_intersection append kneighbors sum keys values fit show set_size_inches subplots print scatter legend append values enumerate glob round list keys append list keys shuffle print strip list print strip copy append keys sum values jaccard_similarity list print set difference append keys make_stopwords_list values enumerate list print len add set keys values enumerate glob print append len
Code for research paper "On Extending NLP Techniques from the Categorical to the Latent Space: KL Divergence, Zipf’s Law, and Similarity Search" Currently under construction The embeddings library used in this paper is forked from https://github.com/vzhong/embeddings and available as a repository on this Github account.
1,281
ahatamiz/dals
['lesion segmentation']
['Deep Active Lesion Segmentation']
main_demo.py DataGen.py architectures.py utils.py main.py Batch_Normalization bottleneck_layer conv_block Concatenation conv_Norm_Relu ddunet atrous_spatial_pyramid_pooling conv_start_ddunet transition_layer max_pool upsample_block dilation_block res_block dense_block transpose_conv_block unet ImageGen BaseDataProvider active_contour_layer get_intensity re_init_phi get_curvature active_contour_layer get_intensity re_init_phi get_curvature my_func dice_hard resolve_status create_contour_mask dice_soft load_image contoured_image Batch_Normalization conv2d dropout Batch_Normalization conv2d average_pooling2d dropout bottleneck_layer list Concatenation append range conv2d conv2d reduce_mean concat Batch_Normalization conv2d concat conv_Norm_Relu Batch_Normalization conv2d max_pooling2d conv_Norm_Relu Batch_Normalization conv2d shape concat conv2d batch_normalization concat conv_block sigmoid conv_Norm_Relu upsample_block Batch_Normalization conv2d_transpose exp subtract conv_start_ddunet divide transition_layer dilation_block max_pool conv2d add dense_block transpose_conv_block multiply concat reduce_max identity where roll scatter_nd sqrt stack divide cast clip_by_value square abs minimum multiply maximum square add divide shape stack gather_nd cast pow average_pooling2d multiply cast constant while_loop sigmoid cast round zeros range len RETR_TREE uint8 drawContours imwrite findContours astype imread CHAIN_APPROX_NONE load asarray min astype max multiply reduce_mean cast reduce_sum reduce_mean reduce_sum bwdist astype float32
# Deep Active Lesion Segmentation Official repositoy for Deep Active Lesion Segmentaion ( DALS ). DALS offers a fast levelset active contour model, implemented entirely in Tensorflow, that can be paired with any CNN backbone for image segmentation. # Demo In this demo, the CNN output is not exact and entails artifacts outside the regions of interest (lesion). Given such a sub-optimal initial condition, our DALS framework still is capable of delineating the boundaries and significantly improving the results. <img src="./Images/brain1.png" width="100%"> To run the demo, simply run the following command: ``` python main_demo.py --img_resize=256 --acm_iter_limit=600 --batch_size=1 ```
1,282
ahclab/reflection
['word embeddings']
['Reflection-based Word Attribute Transfer']
acl_version/src/reflection_based_transfer/demo.py acl_version/src/analogy_based_transfer/data_loader.py acl_version/src/reflection_based_transfer/updater.py acl_version/src/reflection_based_transfer/experiment.py src/nets.py acl_version/src/analogy_based_transfer/evals.py acl_version/src/reflection_based_transfer/evals.py src/trans.py acl_version/src/reflection_based_transfer/train.py src/train.py src/eval.py acl_version/src/reflection_based_transfer/nets.py src/utils.py acl_version/src/reflection_based_transfer/data_loader.py acl_version/src/fix_glove_file.py src/fix_glove_file.py acl_version/src/analogy_based_transfer/experiment.py load_datasets data_argument get_non_attribute_words load_attribute_words reset_seed evaluation1_acc get_mean_score_of_mean_one_diff_score analogy evaluation1_stb get_stability get_stability_with_vocab get_accuracy _get_nearest_words get_plus_minus_list get_avg_diff_vecs experiment1_one_diff get_one_diff_vecs experiment1_avg_diff load_datasets data_argument get_non_attribute_words load_attribute_words reset_seed get_attr_id Analogy Demo reset_seed show_result get_sentence get_mirror_distance evaluation1_acc get_xy_mirror_distance evaluation1_stb get_stability get_stability_score get_accuracy _get_nearest_words get_best_model_by_loss experiment1 get_best_model_by_accuracy MLP2 reflection Ref_PM reflection_numpy MLP3 Ref add_noise_to_word_vec reset_seed train AttributeTransferDataset get_z AttributeTransferUpdater1 main trasfer reflection Ref_PM_Share Ref_PM test main train get_valid_score add_noise_to_word_vec trasfer_from_tokens main predict many_to_one get_device reflection_numpy load_dataset load_word_embeddings seed available append deepcopy range astype int32 enumerate seed deepcopy sample append len list print sort set get_non_attribute_words load_attribute_words append keys range append format print mean print format get_accuracy get_stability_with_vocab format print int list tqdm mean zip append _get_nearest_words print analogy astype float32 similar_by_vector max list sort get_stability get_N keys int list print tqdm mean zip append _get_nearest_words get_one_diff_vecs load get_plus_minus_list format evaluation1_acc get_avg_diff_vecs print evaluation1_stb makedirs load items list get_plus_minus_list format deepcopy evaluation1_acc print evaluation1_stb get_one_diff_vecs set zip append keys makedirs split input int eval exit print enumerate get_stability_score Variable reshape test int32 list sort get_stability get_non_attribute_words keys get_mirror_distance Variable reshape astype float32 int32 deepcopy format print get_accuracy append load_npz range deepcopy format get_val_loss print append load_npz range deepcopy join format load_datasets get_best_model_by_accuracy evaluation1_acc print data_argument evaluation1_stb makedirs set load_npz train len batch_matmul reshape train array get_array_module seed make_optimizer AttributeTransferDataset use snapshot snapshot_object extend LogReport Trainer Updater SerialIterator reset_seed load_npz to_gpu PrintReport run from_numpy float array predict invariant_word_type model_dir ArgumentParser seed weight_sharing trasfer load_state_dict load_dataset parse_args to __dict__ mean manual_seed load_word_embeddings emb load print add_argument dumps get_device gpu t diag matmul model backward dry_run zero_grad mse MSELoss step enumerate add_noise_to_word_vec sigma eval MSELoss append trasfer zip model use_all_data DataLoader valid_by_acc set_description save list invariant Adam from_numpy TensorDataset range state_dict update format replace test float attr get_valid_score fout dry_run tqdm parameters train epochs array makedirs eval insert tqdm from_numpy append float array predict enumerate map trasfer_from_tokens no_tokenize input lower eval join seed int print sample len print append
[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE.txt) Reflection-based Word Attribute Transfer ==== [paper (ACL2021 SRW)](https://www.aclweb.org/anthology/2020.acl-srw.8.pdf) ## Setup - Install packages according to ```requirements.txt``` - Download pre-trained [word2vec(GoogleNews-vectors-negative300.bin)(3.6GB)](https://code.google.com/archive/p/word2vec/) and move it to ```data/``` ``` $ cd data $ wget -c https://s3.amazonaws.com/dl4j-distribution/GoogleNews-vectors-negative300.bin.gz
1,283
ahojnnes/local-feature-evaluation
['image retrieval']
['Comparative Evaluation of Hand-Crafted and Learned Local Features']
scripts/feature_extraction_convopt.py scripts/colmap_export.py scripts/reconstruction_pipeline.py scripts/colmap_import.py scripts/feature_extraction_tfeat.py scripts/feature_extraction_lift.py main parse_args read_matrix parse_args write_matrix main write_matrix parse_args main write_matrix parse_args main read_matrix reconstruct import_matches image_ids_to_pair_id main parse_args add_argument ArgumentParser join list cursor exists database_path print reshape zeros fromstring close connect splitext execute parse_args next output_path makedirs dataset_path create KeyPoint append imread format astype IMREAD_GRAYSCALE write_matrix listdir enumerate read_matrix time compute float32 len File batch_size cuda TNet load_state_dict range concatenate eval model_path empty load numpy commit cursor dataset_path list connect add call getbuffer image_ids_to_pair_id append uint32 glob close set execute read_matrix join items print float32 tostring bool split join int print check_output dataset_path call startswith split float listdir makedirs reconstruct map import_matches
Comparative Evaluation of Hand-Crafted and Learned Local Features ================================================================= This repository contains the instructions and the code for evaluating feature descriptors on our image-based reconstruction benchmark. The details of our local feature benchmark can be found in our paper: "Comparative Evaluation of Hand-Crafted and Learned Local Features". J.L. Schönberger, H. Hardmeier, T. Sattler and M. Pollefeys. CVPR 2017. [Paper](https://demuc.de/papers/schoenberger2017comparative.pdf), [Supplementary](https://demuc.de/papers/schoenberger2017comparative_supp.pdf), [Bibtex](https://demuc.de/papers/schoenberger2017comparative.bib)
1,284
ahukui/BOWDANet
['medical image segmentation', 'semantic segmentation']
['Boundary-weighted Domain Adaptive Neural Network for Prostate MR Image Segmentation']
Make_Distance_Map.py Metrics.py BOWDANet.py tSNE.py Layers.py SNet Discriminator_model Gen_Dis_model DisOutput conv_block down_stage __conv_block transition_block up_stage output side_out Decon_stage __dense_block FinalOut Get_edge Distance_Map Get_Edge_position Edge_Extracted dice_coef Dist_Loss dice_coef_loss feature_PCA feature_visualization feature_visualization2 show_and_save_image load_data dimension_reduction save_image down_stage up_stage output SGD add Model Decon_stage Input compile conv_block DisOutput Adam add Model Input compile down_stage up_stage output SGD add Model Decon_stage Input compile str __conv_block concatenate append range transition_block __dense_block add transition_block __dense_block add deepcopy range shape deepcopy shape append array range zeros_like min astype Get_Edge_position square shape sqrt Get_edge sum range flatten sum constant reshape transpose conv3d float32 sqrt clip_by_value flatten Edge_Extracted sum format print loadtxt reshape shape range TSNE xticks yticks show set_xlabel from_numpy shape scatter savefig fit_transform range format plot concatenate set_zlabel int print loadtxt axes PCA set_ylabel load_data figure numpy show int concatenate axes loadtxt set_xlabel PCA from_numpy scatter set_ylabel load_data figure set_zlabel numpy fit_transform range TSNE xticks yticks show set_xlabel shape scatter savefig legend fit_transform range format plot set_zlabel int print loadtxt axes PCA set_ylabel figure gcf str axis imshow savefig figure range load shape save_image print TSNE where xticks yticks show set_xlabel shape scatter savefig legend fit_transform format plot set_zlabel load print axes PCA set_ylabel figure zeros
# BOWDA-Net Source code for BOWDA-Net https://ieeexplore.ieee.org/document/8795525 Please cite our paper if you use this code in your own work: ``` @ARTICLE{8795525, author={Q. {Zhu} and B. {Du} and P. {Yan}}, journal={IEEE Transactions on Medical Imaging}, title={Boundary-weighted Domain Adaptive Neural Network for Prostate MR Image Segmentation}, year={2019},
1,285
ai4bharat-indicnlp/indicnlp_corpus
['word embeddings']
['AI4Bharat-IndicNLP Corpus: Monolingual Corpora and Word Embeddings for Indic Languages']
scripts/word_analogy/word_analogy.py scripts/txtcls.py scripts/word_similarity/wordsim.py scripts/word_similarity/embeddings.py TxtCls doc2vec Params score_analogy get_wordanalogy_scores_customfname mean_center_embeddingwise read write mean_center length_normalize_dimensionwise length_normalize read_vocab compute_word_similarity read_word_similarity replace get_normalizer trivial_tokenize mean normalize vector_size array zeros sum T sorted format print keys from_numpy vstack float numpy max enumerate Embedding load_embeddings copy_ word2id emb_dim numpy Params cuda len int fromstring set add lower append empty range split append int range split join print shape array range len sqrt sum mean sqrt sum mean update list build_w2i set difference dot sqrt append spearmanr array
# <center>AI4Bharat-IndicNLP Dataset</center> The AI4Bharat-IndicNLP dataset is an ongoing effort to create a collection of large-scale, general-domain corpora for Indian languages. Currently, it contains 2.7 billion words for 10 Indian languages from two language families. We share pre-trained word embeddings trained on these corpora. We create news article category classification datasets for 9 languages to evaluate the embeddings. We evaluate the IndicNLP embeddings on multiple evaluation tasks. You can read details regarding the corpus and other resources [HERE](ai4bharat-indicnlp-corpus-2020.pdf). We showcased the AI4Bharat-IndicNLP dataset at [REPL4NLP 2020](https://sites.google.com/view/repl4nlp2020/home) (collocated with ACL 2020) _(non-archival submission as extended abstract)_. You can see the talk here: [VIDEO](https://slideslive.com/38931238/ai4bharatindicnlp-dataset-monolingual-corpora-and-word-embeddings-for-indic-languages). You can use the IndicNLP corpus and embeddings for multiple Indian language tasks. A comprehensive list of Indian language NLP resources can be found in the [IndicNLP Catalog](https://github.com/indicnlpweb/indicnlp_catalog). For processing the Indian language text, you can use the [Indic NLP Library](https://github.com/anoopkunchukuttan/indic_nlp_library). ## Table of contents * [Text Corpora](#text-corpora) * [Word Embeddings](#word-embeddings) * [IndicNLP News Article Classification Dataset](#indicnlp-news-article-classification-dataset) * [Publicly available Classification Datasets](#publicly-available-classification-datasets) * [Morphanalyzers](#morphanalyzers)
1,286
ai4r/Gesture-Generation-from-Trimodal-Context
['gesture generation']
['Speech Gesture Generation from the Trimodal Context of Text, Audio, and Speaker Identity']
scripts/train_eval/train_seq2seq.py scripts/model/seq2seq_net.py scripts/data_loader/data_preprocessor.py scripts/train.py scripts/model/multimodal_context_net.py scripts/data_loader/motion_preprocessor.py scripts/utils/vocab_utils.py scripts/data_loader/lmdb_data_loader.py scripts/utils/train_utils.py config/parse_args.py scripts/utils/data_utils.py scripts/utils/tts_helper.py scripts/train_eval/train_speech2gesture.py scripts/train_eval/train_gan.py scripts/model/embedding_net.py scripts/utils/average_meter.py scripts/data_loader/h36m_loader.py scripts/model/speech2gesture.py scripts/data_loader/calculate_motion_stats.py scripts/train_eval/train_joint_embed.py scripts/model/embedding_space_evaluator.py scripts/train_feature_extractor.py scripts/model/tcn.py scripts/synthesize.py scripts/model/vocab.py parse_args str2bool main align_words generate_gestures evaluate_testset train_epochs init_model evaluate_sample_and_save_video main evaluate_testset main evaluate_sample_and_save_video train_iter calculate_data_mean DataPreprocessor Human36M default_collate_fn word_seq_collate_fn SpeechMotionDataset MotionPreprocessor PoseDecoderGRU ContextEncoder PoseEncoderConv PoseDecoderConv reparameterize PoseDecoderFC ConvNormRelu EmbeddingNet EmbeddingSpaceEvaluator ConvDiscriminator WavEncoder TextEncoderTCN PoseGenerator Discriminator Attn Generator EncoderRNN BahdanauAttnDecoderRNN Seq2SeqNet Conv2d_tf Generator AudioEncoder UnetUp Conv1d_tf Discriminator ConvNormRelu Chomp1d TemporalConvNet TemporalBlock Vocab add_noise train_iter_gan eval_embed train_iter_embed train_iter_seq2seq custom_loss train_iter_speech2gesture AverageMeter time_stretch_for_words make_audio_fixed_length normalize_string convert_pose_seq_to_dir_vec extract_melspectrogram convert_dir_vec_to_pose calc_spectrogram_length_from_motion_length remove_tags_marks resample_pose_seq set_logger create_video_and_save set_random_seed time_since save_checkpoint load_checkpoint_and_model get_speaker_model as_minutes TTSHelper index_words build_vocab isinstance ArgParser add motion_resampling_framerate polyfit unsqueeze randrange floor vstack round n_words EOS_token max mean_dir_vec ones transpose pad ceil append to n_poses range format get_words_in_time_range asarray get_word_index n_pre_poses float enumerate pose_decoder int time print extract_melspectrogram SOS_token zeros numpy array Tensor len resample words write append ForcedAligner enumerate transcribe EmbeddingSpaceEvaluator set_lang_model DataLoader generate_gestures TTSHelper open seed evaluate_testset squeeze exit load_checkpoint_and_model load_dataset input format get_sound_obj remove_tags_marks enumerate load join int print create_video_and_save align_words synthesis makedirs to n_poses L1Loss train_iter_gan EmbeddingSpaceEvaluator init_model model_save_path DataParallel save_checkpoint train_iter_speech2gesture evaluate_testset str list name train_iter_seq2seq len Adam strftime evaluate_sample_and_save_video eval_net_path time_since train_iter_embed to range state_dict update SummaryWriter format size close info keys enumerate int time parameters reset epochs add_scalar time format AverageMeter reset avg info get_scores train train format time info set_logger set_random_seed model_save_path __version__ cuda device_count build_vocab replace SpeechMotionDataset pformat info vars random_seed wordembed_path train_epochs reshape wordembed_dim exp backward min zero_grad step l1_loss mean pow item sum net save_checkpoint Human36M mean_dir_vec list name Adam evaluate_sample_and_save_video time_since to range state_dict update size train_iter keys time parameters reset epochs array len begin join norm cursor format dir_vec_pairs print convert_pose_seq_to_dir_vec close mean vstack append deserialize enumerate open list LongTensor sort default_collate zip long list default_collate zip exp randn_like BatchNorm1d LeakyReLU Sequential Conv1d Conv2d_tf BatchNorm2d Conv1d_tf randn_like loss_kld_weight zero_grad loss_warmup l1_loss exp randperm discriminator sum detach loss_regression_weight new_zeros mean item pose_decoder add_noise backward smooth_l1_loss clamp loss_reg_weight pow loss_gan_weight step exp loss_regression_weight backward min zero_grad loss_kld_weight step l1_loss mean pow item sum net mean net l1_loss norm debug numel stack sum mse_loss backward clip_grad_norm_ zero_grad custom_loss parameters step net pose_decoder ones_like loss_regression_weight zeros_like backward zero_grad discriminator loss_gan_weight loss_fn step mse_loss detach strip sub sub compile melspectrogram power_to_db astype dtype arange hasattr f interp1d astype len range len pad len reshape array zeros enumerate reshape len normalize range zeros enumerate RotatingFileHandler join basicConfig WARNING removeHandler append setLevel makedirs floor time flatten convert_dir_vec_to_pose save max FuncAnimation call format insert view_init astype close join time remove suptitle print write float32 wrap figure len save info z_obj hasattr load format print init_model load_state_dict train manual_seed_all str seed manual_seed format index_words warning Vocab load_word_vectors info lmdb_dir begin index_word cursor close info deserialize n_words open
# Gesture Generation from Trimodal Context This is an official pytorch implementation of *Speech Gesture Generation from the Trimodal Context of Text, Audio, and Speaker Identity (SIGGRAPH Asia 2020)*. In this paper, we present an automatic gesture generation model that uses the multimodal context of speech text, audio, and speaker identity to reliably generate gestures. By incorporating a multimodal context and an adversarial training scheme, the proposed model outputs gestures that are human-like and that match with speech content and rhythm. We also introduce a new quantitative evaluation metric, called FGD, for gesture generation models. ### [PAPER](https://arxiv.org/abs/2009.02119) | [VIDEO](https://youtu.be/2nDaBHUWpC0) ![OVERVIEW](.github/overview.jpg) ## Environment This repository is developed and tested on Ubuntu 18.04, Python 3.6+, and PyTorch 1.3+. On Windows, we only tested the synthesis step and worked fine. On PyTorch 1.5+, some warning appears due to read-only entries in LMDB ([related issue](https://github.com/pytorch/pytorch/issues/37581)). ## Quick Start ### Installation 1. Clone this repository: ```
1,287
aida-ugent/CSNE
['network embedding']
['CSNE: Conditional Signed Network Embedding']
src/csne/weighted_lin_constr.py src/csne/maxent_comb.py src/csne/__init__.py setup.py src/csne/main.py src/csne/csne.py CSNE main parse_args main_helper MaxentCombined cpp cmm cpm CommonNeigh Uniform WeightLinConstr set_defaults add_argument ArgumentParser eliminate_zeros tr_pred tr_e MaxentCombined add_weighted_edges_from tocsr DiGraph csr_matrix savetxt directed te_e te_pred get_embedding predict format astype use_csne prior_regval inputgraph time prior_tricount CSNE print loadtxt output get_posterior fit parse_args main_helper
# CSNE: Conditional Signed Network Embedding [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) This repository contains the source code, installation and use instructions for the method presented in the paper: *CSNE: Conditional Signed Network Embedding*. Instructions for replicating the experiments in the paper are also given. We provide Python implementations of the complete CSNE model as well as of the MaxEnt priors described in the manuscript. The repository is maintained by Alexandru Mara (alexandru.mara(at)ugent.be). ## Installation Install directly from GitHub with: ```shell
1,288
aida-ugent/MaxEntComb
['link prediction']
['Block-Approximated Exponential Random Graphs']
setup.py src/maxentcomb/weighted_lin_constr.py experiments/main.py src/maxentcomb/__init__.py src/maxentcomb/main.py src/maxentcomb/maxent_comb.py main parse_args main parse_args main_helper MaxentCombined WeightLinConstrOn JaccardOn CommonNeighOn PrefAttach AdamicAdar ResourceAllocationOn CommonNeigh ResourceAllocation Jaccard AdamicAdarOn WeightLinConstr add_argument ArgumentParser tr_pred tr_e AROPE list literal_eval savetxt te_e append te_pred add_edges_from format Graph adjacency_matrix inputgraph time T print loadtxt weights output dimension dot set_defaults tr_pred tr_e MaxentCombined memory prior savetxt te_e te_pred predict add_edges_from format Graph adjacency_matrix inputgraph time print loadtxt output get_posterior fit parse_args main_helper
# Block-Approximated Exponential Random Graphs This repository contains the source code, installation and use instructions for the methods presented in the paper: *Block-Approximated Exponential Random Graphs*. Instructions for replicating the experiments in the paper are also given. We provide two different implementations, a Python version for the MaxEnt model with full structural constraints and a Matlab version for the MaxEnt using low rank approximations. ## Installation The Python version of MaxEnt can be installed directly from GitHub with: ```shell $ pip install git+https://github.com/aida-ugent/MaxEntComb.git
1,289
aidriver/ChauffeurNet
['imitation learning', 'autonomous driving']
['ChauffeurNet: Learning to Drive by Imitating the Best and Synthesizing the Worst']
chauffeur_net/rnn_cell/chauffeur_net_main.py chauffeur_net/layers/spatial_softmax.py chauffeur_net/rnn_cell/agent_rnn.py chauffeur_net/exercise/test_tensor_assign.py chauffeur_net/rnn_cell/perception_rnn.py chauffeur_net/chauffeur_net_main.py chauffeur_net/feature_net.py chauffeur_net/road_mask_net.py chauffeur_net/perception_rnn.py chauffeur_net/agent_rnn.py AgentRNN ChauffeurNet FeatureNet PerceptionRNN RoadMaskNet integrate get_one_hot_matrix my_fn tensor_expand tensor_assign_2D max_sentence_similarity SpatialSoftmax AgentRNN ChauffeurNet PerceptionRNN expand_dims range concat one_hot print transpose eval tensor_expand as_list get_one_hot_matrix arg_max
# ChauffeurNet: ChauffeurNet : Learning to Drive by Imitating the Best and Synthesizing the Worst. Reproduction the result according to this paper[https://arxiv.org/pdf/1812.03079.pdf]. I just implement it on the basis of my comprehension,because the paper didn't introduce the neural network in every detail. The model is implemented by Keras with Tensorflow backend. # Roadmap: 1.Model and train and prediction with mocked data.[done] 2.Data pipeline for real data. 3.Train it in real world data. 4.Other approachs in paper.
1,290
aim-uofa/DyCo3D
['instance segmentation', 'semantic segmentation']
['DyCo3D: Robust Instance Segmentation of 3D Point Clouds through Dynamic Convolution']
dataset/scannetv2/scannet_util.py lib/spconv/spconv/ops.py model/pointgroup/pointgroup.py util/visualize.py dataset/scannetv2/prepare_data_inst_gttxt.py util/eval.py lib/spconv/spconv/modules.py dataset/scannetv2/prepare_data_inst.py lib/spconv/spconv/functional.py util/utils.py lib/pointgroup_ops/setup.py train.py lib/spconv/spconv/utils/__init__.py util/utils_3d.py lib/spconv/spconv/__init__.py lib/spconv/setup.py solver.py util/warpper.py util/log.py model/transformer.py util/config.py lib/spconv/spconv/conv.py lib/spconv/test/test_conv.py test.py util/draw_utils.py lib/spconv/spconv/pool.py lib/spconv/spconv/test_utils.py checkpoint.py data/scannetv2_inst.py data_loader_util.py lib/pointgroup_ops/functions/pointgroup_ops.py strip_prefix_if_present mkdir_p checkpoint align_and_update_state_dicts synchronize DistributedSampler get_world_size InfSampler IterationBasedBatchSampler get_rank make_batch_data_sampler ExpLR initialize_optimizer initialize_scheduler PolyLR LambdaStepLR SquaredLR test init non_max_suppression eval_epoch train init Dataset f f_test get_raw2scannetv2_label_map Voxelization SecMean BallQueryBatchP Voxelization_Idx RoiPool PointRecover GetIoU SecMin BFSCluster SecMax CMakeExtension CMakeBuild SubMConv3d SparseConvTranspose3d SparseConv3d SparseConvTranspose2d SparseInverseConv3d _calculate_fan_in_and_fan_out_hwio SparseConvolution SparseConv2d SubMConv2d SparseInverseConv2d SparseMaxPoolFunction SparseConvFunction SparseInverseConvFunction SubMConvFunction SparseSequential is_spconv_module _mean_update SparseModule indice_conv indice_conv_backward get_indice_pairs get_conv_output_size indice_maxpool_backward get_deconv_output_size indice_maxpool SparseMaxPool3d SparseMaxPool SparseMaxPool2d generate_sparse_data params_grid TestCase scatter_nd RemoveGrid ToDense SparseConvTensor VoxelGenerator points_to_voxel SparseCoupleDeConvTest Conv3dTestTorch DeConv3dTestTorch SubMConv3dTestTorch SparseConv3dTestTorch SubmanifoldConvTestTorch SparseMaxPoolTestTorch SCNCoupleDeConvTest scatter_nd gather_nd SparseDeConv3dTestTorch main MaxPool3dTestTorch TestSpConv DecoderLayer MultiHeadAttention FeedForward get_clones Norm TransformerEncoder attention PositionalEncoder EncoderLayer ResidualBlock model_fn_decorator conv_with_kaiming_uniform UBlock dice_coefficient PointGroup VGGBlock get_parser draw_line write_ply_rgb draw_3d_box_pcds write_ply_color draw_3d_box_pcds2 print_results compute_averages assign_instances_for_scan evaluate_matches create_logger checkpoint_save load_model_param print_error AverageMeter checkpoint_restore intersectionAndUnion step_learning_rate get_batch_offsets is_power2 write_obj is_multiple load_ids Instance get_instances get_coords_color visualize_pts_rgb _NewEmptyTensorOp nonzero_tuple Conv2d interpolate Conv1d cat max list sorted format view getLogger print tuple tolist shape info keys enumerate len items sorted list OrderedDict keys makedirs mkdir_p save info barrier get_world_size BatchSampler IterationBasedBatchSampler error error seed join TEST_NPOINT_THRESH format config test_seed manual_seed manual_seed_all exp_path makedirs system TEST_SCORE_THRESH TEST_NMS_THRESH test_epoch model_dir dataset_dir info split testLoader print test_data_loader exit info Dataset append delete SummaryWriter zero_grad list model_fn update val format avg info keys checkpoint enumerate items time int backward add_scalar divmod AverageMeter write empty_cache step output_path len info read print ascontiguousarray mean save array read print ones ascontiguousarray mean save append array range len format print set split range len size numel ndimension append float zip append range len append range len get_indice_pairs_3d get_indice_pairs_2d get_indice_pairs_grid_2d get_conv_output_size get_indice_pairs_grid_3d get_deconv_output_size zip append range len concatenate reshape astype shuffle enumerate stack pad int32 meshgrid zeros array range append len zeros list view tuple tolist points_to_voxel_3d_np zeros array list view device seed all params_grid half from_numpy append range generate_sparse_data synchronize astype net dense time norm print contiguous net_ref float32 int32 numpy dropout transpose matmul sqrt unsqueeze masked_fill softmax reshape sum cuda items list add_argument ArgumentParser parse_args setattr reshape array draw_line write astype close max range open write close astype range open convolve ones cumsum min copy argsort dot unique zip append zeros float empty max enumerate len logical_not where nanmean average isclose enumerate load_ids int count_nonzero format print_error not_equal logical_and logical_not copy get_instances in1d append range enumerate format enumerate info setFormatter basicConfig getLogger addHandler StreamHandler Formatter DEBUG setLevel param_groups max reshape size histogram copy load join sorted int list items glob load_state_dict info cpu cuda join remove isfile save info cpu cuda state_dict update load_state_dict state_dict close write range open sum cuda range str write exit splitlines array append Instance to_dict unique zeros arange __len__ points3d max open room_name shape sum range format readlines astype result_root load join int room_split print data_root zeros array len _output_size tuple
# DyCo3d ## DyCo3d: Robust Instance Segmentation of 3D Point Clouds through Dynamic Convolution (CVPR 2021) ![overview](https://github.com/aim-uofa/DyCo3D/blob/main/doc/dyco3d.png) Code for the paper **DyCo3D: Robust Instance Segmentation of 3D Point Clouds through Dynamic Convolution**, CVPR 2021. **Authors**: Tong He, Chunhua Shen, Anton van den Hengel [[arxiv]](https://arxiv.org/abs/2011.13328) ## Introduction Previous top-performing approaches for point cloud instance segmentation involve a bottom-up strategy, which often includes inefficient operations or complex pipelines, such as grouping over-segmented components, introducing additional steps for refining, or designing complicated loss functions. The inevitable variation in the instance scales can lead bottom-up methods to become particularly sensitive to hyper-parameter values. To this end, we propose instead a dynamic, proposal-free, data-driven approach that generates the appropriate convolution kernels to apply in response to the nature of the instances. To make the kernels discriminative, we explore a large context by gathering homogeneous points that share identical semantic categories and have close votes for the geometric centroids. Instances are then decoded by several simple convolutional layers. Due to the limited receptive field introduced by the sparse convolution, a small light-weight transformer is also devised to capture the long-range dependencies and high-level interactions among point samples. The proposed method achieves promising results on both ScanetNetV2 and S3DIS, and this performance is robust to the particular hyper-parameter values chosen. It also improves inference speed by more than 25% over the current state-of-the-art. ## Installation ### Requirements
1,291
aim-uofa/depth
['depth estimation', 'monocular depth estimation']
['Enforcing geometric constraints of virtual normal for depth prediction', 'Virtual Normal: Enforcing Geometric Constraints for Accurate and Robust Depth Prediction']
LeReS/lib/net_tools.py LeReS/lib/Resnet.py LeReS/lib/spvcnn_classsification.py LeReS/lib/network_auxi.py LeReS/tools/test_depth.py LeReS/lib/multi_depth_model_woauxi.py LeReS/tools/test_shape.py LeReS/lib/spvcnn_utils.py LeReS/lib/Resnext_torch.py LeReS/lib/test_utils.py DepthModel RelDepthModel FeatureFusion FTB DepthNet Decoder ATA FFM resnext101_stride32x8d AO resnet50_stride32 SenceUnderstand ResidualConv load_ckpt get_func strip_prefix_if_present ResNet resnet50 Bottleneck resnet152 conv3x3 resnet34 resnet18 BasicBlock resnet101 conv1x1 ResNet resnext101_32x8d Bottleneck conv3x3 BasicBlock SPVCNN_CLASSIFICATION ResidualBlock BasicDeconvolutionBlock BasicConvolutionBlock initial_voxelize point_to_voxel voxel_to_point recover_metric_depth depth_to_pcd pcd_to_sparsetensor pcd_uv_to_sparsetensor refine_shift_one_step reconstruct_3D refine_focal_one_step save_point_cloud reconstruct_depth refine_shift init_image_coor refine_focal scale_torch parse_args scale_torch parse_args reconstruct3D_from_depth make_shift_focallength_models join import_module split load print strip_prefix_if_present load_state_dict isfile empty_cache items sorted list OrderedDict keys ResNet ResNet ResNet ResNet ResNet ResNet int SparseTensor spvoxelize check sphash spcount sphashquery floor unique F cat len int spvoxelize kernel_maps coord_maps sphash spcount sphashquery C s F cat SparseTensor get contiguous sphash sphashquery device C additional_features cat KernelRegion spdevoxelize to F PointTensor s T arange astype float32 tile stack zeros_like sparse_collate_fn sparse_quantize choice round SparseTensor zeros_like concatenate sparse_collate_fn sparse_quantize choice round SparseTensor model depth_to_pcd pcd_uv_to_sparsetensor init_image_coor cuda model depth_to_pcd pcd_to_sparsetensor init_image_coor cuda refine_focal_one_step range copy item range copy refine_shift_one_step int arange concatenate print transpose astype array float max describe tuple squeeze hstack write savetxt tile append array range column_stack join reshape squeeze reconstruct_3D save_point_cloud max squeeze numpy polyfit add_argument ArgumentParser Compose astype float32 from_numpy transform SPVCNN_CLASSIFICATION eval percentile tan min pi item refine_shift refine_focal
# AdelaiDepth [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1rDLZBtiUgsFJrrL-xOgTVWxj6PMK9swq?usp=sharing) AdelaiDepth is an open source toolbox for monocular depth prediction. Relevant work from our group is open-sourced here. AdelaiDepth contains the following algorithms: * Boosting Depth: [Code](https://github.com/guangkaixu/BoostingDepth), [Towards 3D Scene Reconstruction from Locally Scale-Aligned Monocular Video Depth (Boosting Monocular Depth Estimation with Sparse Guided Points)](https://arxiv.org/abs/2202.01470) * 3D Scene Shape (Best Paper Finalist): [Code](https://github.com/aim-uofa/AdelaiDepth/tree/main/LeReS), [Learning to Recover 3D Scene Shape from a Single Image](https://arxiv.org/abs/2012.09365) * DiverseDepth: [Code](https://github.com/YvanYin/DiverseDepth), [Virtual Normal: Enforcing Geometric Constraints for Accurate and Robust Depth Prediction](https://arxiv.org/abs/2103.04216), [DiverseDepth: Affine-invariant Depth Prediction Using Diverse Data](https://arxiv.org/abs/2002.00569)
1,292
aimagelab/novelty-detection
['anomaly detection']
['Latent Space Autoregression for Novelty Detection']
models/layers/mconv3d.py models/LSA_cifar10.py result_helpers/one_class.py datasets/base.py models/blocks_3d.py datasets/cifar10.py models/layers/tsc.py datasets/ucsd_ped2.py models/__init__.py result_helpers/__init__.py datasets/transforms.py models/loss_functions/autoregression_loss.py utils.py models/utils/__init__.py models/LSA_mnist.py datasets/mnist.py models/loss_functions/__init__.py models/base.py test.py models/blocks_2d.py datasets/__init__.py models/utils/list_module.py models/LSA_ucsd.py models/estimator_2D.py datasets/shanghaitech.py models/estimator_1D.py models/loss_functions/reconstruction_loss.py models/loss_functions/lsaloss.py models/LSA_shanghaitech.py result_helpers/video_anomaly.py test_ucsdped2 test_cifar test_mnist parse_arguments test_shanghaitech main novelty_score normalize concat_collate set_random_seed OneClassDataset VideoAnomalyDetectionDataset DatasetBase CIFAR10 MNIST SHANGHAITECH ToRandomCrops RemoveBackground ToFloat32 OCToFloatTensor3D AddNoise DropoutNoise RandomMirror OCRemoveMean ToFloatTensor3DMask SubtractBackground ToFloatTensor3D RemoveBackgroundAndConcatMaskToY ToCrops ToFloatTensor2D ToFloatTensor1D OCToFloatTensor2D OCToFloatTensor1D RemoveMean UCSDPed2 BaseModule ResidualBlock residual_op BaseBlock DownsampleBlock UpsampleBlock residual_op BaseBlock UpsampleBlock DownsampleBlock MaskedFullyConnection Estimator1D MaskedConv2d MaskedStackedConvolution Estimator2D LSACIFAR10 Decoder Encoder LSAMNIST Decoder Encoder LSAShanghaiTech Decoder Encoder LSAUCSD Decoder Encoder MaskedConv3d TemporallySharedFullyConnection AutoregressionLoss LSALoss ReconstructionLoss ListModule OneClassResultHelper VideoAnomalyDetectionResultHelper ResultsAccumulator MNIST eval OneClassResultHelper test_one_class_classification test_one_class_classification eval OneClassResultHelper CIFAR10 eval UCSDPed2 test_video_anomaly_detection VideoAnomalyDetectionResultHelper eval SHANGHAITECH test_video_anomaly_detection VideoAnomalyDetectionResultHelper add_argument ArgumentParser test_ucsdped2 test_cifar set_random_seed test_mnist parse_arguments test_shanghaitech seed manual_seed_all manual_seed sum list isinstance Sequence new type zip _new_shared Tensor Mapping bn1 bn2 f2 activation_fn f1 f3 bn3
# Latent Space Autoregression for Novelty Detection This repository contains Pytorch code to replicate experiments in the CVPR19 paper "Latent Space Autoregression for Novelty Detection". Please cite with the following BibTeX: ``` @inproceedings{abati2019latent, title={{Latent Space Autoregression for Novelty Detection}}, author={Abati, Davide and Porrello, Angelo and Calderara, Simone and Cucchiara, Rita}, booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision and Pattern Recognition}, year={2019} }
1,293
aimerykong/Pixel-Attentional-Gating
['boundary detection', 'semantic segmentation']
['Pixel-wise Attentional Gating for Parsimonious Pixel Labeling']
matconvnet-1.0-beta23_modifiedDagnn/utils/proto/caffe_fastrcnn_pb2.py matconvnet-1.0-beta23_modifiedDagnn/utils/proto/caffe_6e3916_pb2.py matconvnet-1.0-beta23_modifiedDagnn/utils/layers.py matconvnet-1.0-beta23_modifiedDagnn/doc/matdocparser.py matconvnet-1.0-beta23_modifiedDagnn/utils/proto/vgg_caffe_pb2.py matconvnet-1.0-beta23_modifiedDagnn/utils/proto/caffe_old_pb2.py matconvnet-1.0-beta23_modifiedDagnn/utils/proto/caffe_0115_pb2.py matconvnet-1.0-beta23_modifiedDagnn/utils/proto/caffe_b590f1d_pb2.py matconvnet-1.0-beta23_modifiedDagnn/utils/proto/caffe_pb2.py matconvnet-1.0-beta23_modifiedDagnn/doc/matdoc.py matconvnet-1.0-beta23_modifiedDagnn/utils/import-caffe.py extract render_L render_V render_P render_DIVL render_DH render_BL render_L_from_indent render_SL render_S render Context render_DI Frame render_B findNextFunction getFunctionDoc readText MatlabFunction render_DL clean Lexer P PL Parser BH EOF DI L DL SL BL DH DIVL Terminal S DIV NonTerminal B V Symbol blobproto_to_array versiontuple dict_to_struct_array keyboard tolist escape bilinear_interpolate getopts find rowcell CaffeInnerProduct ConversionError CaffeScale CaffeBatchNorm CaffeLayer CaffeCrop CaffeConcat CaffeConv CaffePooling CaffeData reorder CaffeElementWise getFilterOutputSize CaffeROIPooling CaffeSoftMaxLoss CaffeReLU getFilterTransform CaffeModel CaffeTransform CaffeDeconvolution row dictToMatlabStruct rowarray CaffeBlob transposeTransform CaffeDropout CaffeLRN CaffeEltWise composeTransforms CaffeSoftMax HingeLossParameter BlobProto BlobProtoVector NetStateRule LayerParameter PowerParameter FillerParameter ArgMaxParameter V0LayerParameter InnerProductParameter ConvolutionParameter SolverState EltwiseParameter SliceParameter WindowDataParameter DummyDataParameter HDF5OutputParameter TanHParameter TransformationParameter SoftmaxParameter ConcatParameter DataParameter SolverParameter MVNParameter ContrastiveLossParameter NetState NetParameter PoolingParameter DropoutParameter Datum SigmoidParameter AccuracyParameter MemoryDataParameter LRNParameter ReLUParameter ImageDataParameter InfogainLossParameter HDF5DataParameter ThresholdParameter ReductionParameter HingeLossParameter BlobProto BlobProtoVector NetStateRule LayerParameter PowerParameter FillerParameter ArgMaxParameter V0LayerParameter InnerProductParameter ConvolutionParameter SolverState EltwiseParameter LossParameter SliceParameter WindowDataParameter DummyDataParameter HDF5OutputParameter TanHParameter TransformationParameter SoftmaxParameter ConcatParameter DataParameter SPPParameter ParamSpec EmbedParameter SolverParameter MVNParameter ContrastiveLossParameter NetState NetParameter PoolingParameter DropoutParameter Datum SigmoidParameter BlobShape ExpParameter AccuracyParameter LogParameter ThresholdParameter TileParameter MemoryDataParameter LRNParameter ReLUParameter ImageDataParameter ReshapeParameter InfogainLossParameter V1LayerParameter HDF5DataParameter PReLUParameter FlattenParameter PythonParameter ReductionParameter HingeLossParameter BlobProto BlobProtoVector NetStateRule LayerParameter PowerParameter FillerParameter ArgMaxParameter V0LayerParameter InnerProductParameter ConvolutionParameter SolverState EltwiseParameter LossParameter SliceParameter BatchNormParameter WindowDataParameter DummyDataParameter HDF5OutputParameter TanHParameter TransformationParameter SoftmaxParameter ConcatParameter DataParameter SPPParameter ParamSpec EmbedParameter SolverParameter MVNParameter ContrastiveLossParameter NetState NetParameter BiasParameter PoolingParameter DropoutParameter Datum SigmoidParameter BlobShape ExpParameter AccuracyParameter LogParameter ThresholdParameter TileParameter MemoryDataParameter LRNParameter ReLUParameter ImageDataParameter ELUParameter ReshapeParameter InfogainLossParameter ScaleParameter V1LayerParameter HDF5DataParameter PReLUParameter FlattenParameter PythonParameter ROIPoolingParameter HingeLossParameter BlobProto BlobProtoVector NetStateRule LayerParameter PowerParameter FillerParameter ArgMaxParameter V0LayerParameter InnerProductParameter ConvolutionParameter SolverState EltwiseParameter LossParameter SliceParameter WindowDataParameter DummyDataParameter HDF5OutputParameter TanHParameter TransformationParameter SoftmaxParameter ConcatParameter DataParameter ParamSpec SolverParameter MVNParameter ContrastiveLossParameter NetState NetParameter PoolingParameter DropoutParameter Datum SigmoidParameter BlobShape ExpParameter AccuracyParameter ThresholdParameter MemoryDataParameter LRNParameter ReLUParameter ImageDataParameter InfogainLossParameter V1LayerParameter HDF5DataParameter PReLUParameter PythonParameter NetParameter LayerConnection BlobProto BlobProtoVector LayerParameter FillerParameter Datum SolverParameter SolverState BlobProto BlobProtoVector PowerParameter LayerParameter FillerParameter V0LayerParameter InnerProductParameter ConvolutionParameter SolverState WindowDataParameter HDF5OutputParameter ConcatParameter DataParameter SolverParameter NetParameter PoolingParameter DropoutParameter Datum MemoryDataParameter LRNParameter ImageDataParameter InfogainLossParameter HDF5DataParameter NetParameter EvalHistoryIter LayerConnection BlobProto BlobProtoVector LayerParameter FillerParameter Datum EvalHistory SolverParameter SolverState search clean match strip group append getFunctionDoc findNextFunction print print print children render_SL print pop render_DH print Frame push render_DIVL children render_DI print children render_L print pop children render_L_from_indent isa Frame render_B push indent pop children Frame push render_DIVL children render_BL render_V render_S render_DL isa render_P print Context render_DIVL dim tolist hasattr list empty keys RepeatedScalarFieldContainer isinstance update print f_locals interact copy reshape asarray astype clip hasattr list ndarray isinstance append empty keys CaffeTransform CaffeTransform
# Pixel-wise Attentional Gating for Scene Parsing For [paper](https://arxiv.org/abs/1805.01556) and [slides](https://www.ics.uci.edu/~skong2/slides/20180514_AIML_UCI.pdf), please refer to our [project page](http://www.ics.uci.edu/~skong2/PAG.html "pixel-attentional-gating") Our entry to Robust Vision Challenge can be found here [depth estimation](http://www.robustvision.net/leaderboard.php?benchmark=depth) and [semantic segmentation](http://www.robustvision.net/leaderboard.php?benchmark=semantic). ![alt text](http://www.ics.uci.edu/~skong2/image/PAG_splashFigure.png "visualization") To achieve parsimonious inference in per-pixel labeling tasks with a limited computational budget, we propose a **Pixel-wise Attentional Gating** unit (**PAG**) that learns to selectively process a subset of spatial locations at each layer of a deep convolutional network. PAG is a generic, architecture-independent, problem-agnostic mechanism that can be readily ``plugged in'' to an existing model with fine-tuning. We utilize PAG in two
1,294
aimerykong/Recurrent-Pixel-Embedding-for-Instance-Grouping
['boundary detection', 'object proposal generation', 'instance segmentation', 'semantic segmentation']
['Recurrent Pixel Embedding for Instance Grouping']
libs/matconvnet-1.0-beta23_modifiedDagnn/utils/proto/vgg_caffe_pb2.py libs/matconvnet-1.0-beta23_modifiedDagnn/utils/proto/caffe_old_pb2.py libs/matconvnet-1.0-beta23_modifiedDagnn/doc/matdoc.py libs/matconvnet-1.0-beta23_modifiedDagnn/utils/proto/caffe_0115_pb2.py libs/matconvnet-1.0-beta23_modifiedDagnn/utils/proto/caffe_pb2.py libs/matconvnet-1.0-beta23_modifiedDagnn/utils/proto/caffe_fastrcnn_pb2.py libs/matconvnet-1.0-beta23_modifiedDagnn/utils/layers.py libs/matconvnet-1.0-beta23_modifiedDagnn/doc/matdocparser.py libs/matconvnet-1.0-beta23_modifiedDagnn/utils/proto/caffe_b590f1d_pb2.py libs/matconvnet-1.0-beta23_modifiedDagnn/utils/proto/caffe_6e3916_pb2.py libs/matconvnet-1.0-beta23_modifiedDagnn/utils/import-caffe.py extract render_L render_V render_P render_DIVL render_DH render_BL render_L_from_indent render_SL render_S render Context render_DI Frame render_B findNextFunction getFunctionDoc readText MatlabFunction render_DL clean Lexer P PL Parser BH EOF DI L DL SL BL DH DIVL Terminal S DIV NonTerminal B V Symbol blobproto_to_array versiontuple dict_to_struct_array keyboard tolist escape bilinear_interpolate getopts find rowcell CaffeInnerProduct ConversionError CaffeScale CaffeBatchNorm CaffeLayer CaffeCrop CaffeConcat CaffeConv CaffePooling CaffeData reorder CaffeElementWise getFilterOutputSize CaffeROIPooling CaffeSoftMaxLoss CaffeReLU getFilterTransform CaffeModel CaffeTransform CaffeDeconvolution row dictToMatlabStruct rowarray CaffeBlob transposeTransform CaffeDropout CaffeLRN CaffeEltWise composeTransforms CaffeSoftMax HingeLossParameter BlobProto BlobProtoVector NetStateRule LayerParameter PowerParameter FillerParameter ArgMaxParameter V0LayerParameter InnerProductParameter ConvolutionParameter SolverState EltwiseParameter SliceParameter WindowDataParameter DummyDataParameter HDF5OutputParameter TanHParameter TransformationParameter SoftmaxParameter ConcatParameter DataParameter SolverParameter MVNParameter ContrastiveLossParameter NetState NetParameter PoolingParameter DropoutParameter Datum SigmoidParameter AccuracyParameter MemoryDataParameter LRNParameter ReLUParameter ImageDataParameter InfogainLossParameter HDF5DataParameter ThresholdParameter ReductionParameter HingeLossParameter BlobProto BlobProtoVector NetStateRule LayerParameter PowerParameter FillerParameter ArgMaxParameter V0LayerParameter InnerProductParameter ConvolutionParameter SolverState EltwiseParameter LossParameter SliceParameter WindowDataParameter DummyDataParameter HDF5OutputParameter TanHParameter TransformationParameter SoftmaxParameter ConcatParameter DataParameter SPPParameter ParamSpec EmbedParameter SolverParameter MVNParameter ContrastiveLossParameter NetState NetParameter PoolingParameter DropoutParameter Datum SigmoidParameter BlobShape ExpParameter AccuracyParameter LogParameter ThresholdParameter TileParameter MemoryDataParameter LRNParameter ReLUParameter ImageDataParameter ReshapeParameter InfogainLossParameter V1LayerParameter HDF5DataParameter PReLUParameter FlattenParameter PythonParameter ReductionParameter HingeLossParameter BlobProto BlobProtoVector NetStateRule LayerParameter PowerParameter FillerParameter ArgMaxParameter V0LayerParameter InnerProductParameter ConvolutionParameter SolverState EltwiseParameter LossParameter SliceParameter BatchNormParameter WindowDataParameter DummyDataParameter HDF5OutputParameter TanHParameter TransformationParameter SoftmaxParameter ConcatParameter DataParameter SPPParameter ParamSpec EmbedParameter SolverParameter MVNParameter ContrastiveLossParameter NetState NetParameter BiasParameter PoolingParameter DropoutParameter Datum SigmoidParameter BlobShape ExpParameter AccuracyParameter LogParameter ThresholdParameter TileParameter MemoryDataParameter LRNParameter ReLUParameter ImageDataParameter ELUParameter ReshapeParameter InfogainLossParameter ScaleParameter V1LayerParameter HDF5DataParameter PReLUParameter FlattenParameter PythonParameter ROIPoolingParameter HingeLossParameter BlobProto BlobProtoVector NetStateRule LayerParameter PowerParameter FillerParameter ArgMaxParameter V0LayerParameter InnerProductParameter ConvolutionParameter SolverState EltwiseParameter LossParameter SliceParameter WindowDataParameter DummyDataParameter HDF5OutputParameter TanHParameter TransformationParameter SoftmaxParameter ConcatParameter DataParameter ParamSpec SolverParameter MVNParameter ContrastiveLossParameter NetState NetParameter PoolingParameter DropoutParameter Datum SigmoidParameter BlobShape ExpParameter AccuracyParameter ThresholdParameter MemoryDataParameter LRNParameter ReLUParameter ImageDataParameter InfogainLossParameter V1LayerParameter HDF5DataParameter PReLUParameter PythonParameter NetParameter LayerConnection BlobProto BlobProtoVector LayerParameter FillerParameter Datum SolverParameter SolverState BlobProto BlobProtoVector PowerParameter LayerParameter FillerParameter V0LayerParameter InnerProductParameter ConvolutionParameter SolverState WindowDataParameter HDF5OutputParameter ConcatParameter DataParameter SolverParameter NetParameter PoolingParameter DropoutParameter Datum MemoryDataParameter LRNParameter ImageDataParameter InfogainLossParameter HDF5DataParameter NetParameter EvalHistoryIter LayerConnection BlobProto BlobProtoVector LayerParameter FillerParameter Datum EvalHistory SolverParameter SolverState search clean match strip group append getFunctionDoc findNextFunction print print print children render_SL print pop render_DH print Frame push render_DIVL children render_DI print children render_L print pop children render_L_from_indent isa Frame render_B push indent pop children Frame push render_DIVL children render_BL render_V render_S render_DL isa render_P print Context render_DIVL dim tolist hasattr list empty keys RepeatedScalarFieldContainer isinstance update print f_locals interact copy reshape asarray astype clip hasattr list ndarray isinstance append empty keys CaffeTransform CaffeTransform
# Recurrent Pixel Embedding for Instance Grouping For paper, slides and poster, please refer to our [project page](http://www.cs.cmu.edu/~shuk/SMMMSG.html "pixel-grouping") ![alt text](http://www.cs.cmu.edu/~shuk/image/icon_pixelEmbedding.png "visualization") We introduce a differentiable, end-to-end trainable framework for solving pixel-level grouping problems such as instance segmentation consisting of two novel components. First, we regress pixels into a hyper-spherical embedding space so that pixels from the same group have high cosine similarity while those from different groups have similarity below a specified margin. We analyze the choice of embedding dimension and margin, relating them to theoretical results on the problem of distributing points uniformly on the sphere. Second, to group instances, we utilize a variant of mean-shift clustering, implemented as a recurrent neural network parameterized by kernel bandwidth. This recurrent grouping module is differentiable, enjoys convergent dynamics and probabilistic interpretability. Backpropagating the group-weighted loss through this module allows learning to focus on only correcting embedding errors that won't be resolved during subsequent clustering. Our framework, while conceptually simple and theoretically abundant, is also practically effective and computationally efficient. We demonstrate substantial improvements over state-of-the-art instance segmentation for object proposal generation, as well as demonstrating the benefits of grouping loss for classification tasks such as boundary detection and semantic segmentation. **keywords**: Pixel Embedding, Recurrent Grouping, Boundary Detection, Object Proposal Detection, Instance Segmentation, Semantic Segmentation, Maximum Margin, Metric Learning, Hard Pixel Pair Mining, Distributing Many Points on a (Hyper-) Sphere, Mean Shift Clustering, Recurrent Networks, Mode Seeking, von Mises Fisher Distribution, Robust Loss, Instance-aware Pixel Weighting, non-parametric model, etc. Several demos are included as below. As for details on the training, demo and code, please go into each demo folder. 1. [demo 1](https://github.com/aimerykong/Recurrent-Pixel-Embedding-for-Instance-Grouping/tree/master/demo1_tutorial_instance_segmentation): a tutorial for learning the embedding hypersphere and mean shift grouping. We use instance segmentation as example, and include useful visualization functions. [**Ready**]; 2. [demo 2](https://github.com/aimerykong/Recurrent-Pixel-Embedding-for-Instance-Grouping/tree/master/demo2_boundary_detection): boundary detection on BSDS500 dataset (also including code, model, visualization) [**Ready**];
1,295
aimerykong/Recurrent-Scene-Parsing-with-Perspective-Understanding-in-the-loop
['depth estimation', 'scene parsing', 'monocular depth estimation', 'semantic segmentation']
['Recurrent Scene Parsing with Perspective Understanding in the Loop']
matconvnet/utils/proto/caffe_old_pb2.py matconvnet/utils/proto/caffe_b590f1d_pb2.py matconvnet/utils/proto/vgg_caffe_pb2.py matconvnet/utils/proto/caffe_0115_pb2.py matconvnet/doc/matdocparser.py matconvnet/utils/layers.py matconvnet/utils/proto/caffe_fastrcnn_pb2.py matconvnet/utils/proto/caffe_6e3916_pb2.py matconvnet/doc/matdoc.py matconvnet/utils/proto/caffe_pb2.py matconvnet/utils/import-caffe.py extract render_L render_V render_P render_DIVL render_DH render_BL render_L_from_indent render_SL render_S render Context render_DI Frame render_B findNextFunction getFunctionDoc readText MatlabFunction render_DL clean Lexer P PL Parser BH EOF DI L DL SL BL DH DIVL Terminal S DIV NonTerminal B V Symbol blobproto_to_array versiontuple dict_to_struct_array keyboard tolist escape bilinear_interpolate getopts find rowcell CaffeInnerProduct ConversionError CaffeScale CaffeBatchNorm CaffeLayer CaffeCrop CaffeConcat CaffeConv CaffePooling CaffeData reorder CaffeElementWise getFilterOutputSize CaffeROIPooling CaffeSoftMaxLoss CaffeReLU getFilterTransform CaffeModel CaffeTransform CaffeDeconvolution row dictToMatlabStruct rowarray CaffeBlob transposeTransform CaffeDropout CaffeLRN CaffeEltWise composeTransforms CaffeSoftMax HingeLossParameter BlobProto BlobProtoVector NetStateRule LayerParameter PowerParameter FillerParameter ArgMaxParameter V0LayerParameter InnerProductParameter ConvolutionParameter SolverState EltwiseParameter SliceParameter WindowDataParameter DummyDataParameter HDF5OutputParameter TanHParameter TransformationParameter SoftmaxParameter ConcatParameter DataParameter SolverParameter MVNParameter ContrastiveLossParameter NetState NetParameter PoolingParameter DropoutParameter Datum SigmoidParameter AccuracyParameter MemoryDataParameter LRNParameter ReLUParameter ImageDataParameter InfogainLossParameter HDF5DataParameter ThresholdParameter ReductionParameter HingeLossParameter BlobProto BlobProtoVector NetStateRule LayerParameter PowerParameter FillerParameter ArgMaxParameter V0LayerParameter InnerProductParameter ConvolutionParameter SolverState EltwiseParameter LossParameter SliceParameter WindowDataParameter DummyDataParameter HDF5OutputParameter TanHParameter TransformationParameter SoftmaxParameter ConcatParameter DataParameter SPPParameter ParamSpec EmbedParameter SolverParameter MVNParameter ContrastiveLossParameter NetState NetParameter PoolingParameter DropoutParameter Datum SigmoidParameter BlobShape ExpParameter AccuracyParameter LogParameter ThresholdParameter TileParameter MemoryDataParameter LRNParameter ReLUParameter ImageDataParameter ReshapeParameter InfogainLossParameter V1LayerParameter HDF5DataParameter PReLUParameter FlattenParameter PythonParameter ReductionParameter HingeLossParameter BlobProto BlobProtoVector NetStateRule LayerParameter PowerParameter FillerParameter ArgMaxParameter V0LayerParameter InnerProductParameter ConvolutionParameter SolverState EltwiseParameter LossParameter SliceParameter BatchNormParameter WindowDataParameter DummyDataParameter HDF5OutputParameter TanHParameter TransformationParameter SoftmaxParameter ConcatParameter DataParameter SPPParameter ParamSpec EmbedParameter SolverParameter MVNParameter ContrastiveLossParameter NetState NetParameter BiasParameter PoolingParameter DropoutParameter Datum SigmoidParameter BlobShape ExpParameter AccuracyParameter LogParameter ThresholdParameter TileParameter MemoryDataParameter LRNParameter ReLUParameter ImageDataParameter ELUParameter ReshapeParameter InfogainLossParameter ScaleParameter V1LayerParameter HDF5DataParameter PReLUParameter FlattenParameter PythonParameter ROIPoolingParameter HingeLossParameter BlobProto BlobProtoVector NetStateRule LayerParameter PowerParameter FillerParameter ArgMaxParameter V0LayerParameter InnerProductParameter ConvolutionParameter SolverState EltwiseParameter LossParameter SliceParameter WindowDataParameter DummyDataParameter HDF5OutputParameter TanHParameter TransformationParameter SoftmaxParameter ConcatParameter DataParameter ParamSpec SolverParameter MVNParameter ContrastiveLossParameter NetState NetParameter PoolingParameter DropoutParameter Datum SigmoidParameter BlobShape ExpParameter AccuracyParameter ThresholdParameter MemoryDataParameter LRNParameter ReLUParameter ImageDataParameter InfogainLossParameter V1LayerParameter HDF5DataParameter PReLUParameter PythonParameter NetParameter LayerConnection BlobProto BlobProtoVector LayerParameter FillerParameter Datum SolverParameter SolverState BlobProto BlobProtoVector PowerParameter LayerParameter FillerParameter V0LayerParameter InnerProductParameter ConvolutionParameter SolverState WindowDataParameter HDF5OutputParameter ConcatParameter DataParameter SolverParameter NetParameter PoolingParameter DropoutParameter Datum MemoryDataParameter LRNParameter ImageDataParameter InfogainLossParameter HDF5DataParameter NetParameter EvalHistoryIter LayerConnection BlobProto BlobProtoVector LayerParameter FillerParameter Datum EvalHistory SolverParameter SolverState search clean match strip group append getFunctionDoc findNextFunction print print print children render_SL print pop render_DH print Frame push render_DIVL children render_DI print children render_L print pop children render_L_from_indent isa Frame render_B push indent pop children Frame push render_DIVL children render_BL render_V render_S render_DL isa render_P print Context render_DIVL dim tolist hasattr list empty keys RepeatedScalarFieldContainer isinstance update print f_locals interact copy reshape asarray astype clip hasattr list ndarray isinstance append empty keys CaffeTransform CaffeTransform
# Recurrent Scene Parsing with Perspective Understanding in the Loop ![alt text](http://www.ics.uci.edu/~skong2/img/perspectiveDemo.png "visualization") Objects may appear at arbitrary scales in perspective images of a scene, posing a challenge for recognition systems that process an image at a fixed resolution. We propose a depth-aware gating module that adaptively chooses the pooling field size in a convolutional network architecture according to the object scale (inversely proportional to the depth) so that small details can be preserved for objects at distance and a larger receptive field can be used for objects nearer to the camera. The depth gating signal is provided from stereo disparity (when available) or estimated directly from a single image. We integrate this depth-aware gating into a recurrent convolutional neural network trained in an end-to-end fashion to perform semantic segmentation. Our recurrent module iteratively refines the segmentation results, leveraging the depth estimate and output prediction from the previous loop. Through extensive experiments on three popular large-scale RGB-D datasets, we demonstrate our approach achieves competitive semantic segmentation performance using more compact model than existing methods. Interestingly, we find segmentation performance improves when we estimate depth directly from the image rather than using "ground-truth" and the model produces state-of-the-art results for quantitative depth estimation from a single image. For details, please refer to our [project page](http://www.ics.uci.edu/~skong2/recurrentDepthSeg) To download our models, please go [google drive](https://drive.google.com/open?id=0BxeylfSgpk1MaVlNZV96eVVqdWM) and put the models in directory 'models'. MatConvNet is used in our project, some functions are changed. So it might be required to re-compile. Useful commands are -- ```python LD_LIBRARY_PATH=/usr/local/cuda-7.5/lib64:local matlab path_to_matconvnet = '../matconvnet'; run(fullfile(path_to_matconvnet, 'matlab', 'vl_setupnn'));
1,296
airglow/simitate
['imitation learning']
['Simitate: A Hybrid Imitation Learning Benchmark']
simitate/trajectory_loader.py setup.py simitate/transformations.py simitate/simitate_bullet.py download_and_unzip_data_file SimitateTrajectoryLoader filter_lines own_genfromtxt plot_trajectory matrix_from_row orthogonalization_matrix inverse_matrix euler_matrix translation_matrix shear_matrix vector_norm quaternion_from_matrix quaternion_inverse Arcball projection_matrix unit_vector rotation_from_matrix random_rotation_matrix quaternion_from_euler decompose_matrix clip_matrix quaternion_conjugate quaternion_slerp quaternion_about_axis arcball_map_to_sphere scale_from_matrix euler_from_quaternion scale_matrix random_quaternion quaternion_matrix superimposition_matrix arcball_nearest_axis projection_from_matrix translation_from_matrix shear_from_matrix euler_from_matrix rotation_matrix random_vector compose_matrix identity_matrix reflection_matrix concatenate_matrices is_same_transform arcball_constrain_to_axis reflection_from_matrix quaternion_multiply _import_module print get enumerate split split translation_matrix quaternion_matrix plot identity dot unit_vector identity squeeze eig array cos identity dot sin unit_vector array T squeeze eig atan2 trace array dot unit_vector array identity squeeze eig array trace dot unit_vector array identity T squeeze eig dot array len dot unit_vector tan identity T vector_norm squeeze eig identity cross dot atan array T vector_norm asin inv cos copy atan2 dot any zeros array dot euler_matrix identity radians cos sin svd T reshape eig identity quaternion_matrix roll mean dot sum identity sqrt atan2 empty cos sin zeros cos vector_norm dot array outer empty trace pi dot sin unit_vector acos sqrt rand pi sqrt array array vector_norm dot arcball_constrain_to_axis array atleast_1d sqrt sum array atleast_1d sqrt expand_dims sum array dot identity array __import__
# Simitate: A Hybrid Imitation Learning Benchmark ![Simitate Overview](images/simitate_overview.png) * A preprint can be found on [arxiv](https://arxiv.org/abs/1905.06002). * A short overview video is available on [youtube](https://www.youtube.com/watch?v=EHRgX0_G-j4). * A [pytorch dataset integration](https://github.com/airglow/simitate_dataset_pytorch) is available. <!--<section id="video" class="bg-light">--> ## Video <video width=100% controls> <source src="video/simitate.mp4"> </video>
1,297
airglow/simitate_imitation_learning_benchmark
['imitation learning']
['Simitate: A Hybrid Imitation Learning Benchmark']
simitate/trajectory_loader.py setup.py simitate/transformations.py simitate/simitate_bullet.py download_and_unzip_data_file SimitateTrajectoryLoader filter_lines own_genfromtxt plot_trajectory matrix_from_row orthogonalization_matrix inverse_matrix euler_matrix translation_matrix shear_matrix vector_norm quaternion_from_matrix quaternion_inverse Arcball projection_matrix unit_vector rotation_from_matrix random_rotation_matrix quaternion_from_euler decompose_matrix clip_matrix quaternion_conjugate quaternion_slerp quaternion_about_axis arcball_map_to_sphere scale_from_matrix euler_from_quaternion scale_matrix random_quaternion quaternion_matrix superimposition_matrix arcball_nearest_axis projection_from_matrix translation_from_matrix shear_from_matrix euler_from_matrix rotation_matrix random_vector compose_matrix identity_matrix reflection_matrix concatenate_matrices is_same_transform arcball_constrain_to_axis reflection_from_matrix quaternion_multiply _import_module print get enumerate split split translation_matrix quaternion_matrix plot identity dot unit_vector identity squeeze eig array cos identity dot sin unit_vector array T squeeze eig atan2 trace array dot unit_vector array identity squeeze eig array trace dot unit_vector array identity T squeeze eig dot array len dot unit_vector tan identity T vector_norm squeeze eig identity cross dot atan array T vector_norm asin inv cos copy atan2 dot any zeros array dot euler_matrix identity radians cos sin svd T reshape eig identity quaternion_matrix roll mean dot sum identity sqrt atan2 empty cos sin zeros cos vector_norm dot array outer empty trace pi dot sin unit_vector acos sqrt rand pi sqrt array array vector_norm dot arcball_constrain_to_axis array atleast_1d sqrt sum array atleast_1d sqrt expand_dims sum array dot identity array __import__
# Simitate: A Hybrid Imitation Learning Benchmark ![Simitate Overview](images/simitate_overview.png) * A preprint can be found on [arxiv](https://arxiv.org/abs/1905.06002). * A short overview video is available on [youtube](https://www.youtube.com/watch?v=EHRgX0_G-j4). * A [pytorch dataset integration](https://github.com/airglow/simitate_dataset_pytorch) is available. <!--<section id="video" class="bg-light">--> ## Video <video width=100% controls> <source src="video/simitate.mp4"> </video>
1,298
aistairc/market-reporter
['text generation']
['Generating Market Comments Referring to External Resources']
reporter/webapp/main.py reporter/main.py reporter/__init__.py reporter/resource/s3.py reporter/postprocessing/text.py reporter/webapp/table.py reporter/__main__.py reporter/webapp/__main__.py reporter/webapp/search.py reporter/preprocessing/text.py reporter/database/model.py reporter/database/write.py reporter/postprocessing/export.py tests/preprocessing/test_text.py reporter/predict.py reporter/util/exchange.py tests/util/test_tool.py tests/core/test_operation.py reporter/util/tool.py tests/postprocessing/test_text.py reporter/util/config.py tests/database/test_write.py reporter/webapp/human_evaluation.py reporter/preprocessing/number.py reporter/util/constant.py reporter/util/logging.py reporter/postprocessing/bleu.py reporter/webapp/chart.py reporter/core/network.py reporter/preprocessing/dataset.py tests/util/test_exchange.py reporter/database/read.py reporter/database/misc.py setup.py reporter/util/conversion.py tests/resource/test_reuters.py reporter/core/train.py reporter/resource/reuters.py reporter/core/operation.py main parse_args main create_dataset Predictor parse_args load_alignments_from_db GeneralAttention ConcatAttention MLP Decoder Encoder Attention setup_attention EncoderDecoder get_latest_closing_vals perform_operation find_operation replace_tags_with_vals RunResult run in_jst stringify in_utc Instrument Headline HumanEvaluation create_table Price create_tables Close GenerationResult PriceSeq fetch_date_range fetch_prices_of_a_day Alignment fetch_rics fetch_latest_vals are_headlines_ready fetch_max_t_of_prev_trading_day load_alignments_from_db insert_prices update_headlines insert_headlines insert_instruments calc_bleu export_results_to_csv number2kansuuzi remove_bos prepare_resources create_dataset format_digit is_interesting kansuuzi2number is_template simplify_headline find_economic_exprs replace_prices_with_tags replace_tosho_with_n225 list_csv_filenames get_auth_token make_extract_header filename2ric make_payload download_prices_from_reuters ric2filename download_reuters_articles_from_s3 list_rics_in_s3 download_prices_from_s3 upload_prices_to_s3 download_nikkei_headlines_from_s3 download_nikkei_bodies_from_s3 Config Span Code Reuters Phase Category SpecialToken SeqType stringify_ric_seqtype base_ric_first convert_24h_to_12h ClosingTime create_logger takeuntil _xs_ys_of_group fetch_points fetch_all_points_fast fetch_close fetch_all_closes_fast populate_for_human_evaluation data epoch EvalListRow list_targets list_targets_of_human_evaluation debug predict article_evaluation index human_evaluation DummyPagination articles EvalTarget data_ts demo order_method_names_for_debug construct_constraint_query RICInfo create_ric_tables Table load_ric_to_ric_info test_perform_operation test_find_operation_reverse test_find_operation config test_standardized_long test_normalized_moving_reference_long test_normalized_moving_reference_short test_raw_short engine test_moving_reference_short db_session test_raw_long test_moving_reference_long test_standardized_short test_number2kansuuzi test_simplify_headline test_is_not_template test_replace_prices_with_tags test_is_template test_kansuuzi2number test_filename2ric_underscore test_ric2filename_equal test_ric2filename_lowercase test_ric2filename_period test_get_auth_token test_filename2ric_period test_ric2filename_underscore test_filename2ric_lowercase test_filename2ric_equql test_func_get_close_t_tse TestTool add_argument ArgumentParser Config create_logger Path save device Train run str list calc_bleu all Adam strftime db_uri dest_config prepare_resources parse_args load_alignments_from_db setup_attention range Valid state_dict format value create_engine SessionMaker dir_output close create_tables Encoder export_results_to_csv write_log mkdir pred_sents info gold_sents n_epochs is_debug EncoderDecoder NLLLoss join Decoder parameters create_dataset simplefilter sessionmaker Test len dict strptime TabularDataset product dict Field stringify_ric_seqtype time print output ric Predictor predict time_embed_size len items list argmin Decimal append abs formula get abs append perform_operation model batch_size zero_grad seed list RawLong append stringify_ric_seqtype token value size replace_tags_with_vals eval article_id attn zip info RawShort join time isinstance backward get_latest_closing_vals extend sentence_bleu train step array compile statement Numeric TIMESTAMP Column ARRAY TIMESTAMP Column TIMESTAMP Column UUID ARRAY TIMESTAMP Column Column ARRAY Column Column create_all create_all distinct first all timedelta timedelta one_or_none scalar str list all jst_hour Alignment fetch_rics tqdm t Decimal find_operation article_id to_dict info append tag_tokens range len ClosingTime ric2filename insert_instruments dict Path glob list str list commit all kansuuzi2number simplify_headline tqdm replace_prices_with_tags info append headline bulk_update_mappings Tokenizer commit Path mkdir head_bucket upload_prices_to_s3 Path s3_bucket_name remote_nikkei_headline_filenames download_prices_from_s3 fetch_rics resource insert_prices Bucket reuters_username dir_resources download_nikkei_headlines_from_s3 reuters_password list_rics_in_s3 update_headlines are_headlines_ready download_prices_from_reuters insert_headlines remote_dir_prices splits batch_size rics RawField build_vocab normalize sub replace pop zfill index len format replace enumerate append join format search append join listdir sub replace get_auth_token get format WARNING error CRITICAL make_extract_header make_payload status_code debug post mkdir info append sleep setLevel auth_token_uri format error status_code post join join int format debug search lower download_file sub isfile makedirs format name debug ric2filename download_file Path mkdir is_file all str list all name ric2filename Path format filter joinpath download_file mkdir info format name joinpath download_file mkdir info insert remove setFormatter basicConfig getLogger addHandler StreamHandler Formatter mkdir setLevel FileHandler append astimezone timedelta fetch_prices_of_a_day append execute text join scalar join list text dict execute commit list permutations all HumanEvaluation len add article_id sample randint keys range enumerate factorial append EvalListRow strip one_or_none fluency informativeness construct_constraint_query EvalTarget count str all DummyPagination append range n_items_per_page get order_by format article_id is_target phase int note t jst order_method_names_for_debug args get commit format session Table one_or_none form t dict one EvalTarget rics append create_ric_tables order_method_names_for_debug replace append session month fetch_points one day year datetime session fetch_date_range fetch_rics fromtimestamp int session fetch_points fetch_all_points_fast timedelta fetch_close rics fetch_all_closes_fast fromtimestamp strftime int get all Table description append currency enumerate find_operation find_operation perform_operation close create_logger insert_prices drop_all Path create_all dir_resources sessionmaker Session scalar scalar scalar scalar scalar scalar scalar scalar number2kansuuzi join simplify_headline tokenize replace_prices_with_tags Tokenizer kansuuzi2number get_auth_token is_file Path skip filename2ric filename2ric filename2ric filename2ric Path ric2filename Path ric2filename Path ric2filename Path ric2filename func_get_close_t get_close_t_tse ClosingTime get_close_t_nyse Path get_close_t_osa
# Market Reporter [![CircleCI](https://circleci.com/gh/aistairc/market-reporter.svg?style=svg)](https://circleci.com/gh/aistairc/market-reporter) [日本語](docs/README-ja.md) <p align="center"><img src="docs/figures/logo.svg" width="600px"></p> __Market Reporter__ automatically generates short comments that describe time series data of stock prices, FX rates, etc. This is an implementation of Murakami et al. (ACL 2017) [[bib](#reference)] [[paper](http://www.aclweb.org/anthology/P17-1126)] and Aoki et al. (INLG 2018) [[bib](#reference)] [[paper](http://aclweb.org/anthology/W18-6515)] [[poster](figures/pdf/poster.pdf)]. <p align="center"><img src="docs/figures/gloss.svg" width="100%"></p> ## Table of Contents 1. [Requirements](#requirements) 1. [Architecture](#architecture)
1,299