Skip to content

Counting the number of people in an indoor space using Wi-Fi sensing

Notifications You must be signed in to change notification settings

jyoonlee/GCU_WifiSensing

Repository files navigation

GCU_WifiSensing

Project name: GCU WiFiSensing (2020.07 ~ 2021.06)
Team members: 이재윤(Jaeyoon Lee), 정은서(Eunseo Jeong), 여찬영(Chanyeong Yeo)

System architecture

struct

In our project, Fair MOT and Linux 802.11n CSI tool library were used. Each library was used when recognizing and tracking objects from the video data received from the initial camera and when collecting and quantifying Wi-Fi CSI data from the AP.

CSI

  1. our File:

     git clone https://github.com/jyoonlee/GCU_WifiSensing.git
    
  2. In matlab:

     cd CSI
     cd matlab
     run read_bf_socket using Matlab
    
  3. In terminal:

    sudo stop network-manager
    sudo modprobe -r iwlwifi mac80211
    sudo modprobe iwlwifi connector_log=0x1
    
  4. In other terminal(connect Wifi):

     iw dev
     sudo ip link show wlan0
     sudo ip link set wlan0 up
     iw wlan0 link
     sudo iw dev wlan0 connect [WiFi name]
     iw wlan0 link
     sudo dhclient wlan0
    
  5. connet csi:

     cd CSI
     cd linux-80211n-csitool-supplementary-master/netlink
     gcc log_to_server.c -o log_to_server
     sudo ./log_to_server 127.0.0.1 8090
    
  6. ping test

     ping -i 0.2 192.168.1.1
    

FairMOT

  • We used FairMOT model and changed the code according to us.

  • We referred to this link for FairMOT code.

  • installation

      conda create -n FairMOT
      conda activate FairMOT
      conda install pytorch==1.7.0 torchvision==0.8.0 cudatoolkit=10.2 -c pytorch
      cd ${FAIRMOT_ROOT}
      pip install -r requirements.txt
    
  • baseline model pretrain model fairmot_dla34.pth Google Reference this link Model save structure

        ${FAIRMOT_ROOT}
         └——————models
                 └——————fairmot_dla34.pth
                 └——————...
         └——————src
                 └——————...
         └——————video
                 └——————video
         └——————demo
                 └——————result.txt
                 └——————frame image
                 └——————output.mp4
                 └——————...
    
  • Use FairMOT Object Detection

      cd ${FAIRMOT_ROOT(Object Detection)}
      cd src
      python demo.py mot --load_model ../models/fairmot_dla34.pth --conf_thres 0.4
    
  • result.txt output

      YY-MM-DD hh:mm:ss       object label
    
  • Use FairMOT position

      cd ${FAIRMOT_ROOT(Position)}
      cd src
      python demo.py mot --load_model ../models/fairmot_dla34.pth --conf_thres 0.4
    
  • result.txt output

      frame_number    Object id       position x      position y
    

Experiment

  • Use TrainModel.py

      python TrainModel.py
    
  • input

  1. CSI Data
  2. Object Detection Result.txt
  • Progress
  1. synchronize csi label and Result.txt
  2. Use Randomforest

Result

CSI Demo Video

csi_output

MOT Demo Video

MOT_output

Experiment

About

Counting the number of people in an indoor space using Wi-Fi sensing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published