• Stars
    star
    5,081
  • Rank 7,825 (Top 0.2 %)
  • Language
    Python
  • License
    GNU Affero Genera...
  • Created over 7 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Uses WiFi signals 📶 and machine learning to predict where you are

whereami

Build Status Coverage Status PyPI PyPI

Uses WiFi signals and machine learning (sklearn's RandomForest) to predict where you are. Even works for small distances like 2-10 meters.

Your computer will known whether you are on Couch #1 or Couch #2.

Cross-platform

Works on OSX, Windows, Linux (tested on Ubuntu/Arch Linux).

The package access_points was created in the process to allow scanning wifi in a cross platform manner. Using access_points at command-line will allow you to scan wifi yourself and get JSON output. whereami builds on top of it.

Installation

pip install whereami

Usage

# in your bedroom, takes a sample
whereami learn -l bedroom

# in your kitchen, takes a sample
whereami learn -l kitchen

# get a list of already learned locations
whereami locations

# cross-validated accuracy on historic data
whereami crossval
# 0.99319

# use in other applications, e.g. by piping the most likely answer:
whereami predict | say
# Computer Voice says: "bedroom"

# probabilities per class
whereami predict_proba
# {"bedroom": 0.99, "kitchen": 0.01}

If you want to delete some of the last lines, or the data in general, visit your $USER/.whereami folder.

Python

Any of the functionality is available in python as well. Generally speaking, commands can be imported:

from whereami import learn
from whereami import get_pipeline
from whereami import predict, predict_proba, crossval, locations

Accuracy

k Generally it should work really well. I've been able to learn using only 7 access points at home (test using access_points -n). At organizations you might see 70+.

Distance: anything around ~10 meters or more should get >99% accuracy.

If you're adventurous and you want to learn to distinguish between couch #1 and couch #2 (i.e. 2 meters apart), it is the most robust when you switch locations and train in turn. E.g. first in Spot A, then in Spot B then start again with A. Doing this in spot A, then spot B and then immediately using "predict" will yield spot B as an answer usually. No worries, the effect of this temporal overfitting disappears over time. And, in fact, this is only a real concern for the very short distances. Just take a sample after some time in both locations and it should become very robust.

Height: Surprisingly, vertical difference in location is typically even more distinct than horizontal differences.

Related Projects

  • The wherearehue project can be used to toggle Hue light bulbs based on the learned locations.

Almost entirely "copied" from:

https://github.com/schollz/find

That project used to be in Python, but is now written in Go. whereami is in Python with lessons learned implemented.

Tests

It's possible to locally run tests for python 2.7, 3.4 and 3.5 using tox.

git clone https://github.com/kootenpv/whereami
cd whereami
python setup.py install
tox

More Repositories

1

yagmail

Send email in Python conveniently for gmail using yagmail
Python
2,579
star
2

neural_complete

A neural network trained to help writing neural network code using autocomplete
Python
1,149
star
3

gittyleaks

💧 Find sensitive information for a git repo
Python
687
star
4

sky

🌅 next generation web crawling using machine intelligence
Python
321
star
5

contractions

Fixes contractions such as `you're` to `you are`
Python
301
star
6

access_points

Scan your WiFi and get access point information and signal quality
Python
181
star
7

textsearch

Find strings/words in text; convenience and C speed 🎆
Python
121
star
8

brightml

Convenient Machine-Learned Auto Brightness (Linux)
Python
119
star
9

shrynk

Using Machine Learning to learn how to Compress ⚡
Python
109
star
10

loco

Share localhost through SSH. Local/Remote port forwarding made safe and easy.
Python
105
star
11

cliche

Build a simple command-line interface from your functions 💻
Python
105
star
12

tok

Fast and customizable tokenization 🚤
Python
65
star
13

aserve

Easily mock an API ☕
Python
50
star
14

just

Just is a wrapper to automagically read/write a file based on extension
Python
48
star
15

xtoy

Automated Machine Learning: go from 'X' to 'y' without effort.
Python
47
star
16

spacy_api

Server/Client around Spacy to load spacy only once
Python
46
star
17

requests_viewer

View requests objects with style
Python
42
star
18

cant

For those who can't remember how to get a result
Python
33
star
19

aioyagmail

makes sending emails very easy by doing all the magic for you, asynchronously
Python
29
star
20

sysdm

Scripts as a service. Builds on systemd (for Linux)
Python
21
star
21

deep_eye2mouse

Move the mouse by your webcam + eyes
Python
20
star
22

reddit_ml_challenge

Reddit Machine Learning: Tagging Challenge
Python
19
star
23

inthenews.io

Get the latest and greatest in news (on Python)
CSS
19
star
24

crtime

Get creation time of files for any platform - no external dependencies ⏰
Python
16
star
25

natura

Find currencies / money talk in natural text
Python
15
star
26

rebrand

✨ Refactor your software using programming language independent, case-preserving string replacement 💄
Python
15
star
27

emacs-kooten-theme

Dark color theme by kootenpv
Emacs Lisp
14
star
28

justdb

Just a thread/process-safe, file-based, fast, database.
Python
8
star
29

fastlang

Fast Detection of Language without Dependencies
Python
7
star
30

quickpip

A template for creating a quick, maintainable and high quality pypi project
Python
7
star
31

xdb

Ambition: Single API for any database in Python
Python
6
star
32

nostalgia_chrome

Self tracking your online life!
Python
5
star
33

cnn_basics

NLP using CNN on Cornell Movie Ratings
Python
4
star
34

kootenpv.github.io

Pascal van Kooten's website hosted on github.io
CSS
3
star
35

gittraffic

Save your gittrafic data so it won't get lost!
Python
3
star
36

flymake-solidity

flymake for solidity, using flymake-easy: live feedback on writing solidity contracts
Emacs Lisp
3
star
37

ppm

Safe password manager
C
2
star
38

automl_presentation

Example code for the presentation "Automated Machine Learning"
Python
2
star
39

dot_access

Makes nested python objects easy to go through
Python
1
star
40

feedview

View a feed url with `feedview <URL>`
Python
1
star
41

PassMan

android app for ppm
C
1
star
42

mockle

Automatic Mocking by Pickles
Python
1
star
43

emoji-picker

Python
1
star