-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.txt
113 lines (65 loc) · 2.47 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
##################################
README IS BEST VIEWED ON GITHUB:
https://github.com/ehofesmann/PawPal/
##################################
# PawPal
Entertaining and Training your dog while you are away.
Using state-of-the-art computer vision algorithms, this dog localization and activity recognition system can determine what your dog is doing from a home surveillance camera.
![](https://github.com/ehofesmann/PawPal/blob/master/images/pipeline.png)
## Results
![](https://github.com/ehofesmann/PawPal/blob/master/images/furniture.png)
#### Biting C3D Recogntiion Accuracy (%)
| Mean | Standard Deviation | Random Chance |
|:----------:|:------:| :----:|
| 68.41 | 6.10 | 50.00 |
Across 5 splits given in ```tfrecords_pawpal/split.npy``` in the dataset download link below
![](https://github.com/ehofesmann/PawPal/blob/master/images/biting.png)
## Usage
### Requirements
Python 3.5
OpenCV
Tensorflow 1.0.0
Cython
[Darkflow](https://github.com/thtrieu/darkflow) for Yolo
[M-PACT](https://github.com/MichiganCOG/M-PACT) Activity Recognition Platform
Detailed installation instructions below.
### Installation and Setup
Follow instructions below to install darkflow and PawPal
```
git clone https://github.com/thtrieu/darkflow
virtualenv -p python3.5 env
source env/bin/activate
pip install tensorflow==1.0.0
pip install Cython
pip install opencv-python
cd darkflow
sudo apt-get install python3 python-dev python3-dev \
build-essential libssl-dev libffi-dev \
libxml2-dev libxslt1-dev zlib1g-dev \
python-pip
pip install -e .
flow (ignore any errors)
cd ..
git clone https://github.com/ehofesmann/PawPal/
cd PawPal
```
Download the weights for C3D [Download link](https://umich.box.com/s/va0jkzx6ym0vb4k6909sxebjijne0uez)
Download yolo.weights [Download link](https://drive.google.com/drive/folders/0B1tW_VtY7onidEwyQ2FtQVplWEU)
```
mv ~/Downloads/checkpoint-532.npy ./c3d/
mv ~/Downloads/yolo.weights ../darkflow/bin/
```
Update the /path/to/darkflow in detect_video.py
```
python detect_video.py --vidpath example/example1.mp4
```
### Testing
```
python detect_video.py --vidpath example/example1.mp4
```
### Training or Finetuneing
#### Dataset
Dog biting vs non biting tfrecords dataset [Download link](https://umich.box.com/s/jptvbcuig2ieejmhhv7p8kic7t3vraeu)
![](https://github.com/ehofesmann/PawPal/blob/master/images/data.png)
#### Activity Recognition Model
Install M-PACT and copy ```PawPal/c3d/c3d_frozen``` into the models directory of M-PACT