Image
Notes about image processing.
Convolution
Implementation of convolution
提取灰度特征和边缘特征的卷积核:
# Set up a convolutional weights holding 2 filters, each 3x3
w = np.zeros((2, 3, 3, 3))
# The first filter converts the image to grayscale.
# Set up the red, green, and blue channels of the filter.
w[0, 0, :, :] = [[0, 0, 0], [0, 0.3, 0], [0, 0, 0]]
w[0, 1, :, :] = [[0, 0, 0], [0, 0.6, 0], [0, 0, 0]]
w[0, 2, :, :] = [[0, 0, 0], [0, 0.1, 0], [0, 0, 0]]
# Second filter detects horizontal edges in the blue channel.
w[1, 2, :, :] = [[1, 2, 1], [0, 0, 0], [-1, -2, -1]]
im2col
Bootstrap
Quick notes
.d-none
, hide elements.d-{sm,md,lg,xl}-none
- Tips: use
d-none
first, and specify screen display mode to cover it.
container-fluid
, full width container
Responsive breakpoints
Github issue: Bootstrap default breakpoints
Viewport dimensions.
xs
, extra small- \( xs \le 575.98px \)
sm
, small- \( 576px \le sm \le 767.98px \)
md
, medium- \( 768px \le md \le 991.98px \)
lg
, large- \( 992px \le lg \le 1199.98px \)
xl
, extra large- \( xl \ge 1200px \)
Take control over the viewport:
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Docker
Links
Quick notes
Commands
docker images
docker run -it ubuntu <shell>
-v <host_dir>/<container_dir>
-p
--rm
, automatically aremove the container when it exists
docker exec -it <container_name> bash
docker history <image>
- 自下而上构建镜像层的缓存,
<...>: Already existes
docker ps
-a
for all
路
- 2018-01-07 大钟寺博物馆-中华民族园博物馆-中国动物博物馆
- 2018-01-14 清华大学艺术博物馆-香巴拉户外用品专卖店-中国人民大学
- 2018-01-21 惠新西街南口-天坛
- 2018-01-28 石刻艺术博物馆-古代钱币展览馆(德胜门箭楼)
- 2018-02-05 西直门-阜成门-宣武门-中国铁道博物馆正阳门展馆-正阳门城楼
- 2018-03-04 中国海关博物馆(雄关漫道:丝绸之路上的谷关)-北京古观象台
- 2018-03-10 国家典籍博物馆-中国古动物馆-李大钊故居
- 2018-03-17 首都博物馆
- 天路文华,西藏历史文化展
- 读城,发现北京四合院之美
文化
速记
龙之九子
- 龙有九个儿子,是跟谁生的?为什么「龙生九子,各不成龙」? - 豆子的回答 - 知乎
- 龙有九个儿子,是跟谁生的?为什么「龙生九子,各不成龙」? - 知乎
一说
龍生九子不成龍,各有所好:
囚牛,龍種,平生好音樂,今胡琴頭上刻獸是其遺像;
睚眦,平生好殺,今刀柄上龍吞口是其遺像;
嘲風,平生好險,今殿角走獸是其遺像;
蒲牢,平生好鳴,今鐘上獸鈕是其遺像;
狻猊,平生好坐,今佛座獅子是其遺像;
霸上,平生好負重,今碑座獸是其遺像;
狴犴,平生好訟,今獄門上獅子頭是其遺像;
贔屭,平生好文,今碑兩旁龍是其遺像;
蚩吻,平生好吞,今殿脊獸頭是其遺像。
李东阳(1447年-1516年) 《怀麓堂集》
行于五台
出发
旧岁之末,新年伊始,我们来到了五台山。
这是我第一次进行多天的徒步。
去之前的心情还是比较放松的,因为从照片上看,五台山的山势平缓。
路,看起来相当的很好走。
仅有的一丝丝忐忑不安,仅仅是有点低的温度。
Tensorflow
Notes about using Tensorflow
Quick notes
trainable: If True
, the default, also adds the variable to the graph collection GraphKeys.TRAINABLE_VARIABLES
. This collection is used as the default list of variables to use by the Optimizer
classes.
Tensorflow gpu auto growth
config = tf.ConfigProto()
config.gpu_options.allow_growth = True
Reset default graph
tf.reset_default_graph()
Tensorboard
with tf.Session(config=config) as sess:
# ...
writer = tf.summary.FileWriter('./graphs/test', sess.graph)
writer.flush()
writer.close()
Startup tensorboard:
CS231n
Course notes of CS231n, Convolutional Neural Networks for Visual Recognition.
2. Image Classification pipeline
- Challenges
- Viewpoint variation 多视角
- Illumination 光线
- Deformation 变形
- Occlusion 遮挡
- Background Clutter 杂乱的背景
- Intraclass variation 内类多样性
- Nearest Neighbor
- Compute the distances of testing images and training images
- \(L_n\) norm
- \((\sum_{i}{|X^i|^n})^{\frac{1}{n}}\)
- \(L_n\) distance
- \((\sum_{i}{|X_1^i - X_2^i|^n})^{\frac{1}{n}}\)
- method
- For each testing image, find the nearest training image
- Use the label of finding training image as the prediction
- complexity
- Training: \(O(1)\)
- Testing: \(O(n)\)
MCB80x
MCB80x, the fundamental of neuroscience, is a free, open, online Neuroscience course from HarvardX led by Professor David Cox. Animation by Daniela Sherer + Music by Dan Deacon. Edited by Alex Auriema.
Welcome
- Harvard
- brain
- Three parts
- explore science in Harvard and Boston
- guided interactivity
- DIY science
- Modules
- THE ELECTRICAL PROPERTIES OF THE NEURON
- signal generating, transfering
- NEURONS AND NETWORKS
- groups of neurons
- THE BRAIN
- society, intelligence
- THE ELECTRICAL PROPERTIES OF THE NEURON
Matlab
Quick notes
! Matlab start from 1, not 0 !
switch
dataset = 'minist';
switch(dataset):
case 'cifar-10'
code;
case 'minist'
code;
otherwise
error('Unrecognized dataset!')
end