Skip to content

Instantly share code, notes, and snippets.

View smidm's full-sized avatar

Matěj Šmíd smidm

View GitHub Profile
@smidm
smidm / matplotlib_wait_or_exit.py
Created October 27, 2017 09:32
shows figure in matplotlib and waits for keypress or mouse click to continue, on figure close exits the loop
import matplotlib.pylab as plt
import numpy as np
fig = plt.figure()
closed = False
def handle_close(evt):
global closed
closed = True
@smidm
smidm / ellipse_bounding_box.ipynb
Last active March 26, 2023 04:27
Compute bounding box for an ellipse.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@smidm
smidm / mot.py
Created October 15, 2018 12:59
multiple object tracking challenge data file and evaluation
import pandas as pd
import errno
import numpy as np
import sys
import warnings
def save_mot(filename, df):
df.to_csv(filename, header=False, index=False)
@smidm
smidm / stable_matching_between_2_sets_of_points.py
Last active October 25, 2018 05:45
find stable matching of minimal distance between two sets of points
import numpy as np
import scipy.optimize
a = np.array([[0, 0], [1, 1], [2, 2]])
b = np.array([[0, 1], [2, 2.2], [1, 1.2], [0, 0]])
indices = np.indices((len(a), len(b)))
# array([[[0, 0, 0, 0],
# [1, 1, 1, 1],
# [2, 2, 2, 2]],
@smidm
smidm / flann_distance_test.py
Created February 28, 2019 14:43
test returned flann distance
from pyflann import *
import numpy as np
dataset = np.array(
[[1., 1, 1, 2, 3],
[10, 10, 10, 3, 2],
[100, 100, 2, 30, 1]
])
testset = np.array(
[[1., 1, 1, 1, 1],
@smidm
smidm / statsmodels_influence_plot_tooltip.ipynb
Created October 26, 2021 06:23
Tooltips for Outliers in Regression Influence Plots
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
wholebody_2d_keypoint/topdown_heatmap/coco-wholebody/td-hm_hrnet-w32_8xb64-210e_coco-wholebody-384x288.py: checkpoint='https://download.openmmlab.com/mmpose/'
wholebody_2d_keypoint/topdown_heatmap/coco-wholebody/td-hm_hrnet-w32_8xb64-210e_coco-wholebody-384x288.py- 'pretrain_models/hrnet_w32-36af842e.pth'),
--
wholebody_2d_keypoint/rtmpose/ubody/rtmpose-m_8xb64-270e_coco-ubody-wholebody-256x192.py: checkpoint='https://download.openmmlab.com/mmpose/v1/projects/'
wholebody_2d_keypoint/rtmpose/ubody/rtmpose-m_8xb64-270e_coco-ubody-wholebody-256x192.py- 'rtmpose/cspnext-m_udp-aic-coco_210e-256x192-f2f7d6f6_20230130.pth' # noqa: E501
--
wholebody_2d_keypoint/topdown_heatmap/coco-wholebody/td-hm_hrnet-w32_dark-8xb64-210e_coco-wholebody-256x192.py: checkpoint='https://download.openmmlab.com/mmpose/'
wholebody_2d_keypoint/topdown_heatmap/coco-wholebody/td-hm_hrnet-w32_dark-8xb64-210e_coco-wholebody-256x192.py- 'pretrain_models/hrnet_w32-36af842e.pth')
yolox_pose/configs/yolox-pose_l_4xb64-300e_coco.py: init_cfg=dict(checkpoint='https://download.openmmlab.com/mmyolo/v0/yolox/'
yolox_pose/configs/yolox-pose_l_4xb64-300e_coco.py- 'yolox_l_fast_8xb8-300e_coco/yolox_l_fast_8xb8-300e_'
--
uniformer/configs/td-hm_uniformer-s-8xb64-210e_coco-448x320.py: checkpoint='https://download.openmmlab.com/mmpose/v1/projects/'
uniformer/configs/td-hm_uniformer-s-8xb64-210e_coco-448x320.py- 'uniformer/uniformer_small_in1k.pth')))
--
yolox_pose/configs/py_yolox_pose_s_8xb32_300e_coco.py: checkpoint='https://download.openmmlab.com/mmyolo/v0/yolox/'
yolox_pose/configs/py_yolox_pose_s_8xb32_300e_coco.py- 'yolox_s_fast_8xb32-300e-rtmdet-hyp_coco/yolox_s_fast_'
--
uniformer/configs/td-hm_uniformer-b-8xb128-210e_coco-256x192.py: checkpoint='https://download.openmmlab.com/mmpose/v1/projects/'