-
Notifications
You must be signed in to change notification settings - Fork 2
/
README
155 lines (139 loc) · 5.64 KB
/
README
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
-------
Summary
-------
Prob-EC (Probabilistic Event Calculus) is a version of the Event Calculus, originally introduced by Robert Kowalski and Marek Sergot
in their paper "A Logic-Based Calculus of Events", New Generation Computing 4: 67–95. The relevant paper detailing our system will appear in
the Special Issue on Probability, Logic and Learning of the Cambridge University Press journal "Theory and Practice of Logic Programming" in early 2014.
A PDF copy of the paper is available at: http://arxiv.org/abs/1204.1851.
------------------------------------------
Contents ((f) for file, (d) for directory)
------------------------------------------
prob-EC-code(d)
|
|
-----README (f)
LICENSE (f)
CAVIAR-Full-Evaluation (d)
|
|
------LTAR-EC (d)
| |
| |
| ----cached-version (d)
| | |
| | |
| | ---- er_crisp_orig_cached.pl (f)
| | | crisp_utils_cached.pl (f)
| | | event_defs_orig_cached.pl (f)
| | | ec_cached.pl (f)
| | ----
| | non-cached-version (d)
| | |
| | |
| | ----- er_crisp_orig.pl (f)
| | | crisp_utils.pl (f)
| | | event_defs_orig.pl (f)
| | | ec.pl (f)
| | -----
| Prob-EC (d)
| |
| |
| ----cached-version (d)
| | |
| | |
| | ---- er_prob_orig_cached.pl (f)
| | | prob_utils_cached.pl (f)
| | | prob_event_defs_orig_cached.pl (f)
| | | prob_ec_cached.pl (f)
| | ----
| | non-cached-version (d)
| | |
| | |
| | ----- er_prob_orig.pl (f)
| | | prob_utils.pl (f)
| | | prob_event_defs_orig.pl (f)
| | | prob_ec.pl (f)
| | -----
| -------
randomQuerying (d)
|
|
------ LTAR-EC (d)
| |
| |
| -------- event_defs_orig.pl (f)
| ec.pl (f)
| --------
| Prob-EC (d)
| |
| |
| -------- prob_event_defs_orig.pl (f)
| prob_ec.pl (f)
| --------
| ------
dataset (d)
|
|
| ------ clean-CAVIAR (d)
| |
| |
| --- 30 CAVIAR videos (30 x d)
| ------ smooth-noise (d)
| |
| |
| --- 30 CAVIAR videos with probabilities (30 x d)
| ------ strong-noise (d)
| |
| |
| --- 30 CAVIAR videos with probabilities (30 x d)
| -------
--------
-------
------
-----
Usage
-----
There are two main functions of the code:
1) Directory "randomQuerying" provides the user with the ability to query any video of the CAVIAR dataset for any query of interest.
The following example procedure can be used:
- Copy the source files from subdirectories LTAR-EC or Prob-EC to the directory corresponding to the video of interest (all CAVIAR videos can be
found in the "dataset" directory).
- Go to the subdirectory of interest and run YAP Prolog.
- Load the event definitions file (e.g. ?- consult('prob_event_defs_orig.pl')). ProbLog and the EC engine
are both consulted automatically from this file.
- Load the "AppearanceIndv" and "MovementIndv" files of the video directory (.pl for LTAR-EC queries and .pbl for Prob-EC queries).
For example, for Prob-EC queries on video 02-Walk2, type: ?- consult(['wk2gtAppearenceIndv.pbl', 'wk2gtMovementIndv.pbl']) in the YAP
prompt.
- Run a "holdsAt" query of interest, e.g. ?- problog_exact(holdsAt(fighting(id2, id1) = true, 1400), Prob, Status) for Prob-EC or
holdsAt(leaving_object(id5, id6) = true, 120) for LTAR-EC.
- Exit the YAP prompt at any time with ?- halt or ^C (SIGINT).
2) Directory CAVIAR-Full-Evaluation contains code required to perform a full evaluation of LTAR-EC and Prob-EC over any CAVIAR video. That is,
it provides the user with the ability to ask all possible holdsAt queries from any video. This will produce a .result text file
in the current directory. A caching technique has been implemented (CAVIAR-Full-Evaluation/*-EC/cached-version) to speed up this process and is strongly
recommended over the non-cached versions, which are mainly provided for consistency with the "randomQuerying" directory. The following example procedure
may be used:
- As with (1), copy the source files of either Crisp-EC or Prob-EC to the directory of interest and run YAP in that directory.
- Load the "er" file, e.g. ?-consult('er_prob_orig_cached.pl'). The rest of the code and ProbLog should be then loaded automatically.
- Use any rule of the er/1 predicate to run a full evaluation of the relevant video, e.g. ?-er('23-Meet_Crowd') will load the required
"AppearanceIndv" and "MovementIndv" files of video 23 and proceed with the evaluation.
- For a full evaluation of the entire CAVIAR dataset, run the query ?- fullCAVIAR. It is strongly recommended that this query is run in a separate
shell "screen", because it is rather time-consuming.
- Exit the YAP prompt at any time with ?- halt or ^C (SIGINT).
-----
Notes
-----
1) A gamma distribution with mean value 4.0 was used to produce the probabilities for the noisy versions of CAVIAR.
Noisy versions with probabilities corresponding to different gamma mean values are available upon request.
2) Total size of the full code (with datasets included) is 198.2 MB.
---------------------
System Compatibility
---------------------
The code has been tested on YAP Prolog 6.2.x on Debian and Ubuntu GNU / Linux (kernel 3.0.0-16-generic and 2.6.35-28-server) x86_64 systems.
-------
License
-------
Please refer to the "LICENSE" file.
----------------
Questions / Bugs
----------------
Please send an e-mail at jfilip (at) iit (dot) demokritos (dot) gr for any questions or bug reports.