{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "initial_id",
"metadata": {
"ExecuteTime": {
"end_time": "2023-11-22T14:37:00.234701874Z",
"start_time": "2023-11-22T14:37:00.234399600Z"
}
},
"outputs": [],
"source": [
"# for i in range(4):\n",
"# %run log_analyzer.ipynb"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "ab0c65333d382055",
"metadata": {
"ExecuteTime": {
"end_time": "2024-01-30T03:21:48.027739767Z",
"start_time": "2024-01-30T03:21:48.010027555Z"
}
},
"outputs": [],
"source": [
"import os\n",
"input_directory_path = '/home/andrew/Videos/VIRAT_gray_0.5_3'\n",
"\n",
"already_done_files = os.listdir('.')\n",
"\n",
"# List all files in the directory\n",
"file_list = os.listdir(input_directory_path)\n",
"# full_file_paths = [os.path.join(input_directory_path, filename) for filename in file_list]"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "37c62b1b596dc13a",
"metadata": {
"ExecuteTime": {
"start_time": "2024-01-30T03:21:51.955601757Z"
}
},
"outputs": [],
"source": [
"# Suppress cargo build warnings\n",
"%env RUSTFLAGS=-Awarnings\n",
"for filename in file_list:\n",
" full_file_path = os.path.join(input_directory_path, filename)\n",
" i = 0\n",
" \n",
" for i in [0,3,6,9]:\n",
" \n",
" \n",
" output_filename = str(i) + '_' + filename+'_nofeat.adder'\n",
" run_it = True\n",
" for already_done_file in already_done_files:\n",
" if already_done_file.__contains__(str(i) + '_' + filename):\n",
" run_it = False\n",
" \n",
" if run_it:\n",
" print(\"Running CRF\", i)\n",
" ! cargo run --bin evaluate_feature_detection_transcode --release --features \"open-cv feature-logging compression\" -- \\\n",
" --crf {i} --delta-t-max 7650 --frame-count-max 480 \\\n",
" --input-filename {full_file_path} \\\n",
" --scale 1.0 --compressed --thread-count 16 --output-filename {output_filename}\n",
" \n",
" output_filename = str(i) + '_' + filename+'_feat.adder'\n",
" ! cargo run --bin evaluate_feature_detection_transcode --release --features \"open-cv feature-logging compression\" -- \\\n",
" --crf {i} --delta-t-max 7650 --frame-count-max 480 \\\n",
" --input-filename {full_file_path} \\\n",
" --scale 1.0 --detect-features --compressed --thread-count 16 --output-filename {output_filename}\n",
" # --color-input\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 5
}