<jupyter_start><jupyter_text>Creating Sequences Looks to be ~ 12 seconds per video ~24 minutes for 120 videos, ~6.6 hrs for entire 1980 videos<jupyter_code># ---- RUN THE FOLLOWING CELLS TO GENERATE .NPY SEQ FOR ALL VIDEOS IN DATASET ----- # 
#      SEQUENCES THAT ALREADY EXIST WILL BE SKIPPED

seq_length = 16
dataset = DataSet(cnn_model)
dataset.data[-1]
tic = time.time()

for ind, sample in enumerate(dataset.data):
    
    path = os.path.join('data', 'sequences', sample[1], sample[2] + '-' + str(seq_length) + \
        '-features.npy')
    
    if os.path.isfile(path):
        print "Sequence: {} already exists".format(ind)
    else:
        print "Generating and saving sequence: {}".format(ind)
        sequence = dataset.extract_seq_features(sample)

print "Time Elapsed: {}".format(time.time() - tic)<jupyter_output>Sequence: 0 already exists
Sequence: 1 already exists
Sequence: 2 already exists
Sequence: 3 already exists
Sequence: 4 already exists
Sequence: 5 already exists
Sequence: 6 already exists
Sequence: 7 already exists
Sequence: 8 already exists
Sequence: 9 already exists
Sequence: 10 already exists
Sequence: 11 already exists
Sequence: 12 already exists
Sequence: 13 already exists
Sequence: 14 already exists
Sequence: 15 already exists
Sequence: 16 already exists
Sequence: 17 already exists
Sequence: 18 already exists
Sequence: 19 already exists
Sequence: 20 already exists
Sequence: 21 already exists
Sequence: 22 already exists
Sequence: 23 already exists
Sequence: 24 already exists
Sequence: 25 already exists
Sequence: 26 already exists
Sequence: 27 already exists
Sequence: 28 already exists
Sequence: 29 already exists
Sequence: 30 already exists
Sequence: 31 already exists
Sequence: 32 already exists
Sequence: 33 already exists
Sequence: 34 already exists
Sequence: 35 already exists
Se[...]<jupyter_text>Sanity Check on Generated Sequences<jupyter_code>path = os.path.join('data', 'sequences', 'backhand', 'p36_backhand_s3-16-features.npy')

sequence = np.load(path)
sequence<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08873720136518772, 'fraction_numerical': 0.04144319843978547, 'mean_word_length': 4.780281690140845, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '564314', 'license': 'MIT', 'n_tokens_mistral': 668, 'n_tokens_neox': 576, 'n_words': 234, 'path': 'lrcnn/extract_and_save_sequences.ipynb', 'repo_name': 'Ternura603/tennis_action_recognition', 'size': '2051'}