Giter VIP home page Giter VIP logo

crowd-crush's Introduction

Crowd Crush

CrowdCrush is a research tool that allows to annotate the motions of objects in videos. Primarily used for pedestrian crowd simulations, this project is part of Alexander Fuchsberger's dissertation, conducted at the University of Nebraska at Omaha.

Currently the following features are implemented:

  • Annotation of objects via Agents and Markers
  • 2D relative Coordinate Translation into real world coordinates
  • Rendering of
    • Original Video
    • Original Video overlayed with annotated Agents
    • Overlay Videos (such as Background removal rendered variants)
    • Overlay Videos with annotated Agents
    • Side by side comparison of agent movements with a secondary simulation
  • Downloading of Data files that serve as input for succeeding research projects

If you want to report any bugs or report on the research tool please submit an issue on Github

Recommended Browser Settings

it is recommended to use Chrome and install uBlock Origin extension to block related videos from overlaying content. Here is the recommend list of custom filters (uBlock Origin -> insert in Options -> My Filters):

! Crowd Crush custom filters
www.youtube.com##.ytp-pause-overlay
www.youtube.com##.ytp-chrome-top
www.youtube.com##.ytp-gradient-top

Installation

This project is best deployed on a debain-based linux distribution (such as Ubuntu). The following requirements have to be met:

  • erlang 22.2.1
  • elixir 1.9.4
  • nodejs 13.5.0

First clone the project:

git clone https://github.com/fuchsberger/crowd-crush.git

Then set environment variables. You may want to store them in .zshenv or .bashenv:

$ mix phx.gen.secret
REALLY_LONG_SECRET
$ export SECRET_KEY_BASE=REALLY_LONG_SECRET
$ export CROWD_CRUSH_DATABASE_URL=ecto://USER:PASS@HOST/DATABASE

Then load dependencies to compile code and assets:

# Initial setup (1)
$ mix deps.get --only prod
$ MIX_ENV=prod mix compile

# Compile assets
$ cd assets && npm install # (2)
$ npm run deploy --prefix ./assets
$ mix phx.digest
$ MIX_ENV=prod mix release

# (*) only on initial deploy or when changing deps (1) / npm assets (2)

Create a service that allows to (re)start the webserver on system boot and when it crashes. Create lib/systemd/system/app_crowd_crush.service:

[Unit]
Description=Crowd Crush
After=network.target

[Service]
User=deploy
Group=deploy
Restart=on-failure
Environment=HOME=/home/deploy/apps/crowd-crush/
ExecStart=/home/deploy/apps/crowd-crush/_build/prod/rel/crowd_crush/bin/crowd_crush start
ExecStop=/home/deploy/apps/crowd-crush/_build/prod/rel/crowd_crush/bin/crowd_crush stop

[Install]
WantedBy=multi-user.target

You can now start / stop the server as a service and it will auto-restart on reboot / failure:

$ sudo systemctl daemon-reload
$ sudo systemctl start app_crowd_crush.service

Backup / Resore Database

backup: pg_dump -F tar crowd_crush_dev > backup.tar

restore: pg_restore -U postgres -h localhost --create --exit-on-error --verbose --dbname=postgres backup.tar

crowd-crush's People

Stargazers

 avatar  avatar

Watchers

 avatar

crowd-crush's Issues

Idea / Note: Produce Simulation Serverside, Render Client Side

In Simulation Mode (always at 25 fps but csv files can be downloaded at any other rate)

  • load the first time user goes into sim mode and only when modifications were made in marker mode
  • list is actually a dictionary for faster read times: {"agent_id": {"frame_id": [])}}
  • download list of agent positions every 40 miliseconds (25 fps). Produced on server using agent markers
  • no need to calculate on client/with react where agents are only displayed at a given location.

In Marker Mode:

  • do not download/generate updated position list
  • if adding a marker add marker in database

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.