0%

This blog comes from an answer from How to put the legend out of the plot. Reprint it here for note. Original author keeps all the right.

Placing the legend (bbox_to_anchor)

A legend is positioned inside the bounding box of the axes using the loc argument to plt.legend.
E.g. loc="upper right" places the legend in the upper right corner of the bounding box, which by default extents from (0,0) to (1,1) in axes coordinates (or in bounding box notation (x0,y0, width, height)=(0,0,1,1)).

Read more »

EMD

EMD: Empirical Mode Decomposition

特征

  1. 自适应。与小波分析相比,克服了基函数无自适应性的问题,解决了全局最优小波基在局部并非最优的问题,有基函数自适应特性。
  2. 可以直接进行分解,不需要预分析和研究。
Read more »

Some Facts

  1. The output of face detector is not always the same, it can be a square, a rectangle, or an oval bounding box.
  2. Most of the landmark detectors need to take in an square bounding box for the detection.
  3. Although the bounding box shape is different, they roughly have the same shape center. For the square and rectangle, they have the same bounding box center, and the edge length of the square box is roughly the same as the mean value of the two edge lengths of the rectangle. Here is a sample.
Read more »

有两种常见解决办法:

  1. 调用目标函数的__func__()方法。
  2. 使用CLASS_NAME.target_func()方法。这种方法更加干净、Pythonic。
1
2
3
4
5
6
7
8
9
10
11
class Klass(object):

@staticmethod # use as decorator
def stat_func():
return 42

_ANS = stat_func.__func__() # call the staticmethod

def method(self):
ret = Klass.stat_func()
return ret

对象是一个定值

此时三种方法的作用实际上是相同的。

1
2
3
4
5
6
7
8
9
10
11
import copy

a = "亚丝娜"
b = a
c = copy.copy(a)
d = copy.deepcopy(a)

print("源:id(a)->>>", id(a))
print("赋值:id(b)->>>", id(b))
print("浅拷贝:id(c)->>>", id(c))
print("深拷贝:id(d)->>>", id(d))
Read more »

符号变量 syms

在MATLAB中创建或定义一个函数需要用到符号变量。一般情况下,想要绘制函数图像时,往往使用x=[a:0.01:b]的方式先创建一个x的离散定义域,然后再用y=func(x)的方式定义函数本身,最后使用plot(x,y)的方式绘制图像。

然而,当涉及到函数极值、求导、方程求解、连续图像绘制等问题时,这种方法就不够用了。

Read more »

Pytorch Release Version Composition

The repository cloned from GitHub pytorch/pytorch is different from the package we download using pip install or conda install. In fact, the former contains many C/C++ based files, which consist of the basic of Pytorch, while the latter is more concise and contains compiled libraries and dll files instead.

Here, let’s discuss the release version, or the installed package at first. The package has a lot of components, Here I only pick out some most important parts to do explanation.

image-20191128191350467

Read more »

Overview

Video classification, or in our case, more specifically, action recognition, are studied for a long time. There are many traditional as well as deep learning based method developed to address this problem, and the latest action recognition result trained on a large dataset Kinetics can even reach 98% accuracy. Considering the fact that the action we need to classify is not too much, giving enough data and using the pre-trained model on Kinetics, the result can be quite promising.

Read more »

One Line Summary

NOSE: A device which utilize order sensing component and machine learning to detect which kind of cooking method and which kind of foods, oils are used when you are cooking. It can be used to periodically reports to users about their cooking habits.

Read more »

Aims

  1. Build a project to visualize the workflow of Tomasulo’s algorithm.
  2. The project should contain at least these parts: Cycle graph, Register info, Pipeline, Data info, Code info and statistics.
  3. We can add some additional components.
Read more »