Skip to content

Commit

Permalink
Merge pull request #255 from luxonis/release_0_3_0_0
Browse files Browse the repository at this point in the history
Release 0.3.0.0
  • Loading branch information
Luxonis-Brandon authored Oct 26, 2020
2 parents 03d7d52 + d4faa6a commit b02bffd
Show file tree
Hide file tree
Showing 87 changed files with 5,454 additions and 1,772 deletions.
12 changes: 10 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,24 @@ share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
*darwin.so
MANIFEST

*.idea
# DepthAI-Specific
dataset/
.fw_cache/
depthai.calib
mesh_left.calib
mesh_right.calib
intrinsic.json
intrinsic_calib_m2

*.h264
*.h265
*.mkv
*.mp4
*.blob.sh*cmx*
*.blob*
*.cmd
*.mvcmd
*.so
*.prof
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ python3 -m pip install -r requirements.txt
Optional:
For command line autocomplete when pressing TAB, only bash interpreter supported now:
Add to .bashrc:
`echo 'eval "$(register-python-argcomplete depthai.py)"' >> ~/.bashrc`
`echo 'eval "$(register-python-argcomplete depthai_demo.py)"' >> ~/.bashrc`

If you use any other interpreter: https://kislyuk.github.io/argcomplete/

Expand Down
25 changes: 19 additions & 6 deletions calibrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
import shutil
import consts.resource_paths
import json
from depthai_helpers.config_manager import BlobManager
from depthai_helpers.version_check import check_depthai_version
check_depthai_version()

use_cv = True
try:
Expand Down Expand Up @@ -126,6 +129,16 @@ class Main:

def __init__(self):
self.args = vars(parse_args())
blob_man_args = {
'cnn_model':'mobilenet-ssd',
'cnn_model2':'',
'model_compilation_target':'auto'
}
shaves = 7
cmx_slices = 7
NN_engines = 1
blobMan = BlobManager(blob_man_args, True , shaves, cmx_slices,NN_engines)

self.config = {
'streams':
['left', 'right'] if not on_embedded else
Expand All @@ -137,11 +150,11 @@ def __init__(self):
},
'ai':
{
'blob_file': consts.resource_paths.blob_fpath,
'blob_file_config': consts.resource_paths.blob_config_fpath,
'shaves' : 7,
'cmx_slices' : 7,
'NN_engines' : 1,
'blob_file': blobMan.blob_file,
'blob_file_config': blobMan.blob_file_config,
'shaves' : shaves,
'cmx_slices' : cmx_slices,
'NN_engines' : NN_engines,
},
'board_config':
{
Expand All @@ -156,7 +169,7 @@ def __init__(self):
'mono':
{
# 1280x720, 1280x800, 640x400 (binning enabled)
'resolution_h': 720,
'resolution_h': 800,
'fps': 30.0,
},
},
Expand Down
2 changes: 1 addition & 1 deletion calibrate_and_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def cleanup():
args+="'"+arg+"' "

calibrate_cmd = "python3 calibrate.py " + args
test_cmd = """python3 depthai_demo.py -co '{"streams": [{"name": "depth_raw", "max_fps": 12.0}]}'"""
test_cmd = """python3 depthai_demo.py -co '{"streams": [{"name": "depth", "max_fps": 12.0}]}'"""


atexit.register(cleanup)
Expand Down
12 changes: 10 additions & 2 deletions consts/resource_paths.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import os
from os import path
from pathlib import Path


Expand All @@ -15,9 +13,19 @@ def relative_to_abs_path(relative_path):
device_usb2_cmd_fpath = relative_to_abs_path('../depthai_usb2.cmd')
boards_dir_path = relative_to_abs_path('../resources/boards') + "/"
custom_calib_fpath = relative_to_abs_path('../resources/depthai.calib')
left_mesh_fpath = relative_to_abs_path('../resources/mesh_left.calib')
right_mesh_fpath = relative_to_abs_path('../resources/mesh_right.calib')

right_map_x_fpath = relative_to_abs_path('../resources/map_x_right.calib')
right_map_y_fpath = relative_to_abs_path('../resources/map_y_right.calib')
left_map_x_fpath = relative_to_abs_path('../resources/map_x_left.calib')
left_map_y_fpath = relative_to_abs_path('../resources/map_y_left.calib')

nn_resource_path = relative_to_abs_path('../resources/nn')+"/"
blob_fpath = relative_to_abs_path('../resources/nn/mobilenet-ssd/mobilenet-ssd.blob')
blob_config_fpath = relative_to_abs_path('../resources/nn/mobilenet-ssd/mobilenet-ssd.json')
tests_functional_path = relative_to_abs_path('../testsFunctional/') + "/"


if custom_calib_fpath is not None and Path(custom_calib_fpath).exists():
calib_fpath = custom_calib_fpath
Expand Down
Loading

0 comments on commit b02bffd

Please sign in to comment.