VisualComputingInstitute / 2D_lidar_person_detection

Person detector for 2D range data. Code release for Self-Supervised Person Detection in 2D Range Data using a Calibrated Camera (https://arxiv.org/abs/2012.08890)
GNU General Public License v3.0
157 stars 36 forks source link

1 FPS instead of 22.6 FPS #6

Closed Shkunn closed 2 years ago

Shkunn commented 2 years ago

HI !

I'm trying to use your model on my Jetson Xavier AGX but I can't get the same number of FPS as expected in your paper...

I ran your example code in your github front page :+1:

import numpy as np
from dr_spaam.detector import Detector

ckpt = 'path_to_checkpoint'
detector = Detector(
    ckpt,
    model="DR-SPAAM",          # Or DR-SPAAM
    gpu=True,               # Use GPU
    stride=1,               # Optionally downsample scan for faster inference
    panoramic_scan=True     # Set to True if the scan covers 360 degree
)

# tell the detector field of view of the LiDAR
laser_fov_deg = 360
detector.set_laser_fov(laser_fov_deg)

# detection
num_pts = 1091
while True:
    # create a random scan
    scan = np.random.rand(num_pts)  # (N,)

    # detect person
    dets_xy, dets_cls, instance_mask = detector(scan)  # (M, 2), (M,), (N,)

    # confidence threshold
    cls_thresh = 0.5
    cls_mask = dets_cls > cls_thresh
    dets_xy = dets_xy[cls_mask]
    dets_cls = dets_cls[cls_mask]

    print(dets_xy)
    print(dets_cls)
    print()

Can you tell me how did you manage to get this result, please?

Thank you !

Shkunn commented 2 years ago

Sorry ! I was using a low energy consumption mode on my Jetson !