Skip to content

Commit

Permalink
model v2 in place - 2.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonswope committed Sep 7, 2021
1 parent 59a802c commit 6b12cdd
Show file tree
Hide file tree
Showing 9 changed files with 232 additions and 261 deletions.
12 changes: 4 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
build
*.blend1
.vscode
evals
__pycache__
datagen/gen
datagen/genstereo
datagen/gen_4class
datagen/genstereo-filterable
datagen/sets
models_out
model

data
models
evals

src/cuda/deps/glm
imgui.ini
Expand Down
6 changes: 3 additions & 3 deletions installer/build_all.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ if (Test-Path $pyi_temp) { Remove-Item -Recurse -Force $pyi_temp }

# you need Inno Setup (6) installed to make the installer!

$model_dir = 'model'
$model_cfg = 'model/model_cfg.json'
$model_dir = 'models/m1'
$model_cfg = 'models/m1/m_cfg.json'
$fatbin_dir = 'cuda_fatbin'

&'C:\Program Files (x86)\Inno Setup 6\ISCC.exe' `
Expand All @@ -26,5 +26,5 @@ $fatbin_dir = 'cuda_fatbin'
/Dmodel_cfg=$model_cfg `
/Dfatbin_dir=$fatbin_dir `
/DAPP_NAME=3d-beats `
/DAPP_VERSION=2.0 `
/DAPP_VERSION=2.1 `
/Oinstaller
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,6 @@ Now try the full 3d-beats app.
- ignore fingertips that are not featured prominently / or have high variance from mean shift
- handle when mean shift has identified a pixel which is not part of the depth image (0 depth!)
- auto-tuning of plane / z threshold. should be able to determine best z threshold automatically
- make new model. simpler 2-stage RDF architecture:
- 1. fingertip OR {rest of hand} OR {thumb tip?} (2-3 classes)
- 2. identify which fingertip (4-5 classes)
- training: resample input data for each tree trained in the forest, resample test data as well
- debug the occasional super slow frame. garbage collection ?
- don't compute mean shift for non-fingertip classes (hand/arm class)
4 changes: 2 additions & 2 deletions src/3d_bz.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ def __init__(self):
self.labels_image_rgba_tex = GpuTexture((self.DIM_X, self.DIM_Y), (GL_RGBA, GL_UNSIGNED_BYTE))

mean_shift_variances = np.array(
[100., 50., 50., 50., 50., 50.],
[100., 50., 50., 50., 50., 50., 50.],
dtype=np.float32)
self.mean_shift_variances = cu_array.to_gpu(mean_shift_variances)

self.fingertip_idxes = [2, 3, 4, 5, 6]
self.DEFAULT_FINGERTIP_THRESHOLDS = [180., 160., 160., 160., 160.]
self.DEFAULT_FINGERTIP_THRESHOLDS = [200., 160., 160., 160., 160.]
# (z_thresh, midi_note)
init_hand_state = lambda n: [(self.DEFAULT_FINGERTIP_THRESHOLDS[i], n+i) for i in range(len(self.fingertip_idxes))]

Expand Down
Loading

0 comments on commit 6b12cdd

Please sign in to comment.