This project utilises a VGG model with Bayesian loss to estimate the desity of a crowd.
device: 'cpu' # Device string used for pytorch (options: 'cpu'| 'gpu')model_path: 'weight.pth'
mean: [0.485, 0.456, 0.406]
std: [0.229, 0.224, 0.225]
cfg:
E: [ 64, 64, 'M', 128, 128,
'M', 256, 256, 256, 256,
'M', 512, 512, 512, 512,
'M', 512, 512, 512, 512 ]-
Input: It receives the RGB image as a FrameObject:
def inference(self, frame_object: FrameObject) -> Inference
-
Output: Updates the
Inference.extraobject with thecrowd_numberreturn Inference(extra={"crowd_number": crowd_no})