Commit d154e704 authored by Maxime Hubert's avatar Maxime Hubert
Browse files

Merge branch 'development'

parents ac3e7c8f e15406ab
Pipeline #142006 passed with stage
in 28 seconds
1.2.1 - 07.24.19
================
* Add baseline outputs on ActEV-Eval-CLI-Validation-Set3
* Update baseline outputs on ActEV-Eval-CLI-Validation-Set1 and ActEV-Eval-CLI-Validation-Set2
* Bug fixes in the validation-execution command
1.2.0 - 07.01.19
================
* Update validate-execution command with a `--score` flag https://gitlab.kitware.com/actev/diva_evaluation_cli/issues/11
......
__version__ = '1.2.0'
__version__ = '1.2.1'
......@@ -18,26 +18,25 @@ def entry_point(output, reference, activity_index, file_index, result, score):
"""
# go into the right directory to execute the script
path = os.path.dirname(__file__)
execution_validation_dir = os.path.join(path, '../implementation/validate_execution')
if score:
s = "true"
else:
s = "false"
current_path = os.path.dirname(__file__)
execution_validation_dir = os.path.join(current_path, '../implementation/validate_execution')
installation_script = os.path.join(execution_validation_dir, 'install.sh')
script = os.path.join(execution_validation_dir, 'score.sh')
script += " " + output + \
" " + reference + \
" " + activity_index + \
" " + file_index + \
" " + result + \
" " + s
scoring_cmd = 'python2 ' + os.path.join(execution_validation_dir, 'ActEV_Scorer', 'ActEV_Scorer.py ActEV18_AD -v ')
scoring_cmd += " -s " + os.path.realpath(output)
scoring_cmd += " -r " + os.path.realpath(reference) if reference else " "
scoring_cmd += " -a " + os.path.realpath(activity_index)
scoring_cmd += " -f " + os.path.realpath(file_index)
scoring_cmd += " -o " + os.path.realpath(result) if result else " "
scoring_cmd += " " if score else " -V"
if not result and score:
raise Exception("Please provide a -R option when using --score")
# execute the script
# status is the exit status code returned by the program
status = os.system('cd ' + execution_validation_dir + \
';. ' + installation_script + \
';' + script)
cmd = 'cd ' + execution_validation_dir + ';' + ' . ' + installation_script + ';' + scoring_cmd
status = os.system(cmd)
if status != 0:
raise Exception("Error occured in install.sh or score.sh")
#!/bin/bash
cd "$(dirname "$0")"
env_dir="python_env"
path=`pwd`
path_to_env_dir="$path/$env_dir"
current_path=`realpath $(dirname $0)`
path_to_env_dir="$current_path/$env_dir"
if [ -d $path_to_env_dir ];then
. ./$env_dir/bin/activate
. $path_to_env_dir/bin/activate
else
sudo apt-get install python-dev -y
virtualenv -p /usr/bin/python2 $env_dir
. ./$env_dir/bin/activate
python -m pip --no-cache-dir install -r requirements.txt
virtualenv -p python2 $path_to_env_dir
. $path_to_env_dir/bin/activate
python -m pip --no-cache-dir install -r $current_path/requirements.txt
fi
#!/bin/bash
cd "$(dirname "$0")"
# Get the ActEV scorer submodule
git submodule update --init --recursive
if [ $? -ne 0 ];then
exit 1
fi
# Configure the scorer with the right arguments
output=$1
reference=$2
activity=$3
file=$4
result=$5
score=$6
# Execute ActEV Scorer
cd ActEV_Scorer
if [ $score == "true" ] ; then
python2 ActEV_Scorer.py \
ActEV18_AD \
-s $output \
-r $reference \
-a $activity \
-f $file \
-o $result \
-v
else
python2 ActEV_Scorer.py \
ActEV18_AD \
-s $output \
-a $activity \
-f $file \
-v \
-V
fi
{
"Closing_Trunk": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
},
"Open_Trunk": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
},
"Riding": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
},
"Talking": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
},
"Transport_HeavyCarry": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
},
"Unloading": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
},
"abandon_package": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
},
"hand_interaction": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
},
"object_transfer": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
},
"person_closes_facility_door": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
},
"person_closes_vehicle_door": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
},
"person_enters_through_structure": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
},
"person_enters_vehicle": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
},
"person_exits_through_structure": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
},
"person_exits_vehicle": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
},
"person_laptop_interaction": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
},
"person_loads_vehicle": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
},
"person_opens_facility_door": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
},
"person_opens_vehicle_door": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
},
"person_person_embrace": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
},
"person_picks_up_object": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
},
"person_purchasing": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
},
"person_reading_document": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
},
"person_sets_down_object": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
},
"person_sitting_down": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
},
"person_standing_up": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
},
"specialized_talking_phone": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
},
"specialized_texting_phone": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
},
"theft": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
},
"vehicle_drops_off_person": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
},
"vehicle_picks_up_person": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
},
"vehicle_reversing": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
},
"vehicle_starting": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
},
"vehicle_stopping": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
},
"vehicle_turning_left": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
},
"vehicle_turning_right": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
},
"vehicle_u_turn": {
"objectTypeMap": {
"Construction_Vehicle": "*Vehicle*",
"Vehicle": "*Vehicle*"
},
"objectTypes": [
"Construction_Vehicle",
"Person",
"Vehicle"
]
}
}