/EfficientDet-Webcam

Object Detection for Multiple IP Cameras. EfficientDet implemented on Jetson TX2 (ARM architecture) platform and HikiVision webcam devices.

Primary LanguagePython

EfficientDet on Multiple Webcams

Usage

Same usage as gaodechen/webcam_yolov3_jetson_tx_hikvision.

Multiple Webcams Streaming & Object Detection

  • model.py: post-packaging for Yet-Another-EfficientDet-Pytorch, no need to change
  • settings.py: IP list & image shape could be modified here, view the zylo117/Yet-Another-EfficientDet-Pytorch repo for other configurations

Running:

python run.py --single_window=True (or False) --num_cameras=4

single_window: argument used when multiple images should be merged and displayed into one single window.

num_cameras: number of cameras to be processed.

Streaming Only

Delete model processing part in predict() as below.

def predict(raw_q, pred_q):
    # model = Model()
    while True:
        raw_img = raw_q.get()
        # pred_img = model.run(raw_img)
        pred_q.put(raw_img)

Preparation on Jetson Platform

PyTorch 1.4.0 and torchvision 0.5.0 are required for EfficientDet. Now the ARM sources for pip are still not supporting those versions, so we need installing packages or sources to build.

PyTorch 1.4.0 Installation

No need to build from scratch, installation package of PyTorch for ARM is available.

torchvision 0.5.0 Installation

Here you need to clone torchvision sources and build. git clone may take a while so I add the --depth argument to download the latest commit only.

$ git clone --branch v0.5.0 https://github.com/pytorch/vision torchvision --depth=1
$ cd torchvision
$ sudo python setup.py install