Python | Seaborn
seaborn: statistical data visualization
provides a high-level interface for drawing attractive and informative statistical graphics
based on matplotlib
Introduction[^1]12345678# it’s recommended to use a Jupyter/IPython interface in matplotlib mode, or else you’ll have to call matplotlib.pyplot.show when you want to see the plotimport seaborn as snssns.set() # default theme, affect how all matplotlib plots looktips = sns.load_dataset("tips") # gat quick access to an example ...
× | Python | pandas
pandas: Python Data Analysis Library
Introduce
A fast and efficient DataFrame object
Reading and writing data (csv, txt, excel, sql, hdf5…)
Data alignment, handling of missing data, reshape and pivoting of datasets, merge and join of dataset
Label-based slicing, fancy indexing and subsetting, hierarchical axis indexing
Modules
DataFrame
Missing data handling: dropna,
Python | Virtualize Train & Result
收集一些训练可视化与结果可视化的代码。
利用plt调用history绘图1234567891011121314# ref: https://www.kaggle.com/uysimty/keras-cnn-dog-or-cat-classification/notebookfig, (ax1, ax2) = plt.subplots(2, 1, figsize=(12, 12))ax1.plot(history.history['loss'], color='b', label="Training loss")ax1.plot(history.history['val_loss'], color='r', label="validation loss")ax1.set_xticks(np.arange(1, epochs, 1))ax1.set_yticks(np.arange(0, 1, 0.1))ax2.plot(history.history[ ...
DeepLearning | PrePare Data
从目录或特定文件(CSV、npy )读取数据及预处理(scale、generator)的相关代码。
文件夹图片读取12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273# ref: https://www.kaggle.com/uysimty/keras-cnn-dog-or-cat-classification# load datafilenames = os.listdir("../input/train/train")categories = []for filename in filenames: category = filename.split('.')[0] if category == 'dog': categories.append(1) el ...
Python | scikit-learn
scikit-learn
Machine Learning in Python
Simple and efficient tools for data mining and data analysis
Built on NumPy, SciPy, and matplotlib
Structure^1
图中蓝色圆圈内是判断条件,绿色方框内是可以选择的算法。根据自己的数据特征和任务目标去找到一条自己的操作路线,一步步做就好了。
可以看到库的算法主要有四类:分类,回归,聚类,降维。其中:
常用的回归:线性、决策树、SVM、KNN ;集成回归:随机森林、Adaboost、GradientBoosting、Bagging、ExtraTrees
常用的分类:线性、决策树、SVM、KNN,朴素贝叶斯;集成分类:随机森林、Adaboost、GradientBoosting、Bagging、ExtraTrees
常用聚类:k均值(K-means)、层次聚类(Hierarchical clustering)、DBSCAN
常用降维:LinearDiscriminantAnalysi ...
Paper | Simultaneous Temperature and Strain Measurement Using Deep Neural Networks for BOTDA Sensing System
large effective-area fiber ~ multiple Brillouin peaks
use DNN to extract both the temperature and strain distribution form BGS without the need of fitting and calculation of two BFS equations
LEAFTwo peak with different BFS temperature and strain coefficients
Structure of DNN1input (data points) + 2hidden(number of neurons: 40 and 10) + 1output (temperature and strain)
Train
simulated ideal BGSs
ideal two-peak BGS simulate by using coefficients and theoretical Lorentzian as input
corresp ...
Paper | CBDNet | Toward Convolutional Blind Denoising of Real Photographs
Realistic Noise Model
Real image noise generally is more sophisticated and signal-dependent.
Considering both heteroscedastic Gaussian noise and in-camera processing pipeline
Noise Model of Imaging Sensors (Poisson-Gaussian)
Poisson - the noise produced by photon sensing
Gaussian - remaining stationary disturbances
$$\textbf n(\textbf L) =\textbf n_s(\textbf L) + \textbf n_c \sim \mathcal{N}(0,\sigma^2(\textbf L))$$
$$\sigma^2(\textbf L)=\textbf L · \sigma^2_s + \sigma^2_c $$
L is ...
python | multiprocessing
Python的多线程(threading) 与多进程(multiprocessing)Python的多线程实际上并不能真正利用多核,所以如果使用多线程实际上还是在一个核上做并发处理。
不过,如果使用多进程就可以真正利用多核,因为各进程之间是相互独立的,不共享资源,可以在不同的核上执行不同的进程,达到并行的效果。
multiprocessing模块[^1]multiprocessing是Python中的多进程管理包。它与 threading.Thread类似,可以利用multiprocessing.Process对象来创建一个进程。
该进程可以允许放在Python程序内部编写的函数中。该Process对象与Thread对象的用法相同,拥有is_alive()、join([timeout])、run()、start()、terminate()等方法。属性有:authkey、daemon(要通过start()设置)、exitcode(进程在运行时为None、如果为–N,表示被信号N结束)、name、pid。
此外multiprocessing包中也有Lock/Event ...
【未完】去噪算法 DnCnn | FFDNet | WaveletCNN | MWCNN
https://github.com/flyywh/Image-Denoising-State-of-the-art
https://blog.csdn.net/qq_26499769/article/details/78982560?utm_source=copy
https://blog.csdn.net/zbwgycm?t=1
Rank
Paper
Code
Tag
H
Beyond a Gaussian Denoiser: Residual Learning of Deep CNN for Image Denoising (TIP, 2017)
Matlab, Keras
H
FFDNet: Toward a Fast and Flexible Solution for CNN based Image Denoising (TIP, 2018)
Matlab
Toward Convolutional Blind Denoising of Real Photographs, CVPR 2019
Matlab
Noise2 ...
Python | argparse介绍与用法
简介[^1]通俗来说,命令行与参数解析就是当你输入cmd 打开dos 交互界面时候,启动程序要进行的参数给定。比如在dos 界面输入:python openPythonFile.py "a" -b "number",其中的”a”, -b 等就是命令行与参数解析要做的事。
基本框架
创建解析
添加参数
解析参数
12345678910111213import argparse# 创建解析步骤parser = argparse.ArgumentParser(description='Process some integers.')# 添加参数步骤parser.add_argument('integers', metavar='N', type=int, nargs='+', help='an integer for the accumulator')parser.add_argument('-- ...