hyperpose.Model.openpose.model package¶
Submodules¶
hyperpose.Model.openpose.model.lw_openpose module¶
-
class
hyperpose.Model.openpose.model.lw_openpose.
LightWeightOpenPose
(parts=<enum 'CocoPart'>, limbs=[(1, 8), (8, 9), (9, 10), (1, 11), (11, 12), (12, 13), (1, 2), (2, 3), (3, 4), (2, 16), (1, 5), (5, 6), (6, 7), (5, 17), (1, 0), (0, 14), (0, 15), (14, 16), (15, 17)], colors=None, n_pos=19, n_limbs=19, num_channels=128, hin=368, win=368, hout=46, wout=46, backbone=None, pretraining=False, data_format='channels_first')¶ Bases:
tensorlayer.models.core.Model
- Attributes
- all_drop
all_layers
Return all layers of this network in a list.
- all_params
all_weights
Return all weights of this network in a list.
- config
- inputs
n_weights
Return the number of weights (parameters) in this network.
nontrainable_weights
Return nontrainable weights of this network in a list.
- outputs
trainable_weights
Return trainable weights of this network in a list.
Methods
Cpm_stage
([n_filter, in_channels, data_format])- Attributes
Dilated_mobilenet
([data_format])- Attributes
Init_stage
([n_filter, n_confmaps, …])- Attributes
Refinement_stage
([n_filter, in_channels, …])- Attributes
__call__
(self, inputs[, is_train])Forward input tensors through this network by calling.
as_layer
(self)Return this network as a ModelLayer so that it can be integrated into another Model.
eval
(self)Set this network in evaluation mode.
forward
(self, x[, is_train, stage_num, …])Network forwarding given input tensors
get_layer
(self[, name, index])Network forwarding given input tensors
infer
(self, x)Set this network in evaluation mode.
load
(filepath[, load_weights])Load model from a given file, which should be previously saved by Model.save().
load_weights
(self, filepath[, format, …])Load model weights from a given file, which should be previously saved by self.save_weights().
print_all_layers
(self)release_memory
(self)WARNING: This function should be called with great caution.
save
(self, filepath[, save_weights, …])Save model into a given file.
save_weights
(self, filepath[, format])Input filepath, save model weights into a file of given format.
test
(self)Set this network in evaluation mode.
train
(self)Set this network in training mode.
cal_loss
count_params
print_params
-
class
Cpm_stage
(n_filter=128, in_channels=512, data_format='channels_first')¶ Bases:
tensorlayer.models.core.Model
- Attributes
- all_drop
all_layers
Return all layers of this network in a list.
- all_params
all_weights
Return all weights of this network in a list.
- config
- inputs
n_weights
Return the number of weights (parameters) in this network.
nontrainable_weights
Return nontrainable weights of this network in a list.
- outputs
trainable_weights
Return trainable weights of this network in a list.
Methods
__call__
(self, inputs[, is_train])Forward input tensors through this network by calling.
as_layer
(self)Return this network as a ModelLayer so that it can be integrated into another Model.
eval
(self)Set this network in evaluation mode.
forward
(self, x)Network forwarding given input tensors
get_layer
(self[, name, index])Network forwarding given input tensors
infer
(self)Set this network in evaluation mode.
load
(filepath[, load_weights])Load model from a given file, which should be previously saved by Model.save().
load_weights
(self, filepath[, format, …])Load model weights from a given file, which should be previously saved by self.save_weights().
print_all_layers
(self)release_memory
(self)WARNING: This function should be called with great caution.
save
(self, filepath[, save_weights, …])Save model into a given file.
save_weights
(self, filepath[, format])Input filepath, save model weights into a file of given format.
test
(self)Set this network in evaluation mode.
train
(self)Set this network in training mode.
count_params
print_params
-
forward
(self, x)¶ Network forwarding given input tensors
- Parameters
- inputsTensor or list of Tensors
input tensor(s)
- kwargs :
For other keyword-only arguments.
- Returns
- output tensor(s)Tensor or list of Tensor(s)
-
class
Dilated_mobilenet
(data_format='channels_first')¶ Bases:
tensorlayer.models.core.Model
- Attributes
- all_drop
all_layers
Return all layers of this network in a list.
- all_params
all_weights
Return all weights of this network in a list.
- config
- inputs
n_weights
Return the number of weights (parameters) in this network.
nontrainable_weights
Return nontrainable weights of this network in a list.
- outputs
trainable_weights
Return trainable weights of this network in a list.
Methods
__call__
(self, inputs[, is_train])Forward input tensors through this network by calling.
as_layer
(self)Return this network as a ModelLayer so that it can be integrated into another Model.
eval
(self)Set this network in evaluation mode.
forward
(self, x)Network forwarding given input tensors
get_layer
(self[, name, index])Network forwarding given input tensors
infer
(self)Set this network in evaluation mode.
load
(filepath[, load_weights])Load model from a given file, which should be previously saved by Model.save().
load_weights
(self, filepath[, format, …])Load model weights from a given file, which should be previously saved by self.save_weights().
print_all_layers
(self)release_memory
(self)WARNING: This function should be called with great caution.
save
(self, filepath[, save_weights, …])Save model into a given file.
save_weights
(self, filepath[, format])Input filepath, save model weights into a file of given format.
test
(self)Set this network in evaluation mode.
train
(self)Set this network in training mode.
count_params
print_params
-
forward
(self, x)¶ Network forwarding given input tensors
- Parameters
- inputsTensor or list of Tensors
input tensor(s)
- kwargs :
For other keyword-only arguments.
- Returns
- output tensor(s)Tensor or list of Tensor(s)
-
class
Init_stage
(n_filter=128, n_confmaps=19, n_pafmaps=38, data_format='channels_first')¶ Bases:
tensorlayer.models.core.Model
- Attributes
- all_drop
all_layers
Return all layers of this network in a list.
- all_params
all_weights
Return all weights of this network in a list.
- config
- inputs
n_weights
Return the number of weights (parameters) in this network.
nontrainable_weights
Return nontrainable weights of this network in a list.
- outputs
trainable_weights
Return trainable weights of this network in a list.
Methods
__call__
(self, inputs[, is_train])Forward input tensors through this network by calling.
as_layer
(self)Return this network as a ModelLayer so that it can be integrated into another Model.
eval
(self)Set this network in evaluation mode.
forward
(self, x)Network forwarding given input tensors
get_layer
(self[, name, index])Network forwarding given input tensors
infer
(self)Set this network in evaluation mode.
load
(filepath[, load_weights])Load model from a given file, which should be previously saved by Model.save().
load_weights
(self, filepath[, format, …])Load model weights from a given file, which should be previously saved by self.save_weights().
print_all_layers
(self)release_memory
(self)WARNING: This function should be called with great caution.
save
(self, filepath[, save_weights, …])Save model into a given file.
save_weights
(self, filepath[, format])Input filepath, save model weights into a file of given format.
test
(self)Set this network in evaluation mode.
train
(self)Set this network in training mode.
count_params
print_params
-
forward
(self, x)¶ Network forwarding given input tensors
- Parameters
- inputsTensor or list of Tensors
input tensor(s)
- kwargs :
For other keyword-only arguments.
- Returns
- output tensor(s)Tensor or list of Tensor(s)
-
class
Refinement_stage
(n_filter=128, in_channels=185, n_confmaps=19, n_pafmaps=38, data_format='channels_first')¶ Bases:
tensorlayer.models.core.Model
- Attributes
- all_drop
all_layers
Return all layers of this network in a list.
- all_params
all_weights
Return all weights of this network in a list.
- config
- inputs
n_weights
Return the number of weights (parameters) in this network.
nontrainable_weights
Return nontrainable weights of this network in a list.
- outputs
trainable_weights
Return trainable weights of this network in a list.
Methods
Refinement_block
(n_filter, in_channels[, …])- Attributes
__call__
(self, inputs[, is_train])Forward input tensors through this network by calling.
as_layer
(self)Return this network as a ModelLayer so that it can be integrated into another Model.
eval
(self)Set this network in evaluation mode.
forward
(self, x)Network forwarding given input tensors
get_layer
(self[, name, index])Network forwarding given input tensors
infer
(self)Set this network in evaluation mode.
load
(filepath[, load_weights])Load model from a given file, which should be previously saved by Model.save().
load_weights
(self, filepath[, format, …])Load model weights from a given file, which should be previously saved by self.save_weights().
print_all_layers
(self)release_memory
(self)WARNING: This function should be called with great caution.
save
(self, filepath[, save_weights, …])Save model into a given file.
save_weights
(self, filepath[, format])Input filepath, save model weights into a file of given format.
test
(self)Set this network in evaluation mode.
train
(self)Set this network in training mode.
count_params
print_params
-
class
Refinement_block
(n_filter, in_channels, data_format='channels_first')¶ Bases:
tensorlayer.models.core.Model
- Attributes
- all_drop
all_layers
Return all layers of this network in a list.
- all_params
all_weights
Return all weights of this network in a list.
- config
- inputs
n_weights
Return the number of weights (parameters) in this network.
nontrainable_weights
Return nontrainable weights of this network in a list.
- outputs
trainable_weights
Return trainable weights of this network in a list.
Methods
__call__
(self, inputs[, is_train])Forward input tensors through this network by calling.
as_layer
(self)Return this network as a ModelLayer so that it can be integrated into another Model.
eval
(self)Set this network in evaluation mode.
forward
(self, x)Network forwarding given input tensors
get_layer
(self[, name, index])Network forwarding given input tensors
infer
(self)Set this network in evaluation mode.
load
(filepath[, load_weights])Load model from a given file, which should be previously saved by Model.save().
load_weights
(self, filepath[, format, …])Load model weights from a given file, which should be previously saved by self.save_weights().
print_all_layers
(self)release_memory
(self)WARNING: This function should be called with great caution.
save
(self, filepath[, save_weights, …])Save model into a given file.
save_weights
(self, filepath[, format])Input filepath, save model weights into a file of given format.
test
(self)Set this network in evaluation mode.
train
(self)Set this network in training mode.
count_params
print_params
-
forward
(self, x)¶ Network forwarding given input tensors
- Parameters
- inputsTensor or list of Tensors
input tensor(s)
- kwargs :
For other keyword-only arguments.
- Returns
- output tensor(s)Tensor or list of Tensor(s)
-
forward
(self, x)¶ Network forwarding given input tensors
- Parameters
- inputsTensor or list of Tensors
input tensor(s)
- kwargs :
For other keyword-only arguments.
- Returns
- output tensor(s)Tensor or list of Tensor(s)
-
cal_loss
(self, gt_conf, gt_paf, mask, stage_confs, stage_pafs)¶
-
forward
(self, x, is_train=False, stage_num=1, domainadapt=False)¶ Network forwarding given input tensors
- Parameters
- inputsTensor or list of Tensors
input tensor(s)
- kwargs :
For other keyword-only arguments.
- Returns
- output tensor(s)Tensor or list of Tensor(s)
-
infer
(self, x)¶ Set this network in evaluation mode.
-
hyperpose.Model.openpose.model.lw_openpose.
conv_block
(n_filter, in_channels, filter_size=(3, 3), strides=(1, 1), dilation_rate=(1, 1), W_init=<tensorlayer.initializers.TruncatedNormal object at 0x7fa0aa21ecf8>, b_init=<tensorlayer.initializers.TruncatedNormal object at 0x7fa0aa21ecf8>, padding='SAME', data_format='channels_first')¶
-
hyperpose.Model.openpose.model.lw_openpose.
dw_conv_block
(n_filter, in_channels, filter_size=(3, 3), strides=(1, 1), dilation_rate=(1, 1), W_init=<tensorlayer.initializers.TruncatedNormal object at 0x7fa0aa21ecf8>, b_init=<tensorlayer.initializers.TruncatedNormal object at 0x7fa0aa21ecf8>, data_format='channels_first')¶
-
hyperpose.Model.openpose.model.lw_openpose.
nobn_dw_conv_block
(n_filter, in_channels, filter_size=(3, 3), strides=(1, 1), W_init=<tensorlayer.initializers.TruncatedNormal object at 0x7fa0aa21ecf8>, b_init=<tensorlayer.initializers.TruncatedNormal object at 0x7fa0aa21ecf8>, data_format='channels_first')¶
hyperpose.Model.openpose.model.mbv2_sm_openpose module¶
-
class
hyperpose.Model.openpose.model.mbv2_sm_openpose.
Mobilenetv2_small_Openpose
(parts=<enum 'CocoPart'>, limbs=[(1, 8), (8, 9), (9, 10), (1, 11), (11, 12), (12, 13), (1, 2), (2, 3), (3, 4), (2, 16), (1, 5), (5, 6), (6, 7), (5, 17), (1, 0), (0, 14), (0, 15), (14, 16), (15, 17)], colors=None, n_pos=19, n_limbs=19, num_channels=128, hin=368, win=368, hout=46, wout=46, backbone=None, pretraining=False, data_format='channels_first')¶ Bases:
tensorlayer.models.core.Model
- Attributes
- all_drop
all_layers
Return all layers of this network in a list.
- all_params
all_weights
Return all weights of this network in a list.
- config
- inputs
n_weights
Return the number of weights (parameters) in this network.
nontrainable_weights
Return nontrainable weights of this network in a list.
- outputs
trainable_weights
Return trainable weights of this network in a list.
Methods
Init_stage
([n_confmaps, n_pafmaps, …])- Attributes
Mobilenetv2_variant
([data_format])- Attributes
Refinement_stage
([n_confmaps, n_pafmaps, …])- Attributes
__call__
(self, inputs[, is_train])Forward input tensors through this network by calling.
as_layer
(self)Return this network as a ModelLayer so that it can be integrated into another Model.
eval
(self)Set this network in evaluation mode.
forward
(self, x[, mask_conf, mask_paf, …])Network forwarding given input tensors
get_layer
(self[, name, index])Network forwarding given input tensors
infer
(self, x)Set this network in evaluation mode.
load
(filepath[, load_weights])Load model from a given file, which should be previously saved by Model.save().
load_weights
(self, filepath[, format, …])Load model weights from a given file, which should be previously saved by self.save_weights().
print_all_layers
(self)release_memory
(self)WARNING: This function should be called with great caution.
save
(self, filepath[, save_weights, …])Save model into a given file.
save_weights
(self, filepath[, format])Input filepath, save model weights into a file of given format.
test
(self)Set this network in evaluation mode.
train
(self)Set this network in training mode.
cal_loss
count_params
print_params
-
class
Init_stage
(n_confmaps=19, n_pafmaps=38, in_channels=704, data_format='channels_first')¶ Bases:
tensorlayer.models.core.Model
- Attributes
- all_drop
all_layers
Return all layers of this network in a list.
- all_params
all_weights
Return all weights of this network in a list.
- config
- inputs
n_weights
Return the number of weights (parameters) in this network.
nontrainable_weights
Return nontrainable weights of this network in a list.
- outputs
trainable_weights
Return trainable weights of this network in a list.
Methods
__call__
(self, inputs[, is_train])Forward input tensors through this network by calling.
as_layer
(self)Return this network as a ModelLayer so that it can be integrated into another Model.
eval
(self)Set this network in evaluation mode.
forward
(self, x)Network forwarding given input tensors
get_layer
(self[, name, index])Network forwarding given input tensors
infer
(self)Set this network in evaluation mode.
load
(filepath[, load_weights])Load model from a given file, which should be previously saved by Model.save().
load_weights
(self, filepath[, format, …])Load model weights from a given file, which should be previously saved by self.save_weights().
print_all_layers
(self)release_memory
(self)WARNING: This function should be called with great caution.
save
(self, filepath[, save_weights, …])Save model into a given file.
save_weights
(self, filepath[, format])Input filepath, save model weights into a file of given format.
test
(self)Set this network in evaluation mode.
train
(self)Set this network in training mode.
count_params
print_params
-
forward
(self, x)¶ Network forwarding given input tensors
- Parameters
- inputsTensor or list of Tensors
input tensor(s)
- kwargs :
For other keyword-only arguments.
- Returns
- output tensor(s)Tensor or list of Tensor(s)
-
class
Mobilenetv2_variant
(data_format='channels_first')¶ Bases:
tensorlayer.models.core.Model
- Attributes
- all_drop
all_layers
Return all layers of this network in a list.
- all_params
all_weights
Return all weights of this network in a list.
- config
- inputs
n_weights
Return the number of weights (parameters) in this network.
nontrainable_weights
Return nontrainable weights of this network in a list.
- outputs
trainable_weights
Return trainable weights of this network in a list.
Methods
__call__
(self, inputs[, is_train])Forward input tensors through this network by calling.
as_layer
(self)Return this network as a ModelLayer so that it can be integrated into another Model.
eval
(self)Set this network in evaluation mode.
forward
(self, x)Network forwarding given input tensors
get_layer
(self[, name, index])Network forwarding given input tensors
infer
(self)Set this network in evaluation mode.
load
(filepath[, load_weights])Load model from a given file, which should be previously saved by Model.save().
load_weights
(self, filepath[, format, …])Load model weights from a given file, which should be previously saved by self.save_weights().
print_all_layers
(self)release_memory
(self)WARNING: This function should be called with great caution.
save
(self, filepath[, save_weights, …])Save model into a given file.
save_weights
(self, filepath[, format])Input filepath, save model weights into a file of given format.
test
(self)Set this network in evaluation mode.
train
(self)Set this network in training mode.
count_params
print_params
-
forward
(self, x)¶ Network forwarding given input tensors
- Parameters
- inputsTensor or list of Tensors
input tensor(s)
- kwargs :
For other keyword-only arguments.
- Returns
- output tensor(s)Tensor or list of Tensor(s)
-
class
Refinement_stage
(n_confmaps=19, n_pafmaps=38, in_channels=761, data_format='channels_first')¶ Bases:
tensorlayer.models.core.Model
- Attributes
- all_drop
all_layers
Return all layers of this network in a list.
- all_params
all_weights
Return all weights of this network in a list.
- config
- inputs
n_weights
Return the number of weights (parameters) in this network.
nontrainable_weights
Return nontrainable weights of this network in a list.
- outputs
trainable_weights
Return trainable weights of this network in a list.
Methods
__call__
(self, inputs[, is_train])Forward input tensors through this network by calling.
as_layer
(self)Return this network as a ModelLayer so that it can be integrated into another Model.
eval
(self)Set this network in evaluation mode.
forward
(self, x)Network forwarding given input tensors
get_layer
(self[, name, index])Network forwarding given input tensors
infer
(self)Set this network in evaluation mode.
load
(filepath[, load_weights])Load model from a given file, which should be previously saved by Model.save().
load_weights
(self, filepath[, format, …])Load model weights from a given file, which should be previously saved by self.save_weights().
print_all_layers
(self)release_memory
(self)WARNING: This function should be called with great caution.
save
(self, filepath[, save_weights, …])Save model into a given file.
save_weights
(self, filepath[, format])Input filepath, save model weights into a file of given format.
test
(self)Set this network in evaluation mode.
train
(self)Set this network in training mode.
count_params
print_params
-
forward
(self, x)¶ Network forwarding given input tensors
- Parameters
- inputsTensor or list of Tensors
input tensor(s)
- kwargs :
For other keyword-only arguments.
- Returns
- output tensor(s)Tensor or list of Tensor(s)
-
cal_loss
(self, gt_conf, gt_paf, mask, stage_confs, stage_pafs)¶
-
forward
(self, x, mask_conf=None, mask_paf=None, is_train=False, stage_num=4, domainadapt=False)¶ Network forwarding given input tensors
- Parameters
- inputsTensor or list of Tensors
input tensor(s)
- kwargs :
For other keyword-only arguments.
- Returns
- output tensor(s)Tensor or list of Tensor(s)
-
infer
(self, x)¶ Set this network in evaluation mode.
-
hyperpose.Model.openpose.model.mbv2_sm_openpose.
conv_block
(n_filter=32, in_channels=3, filter_size=3, 3, strides=1, 1, act=tensorflow.nn.relu, padding='SAME', data_format='channels_first')¶
-
hyperpose.Model.openpose.model.mbv2_sm_openpose.
separable_block
(n_filter=32, in_channels=3, filter_size=3, 3, strides=1, 1, act=tensorflow.nn.relu, padding='SAME', data_format='channels_first')¶
hyperpose.Model.openpose.model.mbv2_th_openpose module¶
-
class
hyperpose.Model.openpose.model.mbv2_th_openpose.
MobilenetThinOpenpose
(parts=<enum 'CocoPart'>, limbs=[(1, 8), (8, 9), (9, 10), (1, 11), (11, 12), (12, 13), (1, 2), (2, 3), (3, 4), (2, 16), (1, 5), (5, 6), (6, 7), (5, 17), (1, 0), (0, 14), (0, 15), (14, 16), (15, 17)], colors=None, n_pos=19, n_limbs=19, num_channels=128, hin=368, win=368, hout=46, wout=46, backbone=None, pretraining=False, data_format='channels_first')¶ Bases:
tensorlayer.models.core.Model
- Attributes
- all_drop
all_layers
Return all layers of this network in a list.
- all_params
all_weights
Return all weights of this network in a list.
- config
- inputs
n_weights
Return the number of weights (parameters) in this network.
nontrainable_weights
Return nontrainable weights of this network in a list.
- outputs
trainable_weights
Return trainable weights of this network in a list.
Methods
Init_stage
([n_confmaps, n_pafmaps, …])- Attributes
Mobilenetv2_variant
([data_format])- Attributes
Refinement_stage
([n_confmaps, n_pafmaps, …])- Attributes
__call__
(self, inputs[, is_train])Forward input tensors through this network by calling.
as_layer
(self)Return this network as a ModelLayer so that it can be integrated into another Model.
eval
(self)Set this network in evaluation mode.
forward
(self, x[, is_train, stage_num, …])Network forwarding given input tensors
get_layer
(self[, name, index])Network forwarding given input tensors
infer
(self, x)Set this network in evaluation mode.
load
(filepath[, load_weights])Load model from a given file, which should be previously saved by Model.save().
load_weights
(self, filepath[, format, …])Load model weights from a given file, which should be previously saved by self.save_weights().
print_all_layers
(self)release_memory
(self)WARNING: This function should be called with great caution.
save
(self, filepath[, save_weights, …])Save model into a given file.
save_weights
(self, filepath[, format])Input filepath, save model weights into a file of given format.
test
(self)Set this network in evaluation mode.
train
(self)Set this network in training mode.
cal_loss
count_params
print_params
-
class
Init_stage
(n_confmaps=19, n_pafmaps=38, in_channels=1152, data_format='channels_first')¶ Bases:
tensorlayer.models.core.Model
- Attributes
- all_drop
all_layers
Return all layers of this network in a list.
- all_params
all_weights
Return all weights of this network in a list.
- config
- inputs
n_weights
Return the number of weights (parameters) in this network.
nontrainable_weights
Return nontrainable weights of this network in a list.
- outputs
trainable_weights
Return trainable weights of this network in a list.
Methods
__call__
(self, inputs[, is_train])Forward input tensors through this network by calling.
as_layer
(self)Return this network as a ModelLayer so that it can be integrated into another Model.
eval
(self)Set this network in evaluation mode.
forward
(self, x)Network forwarding given input tensors
get_layer
(self[, name, index])Network forwarding given input tensors
infer
(self)Set this network in evaluation mode.
load
(filepath[, load_weights])Load model from a given file, which should be previously saved by Model.save().
load_weights
(self, filepath[, format, …])Load model weights from a given file, which should be previously saved by self.save_weights().
print_all_layers
(self)release_memory
(self)WARNING: This function should be called with great caution.
save
(self, filepath[, save_weights, …])Save model into a given file.
save_weights
(self, filepath[, format])Input filepath, save model weights into a file of given format.
test
(self)Set this network in evaluation mode.
train
(self)Set this network in training mode.
count_params
print_params
-
forward
(self, x)¶ Network forwarding given input tensors
- Parameters
- inputsTensor or list of Tensors
input tensor(s)
- kwargs :
For other keyword-only arguments.
- Returns
- output tensor(s)Tensor or list of Tensor(s)
-
class
Mobilenetv2_variant
(data_format='channels_first')¶ Bases:
tensorlayer.models.core.Model
- Attributes
- all_drop
all_layers
Return all layers of this network in a list.
- all_params
all_weights
Return all weights of this network in a list.
- config
- inputs
n_weights
Return the number of weights (parameters) in this network.
nontrainable_weights
Return nontrainable weights of this network in a list.
- outputs
trainable_weights
Return trainable weights of this network in a list.
Methods
__call__
(self, inputs[, is_train])Forward input tensors through this network by calling.
as_layer
(self)Return this network as a ModelLayer so that it can be integrated into another Model.
eval
(self)Set this network in evaluation mode.
forward
(self, x)Network forwarding given input tensors
get_layer
(self[, name, index])Network forwarding given input tensors
infer
(self)Set this network in evaluation mode.
load
(filepath[, load_weights])Load model from a given file, which should be previously saved by Model.save().
load_weights
(self, filepath[, format, …])Load model weights from a given file, which should be previously saved by self.save_weights().
print_all_layers
(self)release_memory
(self)WARNING: This function should be called with great caution.
save
(self, filepath[, save_weights, …])Save model into a given file.
save_weights
(self, filepath[, format])Input filepath, save model weights into a file of given format.
test
(self)Set this network in evaluation mode.
train
(self)Set this network in training mode.
count_params
print_params
-
forward
(self, x)¶ Network forwarding given input tensors
- Parameters
- inputsTensor or list of Tensors
input tensor(s)
- kwargs :
For other keyword-only arguments.
- Returns
- output tensor(s)Tensor or list of Tensor(s)
-
class
Refinement_stage
(n_confmaps=19, n_pafmaps=38, in_channels=1209, data_format='channels_first')¶ Bases:
tensorlayer.models.core.Model
- Attributes
- all_drop
all_layers
Return all layers of this network in a list.
- all_params
all_weights
Return all weights of this network in a list.
- config
- inputs
n_weights
Return the number of weights (parameters) in this network.
nontrainable_weights
Return nontrainable weights of this network in a list.
- outputs
trainable_weights
Return trainable weights of this network in a list.
Methods
__call__
(self, inputs[, is_train])Forward input tensors through this network by calling.
as_layer
(self)Return this network as a ModelLayer so that it can be integrated into another Model.
eval
(self)Set this network in evaluation mode.
forward
(self, x)Network forwarding given input tensors
get_layer
(self[, name, index])Network forwarding given input tensors
infer
(self)Set this network in evaluation mode.
load
(filepath[, load_weights])Load model from a given file, which should be previously saved by Model.save().
load_weights
(self, filepath[, format, …])Load model weights from a given file, which should be previously saved by self.save_weights().
print_all_layers
(self)release_memory
(self)WARNING: This function should be called with great caution.
save
(self, filepath[, save_weights, …])Save model into a given file.
save_weights
(self, filepath[, format])Input filepath, save model weights into a file of given format.
test
(self)Set this network in evaluation mode.
train
(self)Set this network in training mode.
count_params
print_params
-
forward
(self, x)¶ Network forwarding given input tensors
- Parameters
- inputsTensor or list of Tensors
input tensor(s)
- kwargs :
For other keyword-only arguments.
- Returns
- output tensor(s)Tensor or list of Tensor(s)
-
cal_loss
(self, gt_conf, gt_paf, mask, stage_confs, stage_pafs)¶
-
forward
(self, x, is_train=False, stage_num=5, domainadapt=False)¶ Network forwarding given input tensors
- Parameters
- inputsTensor or list of Tensors
input tensor(s)
- kwargs :
For other keyword-only arguments.
- Returns
- output tensor(s)Tensor or list of Tensor(s)
-
infer
(self, x)¶ Set this network in evaluation mode.
-
hyperpose.Model.openpose.model.mbv2_th_openpose.
conv_block
(n_filter=32, in_channels=3, filter_size=3, 3, strides=1, 1, act=tensorflow.nn.relu, padding='SAME', data_format='channels_first')¶
-
hyperpose.Model.openpose.model.mbv2_th_openpose.
separable_block
(n_filter=32, in_channels=3, filter_size=3, 3, strides=1, 1, dilation_rate=1, 1, act=tensorflow.nn.relu, data_format='channels_first')¶
hyperpose.Model.openpose.model.openpose module¶
-
class
hyperpose.Model.openpose.model.openpose.
OpenPose
(parts=<enum 'CocoPart'>, limbs=[(1, 8), (8, 9), (9, 10), (1, 11), (11, 12), (12, 13), (1, 2), (2, 3), (3, 4), (2, 16), (1, 5), (5, 6), (6, 7), (5, 17), (1, 0), (0, 14), (0, 15), (14, 16), (15, 17)], colors=None, n_pos=19, n_limbs=19, num_channels=128, hin=368, win=368, hout=46, wout=46, backbone=None, pretraining=False, data_format='channels_first')¶ Bases:
tensorlayer.models.core.Model
- Attributes
- all_drop
all_layers
Return all layers of this network in a list.
- all_params
all_weights
Return all weights of this network in a list.
- config
- inputs
n_weights
Return the number of weights (parameters) in this network.
nontrainable_weights
Return nontrainable weights of this network in a list.
- outputs
trainable_weights
Return trainable weights of this network in a list.
Methods
Init_stage
([n_confmaps, n_pafmaps, …])- Attributes
Refinement_stage
([n_confmaps, n_pafmaps, …])- Attributes
__call__
(self, inputs[, is_train])Forward input tensors through this network by calling.
as_layer
(self)Return this network as a ModelLayer so that it can be integrated into another Model.
eval
(self)Set this network in evaluation mode.
forward
(self, x[, is_train, stage_num, …])Network forwarding given input tensors
get_layer
(self[, name, index])Network forwarding given input tensors
infer
(self, x[, stage_num])Set this network in evaluation mode.
load
(filepath[, load_weights])Load model from a given file, which should be previously saved by Model.save().
load_weights
(self, filepath[, format, …])Load model weights from a given file, which should be previously saved by self.save_weights().
print_all_layers
(self)release_memory
(self)WARNING: This function should be called with great caution.
save
(self, filepath[, save_weights, …])Save model into a given file.
save_weights
(self, filepath[, format])Input filepath, save model weights into a file of given format.
test
(self)Set this network in evaluation mode.
train
(self)Set this network in training mode.
cal_loss
count_params
print_params
-
class
Init_stage
(n_confmaps=19, n_pafmaps=38, in_channels=128, data_format='channels_first')¶ Bases:
tensorlayer.models.core.Model
- Attributes
- all_drop
all_layers
Return all layers of this network in a list.
- all_params
all_weights
Return all weights of this network in a list.
- config
- inputs
n_weights
Return the number of weights (parameters) in this network.
nontrainable_weights
Return nontrainable weights of this network in a list.
- outputs
trainable_weights
Return trainable weights of this network in a list.
Methods
__call__
(self, inputs[, is_train])Forward input tensors through this network by calling.
as_layer
(self)Return this network as a ModelLayer so that it can be integrated into another Model.
eval
(self)Set this network in evaluation mode.
forward
(self, x)Network forwarding given input tensors
get_layer
(self[, name, index])Network forwarding given input tensors
infer
(self)Set this network in evaluation mode.
load
(filepath[, load_weights])Load model from a given file, which should be previously saved by Model.save().
load_weights
(self, filepath[, format, …])Load model weights from a given file, which should be previously saved by self.save_weights().
print_all_layers
(self)release_memory
(self)WARNING: This function should be called with great caution.
save
(self, filepath[, save_weights, …])Save model into a given file.
save_weights
(self, filepath[, format])Input filepath, save model weights into a file of given format.
test
(self)Set this network in evaluation mode.
train
(self)Set this network in training mode.
count_params
print_params
-
forward
(self, x)¶ Network forwarding given input tensors
- Parameters
- inputsTensor or list of Tensors
input tensor(s)
- kwargs :
For other keyword-only arguments.
- Returns
- output tensor(s)Tensor or list of Tensor(s)
-
class
Refinement_stage
(n_confmaps=19, n_pafmaps=38, in_channels=185, data_format='channels_first')¶ Bases:
tensorlayer.models.core.Model
- Attributes
- all_drop
all_layers
Return all layers of this network in a list.
- all_params
all_weights
Return all weights of this network in a list.
- config
- inputs
n_weights
Return the number of weights (parameters) in this network.
nontrainable_weights
Return nontrainable weights of this network in a list.
- outputs
trainable_weights
Return trainable weights of this network in a list.
Methods
__call__
(self, inputs[, is_train])Forward input tensors through this network by calling.
as_layer
(self)Return this network as a ModelLayer so that it can be integrated into another Model.
eval
(self)Set this network in evaluation mode.
forward
(self, x)Network forwarding given input tensors
get_layer
(self[, name, index])Network forwarding given input tensors
infer
(self)Set this network in evaluation mode.
load
(filepath[, load_weights])Load model from a given file, which should be previously saved by Model.save().
load_weights
(self, filepath[, format, …])Load model weights from a given file, which should be previously saved by self.save_weights().
print_all_layers
(self)release_memory
(self)WARNING: This function should be called with great caution.
save
(self, filepath[, save_weights, …])Save model into a given file.
save_weights
(self, filepath[, format])Input filepath, save model weights into a file of given format.
test
(self)Set this network in evaluation mode.
train
(self)Set this network in training mode.
count_params
print_params
-
forward
(self, x)¶ Network forwarding given input tensors
- Parameters
- inputsTensor or list of Tensors
input tensor(s)
- kwargs :
For other keyword-only arguments.
- Returns
- output tensor(s)Tensor or list of Tensor(s)
-
cal_loss
(self, gt_conf, gt_paf, mask, stage_confs, stage_pafs)¶
-
forward
(self, x, is_train=False, stage_num=5, domainadapt=False)¶ Network forwarding given input tensors
- Parameters
- inputsTensor or list of Tensors
input tensor(s)
- kwargs :
For other keyword-only arguments.
- Returns
- output tensor(s)Tensor or list of Tensor(s)
-
infer
(self, x, stage_num=5)¶ Set this network in evaluation mode.