Skip to content

Commit 2ae54ff

Browse files
committed
v0.0b2; fixed reading of modeltype
1 parent 13bef6c commit 2ae54ff

File tree

5 files changed

+8
-16
lines changed

5 files changed

+8
-16
lines changed

benchmarking/run.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
from dlclive import benchmark_model_by_size
77

88
# Update the datafolder to where the data is:
9-
datafolder='/media/alex/dropboxdisk/DLC-LiveBenchmarking/DLC-live-benchmarkingdata'
10-
9+
datafolder=PUTFOLDER_TO_data!
10+
n_frames = 1000 #change to 10000 for testing on a GPU!
11+
pixels = [2500, 10000, 40000, 160000, 320000, 640000]
1112

1213
dog_models = glob.glob(datafolder + '/dog/*[!avi]')
1314
dog_video = glob.glob(datafolder + '/dog/*.avi')[0]
@@ -18,10 +19,6 @@
1819
#storing results in /benchmarking/results: (for your PR)
1920
out_dir = os.path.normpath(this_dir + '/results')
2021

21-
n_frames = 1000 #change to 10000 for GPU!
22-
pixels = [2500, 10000, 40000, 160000, 320000, 640000]
23-
ind = 1
24-
2522
for ind_m, m in enumerate(dog_models):
2623
print("\n\nMODEL {:d} / 8".format(ind_m))
2724
benchmark_model_by_size(m, dog_video, ind_m, out_dir=out_dir, n_frames=n_frames, pixels=pixels)

dlclive/bench.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,7 @@ def run_benchmark(model_path, video_path, resize=None, pixels=None, n_frames=100
177177
def get_savebenchmarkfn(sys_info ,i, fn_ind, out_dir=None):
178178
''' get filename to save data (definitions see save_benchmark)'''
179179
out_dir = out_dir if out_dir is not None else os.getcwd()
180-
host_name, op_sys, host_python, dev = sys_info
181-
182-
base_name = "benchmark_{}_{}_{}_{}.pickle".format(host_name, sys_info['device_type'], fn_ind, i)
180+
base_name = "benchmark_{}_{}_{}_{}.pickle".format(sys_info['host_name'], sys_info['device_type'], fn_ind, i)
183181
datafilename = out_dir + '/' + base_name
184182
return datafilename
185183

@@ -214,9 +212,6 @@ def save_benchmark(sys_info, inf_times, pixels, i, fn_ind, TFGPUinference, model
214212
#out_dir = out_dir if out_dir is not None else os.getcwd()
215213
datafilename=get_savebenchmarkfn(sys_info ,iter, fn_ind, out_dir=out_dir)
216214

217-
host_name, op_sys, host_python, dev = sys_info
218-
host_name = host_name.replace(" ", "")
219-
220215
model_type = None
221216
if model is not None:
222217
if 'resnet' in model:
@@ -231,7 +226,7 @@ def save_benchmark(sys_info, inf_times, pixels, i, fn_ind, TFGPUinference, model
231226
'TFGPUinference' : TFGPUinference,
232227
'pixels' : pixels,
233228
'inference_times' : inf_times}
234-
229+
235230
data.update(sys_info)
236231

237232
pickle.dump(data, open(os.path.normpath(datafilename), 'wb'))

dlclive/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
"""
99

1010

11-
__version__ = '0.0.b1'
11+
__version__ = '0.0.b2'
1212
VERSION = __version__

reinstall.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
pip uninstall deeplabcut-live
22
python3 setup.py sdist bdist_wheel
3-
pip install dist/deeplabcut_live-0.0b1-py3-none-any.whl
3+
pip install dist/deeplabcut_live-0.0b2-py3-none-any.whl

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
setuptools.setup(
2727
name="deeplabcut-live",
28-
version="0.0.b1",
28+
version="0.0.b2",
2929
author="A. & M. Mathis Labs",
3030
author_email="[email protected]",
3131
description="Class to load exported DeepLabCut networks and perform pose estimation on single frames (from a camera feed)",

0 commit comments

Comments
 (0)