You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# graph.py the main element to import TF model - convert to pytorch implementation
37
-
# add pcutoffn to docstring
38
-
39
-
# Q: What is the best way to test the code as we go?
40
-
# Q: if self.pose is not None: - ask Niels to go through this!
41
-
42
-
# Q: what exactly does model_type reference?
43
-
# Q: is precision a type of qunatization?
44
-
# Q: for dynamic: First key points are predicted, then dynamic cropping is performed to 'single out' the animal, and then pose is estimated, we think. What is the difference from key point prediction to pose prediction?
45
-
# Q: what is the processor? see processor code F12 from init file - what is the 'user defined process' - could it be that if mouse = standing, perform some action? or is the process the prediction of a certain pose/set of keypoints
46
-
# Q: why have the convert2rgb function, is the stream coming from the camera different from the input needed to DLC live?
47
-
# Q: what is the parameter 'cfg'?
48
-
49
-
# What do these do?
50
-
# self.inputs = None
51
-
# self.outputs = None
52
-
# self.tflite_interpreter = None
53
-
# self.pose = None
54
-
# self.is_initialized = False
55
-
# self.sess = None
56
-
57
-
58
30
classDLCLive(object):
59
31
"""
60
32
Object that loads a DLC network and performs inference on single images (e.g. images captured from a camera feed)
@@ -66,10 +38,10 @@ class DLCLive(object):
66
38
Full path to exported model directory
67
39
68
40
model_type: string, optional
69
-
which model to use: 'base', 'tensorrt' for tensorrt optimized graph, 'lite' for tensorflow lite optimized graph
41
+
which model to use: 'pytorch' or 'onnx' for exported snapshot
70
42
71
43
precision : string, optional
72
-
precision of model weights, only for model_type='tensorrt'. Can be 'FP16' (default), 'FP32', or 'INT8'
44
+
precision of model weights, only for model_type='onnx'. Can be 'FP32' (default)or 'FP16'
73
45
74
46
cropping : list of int
75
47
cropping parameters in pixel number: [x1, x2, y1, y2] #A: Maybe this is the dynamic cropping of each frame to speed of processing, so instead of analyzing the whole frame, it analyses only the part of the frame where the animal is
@@ -196,12 +168,7 @@ def parameterization(
196
168
self,
197
169
) -> (
198
170
dict
199
-
): # A: constructs a dictionary based on the object attributes based on the list of parameters
0 commit comments