pipert.contrib.detection_demo.models

Module Contents

Functions

create_modules(module_defs, img_size, arc)

get_yolo_layers(model)

create_grids(self, img_size=416, ng=(13, 13), device='cpu', type=torch.float32)

load_darknet_weights(self, weights, cutoff=-1)

save_weights(self, path='model.weights', cutoff=-1)

convert(cfg='cfg/yolov3-spp.cfg', weights='weights/yolov3-spp.weights')

pipert.contrib.detection_demo.models.ONNX_EXPORT = False[source]
pipert.contrib.detection_demo.models.create_modules(module_defs, img_size, arc)[source]
class pipert.contrib.detection_demo.models.Swish[source]

Bases: pipert.contrib.detection_demo.utils.nn.Module

forward(self, x)[source]
class pipert.contrib.detection_demo.models.YOLOLayer(anchors, nc, img_size, yolo_index, arc)[source]

Bases: pipert.contrib.detection_demo.utils.nn.Module

forward(self, p, img_size, var=None)[source]
class pipert.contrib.detection_demo.models.Darknet(cfg, img_size=(416, 416), arc='default')[source]

Bases: pipert.contrib.detection_demo.utils.nn.Module

forward(self, x, var=None)[source]
fuse(self)[source]
pipert.contrib.detection_demo.models.get_yolo_layers(model)[source]
pipert.contrib.detection_demo.models.create_grids(self, img_size=416, ng=(13, 13), device='cpu', type=torch.float32)[source]
pipert.contrib.detection_demo.models.load_darknet_weights(self, weights, cutoff=- 1)[source]
pipert.contrib.detection_demo.models.save_weights(self, path='model.weights', cutoff=- 1)[source]
pipert.contrib.detection_demo.models.convert(cfg='cfg/yolov3-spp.cfg', weights='weights/yolov3-spp.weights')[source]