Message Boards Message Boards

[WSS22] Modeling migraine aura in convolutional neural networks (CNN)

Posted 2 years ago

enter image description here

POSTED BY: Fizra Khan
3 Replies

Congratulations! Your post was highlighted on the Wolfram's official social media channels. Thank you for your contribution. We are looking forward to your future posts.

POSTED BY: EDITORIAL BOARD
trainingdata101 = data1[[1 ;; 200]];

Hi @Fizra Khan I try to read all of these lines of code that are submitted but I can't verify that I have read every single line of code but I have read almost all of everything that is submitted.

model01 = Import["/Users/deangladish/Downloads/WSS22-project-main/trainedmodel101.wlnet"]

neuralNetwork00

You know how in physics something similar happens in Wigner's friend scenario where we can model the convolution layers. Luckily a lot of the stuff that you've written @Fizra Khan aims to use these convolutional neural networks whether it's a migraine headache, flashing lights, zigzag lines, blind spots, and we can understand the underlying mechanisms, of the migraine aura.

modified01 = 
 NetInsert[model01, ElementwiseLayer[0.5 Sin[0.5 Pi #] &], 13]

neuralNetwork01

I guess the idea of incorporating sine waves demonstrates the adaptability and agility that simulates the visual patterns with varying frequencies.

images = 
  Table[{model01[trainingdata101[[t, 1]]], 
    modified01[trainingdata101[[t, 1]]]}, {t, 195, 200}];
ImageAssemble[images, ImageSize -> 150]

neuralNetwork1

net = NetModel[
   "Enhanced Super-Resolution GAN Trained on DIV2K, Flickr2K and OST \
Data"];
searchQuery = "Beach";
scape = WebImageSearch[SearchQueryString[searchQuery], "Thumbnails", 
   MaxItems -> 15];
images = ImageResize[#, {50, 50}] & /@ scape;
net01 = NetReplacePart[net, 
   "Input" -> NetEncoder[{"Image", ImageSize -> 50}]];
alteredImages = {};
Do[fn = If[i <= 5, Ramp,
    If[i <= 10, Tanh,
     LogisticSigmoid]];
  alteredImage = 
   NetInsert[net01, "alteration" -> ElementwiseLayer[fn], "conv2"][
    images[[i]]];
  AppendTo[alteredImages, alteredImage],
  {i, 1, 15}
  ];
grid = Grid[Partition[alteredImages, 5]]

neuralNetwork2

@Fizra Khan That was so fire, designing the filter weights in the encoder by manipulating them, generating the visual disturbances associated with migraine aura and occipital epilepsy overall.

Row[
 Table[
  altered01 = net01;
  layer01 = "conv1";
  weights01 = Normal[altered01[[layer01, "Weights"]]];
  weights01[[filter]] *= 10;
  altered01[[layer01, "Weights"]] = weights01;
  altered01[images[[2]]],
  {filter, {60, 45, 26, 14}}
  ]
 ]

neuralNetwork3

This is an extreme impression, the sine-blobs and the individual weights that make the zigzag lines and scotoma-type visuals. It would be fair to employ mathematical models like reaction-diffusion equations for cortical spreading and depression (CSD).

POSTED BY: Dean Gladish

enter image description here -- you have earned Featured Contributor Badge enter image description here Your exceptional post has been selected for our editorial column Staff Picks http://wolfr.am/StaffPicks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!

POSTED BY: EDITORIAL BOARD
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract