Pedestrian Detection Visualization with Drones

Pedestrian movement data based on drone footage. 20min time snippets taken at 60-65m height.

The tracking pipeline looks like this:

Given 2.7k 25fps video data that works quite well. Cyclists and pedestrians are detected as pedestrians alike and cars only create few false positives. All in all way faster than object detection networks and totally OK for a quick visualization.

Heatmap is based on my python port of D3s hexbin.

Examples from Weimar:

Theaterplatz

Theaterplatz

Raw video with detection overlays (red: foreground, colored squares: distinct detections)


August-Baudert-Platz

August-Baudert-Platz August-Baudert-Platz


Herderplatz

Herderplatz


Frauenplan

Frauenplan


Goetheplatz

Goetheplatz


Marktplatz

Marktplatz

Gphoto2 as a buildroot package

For everyone who needs to run gphoto on a buildroot system and wants to save some time:

Create a new package named gphoto2 in the package dir and add these two files:

package/gphoto2/Config.in

config BR2_PACKAGE_GPHOTO2
    bool "gphoto2"
    select BR2_PACKAGE_POPT
    select BR2_PACKAGE_LIBGPHOTO2
        help
          gPhoto2 is a free, redistributable, ready to use set of digital 
          camera software applications for Unix-like systems, written by 
          a whole team of dedicated volunteers around the world. 
          It supports more than 2500 cameras.

          http://www.gphoto.org/

package/gphoto2/gphoto2.mk

GPHOTO2_VERSION = 2.5.23
GPHOTO2_SOURCE = gphoto2-$(GPHOTO2_VERSION).tar.bz2
GPHOTO2_SITE = https://downloads.sourceforge.net/project/gphoto/gphoto/$(GPHOTO2_VERSION)

GPHOTO2_LICENSE_FILES = COPYING
GPHOTO2_INSTALL_STAGING = YES

GPHOTO2_DEPENDENCIES = libgphoto2 popt

GPHOTO2_CONF_ENV = POPT_CFLAGS="-I$(STAGING_DIR)/usr/include" POPT_LIBS="-L$(STAGING_DIR)/usr -lpopt"

$(eval $(autotools-package))

If running buildroot with the external_tree option, the package needs to be added to the general Config.in file:

source "$BR2_EXTERNAL_(EXTERNAL_TREE_NAME)_PATH/package/gphoto2/Config.in"

otherwise to package/Config.in

A word about switching USB ports on and off

For various reasons it may be beneficial to be able to turn off or toggle an USB connection or a USB port.

Using the Per-Port-Power-Switching (PPPS)

USB 2.0 Specification contains a part about disabling/enabling power (the VBUS line) on USB-Hubs. Most (if not nearly every) Hub uses a chip that either does not support switching or the manufacturer saves a few cents and omits the external components on the circuitboard to switch power.

One of the few hubs that does support that is D-Link’s DUB-H7 in the older (gray) revision.

Great Hub, btw. Allows PPPS, has LED indicators for every single port, has overcurrent protection, etc. Only mounting holes are missing, cheap bastards… No, for sure: It’s reasonably priced and performs well in it’s intended function as a regular USB hub.

uhubctl allows listing and toggling PPPS and works great for that reason.

Only problem: the DUB-H7 is quite strict about the current limits in the USB specification. When using large loads (>500mA) the hub ist not able to supply enough power and turns off the ports.

In addition to that this blog post claims that even when switching off a port, the output voltage of the port is just reduced to slightly above 1 volts (depending on the voltage converter in the USB device, that still allows operation).

Apple Thunderbolt Displays and Apple Keyboards with integrated Hubs support PPPS out of the box, btw.

Yepkit / ykush

The portugese company Yepkit sells USB-hubs with a PIC microcontroller and a TI load switch. They provide their firmware code and example programs as well as their schematics.

Yepkit page
Yepkit github

Nice stuff. Got one, works well.

Build your own stuff.

Yeah, that’s always an option, though not quite sure if it’s worth the hassle.

Chewchew

chewchew

tracking walking patterns of pedestrians in public spaces

To understand and quantify the usage of public places and plazas, I developed a tracking tool using smartphones as my Master’s Thesis.

dataset_hamburg dataset_weimar dataset_hongkong4

Random images from Brussels

avenue du front avenue du front koekelberg koekelberg jubelpark place de bienfaiteur

Antwerpen

Grote Markt

Hamburg

Hauptbahnhof