SYMBOL INDEX (260 symbols across 25 files) FILE: evaluate.py function create_arg_parser (line 9) | def create_arg_parser(): function main (line 145) | def main(): FILE: tbad/autoencoder/autoencoder.py class Autoencoder (line 13) | class Autoencoder: method __init__ (line 14) | def __init__(self, input_dim, hidden_dims=(16,), output_activation='si... method build (line 25) | def build(self): method compile (line 34) | def compile(self): method train (line 38) | def train(self, X_train, y_train, epochs=5, initial_epoch=0, batch_siz... method predict (line 66) | def predict(self, X_test): method load_weights (line 69) | def load_weights(self, weights_path): method _maybe_write_architecture (line 73) | def _maybe_write_architecture(self, log_dir): function load_ae_pretrained_models (line 89) | def load_ae_pretrained_models(all_pretrained_models_path): function load_pretrained_ae (line 101) | def load_pretrained_ae(pretrained_model_path): function _compute_ae_reconstruction_errors (line 120) | def _compute_ae_reconstruction_errors(X, X_reconstructed, loss): function compute_ae_reconstruction_errors (line 125) | def compute_ae_reconstruction_errors(coordinates, coordinates_reconstruc... function reconstruct_skeletons (line 133) | def reconstruct_skeletons(anomaly_model, trajectories_coordinates): FILE: tbad/autoencoder/data.py class Trajectory (line 12) | class Trajectory: method __init__ (line 13) | def __init__(self, trajectory_id, frames, coordinates): method __len__ (line 20) | def __len__(self): method use_global_features (line 23) | def use_global_features(self, video_resolution, extract_delta=False, u... method use_size_features (line 28) | def use_size_features(self, video_resolution): method _extract_size_features (line 31) | def _extract_size_features(self, video_resolution): method _extract_global_features (line 36) | def _extract_global_features(self, video_resolution, extract_delta=Fal... method _extract_bounding_box_centre (line 55) | def _extract_bounding_box_centre(bb): method _extract_bounding_box_measurements (line 62) | def _extract_bounding_box_measurements(bb): method change_coordinate_system (line 68) | def change_coordinate_system(self, video_resolution, coordinate_system... method _from_global_to_image (line 90) | def _from_global_to_image(coordinates, video_resolution): method _from_image_to_global (line 97) | def _from_image_to_global(coordinates, video_resolution): method _from_image_to_bounding_box (line 104) | def _from_image_to_bounding_box(coordinates, video_resolution, locatio... method _from_image_to_top_left_bounding_box (line 117) | def _from_image_to_top_left_bounding_box(coordinates, video_resolution): method _from_image_to_centre_bounding_box (line 131) | def _from_image_to_centre_bounding_box(coordinates, video_resolution): method is_short (line 153) | def is_short(self, input_length, input_gap, pred_length=0): method input_missing_steps (line 158) | def input_missing_steps(self): function load_trajectories (line 184) | def load_trajectories(trajectories_path): function extract_global_features (line 202) | def extract_global_features(trajectories, video_resolution, extract_delt... function extract_size_features (line 210) | def extract_size_features(trajectories, video_resolution): function change_coordinate_system (line 217) | def change_coordinate_system(trajectories, video_resolution, coordinate_... function split_into_train_and_test (line 224) | def split_into_train_and_test(trajectories, train_ratio=0.8, seed=42): function scale_trajectories (line 260) | def scale_trajectories(X, scaler=None, strategy='zero_one'): function scale_trajectories_zero_one (line 279) | def scale_trajectories_zero_one(X, scaler=None): function scale_trajectories_three_stds (line 299) | def scale_trajectories_three_stds(X, scaler=None): function scale_trajectories_robust (line 313) | def scale_trajectories_robust(X, scaler=None): function aggregate_autoencoder_data (line 325) | def aggregate_autoencoder_data(trajectories): function aggregate_autoencoder_evaluation_data (line 333) | def aggregate_autoencoder_evaluation_data(trajectories): function remove_missing_skeletons (line 343) | def remove_missing_skeletons(X, *arrs): function compute_ae_reconstruction_errors (line 353) | def compute_ae_reconstruction_errors(X, reconstructed_X, loss): function load_anomaly_masks (line 358) | def load_anomaly_masks(anomaly_masks_path): function assemble_ground_truth_and_reconstructions (line 369) | def assemble_ground_truth_and_reconstructions(anomaly_masks, trajectory_... function quantile_transform_errors (line 399) | def quantile_transform_errors(y_hats): function input_trajectories_missing_steps (line 406) | def input_trajectories_missing_steps(trajectories): FILE: tbad/autoencoder/evaluate.py function eval_ae (line 14) | def eval_ae(args): function eval_aes (line 76) | def eval_aes(args): FILE: tbad/autoencoder/train.py function train_ae (line 13) | def train_ae(args): FILE: tbad/combined_model/data.py function inverse_scale (line 8) | def inverse_scale(X, scaler): function restore_global_coordinate_system (line 18) | def restore_global_coordinate_system(X, video_resolution): function restore_original_trajectory (line 26) | def restore_original_trajectory(reconstructed_X_global, reconstructed_X_... function write_reconstructed_trajectories (line 41) | def write_reconstructed_trajectories(pretrained_model_path, reconstructe... function extract_video_and_skeleton_ids (line 82) | def extract_video_and_skeleton_ids(reconstruction_ids): function detect_most_anomalous_or_most_normal_frames (line 93) | def detect_most_anomalous_or_most_normal_frames(reconstruction_errors, a... function compute_num_frames_per_video (line 106) | def compute_num_frames_per_video(anomaly_masks): function write_predicted_masks (line 115) | def write_predicted_masks(pretrained_model_path, num_frames_per_video, a... function compute_worst_mistakes (line 151) | def compute_worst_mistakes(y_true, y_hat, video_ids, error_type='false_p... function generate_array_of_frames (line 185) | def generate_array_of_frames(x): function write_worst_mistakes (line 195) | def write_worst_mistakes(pretrained_model_path, worst_false_positives, w... function clip_trajectories (line 213) | def clip_trajectories(trajectories, video_resolution, margin=0.05): function clip_trajectory (line 222) | def clip_trajectory(trajectory, video_resolution, margin=0.05): function normalise_errors_by_bounding_box_area (line 250) | def normalise_errors_by_bounding_box_area(errors, X, video_resolution): FILE: tbad/combined_model/evaluate.py function eval_combined_model (line 35) | def eval_combined_model(args): function eval_combined_models (line 274) | def eval_combined_models(args): FILE: tbad/combined_model/fusion.py class CombinedEncoderDecoder (line 14) | class CombinedEncoderDecoder: method __init__ (line 15) | def __init__(self, input_length, global_input_dim, local_input_dim, re... method build (line 42) | def build(self): method train (line 168) | def train(self, X_train, y_train=None, epochs=10, initial_epoch=0, bat... method predict (line 229) | def predict(self, X_test, batch_size=256): method reconstruct (line 234) | def reconstruct(self, global_features, local_features): method compile (line 246) | def compile(self): method load_weights (line 250) | def load_weights(self, weights_path): method _construct_input_data (line 254) | def _construct_input_data(self, X_global, X_local): method _construct_output_data (line 272) | def _construct_output_data(self, X_global, X_local, y_global=None, y_l... method _construct_output_data_alt (line 301) | def _construct_output_data_alt(self, X_out, y_out=None, X_global=None,... method _maybe_write_architecture (line 329) | def _maybe_write_architecture(self, log_dir): function load_complete_rnn_ae_pretrained_models (line 358) | def load_complete_rnn_ae_pretrained_models(all_pretrained_models_path): function load_pretrained_combined_model (line 373) | def load_pretrained_combined_model(pretrained_model_path, message_passin... function coordinate_change (line 406) | def coordinate_change(x): FILE: tbad/combined_model/message_passing.py class MessagePassingEncoderDecoder (line 12) | class MessagePassingEncoderDecoder: method __init__ (line 13) | def __init__(self, input_length, global_input_dim, local_input_dim, re... method build (line 40) | def build(self): method train (line 248) | def train(self, X_train, y_train=None, epochs=10, initial_epoch=0, bat... method predict (line 307) | def predict(self, X_test, batch_size=256): method compile (line 312) | def compile(self): method load_weights (line 316) | def load_weights(self, weights_path): method _construct_input_data (line 319) | def _construct_input_data(self, X_global, X_local): method _construct_output_data (line 328) | def _construct_output_data(self, X_global, X_local, y_global=None, y_l... method _construct_output_data_alt (line 357) | def _construct_output_data_alt(self, X_out, y_out=None, X_global=None,... method _maybe_write_architecture (line 385) | def _maybe_write_architecture(self, log_dir): FILE: tbad/combined_model/train.py function train_combined_model (line 17) | def train_combined_model(args): FILE: tbad/data.py class Trajectory (line 11) | class Trajectory: method __init__ (line 12) | def __init__(self, trajectory_id, frames, coordinates): method __len__ (line 18) | def __len__(self): function load_trajectories (line 22) | def load_trajectories(trajectories_path): function is_short_trajectory (line 57) | def is_short_trajectory(trajectory_coordinates, input_length, input_gap=... function remove_short_trajectories (line 77) | def remove_short_trajectories(trajectories_coordinates, input_length, in... function input_trajectory_missing_steps (line 100) | def input_trajectory_missing_steps(trajectory_coordinates): function input_trajectories_missing_steps (line 134) | def input_trajectories_missing_steps(trajectories_coordinates): function normalise_trajectory_video_resolution (line 141) | def normalise_trajectory_video_resolution(trajectory_coordinates, video_... function normalise_trajectories_video_resolution (line 157) | def normalise_trajectories_video_resolution(trajectories_coordinates, vi... function normalise_trajectories (line 178) | def normalise_trajectories(trajectories_coordinates, video_resolution, s... function normalise_bounding_box (line 192) | def normalise_bounding_box(trajectory_coordinates, video_resolution): function normalise_bounding_boxes (line 210) | def normalise_bounding_boxes(trajectories_coordinates, video_resolution): function normalise_joints (line 218) | def normalise_joints(X, min_max_values=None): function denormalise_trajectory (line 235) | def denormalise_trajectory(trajectory_coordinates, video_resolution): function denormalise_trajectories (line 241) | def denormalise_trajectories(trajectories_coordinates, video_resolution): function collect_trajectories (line 264) | def collect_trajectories(trajectory_coordinates, input_length, input_gap... function collect_test_trajectories (line 327) | def collect_test_trajectories(trajectory_coordinates, trajectory_frames,... function collect_overlapping_trajectories (line 360) | def collect_overlapping_trajectories(trajectory_coordinates, trajectory_... function pad_trajectory (line 413) | def pad_trajectory(trajectory_coordinates, padding_length): function shuffle_data (line 440) | def shuffle_data(X, y=None, seed=None): function input2table (line 461) | def input2table(reconstructed_trajectory): function write_trajectories (line 475) | def write_trajectories(write_path, trajectories): function load_anomaly_masks (line 497) | def load_anomaly_masks(masks_path, camera_id=None): function assemble_trajectories (line 521) | def assemble_trajectories(trajectories_frames, trajectories_coordinates,... function detect_anomalous_frames (line 534) | def detect_anomalous_frames(reconstruction_errors, anomaly_threshold): function detect_most_anomalous_or_most_normal_frames (line 542) | def detect_most_anomalous_or_most_normal_frames(reconstruction_errors, a... function uniquify_reconstruction (line 560) | def uniquify_reconstruction(trajectory_frames, reconstructed_coordinates): function uniquify_reconstructions (line 588) | def uniquify_reconstructions(reconstructed_trajectories): function discard_steps_from_padded_frames (line 617) | def discard_steps_from_padded_frames(reconstructed_trajectories, origina... function denormalise_all_trajectories (line 645) | def denormalise_all_trajectories(reconstructed_trajectories, video_resol... function write_all_reconstructed_trajectories (line 673) | def write_all_reconstructed_trajectories(reconstructed_trajectories, wri... function extract_input_dim (line 705) | def extract_input_dim(trajectories_coordinates): function reverse_trajectories (line 710) | def reverse_trajectories(trajectories_coordinates): function collect_skeletons (line 717) | def collect_skeletons(trajectories_frames, trajectories_coordinates): function remove_missing_skeletons (line 730) | def remove_missing_skeletons(trajectories_frames, trajectories_coordinat... function extract_center_of_mass (line 742) | def extract_center_of_mass(trajectory_coordinates): function extract_centre_of_bounding_box (line 760) | def extract_centre_of_bounding_box(trajectory_coordinates, video_resolut... function extract_width_height (line 769) | def extract_width_height(trajectory_coordinates, video_resolution): function extract_global_features_from_trajectory (line 778) | def extract_global_features_from_trajectory(trajectory_coordinates, vide... function extract_global_features (line 786) | def extract_global_features(trajectories_coordinates, video_resolution): function concatenate_features (line 794) | def concatenate_features(global_features, local_features): function local_to_global_coordinates (line 802) | def local_to_global_coordinates(reconstructed_features, video_resolution): function discard_global_features (line 825) | def discard_global_features(reconstructed_features): class StdScaler (line 838) | class StdScaler: method __init__ (line 839) | def __init__(self, stds=3): method fit (line 844) | def fit(self, X): method transform (line 848) | def transform(self, X): method inverse_transform (line 856) | def inverse_transform(self, X): function scale_trajectories_three_stds (line 865) | def scale_trajectories_three_stds(trajectories_coordinates, scaler=None): function scale_trajectories_zero_one (line 893) | def scale_trajectories_zero_one(trajectories_coordinates, scaler=None): function scale_trajectories (line 929) | def scale_trajectories(trajectories_coordinates, scaler=None, strategy='... function inverse_scale_trajectories (line 940) | def inverse_scale_trajectories(reconstructed_trajectories, global_scaler... function inverse_single_scale_trajectories (line 953) | def inverse_single_scale_trajectories(reconstructed_trajectories, scaler): function _train_test_split_through_time (line 965) | def _train_test_split_through_time(trajectory_id, trajectory_coordinates... function train_test_split_through_time (line 990) | def train_test_split_through_time(trajectories_coordinates, input_length... function train_test_split_trajectories (line 1013) | def train_test_split_trajectories(trajectories_frames, trajectories_coor... function pull_global_features (line 1036) | def pull_global_features(all_reconstructed_features): function compute_bounding_boxes_from_global_features (line 1045) | def compute_bounding_boxes_from_global_features(all_reconstructed_featur... function compute_bounding_boxes_from_image_features (line 1058) | def compute_bounding_boxes_from_image_features(all_reconstructed_traject... function change_coordinate_system (line 1071) | def change_coordinate_system(trajectories_coordinates, video_resolution,... function from_image_to_global (line 1095) | def from_image_to_global(trajectories_coordinates, video_resolution): function from_global_to_image (line 1104) | def from_global_to_image(trajectories_coordinates, video_resolution): function from_global_to_image_all_cameras (line 1113) | def from_global_to_image_all_cameras(all_reconstructed_trajectories, vid... function from_image_to_bounding_box (line 1121) | def from_image_to_bounding_box(trajectories_coordinates, video_resolutio... function from_image_to_top_left_bounding_box (line 1135) | def from_image_to_top_left_bounding_box(trajectory_coordinates, video_re... function from_image_to_centre_bounding_box (line 1149) | def from_image_to_centre_bounding_box(trajectory_coordinates, video_reso... function compute_worst_mistakes (line 1166) | def compute_worst_mistakes(y_true, y_hat, video_ids, type='false_positiv... function generate_array_of_frames (line 1195) | def generate_array_of_frames(x): function write_all_worst_mistakes (line 1205) | def write_all_worst_mistakes(all_pretrained_models_path, worst_false_pos... FILE: tbad/eval.py function eval_ae_models (line 24) | def eval_ae_models(args): function eval_rnn_ae_models (line 101) | def eval_rnn_ae_models(args): function eval_complete_rnn_ae_models (line 236) | def eval_complete_rnn_ae_models(args): function compute_all_cameras_performance_metrics (line 402) | def compute_all_cameras_performance_metrics(args): function combine_global_and_local_losses (line 459) | def combine_global_and_local_losses(args): FILE: tbad/gpu.py function configure_gpu_resources (line 10) | def configure_gpu_resources(gpu_ids, gpu_memory_fraction): FILE: tbad/losses.py function mean_squared_error (line 6) | def mean_squared_error(original_trajectory, reconstructed_trajectory): function balanced_mean_squared_error (line 14) | def balanced_mean_squared_error(original_trajectory, reconstructed_traje... function mean_absolute_error (line 23) | def mean_absolute_error(original_trajectory, reconstructed_trajectory): function balanced_mean_absolute_error (line 32) | def balanced_mean_absolute_error(original_trajectory, reconstructed_traj... function binary_crossentropy (line 42) | def binary_crossentropy(original_trajectory, reconstructed_trajectory): function modified_mean_squared_error (line 51) | def modified_mean_squared_error(y_true, y_pred): function modified_mean_squared_error_2 (line 57) | def modified_mean_squared_error_2(y_true, y_pred): function modified_mean_squared_error_3 (line 68) | def modified_mean_squared_error_3(y_true, y_pred): function modified_mean_absolute_error (line 79) | def modified_mean_absolute_error(y_true, y_pred): function modified_balanced_mean_absolute_error (line 90) | def modified_balanced_mean_absolute_error(y_true, y_pred): function modified_binary_crossentropy (line 102) | def modified_binary_crossentropy(y_true, y_pred): function modified_binary_crossentropy_2 (line 108) | def modified_binary_crossentropy_2(y_true, y_pred): FILE: tbad/rnn_autoencoder/data.py function remove_short_trajectories (line 8) | def remove_short_trajectories(trajectories, input_length, input_gap, pre... function aggregate_rnn_autoencoder_data (line 17) | def aggregate_rnn_autoencoder_data(trajectories, input_length, input_gap... function _aggregate_rnn_autoencoder_data (line 34) | def _aggregate_rnn_autoencoder_data(coordinates, input_length, input_gap... function aggregate_rnn_ae_evaluation_data (line 57) | def aggregate_rnn_ae_evaluation_data(trajectories, input_length, input_g... function _aggregate_rnn_ae_evaluation_data (line 70) | def _aggregate_rnn_ae_evaluation_data(trajectory, input_length): function compute_rnn_ae_reconstruction_errors (line 89) | def compute_rnn_ae_reconstruction_errors(X, reconstructed_X, loss): function summarise_reconstruction_errors (line 102) | def summarise_reconstruction_errors(reconstruction_errors, frames, traje... function summarise_reconstruction_errors_per_frame (line 121) | def summarise_reconstruction_errors_per_frame(errors, frames): function summarise_reconstruction (line 131) | def summarise_reconstruction(reconstructed_X, frames, trajectory_ids): function summarise_reconstruction_per_frame (line 159) | def summarise_reconstruction_per_frame(recs, frames): function retrieve_future_skeletons (line 169) | def retrieve_future_skeletons(trajectories_ids, X, pred_length): function discard_information_from_padded_frames (line 189) | def discard_information_from_padded_frames(pred_ids, pred_frames, pred_e... FILE: tbad/rnn_autoencoder/evaluate.py function eval_rnn_ae (line 17) | def eval_rnn_ae(args): function eval_rnn_aes (line 161) | def eval_rnn_aes(args): FILE: tbad/rnn_autoencoder/rnn.py class RNNEncoderDecoder (line 12) | class RNNEncoderDecoder: method __init__ (line 13) | def __init__(self, input_length, input_dim, reconstruction_length, inp... method build (line 37) | def build(self): method compile (line 103) | def compile(self): method load_weights (line 107) | def load_weights(self, weights_path): method _create_reconstruction_input_zeros (line 110) | def _create_reconstruction_input_zeros(self, n_examples): method _create_prediction_input_zeros (line 116) | def _create_prediction_input_zeros(self, n_examples): method _construct_input_data (line 122) | def _construct_input_data(self, X): method _construct_output_data (line 133) | def _construct_output_data(self, X, y=None): method train (line 147) | def train(self, X_train, y_train=None, epochs=10, initial_epoch=0, bat... method predict (line 181) | def predict(self, X_test, batch_size=256): method eval (line 185) | def eval(self, X_test, batch_size=256): method _maybe_write_architecture (line 190) | def _maybe_write_architecture(self, log_dir): function load_architecture_specification (line 215) | def load_architecture_specification(model_architecture): function model_from_architecture_specification (line 244) | def model_from_architecture_specification(architecture_specification): function reconstruct_trajectories (line 248) | def reconstruct_trajectories(anomaly_model, trajectories_coordinates): function load_pretrained_rnn_ae (line 258) | def load_pretrained_rnn_ae(pretrained_model_path): FILE: tbad/rnn_autoencoder/train.py function train_rnn_ae (line 16) | def train_rnn_ae(args): function produce_data_from_model_type (line 95) | def produce_data_from_model_type(model_type, trajectories, video_resolut... FILE: tbad/train.py function train_ae (line 22) | def train_ae(args): function train_rnn_ae (line 89) | def train_rnn_ae(args): function train_complete_rnn_ae (line 216) | def train_complete_rnn_ae(args): FILE: tbad/utils.py function select_optimiser (line 14) | def select_optimiser(optimiser, learning_rate): function select_loss (line 24) | def select_loss(loss_name): function select_cell (line 40) | def select_cell(cell_type, hidden_dim, l1=0.0, l2=0.0): function set_up_logging (line 55) | def set_up_logging(camera_id, root_log_dir=None, resume_training=None): function resume_training_from_last_epoch (line 67) | def resume_training_from_last_epoch(model, resume_training=None): function select_scaler_model (line 76) | def select_scaler_model(scaler_name): FILE: tbad/visualisation.py function compute_bounding_box (line 31) | def compute_bounding_box(keypoints, video_resolution, return_discrete_va... function compute_chest_centred_bounding_box (line 66) | def compute_chest_centred_bounding_box(keypoints, video_resolution): function insert_anomaly_mask_from_bounding_box (line 104) | def insert_anomaly_mask_from_bounding_box(mask, bounding_box): function render_article_main_figure (line 123) | def render_article_main_figure(write_path, frames_path, gt_trajectories_... function render_article_main_figure_2 (line 166) | def render_article_main_figure_2(write_path, frames_path, gt_trajectorie... function draw_skeleton (line 189) | def draw_skeleton(frame, keypoints, colour, dotted=False): function draw_line (line 216) | def draw_line(img, pt1, pt2, color, thickness=1, style='dotted', gap=10): function draw_poly (line 241) | def draw_poly(img, pts, color, thickness=1, style='dotted'): function draw_rect (line 251) | def draw_rect(img, pt1, pt2, color, thickness=1, style='dotted'): function render_trajectories_skeletons (line 256) | def render_trajectories_skeletons(args): function _render_trajectories_skeletons (line 296) | def _render_trajectories_skeletons(write_dir, frames_path, gt_trajectori... function maybe_create_dir (line 406) | def maybe_create_dir(dir_path): function compute_simple_bounding_box (line 414) | def compute_simple_bounding_box(skeleton): function render_video_diff_heatmaps (line 425) | def render_video_diff_heatmaps(args): function render_video_diff_heatmaps_hasan (line 452) | def render_video_diff_heatmaps_hasan(args): function render_video_heatmaps_mpedrnn (line 474) | def render_video_heatmaps_mpedrnn(args): FILE: train.py function create_arg_parser (line 9) | def create_arg_parser(): function main (line 225) | def main(): FILE: utils/metrics.py function frame_level_metrics (line 8) | def frame_level_metrics(anomaly_masks, reconstruction_errors, reconstruc... function ground_truth_and_reconstructions (line 30) | def ground_truth_and_reconstructions(anomaly_masks, reconstruction_error... function summarise_errors_per_frame (line 53) | def summarise_errors_per_frame(trajectory_errors_per_frame, trajectory_f... function compute_reconstruction_errors (line 70) | def compute_reconstruction_errors(trajectories_coordinates, reconstructe... function summarise_reconstruction_errors (line 83) | def summarise_reconstruction_errors(reconstruction_errors, trajectories_... function discard_errors_from_padded_frames (line 93) | def discard_errors_from_padded_frames(reconstruction_errors, original_tr... FILE: utils/score_scaling.py class ScoreNormalization (line 8) | class ScoreNormalization: method __init__ (line 9) | def __init__(self, method="KDE", options=None): method fit (line 30) | def fit(self, X): method score (line 43) | def score(self, x): method get_fit_params_string (line 57) | def get_fit_params_string(self): method get_fit_params (line 69) | def get_fit_params(self): function normalizing_lstm_autoencoder (line 82) | def normalizing_lstm_autoencoder(training_sample_rate=1): function normalizing_3Dconv (line 131) | def normalizing_3Dconv(): function visualize (line 135) | def visualize(X, X_test, dens_train, dens, plot_title): FILE: visualise.py function create_arg_parser (line 7) | def create_arg_parser(): function main (line 107) | def main():