Skip to content

Instantly share code, notes, and snippets.

View hugozanini's full-sized avatar
🎯
Focusing

Hugo Zanini hugozanini

🎯
Focusing
View GitHub Profile
@hugozanini
hugozanini / gist:a4318533dd1319e1cfb002b0988b8688
Last active February 24, 2019 02:05
Essentials of Machine Learning Algorithms
print("Hugo")
x = np.array([1, 2, 4, 3, 5])
y = np.array([1, 3, 3, 2, 5])
n = len(x)
B1 = (np.sum((x - np.mean(x))*(y - np.mean(y))))/(np.sum(((x - np.mean(x))**2)))
B0 = (np.mean(y)) - (B1*np.mean(x))
y_pred = B0 + B1*x
+----+--------------------+
| ID | Descrição |
+----+--------------------+
| 0 | Nariz |
| 1 | Olho Esquerdo |
| 2 | Olho Direito |
| 3 | Orelha esquerda |
| 4 | Orelha direita |
| 5 | Ombro esquerdo |
| 6 | Ombro direito |
var delta_rx = keypoints[10].position.x - keypoints[8].position.x;
var delta_ry = keypoints[10].position.y - keypoints[8].position.y;
var right_teta = Math.atan2(delta_ry, delta_rx) * 180 / Math.PI;
var delta_lx = keypoints[9].position.x - keypoints[7].position.x;
var delta_ly = keypoints[9].position.y - keypoints[7].position.y;
var left_teta = Math.atan2(delta_ly, delta_lx) * 180 / Math.PI;
GET /model.json
GET /group1-shard1of4
GET /group1-shard2of4
GET /group1-shard3of4
GET /group1-shard4of4
async function load_model() {
const model = await tf.loadLayersModel("http://127.0.0.1:8080/model.json");
return model;
}
<annotation>
<folder>images</folder>
<filename>kangaroo-0.jpg</filename>
<path>/home/hugo/Documents/projects/tfjs/dataset/images/kangaroo-0.jpg</path>
<source>
<database>Unknown</database>
</source>
<size>
<width>3872</width>
<height>2592</height>