vault backup: 2023-05-26 18:52:08
Affected files: .obsidian/graph.json .obsidian/workspace.json STEM/AI/Neural Networks/CNN/FCN/FCN.md STEM/AI/Neural Networks/CNN/FCN/FlowNet.md STEM/AI/Neural Networks/CNN/FCN/Super-Resolution.md STEM/AI/Neural Networks/CNN/GAN/CycleGAN.md STEM/AI/Neural Networks/CNN/GAN/DC-GAN.md STEM/AI/Neural Networks/CNN/GAN/GAN.md STEM/AI/Neural Networks/CNN/GAN/cGAN.md STEM/AI/Neural Networks/CNN/Interpretation.md STEM/AI/Neural Networks/CNN/UpConv.md STEM/img/am-process.png STEM/img/am.png STEM/img/fcn-arch.png STEM/img/fcn-eval.png STEM/img/fcn-uses.png STEM/img/flownet-encode.png STEM/img/flownet-training.png STEM/img/flownet-upconv.png STEM/img/flownet.png STEM/img/super-res.png STEM/img/superres-results.png
42
AI/Neural Networks/CNN/FCN/FCN.md
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
Fully [[Convolution]]al Network
|
||||||
|
|
||||||
|
Convolutional and up-convolutional layers with [[Activation Functions#ReLu|ReLu]] but no others (pooling)
|
||||||
|
- All some sort of Encoder-Decoder
|
||||||
|
|
||||||
|
Contractive → [[UpConv]]
|
||||||
|
|
||||||
|
# Image Sementation
|
||||||
|
- For visual output
|
||||||
|
- Previously image $\rightarrow$ vector
|
||||||
|
- Additional layers to up-sample representation to an image
|
||||||
|
- Up-[[convolution]]al
|
||||||
|
- De-[[convolution]]al
|
||||||
|
|
||||||
|
![[fcn-uses.png]]
|
||||||
|
|
||||||
|
![[fcn-arch.png]]
|
||||||
|
|
||||||
|
# Training
|
||||||
|
- Rarely from scratch
|
||||||
|
- Pre-trained weights
|
||||||
|
- Replace final layers
|
||||||
|
- FC layers
|
||||||
|
- White-noise initialised
|
||||||
|
- Add [[upconv]] layer(s)
|
||||||
|
- Fine-tune train
|
||||||
|
- Freeze others
|
||||||
|
- Annotated GT images
|
||||||
|
- Can use summed per-pixel log loss
|
||||||
|
|
||||||
|
# Evaluation
|
||||||
|
![[fcn-eval.png]]
|
||||||
|
- SDS
|
||||||
|
- Classical method
|
||||||
|
- 52% mAP
|
||||||
|
- FCN
|
||||||
|
- 62% mAP
|
||||||
|
- Intersection over Union
|
||||||
|
- IOU
|
||||||
|
- Jaccard
|
||||||
|
- Averaged over all images
|
||||||
|
- $J(A,B)=\frac{|A\cap B|}{|A\cup B|}$
|
26
AI/Neural Networks/CNN/FCN/FlowNet.md
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
Optical Flow
|
||||||
|
|
||||||
|
- 2-Channel optical flow
|
||||||
|
- $dx,dy$
|
||||||
|
- Two consecutive frames
|
||||||
|
- 6-channel tensor
|
||||||
|
|
||||||
|
![[flownet.png]]
|
||||||
|
|
||||||
|
# Skip Connections
|
||||||
|
- Further through the network information is condensed
|
||||||
|
- Less high frequency information
|
||||||
|
- Link encoder layers to [[upconv]] layers
|
||||||
|
- Append activation maps from encoder to decoder
|
||||||
|
|
||||||
|
# Encode
|
||||||
|
![[flownet-encode.png]]
|
||||||
|
|
||||||
|
# [[Upconv]]
|
||||||
|
![[flownet-upconv.png]]
|
||||||
|
|
||||||
|
# Training
|
||||||
|
- Synthetic rendered objects
|
||||||
|
- Real background images
|
||||||
|
|
||||||
|
![[flownet-training.png]]
|
12
AI/Neural Networks/CNN/FCN/Super-Resolution.md
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
- Auto-encoders
|
||||||
|
- Get same image back
|
||||||
|
- Up-sample blurry small image classically
|
||||||
|
- Bi-cubic
|
||||||
|
- Encode-decode to deep sharpen
|
||||||
|
- No ground truth
|
||||||
|
- Unsupervised?
|
||||||
|
- Decoder stage
|
||||||
|
- Identical architecture to encoder
|
||||||
|
![[super-res.png]]
|
||||||
|
- Is actually contractive/up sampling
|
||||||
|
![[superres-results.png]]
|
@ -1,4 +1,4 @@
|
|||||||
Cycle Consistent GAN
|
Cycle Consistent [[GAN]]
|
||||||
|
|
||||||
- G
|
- G
|
||||||
- $x \rightarrow y$
|
- $x \rightarrow y$
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
Deep Convolutional GAN
|
Deep Convolutional [[GAN]]
|
||||||
![[dc-gan.png]]
|
![[dc-gan.png]]
|
||||||
|
|
||||||
- Generator
|
- Generator
|
||||||
- FCN
|
- [[FCN]]
|
||||||
- Decoder
|
- Decoder
|
||||||
- Generate image from code
|
- Generate image from code
|
||||||
- Low-dimensional
|
- Low-dimensional
|
||||||
- ~100-D
|
- ~100-D
|
||||||
- Reshape to tensor
|
- Reshape to tensor
|
||||||
- Upconv to image
|
- [[Upconv]] to image
|
||||||
- Train using Gaussian random noise for code
|
- Train using Gaussian random noise for code
|
||||||
- Discriminator
|
- Discriminator
|
||||||
- Contractive
|
- Contractive
|
||||||
@ -57,12 +57,12 @@ $$J^{(G)}=-J^{(D)}$$
|
|||||||
|
|
||||||
# What is Learnt?
|
# What is Learnt?
|
||||||
- Encoding texture/patch detail from training set
|
- Encoding texture/patch detail from training set
|
||||||
- Similar to FCN
|
- Similar to [[FCN]]
|
||||||
- Reproducing texture at high level
|
- Reproducing texture at high level
|
||||||
- Cues triggered by code vector
|
- Cues triggered by code vector
|
||||||
- Input random noise
|
- Input random noise
|
||||||
- Iteratively improves visual feasibility
|
- Iteratively improves visual feasibility
|
||||||
- Different to FCN
|
- Different to [[FCN]]
|
||||||
- Discriminator is a task specific classifier
|
- Discriminator is a task specific classifier
|
||||||
- Difficult to train over diverse footage
|
- Difficult to train over diverse footage
|
||||||
- Mixing concepts doesn't work
|
- Mixing concepts doesn't work
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
# Fully Convolutional
|
# Fully Convolutional
|
||||||
- Remove max-pooling
|
- Remove [[Max Pooling]]
|
||||||
- Use strided upconv
|
- Use strided [[upconv]]
|
||||||
- Remove FC layers
|
- Remove FC layers
|
||||||
- Hurts convergence in non-classification
|
- Hurts convergence in non-classification
|
||||||
- Normalisation tricks
|
- Normalisation tricks
|
||||||
- Batch normalisation
|
- Batch normalisation
|
||||||
- Batches of 0 mean and variance 1
|
- Batches of 0 mean and variance 1
|
||||||
- Leaky ReLu
|
- Leaky [[Activation Functions#ReLu|ReLu]]
|
||||||
|
|
||||||
# Stages
|
# Stages
|
||||||
## Generator, G
|
## Generator, G
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Conditional GAN
|
Conditional [[GAN]]
|
||||||
|
|
||||||
- Hard to control with AM
|
- Hard to control with [[Interpretation#Activation Maximisation|AM]]
|
||||||
- Unconditional GAN
|
- Unconditional [[GAN]]
|
||||||
- Condition synthesis on a class label
|
- Condition synthesis on a class label
|
||||||
- Concatenate unconditional code with conditioning vector
|
- Concatenate unconditional code with conditioning vector
|
||||||
- Label
|
- Label
|
||||||
|
20
AI/Neural Networks/CNN/Interpretation.md
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# Activation Maximisation
|
||||||
|
- Synthesise an ideal image for a class
|
||||||
|
- Maximise 1-hot output
|
||||||
|
- Maximise [[Activation Functions#SoftMax|SoftMax]]
|
||||||
|
|
||||||
|
![[am.png]]
|
||||||
|
- **Use trained network**
|
||||||
|
- Don't update weights
|
||||||
|
- Feedforward noise
|
||||||
|
- [[Back-Propagation|Back-propagate]] loss
|
||||||
|
- Don't update weights
|
||||||
|
- Update image
|
||||||
|
|
||||||
|
![[am-process.png]]
|
||||||
|
## Regulariser
|
||||||
|
- Fit to natural image statistics
|
||||||
|
- Prone to high frequency noise
|
||||||
|
- Minimise
|
||||||
|
- Total variation
|
||||||
|
- $x^*$ is the best solution to minimise loss
|
0
AI/Neural Networks/CNN/UpConv.md
Normal file
BIN
img/am-process.png
Normal file
After Width: | Height: | Size: 148 KiB |
BIN
img/am.png
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
img/fcn-arch.png
Normal file
After Width: | Height: | Size: 75 KiB |
BIN
img/fcn-eval.png
Normal file
After Width: | Height: | Size: 150 KiB |
BIN
img/fcn-uses.png
Normal file
After Width: | Height: | Size: 147 KiB |
BIN
img/flownet-encode.png
Normal file
After Width: | Height: | Size: 114 KiB |
BIN
img/flownet-training.png
Normal file
After Width: | Height: | Size: 288 KiB |
BIN
img/flownet-upconv.png
Normal file
After Width: | Height: | Size: 125 KiB |
BIN
img/flownet.png
Normal file
After Width: | Height: | Size: 124 KiB |
BIN
img/super-res.png
Normal file
After Width: | Height: | Size: 93 KiB |
BIN
img/superres-results.png
Normal file
After Width: | Height: | Size: 92 KiB |