wqwwlj123

wqwwlj123

Geek Repo

0

followers

0

following

Github PK Tool:Github PK Tool

wqwwlj123's starred repositories

External-Attention-pytorch

🍀 Pytorch implementation of various Attention Mechanisms, MLP, Re-parameter, Convolution, which is helpful to further understand papers.⭐⭐⭐

Language:PythonLicense:MITStargazers:11193Issues:0Issues:0

SwinFusion

This is official Pytorch implementation of "SwinFusion: Cross-domain Long-range Learning for General Image Fusion via Swin Transformer"

Language:PythonStargazers:165Issues:0Issues:0

CBAM-keras

CBAM implementation on Keras

Language:PythonLicense:MITStargazers:359Issues:0Issues:0

senet.pytorch

PyTorch implementation of SENet

Language:PythonLicense:MITStargazers:2264Issues:0Issues:0

cbam_cnn_architectures_image_classification

Spatial and Channel Attention in CNN Architectures for Image Classification task

Language:Jupyter NotebookLicense:MITStargazers:24Issues:0Issues:0
Language:HTMLLicense:NOASSERTIONStargazers:501Issues:0Issues:0

Attention-mechanism-implementation

Self-attention、Non-local、SE、SK、CBAM、DANet

Language:PythonStargazers:418Issues:0Issues:0

CBAM_MatLab

matlab code for Cbam

License:MITStargazers:6Issues:0Issues:0

CBAM

CBAM: Convolutional Block Attention Module for CIFAR10 on ResNet backbone with Pytorch

Language:PythonLicense:MITStargazers:101Issues:0Issues:0

ResNet-50-CBAM-PyTorch

Implementation of Resnet-50 with and without CBAM in PyTorch v1.8. Implementation tested on Intel Image Classification dataset from https://www.kaggle.com/puneet6060/intel-image-classification.

Language:PythonLicense:MITStargazers:76Issues:0Issues:0

cs230-code-examples

Code examples in pyTorch and Tensorflow for CS230

Language:PythonLicense:NOASSERTIONStargazers:3634Issues:0Issues:0

Sharpe-LSTM-Investment-Model

The research provides effective management strategies for different asset portfolios in the financial sector by building models. The VMD-LSTM-PSO model is developed for daily financial market price forecasting, where the time series are decomposed by VMD and the sub-series are used as LSTM input units to carry out forecasting, and then the network parameters are adjusted by PSO to improve the forecasting accuracy, and the Huber-loss of the model is 1.0481e-04. For the daily portfolio strategy, EEG is used to construct a system of investment risk indicators, which is optimized by incorporating the risk indicators into the Sharpe index, and the objective function is analyzed by using GA to derive the optimal daily asset share that maximizes the investor's return with minimal risk. The results of the empirical analysis show that the model provides strategies with good robustness.

Language:PythonLicense:AGPL-3.0Stargazers:16Issues:0Issues:0

CEEMDAN-VMD-GRU

CEEMDAN-VMD-LSTM Forecasting model (a light version of CEEMDAN_LSTM)

Language:Jupyter NotebookLicense:MITStargazers:68Issues:0Issues:0

Hilbert-Huang-transform

Implementation of Hilbert-Huang Transform software for matlab.

Language:MatlabStargazers:26Issues:0Issues:0
Language:MATLABStargazers:5Issues:0Issues:0

Empirical-Mode-Decompostion

Empirical mode Decomposition of Signal for Instantaneous Frequency using Hilbert Huang Transform

Language:MatlabStargazers:4Issues:0Issues:0

hilbert-huang-transform

The Hilbert–Huang transform (HHT) is a way to decompose a signal into so-called intrinsic mode functions (IMF) along with a trend, and obtain instantaneous frequency data. It is designed to work well for data that is nonstationary and nonlinear.

Language:Jupyter NotebookStargazers:6Issues:0Issues:0

Hilbert-Huang-transform

A demo of using Hilbert-Huang Transform (HHT) for non-stationary and non-linear signal analysis.

Language:Jupyter NotebookLicense:MITStargazers:76Issues:0Issues:0

CNN-ResNet

👁 Vision : Model 5: ResNet : Image Classification

Stargazers:6Issues:0Issues:0

pretorched-x

Pretrained Image & Video ConvNets and GANs for PyTorch: NASNet, ResNeXt (2D + 3D), ResNet (2D + 3D), InceptionV4, InceptionResnetV2, Xception, DPN, NonLocalNets, R(2+1)D nets, MultiView CNNs, Temporal Relation Networks, BigGANs StyleGANs, etc.

Language:PythonLicense:MITStargazers:325Issues:0Issues:0

pytorch_models

CNN经典网络结构复现:LeNet5、AlexNet、VGG、ResNet、InceptionNet等。

Language:PythonStargazers:74Issues:0Issues:0

itc2017

Code for paper "Application of Convolutional Neural Networks to Four-Class Motor Imagery Classification Problem"

Language:MatlabLicense:MITStargazers:12Issues:0Issues:0

efficientnet

Implementation of EfficientNet model. Keras and TensorFlow Keras.

Language:PythonLicense:Apache-2.0Stargazers:2068Issues:0Issues:0

time_frequency

时频分析 + 时变阶分数傅立叶变换普 + 时变滤波 相关的毕业设计课题全部代码和论文+PPT,供各位通信、电子信息工程等相关学弟学妹参考。

Language:MATLABLicense:MITStargazers:108Issues:0Issues:0

CBAM.PyTorch

Non-official implement of Paper:CBAM: Convolutional Block Attention Module

Language:PythonStargazers:1313Issues:0Issues:0

Electrical-Fault-detection-and-classification

A sample power system was modeled using MATLAB Simulink and all six types of faults were introduced into the transmission line of the power system. An ML classifier using 8 types model was implemented using sklearn and an appropriate model was selected as the end model for each problem.

Language:Jupyter NotebookStargazers:35Issues:0Issues:0

Dataset-Generation-Power-Line-Transmission-Fault

Power Line Transmission Fault Modeling and Dataset Generation For AI Based Automatic Detection

Language:MATLABLicense:MITStargazers:16Issues:0Issues:0

DeepLearning_FaultLocator

Deep neural network for locating faults in electric distribution systems.

Stargazers:3Issues:0Issues:0

MNIST_GAN

In this notebook, we'll be building a generative adversarial network (GAN) trained on the MNIST dataset. From this, we'll be able to generate new handwritten digits! GANs were first reported on in 2014 from Ian Goodfellow and others in Yoshua Bengio's lab. Since then, GANs have exploded in popularity. Here are a few examples to check out: Pix2Pix CycleGAN & Pix2Pix in PyTorch, Jun-Yan Zhu A list of generative models The idea behind GANs is that you have two networks, a generator 𝐺 and a discriminator 𝐷 , competing against each other. The generator makes "fake" data to pass to the discriminator. The discriminator also sees real training data and predicts if the data it's received is real or fake. The generator is trained to fool the discriminator, it wants to output data that looks as close as possible to real, training data. The discriminator is a classifier that is trained to figure out which data is real and which is fake. What ends up happening is that the generator learns to make data that is indistinguishable from real data to the discriminator. The general structure of a GAN is shown in the diagram above, using MNIST images as data. The latent sample is a random vector that the generator uses to construct its fake images. This is often called a latent vector and that vector space is called latent space. As the generator trains, it figures out how to map latent vectors to recognizable images that can fool the discriminator. If you're interested in generating only new images, you can throw out the discriminator after training. In this notebook, I'll show you how to define and train these adversarial networks in PyTorch and generate new images!

Language:Jupyter NotebookLicense:MITStargazers:25Issues:0Issues:0

Alzhimers-Disease-Prediction-Using-Deep-learning

# AD-Prediction Convolutional Neural Networks for Alzheimer's Disease Prediction Using Brain MRI Image ## Abstract Alzheimers disease (AD) is characterized by severe memory loss and cognitive impairment. It associates with significant brain structure changes, which can be measured by magnetic resonance imaging (MRI) scan. The observable preclinical structure changes provides an opportunity for AD early detection using image classification tools, like convolutional neural network (CNN). However, currently most AD related studies were limited by sample size. Finding an efficient way to train image classifier on limited data is critical. In our project, we explored different transfer-learning methods based on CNN for AD prediction brain structure MRI image. We find that both pretrained 2D AlexNet with 2D-representation method and simple neural network with pretrained 3D autoencoder improved the prediction performance comparing to a deep CNN trained from scratch. The pretrained 2D AlexNet performed even better (**86%**) than the 3D CNN with autoencoder (**77%**). ## Method #### 1. Data In this project, we used public brain MRI data from **Alzheimers Disease Neuroimaging Initiative (ADNI)** Study. ADNI is an ongoing, multicenter cohort study, started from 2004. It focuses on understanding the diagnostic and predictive value of Alzheimers disease specific biomarkers. The ADNI study has three phases: ADNI1, ADNI-GO, and ADNI2. Both ADNI1 and ADNI2 recruited new AD patients and normal control as research participants. Our data included a total of 686 structure MRI scans from both ADNI1 and ADNI2 phases, with 310 AD cases and 376 normal controls. We randomly derived the total sample into training dataset (n = 519), validation dataset (n = 100), and testing dataset (n = 67). #### 2. Image preprocessing Image preprocessing were conducted using Statistical Parametric Mapping (SPM) software, version 12. The original MRI scans were first skull-stripped and segmented using segmentation algorithm based on 6-tissue probability mapping and then normalized to the International Consortium for Brain Mapping template of European brains using affine registration. Other configuration includes: bias, noise, and global intensity normalization. The standard preprocessing process output 3D image files with an uniform size of 121x145x121. Skull-stripping and normalization ensured the comparability between images by transforming the original brain image into a standard image space, so that same brain substructures can be aligned at same image coordinates for different participants. Diluted or enhanced intensity was used to compensate the structure changes. the In our project, we used both whole brain (including both grey matter and white matter) and grey matter only. #### 3. AlexNet and Transfer Learning Convolutional Neural Networks (CNN) are very similar to ordinary Neural Networks. A CNN consists of an input and an output layer, as well as multiple hidden layers. The hidden layers are either convolutional, pooling or fully connected. ConvNet architectures make the explicit assumption that the inputs are images, which allows us to encode certain properties into the architecture. These then make the forward function more efficient to implement and vastly reduce the amount of parameters in the network. #### 3.1. AlexNet The net contains eight layers with weights; the first five are convolutional and the remaining three are fully connected. The overall architecture is shown in Figure 1. The output of the last fully-connected layer is fed to a 1000-way softmax which produces a distribution over the 1000 class labels. AlexNet maximizes the multinomial logistic regression objective, which is equivalent to maximizing the average across training cases of the log-probability of the correct label under the prediction distribution. The kernels of the second, fourth, and fifth convolutional layers are connected only to those kernel maps in the previous layer which reside on the same GPU (as shown in Figure1). The kernels of the third convolutional layer are connected to all kernel maps in the second layer. The neurons in the fully connected layers are connected to all neurons in the previous layer. Response-normalization layers follow the first and second convolutional layers. Max-pooling layers follow both response-normalization layers as well as the fifth convolutional layer. The ReLU non-linearity is applied to the output of every convolutional and fully-connected layer. ![](images/f1.png) The first convolutional layer filters the 224x224x3 input image with 96 kernels of size 11x11x3 with a stride of 4 pixels (this is the distance between the receptive field centers of neighboring neurons in a kernel map). The second convolutional layer takes as input the (response-normalized and pooled) output of the first convolutional layer and filters it with 256 kernels of size 5x5x48. The third, fourth, and fifth convolutional layers are connected to one another without any intervening pooling or normalization layers. The third convolutional layer has 384 kernels of size 3x3x256 connected to the (normalized, pooled) outputs of the second convolutional layer. The fourth convolutional layer has 384 kernels of size 3x3x192 , and the fifth convolutional layer has 256 kernels of size 3x3x192. The fully-connected layers have 4096 neurons each. #### 3.2. Transfer Learning Training an entire Convolutional Network from scratch (with random initialization) is impractical[14] because it is relatively rare to have a dataset of sufficient size. An alternative is to pretrain a Conv-Net on a very large dataset (e.g. ImageNet), and then use the ConvNet either as an initialization or a fixed feature extractor for the task of interest. Typically, there are three major transfer learning scenarios: **ConvNet as fixed feature extractor:** We can take a ConvNet pretrained on ImageNet, and remove the last fully-connected layer, then treat the rest structure as a fixed feature extractor for the target dataset. In AlexNet, this would be a 4096-D vector. Usually, we call these features as CNN codes. Once we get these features, we can train a linear classifier (e.g. linear SVM or Softmax classifier) for our target dataset. **Fine-tuning the ConvNet:** Another idea is not only replace the last fully-connected layer in the classifier, but to also fine-tune the parameters of the pretrained network. Due to overfitting concerns, we can only fine-tune some higher-level part of the network. This suggestion is motivated by the observation that earlier features in a ConvNet contains more generic features (e.g. edge detectors or color blob detectors) that can be useful for many kind of tasks. But the later layer of the network becomes progressively more specific to the details of the classes contained in the original dataset. **Pretrained models:** The released pretrained model is usually the final ConvNet checkpoint. So it is common to see people use the network for fine-tuning. #### 4. 3D Autoencoder and Convolutional Neural Network We take a two-stage approach where we first train a 3D sparse autoencoder to learn filters for convolution operations, and then build a convolutional neural network whose first layer uses the filters learned with the autoencoder. ![](images/f2.png) #### 4.1. Sparse Autoencoder An autoencoder is a 3-layer neural network that is used to extract features from an input such as an image. Sparse representations can provide a simple interpretation of the input data in terms of a small number of \parts by extracting the structure hidden in the data. The autoencoder has an input layer, a hidden layer and an output layer, and the input and output layers have same number of units, while the hidden layer contains more units for a sparse and overcomplete representation. The encoder function maps input x to representation h, and the decoder function maps the representation h to the output x. In our problem, we extract 3D patches from scans as the input to the network. The decoder function aims to reconstruct the input form the hidden representation h. #### 4.2. 3D Convolutional Neural Network Training the 3D convolutional neural network(CNN) is the second stage. The CNN we use in this project has one convolutional layer, one pooling layer, two linear layers, and finally a log softmax layer. After training the sparse autoencoder, we take the weights and biases of the encoder from trained model, and use them a 3D filter of a 3D convolutional layer of the 1-layer convolutional neural network. Figure 2 shows the architecture of the network. #### 5. Tools In this project, we used Nibabel for MRI image processing and PyTorch Neural Networks implementation.

Language:PythonStargazers:133Issues:0Issues:0