From d97613d7458f2527296f9cb34b6c6895ee0157d0 Mon Sep 17 00:00:00 2001 From: RichieHakim Date: Sun, 28 Jan 2024 20:41:12 -0500 Subject: [PATCH] Clean up notebook --- notebooks/interactive_pipeline_basic.ipynb | 994 --------------------- 1 file changed, 994 deletions(-) diff --git a/notebooks/interactive_pipeline_basic.ipynb b/notebooks/interactive_pipeline_basic.ipynb index aef94cd..1b7ee88 100644 --- a/notebooks/interactive_pipeline_basic.ipynb +++ b/notebooks/interactive_pipeline_basic.ipynb @@ -102,1000 +102,6 @@ "If you did everything according to the readme, you should see that the video_path currently points to a folder containing one sample video in the testing folder. Give this a try!" ] }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Key 'directory_project' not found in params dictionary: dict > project. Using default value: /tmp/tmpm167_hrz/project\n", - "Key 'directory_videos' not found in params dictionary: dict > paths_videos. Using default value: /media/rich/Home_Linux_partition/github_repos/face-rhythm/tests/data_test/inputs\n", - "Key 'filename_videos_strMatch' not found in params dictionary: dict > paths_videos. Using default value: demo.*\n", - "Key 'path_file' not found in params dictionary: dict > ROIs > initialize. Using default value: /media/rich/Home_Linux_partition/github_repos/face-rhythm/tests/data_test/inputs/ROIs.h5\n", - "== Operating System ==: uname_result(system='Linux', node='rich-L-CLASS', release='5.15.0-91-generic', version='#101~20.04.1-Ubuntu SMP Thu Nov 16 14:22:28 UTC 2023', machine='x86_64')\n", - "== CPU Info ==: {'n_cores': 36, 'brand': 'Intel(R) Core(TM) i9-10980XE CPU @ 3.00GHz'}\n", - "== RAM ==: svmem(total=269924687872, available=243229765632, percent=9.9, used=24179867648, free=163979988992, active=37395456000, inactive=65874714624, buffers=36703051776, cached=45061779456, shared=162787328, slab=1551257600)\n", - "== GPU Info ==: {0: {'id': 0, 'uuid': 'GPU-361d808e-1136-2078-83bf-4290bf948f25', 'load': 0.43, 'memoryUtil': 0.0950927734375, 'memoryTotal': 24576.0, 'memoryUsed': 2337.0, 'memoryFree': 21889.0, 'driver': '525.147.05', 'name': 'NVIDIA GeForce RTX 3090', 'serial': '1324220011997', 'display_mode': 'Enabled', 'display_active': 'Enabled', 'temperature': 45.0}}\n", - "== Conda Environment ==: FR\n", - "== Python Version ==: 3.9.16\n", - "== GCC Version ==: 9.4.0\n", - "== PyTorch Version ==: 2.0.1+cu117\n", - "== CUDA Version ==: 11.7, CUDNN Version: 8500, Number of Devices: 1, Devices: ['device 0: Name=NVIDIA GeForce RTX 3090, Memory=25.403129856 GB'], \n", - "== face_rhythm Version ==: \n", - "== face_rhythm date installed ==: Sun Jan 28 16:16:39 2024\n", - "Initializing cv2.imshow\n", - "FR: Creating project directory: /tmp/tmpm167_hrz/project\n", - "FR: No existing config.yaml file found in /tmp/tmpm167_hrz/project. \n", - " Creating new config.yaml at /tmp/tmpm167_hrz/project/config.yaml\n", - "'Paths to videos:'\n", - "['/media/rich/Home_Linux_partition/github_repos/face-rhythm/tests/data_test/inputs/demo_mouse0322N20230430cam4_1.avi', '/media/rich/Home_Linux_partition/github_repos/face-rhythm/tests/data_test/inputs/demo_mouse0322N20230430cam4_2.avi']\n", - "printing this line helps the bufferedVideoReader object load properly. True\n", - "FR: No existing run_info.json file found in /tmp/tmpm167_hrz/project/run_info.json. \n", - " Creating new run_info.json at /tmp/tmpm167_hrz/project/run_info.json\n", - "FR WARNING: path_run_data file is expected to be named 'Dataset_videos.h5' if it is part of a project. Please make sure this is correct.\n", - "FR WARNING: path_run_data file is expected to be named 'ROIs.h5' if it is part of a project. Please make sure this is correct.\n", - "FR: 347 points will be tracked\n", - "FR: Collapsing mask ROI images into single mask\n", - "FR: Initializing mesh distances\n", - "FR: Setting initial frame_prev\n", - "FR: Iterating point tracking through videos\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\n", - "frame #: 100%|█████████████████████████████| 2000/2000 [00:06<00:00, 300.69it/s]\u001b[A\n", - "\n", - "video #: 100%|████████████████████████████████████| 1/1 [00:06<00:00, 6.80s/it]\u001b[A\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "FR: Tracking complete\n", - "FR: Placing points_tracked into dictionary self.points_tracked where keys are video indices\n", - "FR: Placing violations into dictionary self.violations where keys are video indices\n", - "FR: Loading file /tmp/tmpm167_hrz/project/run_info.json\n", - "FR: Adding 'PointTracker' field to run_info.json\n", - "FR: Saving run_info.json to /tmp/tmpm167_hrz/project/run_info.json\n", - "FR WARNING: path_run_data file is expected to be named 'PointTracker.h5' if it is part of a project. Please make sure this is correct.\n", - "FR: Deleting all attributes\n", - "device: 'cpu'\n", - "Preparing traces. Reshaping and subtracting offsets...\n", - "Computing spectrograms...\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\n", - "100%|██████████████████████████████████████████| 70/70 [00:00<00:00, 444.77it/s]\u001b[A\n", - "\n", - "Computing spectrograms: 100%|█████████████████████| 1/1 [00:00<00:00, 5.92it/s]\u001b[A" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "FR WARNING: path_run_data file is expected to be named 'VQT_Analyzer.h5' if it is part of a project. Please make sure this is correct.\n", - "FR: Deleting all attributes\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Preparing new names for the concatenated array dimensions. From ['xy', 'points', 'frequency', 'time'] to ['(xy points)', 'frequency', 'time'].\n", - "Rearranging the dict elements using method 'separate'.\n", - "device: 'cpu'\n", - "Using device: cpu\n", - "Using method: \n", - "Running the TCA model with method 'CP_NN_HALS'.\n", - "reconstruction error=0.48406586050987244\n", - "iteration 1, reconstruction error: 0.39907458424568176, decrease = 0.08499127626419067\n", - "iteration 2, reconstruction error: 0.38764214515686035, decrease = 0.011432439088821411\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/media/rich/OS/Users/Richard/Linux_stuff_on_OS/conda_envs/envs/FR/lib/python3.9/site-packages/tensorly/backend/pytorch_backend.py:39: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).\n", - " return torch.tensor(\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "iteration 3, reconstruction error: 0.382941335439682, decrease = 0.004700809717178345\n", - "iteration 4, reconstruction error: 0.3801945745944977, decrease = 0.002746760845184326\n", - "iteration 5, reconstruction error: 0.3784259557723999, decrease = 0.0017686188220977783\n", - "iteration 6, reconstruction error: 0.3771739900112152, decrease = 0.0012519657611846924\n", - "iteration 7, reconstruction error: 0.3762349486351013, decrease = 0.0009390413761138916\n", - "iteration 8, reconstruction error: 0.3755333423614502, decrease = 0.000701606273651123\n", - "iteration 9, reconstruction error: 0.3749985098838806, decrease = 0.0005348324775695801\n", - "iteration 10, reconstruction error: 0.37456560134887695, decrease = 0.0004329085350036621\n", - "iteration 11, reconstruction error: 0.3741915225982666, decrease = 0.00037407875061035156\n", - "iteration 12, reconstruction error: 0.37384340167045593, decrease = 0.00034812092781066895\n", - "iteration 13, reconstruction error: 0.37349408864974976, decrease = 0.00034931302070617676\n", - "iteration 14, reconstruction error: 0.37313202023506165, decrease = 0.00036206841468811035\n", - "iteration 15, reconstruction error: 0.37276968359947205, decrease = 0.0003623366355895996\n", - "iteration 16, reconstruction error: 0.3724372088909149, decrease = 0.0003324747085571289\n", - "iteration 17, reconstruction error: 0.3721542954444885, decrease = 0.0002829134464263916\n", - "iteration 18, reconstruction error: 0.371925950050354, decrease = 0.00022834539413452148\n", - "iteration 19, reconstruction error: 0.37174153327941895, decrease = 0.0001844167709350586\n", - "iteration 20, reconstruction error: 0.3715890944004059, decrease = 0.00015243887901306152\n", - "iteration 21, reconstruction error: 0.37146082520484924, decrease = 0.00012826919555664062\n", - "iteration 22, reconstruction error: 0.3713529407978058, decrease = 0.00010788440704345703\n", - "iteration 23, reconstruction error: 0.37126076221466064, decrease = 9.21785831451416e-05\n", - "iteration 24, reconstruction error: 0.3711814880371094, decrease = 7.927417755126953e-05\n", - "iteration 25, reconstruction error: 0.3711131811141968, decrease = 6.830692291259766e-05\n", - "iteration 26, reconstruction error: 0.3710549473762512, decrease = 5.823373794555664e-05\n", - "iteration 27, reconstruction error: 0.37100476026535034, decrease = 5.0187110900878906e-05\n", - "iteration 28, reconstruction error: 0.37096208333969116, decrease = 4.267692565917969e-05\n", - "iteration 29, reconstruction error: 0.3709257245063782, decrease = 3.635883331298828e-05\n", - "iteration 30, reconstruction error: 0.3708948791027069, decrease = 3.084540367126465e-05\n", - "iteration 31, reconstruction error: 0.37086746096611023, decrease = 2.7418136596679688e-05\n", - "iteration 32, reconstruction error: 0.37084367871284485, decrease = 2.378225326538086e-05\n", - "iteration 33, reconstruction error: 0.3708221912384033, decrease = 2.148747444152832e-05\n", - "iteration 34, reconstruction error: 0.37080270051956177, decrease = 1.9490718841552734e-05\n", - "iteration 35, reconstruction error: 0.3707849681377411, decrease = 1.773238182067871e-05\n", - "iteration 36, reconstruction error: 0.3707689344882965, decrease = 1.6033649444580078e-05\n", - "iteration 37, reconstruction error: 0.3707536458969116, decrease = 1.5288591384887695e-05\n", - "iteration 38, reconstruction error: 0.3707393705844879, decrease = 1.4275312423706055e-05\n", - "iteration 39, reconstruction error: 0.3707250952720642, decrease = 1.4275312423706055e-05\n", - "iteration 40, reconstruction error: 0.3707115054130554, decrease = 1.3589859008789062e-05\n", - "iteration 41, reconstruction error: 0.3706975281238556, decrease = 1.3977289199829102e-05\n", - "iteration 42, reconstruction error: 0.3706829249858856, decrease = 1.4603137969970703e-05\n", - "iteration 43, reconstruction error: 0.37066835165023804, decrease = 1.4573335647583008e-05\n", - "iteration 44, reconstruction error: 0.37065351009368896, decrease = 1.4841556549072266e-05\n", - "iteration 45, reconstruction error: 0.37063705921173096, decrease = 1.6450881958007812e-05\n", - "iteration 46, reconstruction error: 0.3706207275390625, decrease = 1.633167266845703e-05\n", - "iteration 47, reconstruction error: 0.37060314416885376, decrease = 1.7583370208740234e-05\n", - "iteration 48, reconstruction error: 0.3705853819847107, decrease = 1.7762184143066406e-05\n", - "iteration 49, reconstruction error: 0.3705664575099945, decrease = 1.8924474716186523e-05\n", - "iteration 50, reconstruction error: 0.3705465495586395, decrease = 1.990795135498047e-05\n", - "iteration 51, reconstruction error: 0.37052562832832336, decrease = 2.092123031616211e-05\n", - "iteration 52, reconstruction error: 0.3705042600631714, decrease = 2.136826515197754e-05\n", - "iteration 53, reconstruction error: 0.37048229575157166, decrease = 2.1964311599731445e-05\n", - "iteration 54, reconstruction error: 0.3704599142074585, decrease = 2.238154411315918e-05\n", - "iteration 55, reconstruction error: 0.3704373836517334, decrease = 2.2530555725097656e-05\n", - "iteration 56, reconstruction error: 0.3704148530960083, decrease = 2.2530555725097656e-05\n", - "iteration 57, reconstruction error: 0.3703923225402832, decrease = 2.2530555725097656e-05\n", - "iteration 58, reconstruction error: 0.37036967277526855, decrease = 2.2649765014648438e-05\n", - "iteration 59, reconstruction error: 0.3703468441963196, decrease = 2.282857894897461e-05\n", - "iteration 60, reconstruction error: 0.37032416462898254, decrease = 2.2679567337036133e-05\n", - "iteration 61, reconstruction error: 0.3703014850616455, decrease = 2.2679567337036133e-05\n", - "iteration 62, reconstruction error: 0.37027880549430847, decrease = 2.2679567337036133e-05\n", - "iteration 63, reconstruction error: 0.37025684118270874, decrease = 2.1964311599731445e-05\n", - "iteration 64, reconstruction error: 0.37023472785949707, decrease = 2.2113323211669922e-05\n", - "iteration 65, reconstruction error: 0.3702129125595093, decrease = 2.181529998779297e-05\n", - "iteration 66, reconstruction error: 0.37019094824790955, decrease = 2.1964311599731445e-05\n", - "iteration 67, reconstruction error: 0.37016943097114563, decrease = 2.1517276763916016e-05\n", - "iteration 68, reconstruction error: 0.3701478838920593, decrease = 2.154707908630371e-05\n", - "iteration 69, reconstruction error: 0.37012723088264465, decrease = 2.065300941467285e-05\n", - "iteration 70, reconstruction error: 0.3701065480709076, decrease = 2.0682811737060547e-05\n", - "iteration 71, reconstruction error: 0.37008604407310486, decrease = 2.0503997802734375e-05\n", - "iteration 72, reconstruction error: 0.37006595730781555, decrease = 2.008676528930664e-05\n", - "iteration 73, reconstruction error: 0.3700459897518158, decrease = 1.996755599975586e-05\n", - "iteration 74, reconstruction error: 0.37002649903297424, decrease = 1.9490718841552734e-05\n", - "iteration 75, reconstruction error: 0.37000739574432373, decrease = 1.9103288650512695e-05\n", - "iteration 76, reconstruction error: 0.36998844146728516, decrease = 1.895427703857422e-05\n", - "iteration 77, reconstruction error: 0.3699702322483063, decrease = 1.8209218978881836e-05\n", - "iteration 78, reconstruction error: 0.36995217204093933, decrease = 1.806020736694336e-05\n", - "iteration 79, reconstruction error: 0.36993408203125, decrease = 1.8090009689331055e-05\n", - "iteration 80, reconstruction error: 0.36991703510284424, decrease = 1.704692840576172e-05\n", - "iteration 81, reconstruction error: 0.3698996603488922, decrease = 1.7374753952026367e-05\n", - "iteration 82, reconstruction error: 0.36988288164138794, decrease = 1.677870750427246e-05\n", - "iteration 83, reconstruction error: 0.3698665499687195, decrease = 1.633167266845703e-05\n", - "iteration 84, reconstruction error: 0.36985018849372864, decrease = 1.6361474990844727e-05\n", - "iteration 85, reconstruction error: 0.36983445286750793, decrease = 1.5735626220703125e-05\n", - "iteration 86, reconstruction error: 0.36981794238090515, decrease = 1.6510486602783203e-05\n", - "iteration 87, reconstruction error: 0.36980220675468445, decrease = 1.5735626220703125e-05\n", - "iteration 88, reconstruction error: 0.3697858452796936, decrease = 1.6361474990844727e-05\n", - "iteration 89, reconstruction error: 0.36976951360702515, decrease = 1.633167266845703e-05\n", - "iteration 90, reconstruction error: 0.3697531521320343, decrease = 1.6361474990844727e-05\n", - "iteration 91, reconstruction error: 0.3697359263896942, decrease = 1.722574234008789e-05\n", - "iteration 92, reconstruction error: 0.36971843242645264, decrease = 1.749396324157715e-05\n", - "iteration 93, reconstruction error: 0.3696999251842499, decrease = 1.850724220275879e-05\n", - "iteration 94, reconstruction error: 0.36967962980270386, decrease = 2.0295381546020508e-05\n", - "iteration 95, reconstruction error: 0.3696560561656952, decrease = 2.3573637008666992e-05\n", - "iteration 96, reconstruction error: 0.36962783336639404, decrease = 2.822279930114746e-05\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "iteration 97, reconstruction error: 0.36959296464920044, decrease = 3.4868717193603516e-05\n", - "iteration 98, reconstruction error: 0.36955055594444275, decrease = 4.240870475769043e-05\n", - "iteration 99, reconstruction error: 0.3694975674152374, decrease = 5.2988529205322266e-05\n", - "iteration 100, reconstruction error: 0.36943256855010986, decrease = 6.499886512756348e-05\n", - "iteration 101, reconstruction error: 0.369354784488678, decrease = 7.778406143188477e-05\n", - "iteration 102, reconstruction error: 0.36926352977752686, decrease = 9.125471115112305e-05\n", - "iteration 103, reconstruction error: 0.36916226148605347, decrease = 0.00010126829147338867\n", - "iteration 104, reconstruction error: 0.3690563440322876, decrease = 0.00010591745376586914\n", - "iteration 105, reconstruction error: 0.36895427107810974, decrease = 0.00010207295417785645\n", - "iteration 106, reconstruction error: 0.3688608705997467, decrease = 9.340047836303711e-05\n", - "iteration 107, reconstruction error: 0.3687795102596283, decrease = 8.13603401184082e-05\n", - "iteration 108, reconstruction error: 0.3687107563018799, decrease = 6.875395774841309e-05\n", - "iteration 109, reconstruction error: 0.3686559200286865, decrease = 5.4836273193359375e-05\n", - "iteration 110, reconstruction error: 0.3686120808124542, decrease = 4.3839216232299805e-05\n", - "iteration 111, reconstruction error: 0.36857667565345764, decrease = 3.540515899658203e-05\n", - "iteration 112, reconstruction error: 0.36854809522628784, decrease = 2.8580427169799805e-05\n", - "iteration 113, reconstruction error: 0.3685248792171478, decrease = 2.321600914001465e-05\n", - "iteration 114, reconstruction error: 0.36850598454475403, decrease = 1.8894672393798828e-05\n", - "iteration 115, reconstruction error: 0.3684900403022766, decrease = 1.5944242477416992e-05\n", - "iteration 116, reconstruction error: 0.36847683787345886, decrease = 1.3202428817749023e-05\n", - "iteration 117, reconstruction error: 0.3684660792350769, decrease = 1.0758638381958008e-05\n", - "iteration 118, reconstruction error: 0.36845663189888, decrease = 9.447336196899414e-06\n", - "iteration 119, reconstruction error: 0.3684490919113159, decrease = 7.539987564086914e-06\n", - "iteration 120, reconstruction error: 0.3684418201446533, decrease = 7.271766662597656e-06\n", - "iteration 121, reconstruction error: 0.3684360384941101, decrease = 5.781650543212891e-06\n", - "iteration 122, reconstruction error: 0.3684307932853699, decrease = 5.245208740234375e-06\n", - "iteration 123, reconstruction error: 0.368427038192749, decrease = 3.7550926208496094e-06\n", - "iteration 124, reconstruction error: 0.3684232532978058, decrease = 3.7848949432373047e-06\n", - "iteration 125, reconstruction error: 0.36842048168182373, decrease = 2.771615982055664e-06\n", - "iteration 126, reconstruction error: 0.3684175908565521, decrease = 2.8908252716064453e-06\n", - "iteration 127, reconstruction error: 0.36841511726379395, decrease = 2.473592758178711e-06\n", - "iteration 128, reconstruction error: 0.36841320991516113, decrease = 1.9073486328125e-06\n", - "iteration 129, reconstruction error: 0.36841118335723877, decrease = 2.0265579223632812e-06\n", - "iteration 130, reconstruction error: 0.3684099018573761, decrease = 1.2814998626708984e-06\n", - "iteration 131, reconstruction error: 0.3684084415435791, decrease = 1.4603137969970703e-06\n", - "iteration 132, reconstruction error: 0.3684069812297821, decrease = 1.4603137969970703e-06\n", - "iteration 133, reconstruction error: 0.3684062361717224, decrease = 7.450580596923828e-07\n", - "iteration 134, reconstruction error: 0.36840495467185974, decrease = 1.2814998626708984e-06\n", - "iteration 135, reconstruction error: 0.3684040606021881, decrease = 8.940696716308594e-07\n", - "iteration 136, reconstruction error: 0.36840319633483887, decrease = 8.642673492431641e-07\n", - "iteration 137, reconstruction error: 0.36840277910232544, decrease = 4.172325134277344e-07\n", - "iteration 138, reconstruction error: 0.36840203404426575, decrease = 7.450580596923828e-07\n", - "iteration 139, reconstruction error: 0.36840176582336426, decrease = 2.682209014892578e-07\n", - "iteration 140, reconstruction error: 0.36840102076530457, decrease = 7.450580596923828e-07\n", - "iteration 141, reconstruction error: 0.36840030550956726, decrease = 7.152557373046875e-07\n", - "iteration 142, reconstruction error: 0.3684001564979553, decrease = 1.4901161193847656e-07\n", - "iteration 143, reconstruction error: 0.368399441242218, decrease = 7.152557373046875e-07\n", - "iteration 144, reconstruction error: 0.36839914321899414, decrease = 2.980232238769531e-07\n", - "iteration 145, reconstruction error: 0.36839884519577026, decrease = 2.980232238769531e-07\n", - "iteration 146, reconstruction error: 0.3683985769748688, decrease = 2.682209014892578e-07\n", - "iteration 147, reconstruction error: 0.3683982789516449, decrease = 2.980232238769531e-07\n", - "iteration 148, reconstruction error: 0.3683982789516449, decrease = 0.0\n", - "PARAFAC converged after 148 iterations\n", - "FR WARNING: path_run_data file is expected to be named 'TCA.h5' if it is part of a project. Please make sure this is correct.\n", - "RUN COMPLETE\n" - ] - } - ], - "source": [ - "import tempfile\n", - "import warnings\n", - "\n", - "dir_data_test = r'/media/rich/Home_Linux_partition/github_repos/face-rhythm/tests/data_test'\n", - "dir_temp = str(tempfile.TemporaryDirectory().name)\n", - "dir_project = str(Path(dir_temp).resolve() / 'project')\n", - "dir_inputs = str(Path(dir_data_test).resolve() / 'inputs')\n", - "dir_outputs = str(Path(dir_temp).resolve() / 'outputs')\n", - "\n", - "defaults = fr.util.get_default_parameters(\n", - " directory_project=dir_project,\n", - " directory_videos=dir_inputs,\n", - " filename_videos_strMatch=r'demo.*',\n", - " path_ROIs=str(Path(dir_inputs) / 'ROIs.h5'),\n", - ")\n", - "\n", - "SEED = 0\n", - "params_partial = {\n", - " \"steps\": [\n", - " \"load_videos\",\n", - " \"ROIs\",\n", - " \"point_tracking\",\n", - " \"VQT\",\n", - " \"TCA\",\n", - " ],\n", - " \"project\": {\n", - " \"overwrite_config\": True,\n", - " \"update_project_paths\": True,\n", - " \"initialize_visualization\": False,\n", - " \"use_GPU\": False,\n", - " \"random_seed\": SEED,\n", - " \"verbose\": 2,\n", - " },\n", - " \"figure_saver\": {\n", - " \"formats_save\": [\n", - " \"png\"\n", - " ],\n", - " \"kwargs_savefig\": {\n", - " \"bbox_inches\": \"tight\",\n", - " \"pad_inches\": 0.1,\n", - " \"transparent\": True,\n", - " \"dpi\": 300,\n", - " },\n", - " \"overwrite\": True,\n", - " \"verbose\": 2\n", - " },\n", - " \"paths_videos\": {\n", - " \"depth\": 0,\n", - " },\n", - " \"BufferedVideoReader\": {\n", - " \"buffer_size\": 1000,\n", - " \"prefetch\": 1,\n", - " \"posthold\": 1,\n", - " \"method_getitem\": \"by_video\",\n", - " \"verbose\": 1,\n", - " },\n", - " \"Dataset_videos\": {\n", - " \"contiguous\": False,\n", - " \"frame_rate_clamp\": None,\n", - " \"verbose\": 2,\n", - " },\n", - " \"ROIs\": {\n", - " \"initialize\":{\n", - " \"select_mode\": \"file\",\n", - " \"verbose\": 2,\n", - " },\n", - " \"make_rois\": {\n", - " \"rois_points_idx\": [\n", - " 0,\n", - " ],\n", - " \"point_spacing\": 9,\n", - " },\n", - " },\n", - " \"PointTracker\": {\n", - " \"contiguous\": True,\n", - " \"params_optical_flow\": {\n", - " \"method\": \"lucas_kanade\",\n", - " \"mesh_rigidity\": 0.025,\n", - " \"mesh_n_neighbors\": 8,\n", - " \"relaxation\": 0.0015,\n", - " \"kwargs_method\": {\n", - " \"winSize\": [\n", - " 20,\n", - " 20,\n", - " ],\n", - " \"maxLevel\": 2,\n", - " \"criteria\": [\n", - " 3,\n", - " 2,\n", - " 0.03,\n", - " ],\n", - " },\n", - " },\n", - " \"visualize_video\": False,\n", - " \"params_visualization\": {\n", - " \"alpha\": 0.2,\n", - " \"point_sizes\": 2,\n", - " },\n", - " \"params_outlier_handling\": {\n", - " \"threshold_displacement\": 150,\n", - " \"framesHalted_before\": 10,\n", - " \"framesHalted_after\": 10,\n", - " },\n", - " \"verbose\": 2,\n", - " },\n", - " \"VQT_Analyzer\": {\n", - " \"params_VQT\": {\n", - " \"Q_lowF\": 4,\n", - " \"Q_highF\": 10,\n", - " \"F_min\": 1.0,\n", - " \"F_max\": 60,\n", - " \"n_freq_bins\": 36,\n", - " \"win_size\": 501,\n", - " \"symmetry\": 'center',\n", - " \"taper_asymmetric\": True,\n", - " \"plot_pref\": False,\n", - " \"downsample_factor\": 20,\n", - " \"padding\": \"valid\",\n", - " \"batch_size\": 10,\n", - " \"return_complex\": False,\n", - " \"progressBar\": True,\n", - " },\n", - " \"normalization_factor\": 0.95,\n", - " \"spectrogram_exponent\": 1.0,\n", - " \"one_over_f_exponent\": 0.5,\n", - " \"verbose\": 2\n", - " },\n", - " \"TCA\": {\n", - " \"verbose\": 2,\n", - " \"rearrange_data\": {\n", - " \"names_dims_array\": [\n", - " \"xy\",\n", - " \"points\",\n", - " \"frequency\",\n", - " \"time\",\n", - " ],\n", - " \"names_dims_concat_array\": [\n", - " [\n", - " \"xy\",\n", - " \"points\",\n", - " ]\n", - " ],\n", - " \"concat_complexDim\": False,\n", - " \"name_dim_concat_complexDim\": \"time\",\n", - " \"name_dim_dictElements\": \"session\",\n", - " \"method_handling_dictElements\": \"separate\",\n", - " \"name_dim_concat_dictElements\": \"time\",\n", - " \"idx_windows\": None,\n", - " \"name_dim_array_window\": \"time\",\n", - " },\n", - " \"fit\": {\n", - " \"method\": \"CP_NN_HALS\",\n", - " \"params_method\": {\n", - " \"rank\": 10,\n", - " \"n_iter_max\": 200,\n", - " \"init\": \"random\",\n", - " \"svd\": \"truncated_svd\",\n", - " \"tol\": 1e-09,\n", - " \"random_state\": SEED,\n", - " \"verbose\": True,\n", - " },\n", - " \"verbose\": 2,\n", - " },\n", - " \"rearrange_factors\": {\n", - " \"undo_concat_complexDim\": False,\n", - " \"undo_concat_dictElements\": False,\n", - " },\n", - " },\n", - " }\n", - "params = fr.helpers.prepare_params(\n", - " params=params_partial, \n", - " defaults=defaults,\n", - " error_on_missing_keys=False,\n", - ")\n", - "results = fr.pipelines.pipeline_basic(params)" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'/tmp/tmpfjv68m_v/project/config.yaml'" - ] - }, - "execution_count": 11, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "path_test" - ] - }, - { - "cell_type": "code", - "execution_count": 26, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Checking run_data equality\n", - "Loading run_data from /tmp/tmpm167_hrz/project/analysis_files/Dataset_videos.h5\n", - "run_data loaded. Checking equality\n", - "run_data equality check finished successfully\n", - "Loading run_data from /tmp/tmpm167_hrz/project/analysis_files/PointTracker.h5\n", - "run_data loaded. Checking equality\n", - "run_data equality check finished successfully\n", - "Loading run_data from /tmp/tmpm167_hrz/project/analysis_files/ROIs.h5\n", - "run_data loaded. Checking equality\n", - "run_data equality check finished successfully\n", - "Loading run_data from /tmp/tmpm167_hrz/project/analysis_files/TCA.h5\n", - "run_data loaded. Checking equality\n", - "run_data equality check finished successfully\n", - "Loading run_data from /tmp/tmpm167_hrz/project/analysis_files/VQT_Analyzer.h5\n", - "run_data loaded. Checking equality\n", - "run_data equality check finished successfully\n", - "Loading run_data from /tmp/tmpm167_hrz/project/config.yaml\n", - "run_data loaded. Checking equality\n", - "Equivalence check passed. Path: ['', 'Dataset_videos', 'frame_rate_clamp'].\n", - "run_data equality check finished successfully\n", - "Loading run_data from /tmp/tmpm167_hrz/project/run_info.json\n", - "run_data loaded. Checking equality\n", - "run_data equality check finished successfully\n" - ] - } - ], - "source": [ - "dir_outputs = r'/media/rich/Home_Linux_partition/github_repos/face-rhythm/tests/data_test/outputs'\n", - "\n", - "## Check run_data equality\n", - "print(f\"Checking run_data equality\")\n", - "paths_rundata_true = fr.helpers.find_paths(\n", - " dir_outer=dir_outputs,\n", - " reMatch=r'.*',\n", - " depth=5,\n", - ")\n", - "paths_rundata_relative = [str(Path(p).relative_to(dir_outputs)) for p in paths_rundata_true]\n", - "paths_rundata_test = [str(Path(dir_project) / Path(p)) for p in paths_rundata_relative]\n", - "\n", - "def load_file(path):\n", - " if Path(path).suffix == '.pkl':\n", - " return fr.helpers.pickle_load(path)\n", - " elif Path(path).suffix == '.json':\n", - " return fr.helpers.json_load(path)\n", - " elif Path(path).suffix == '.yaml':\n", - " return fr.helpers.yaml_load(path)\n", - " elif Path(path).suffix == '.h5':\n", - " return fr.h5_handling.simple_load(path, return_dict=True)\n", - " else:\n", - " raise ValueError(f\"Unknown file type: {Path(path).suffix}\")\n", - "\n", - "checker = fr.helpers.Equivalence_checker(\n", - " kwargs_allclose={'rtol': 1e-5, 'equal_nan': True},\n", - " assert_mode=False,\n", - " verbose=1,\n", - " )\n", - "for path_test, path_true in zip(paths_rundata_test, paths_rundata_true):\n", - " print(f\"Loading run_data from {path_test}\")\n", - " data_test, data_true = load_file(path_test), load_file(path_true)\n", - " print(f\"run_data loaded. Checking equality\")\n", - " checks = checker(test=data_test, true=data_true)\n", - " fails = [key for key, val in fr.helpers.flatten_dict(checks).items() if val[0]==False]\n", - " if len(fails) > 0:\n", - " warnings.warn(f\"run_data equality check failed for keys: {fails}\")\n", - " else:\n", - " print(f\"run_data equality check finished successfully\")" - ] - }, - { - "cell_type": "code", - "execution_count": 27, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'fcd17f02d3817da53a9f538e8119fc15'" - ] - }, - "execution_count": 27, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "fr.helpers.hash_file(path='/media/rich/bigSSD/downloads_tmp/data_test.zip')" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": {}, - "outputs": [], - "source": [ - "ps = fr.helpers.find_paths(dir_outer=r'/media/rich/Home_Linux_partition/github_repos/face-rhythm/test_data/outputs', reMatch='.*', depth=5)" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "from pathlib import Path" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "l = len(Path('/media/rich/Home_Linux_partition/github_repos/face-rhythm/test_data/outputs').parts)" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "('analysis_files', 'Dataset_videos.h5')" - ] - }, - "execution_count": 18, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "Path(ps[0]).parts[l:]" - ] - }, - { - "cell_type": "code", - "execution_count": 27, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "PosixPath('/rich/Home_Linux_partition/github_repos/face-rhythm/test_data/outputs/analysis_files/Dataset_videos.h5')" - ] - }, - "execution_count": 27, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "Path('/') / str(Path(ps[0]).relative_to('/media'))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": 77, - "metadata": {}, - "outputs": [], - "source": [ - "fr.helpers.json_save(obj=params, path_save='/home/rich/Desktop/params_pipeline_basic.json')" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [], - "source": [ - "params = fr.helpers.json_load(r'/media/rich/Home_Linux_partition/github_repos/face-rhythm/scripts/params_pipeline_basic.json')" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [], - "source": [ - "params = fr.util.get_default_parameters(\n", - " directory_project=r'/media/rich/bigSSD/test2',\n", - " directory_videos=r'/media/rich/Home_Linux_partition/github_repos/face-rhythm/test_data/',\n", - " filename_videos_strMatch=r'demo.*',\n", - " path_ROIs=r'/media/rich/Home_Linux_partition/github_repos/face-rhythm/test_data/ROIs.h5',\n", - ")" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "params['steps'] = ['TCA']\n", - "params['TCA']['fit']['params_method']['n_iter_max'] = 10" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "== Operating System ==: uname_result(system='Linux', node='rich-L-CLASS', release='5.15.0-91-generic', version='#101~20.04.1-Ubuntu SMP Thu Nov 16 14:22:28 UTC 2023', machine='x86_64')\n", - "== CPU Info ==: {'n_cores': 36, 'brand': 'Intel(R) Core(TM) i9-10980XE CPU @ 3.00GHz'}\n", - "== RAM ==: svmem(total=269924687872, available=243472117760, percent=9.8, used=23920050176, free=164991709184, active=37304713216, inactive=65000607744, buffers=36272111616, cached=44740816896, shared=180273152, slab=1514024960)\n", - "== GPU Info ==: {0: {'id': 0, 'uuid': 'GPU-361d808e-1136-2078-83bf-4290bf948f25', 'load': 0.31, 'memoryUtil': 0.09464518229166667, 'memoryTotal': 24576.0, 'memoryUsed': 2326.0, 'memoryFree': 21899.0, 'driver': '525.147.05', 'name': 'NVIDIA GeForce RTX 3090', 'serial': '1324220011997', 'display_mode': 'Enabled', 'display_active': 'Enabled', 'temperature': 36.0}}\n", - "== Conda Environment ==: FR\n", - "== Python Version ==: 3.9.16\n", - "== GCC Version ==: 9.4.0\n", - "== PyTorch Version ==: 2.0.1+cu117\n", - "== CUDA Version ==: 11.7, CUDNN Version: 8500, Number of Devices: 1, Devices: ['device 0: Name=NVIDIA GeForce RTX 3090, Memory=25.403129856 GB'], \n", - "== face_rhythm Version ==: \n", - "== face_rhythm date installed ==: Tue Jan 23 15:39:53 2024\n", - "Initializing cv2.imshow\n", - "FR: Found config.yaml file at /media/rich/bigSSD/test2/config.yaml\n", - "FR: Overwriting config.yaml file at /media/rich/bigSSD/test2/config.yaml\n", - "Preparing new names for the concatenated array dimensions. From ['xy', 'points', 'frequency', 'time'] to ['(xy points)', 'frequency', 'time'].\n", - "Rearranging the dict elements using method 'separate'.\n", - "devices available: [_CudaDeviceProperties(name='NVIDIA GeForce RTX 3090', major=8, minor=6, total_memory=24226MB, multi_processor_count=82)]\n", - "Using device: 'cuda:0': _CudaDeviceProperties(name='NVIDIA GeForce RTX 3090', major=8, minor=6, total_memory=24226MB, multi_processor_count=82)\n", - "Using device: cuda:0\n", - "Using method: \n", - "Running the TCA model with method 'CP_NN_HALS'.\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/media/rich/OS/Users/Richard/Linux_stuff_on_OS/conda_envs/envs/FR/lib/python3.9/site-packages/tensorly/backend/pytorch_backend.py:39: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).\n", - " return torch.tensor(\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "reconstruction error=0.41515639424324036\n", - "iteration 1, reconstruction error: 0.36994197964668274, decrease = 0.04521441459655762\n", - "iteration 2, reconstruction error: 0.3551662862300873, decrease = 0.014775693416595459\n", - "iteration 3, reconstruction error: 0.3482605516910553, decrease = 0.006905734539031982\n", - "iteration 4, reconstruction error: 0.3442731201648712, decrease = 0.003987431526184082\n", - "iteration 5, reconstruction error: 0.3416520059108734, decrease = 0.0026211142539978027\n", - "iteration 6, reconstruction error: 0.33989977836608887, decrease = 0.001752227544784546\n", - "iteration 7, reconstruction error: 0.33862870931625366, decrease = 0.001271069049835205\n", - "iteration 8, reconstruction error: 0.33756449818611145, decrease = 0.001064211130142212\n", - "iteration 9, reconstruction error: 0.33660200238227844, decrease = 0.0009624958038330078\n", - "reconstruction error=0.36632728576660156\n", - "iteration 1, reconstruction error: 0.29496103525161743, decrease = 0.07136625051498413\n", - "iteration 2, reconstruction error: 0.28470271825790405, decrease = 0.010258316993713379\n", - "iteration 3, reconstruction error: 0.28162652254104614, decrease = 0.00307619571685791\n", - "iteration 4, reconstruction error: 0.2801879048347473, decrease = 0.0014386177062988281\n", - "iteration 5, reconstruction error: 0.2793511152267456, decrease = 0.000836789608001709\n", - "iteration 6, reconstruction error: 0.2788073420524597, decrease = 0.0005437731742858887\n", - "iteration 7, reconstruction error: 0.2784256935119629, decrease = 0.00038164854049682617\n", - "iteration 8, reconstruction error: 0.27815163135528564, decrease = 0.0002740621566772461\n", - "iteration 9, reconstruction error: 0.2779473066329956, decrease = 0.00020432472229003906\n", - "FR Warning: Overwriting field. 'TCA' is already a field in the run_info.json dictionary.\n", - "FR WARNING: path_run_data file is expected to be named 'TCA.h5' if it is part of a project. Please make sure this is correct.\n", - "FR Warning: Overwriting file. File: /media/rich/bigSSD/test2/analysis_files/TCA.h5 already exists.\n", - "RUN COMPLETE\n" - ] - } - ], - "source": [ - "fr.pipelines.pipeline_basic(params)" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "['/media/rich/bigSSD/test2/analysis_files/Dataset_videos.h5',\n", - " '/media/rich/bigSSD/test2/analysis_files/PointTracker.h5',\n", - " '/media/rich/bigSSD/test2/analysis_files/ROIs.h5',\n", - " '/media/rich/bigSSD/test2/analysis_files/TCA.h5',\n", - " '/media/rich/bigSSD/test2/analysis_files/VQT_Analyzer.h5']" - ] - }, - "execution_count": 2, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "paths_data = fr.helpers.find_paths(\n", - " dir_outer=r'/media/rich/bigSSD/test2/analysis_files/',\n", - " reMatch=r'.*h5',\n", - ")\n", - "paths_data" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [], - "source": [ - "d = fr.h5_handling.simple_load(paths_data[3], return_dict=False)" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [], - "source": [ - "d = fr.h5_handling.simple_load(paths_data[3], return_dict=True)" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "array([b'(xy points)', b'frequency', b'time'], dtype=object)" - ] - }, - "execution_count": 10, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "d['names_dims_array']" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "array(b'session', dtype='|S7')" - ] - }, - "execution_count": 11, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "d['name_dim_dictElements']" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Equivalence check passed. Path: ['', 'name_dim_dictElements'].\n", - "Equivalence check passed. Path: ['', 'name_dim_dictElements']\n", - "Equivalence check passed. Path: ['', 'name_dim_dictElements_preDecomp'].\n", - "Equivalence check passed. Path: ['', 'name_dim_dictElements_preDecomp']\n" - ] - } - ], - "source": [ - "checker = fr.helpers.Equivalence_checker(assert_mode=False, verbose=2)\n", - "out = checker(test=d, true=d)" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Equivalence check passed. Path: ['', 'example_image']\n", - "Equivalence check passed. Path: ['', 'mask']\n", - "Equivalence check passed. Path: ['', 'mesh_d0']\n", - "Equivalence check passed. Path: ['', 'neighbors']\n", - "Equivalence check passed. Path: ['', 'point_positions']\n", - "Equivalence check passed. Path: ['', 'points_tracked', '0']\n", - "Equivalence check passed. Path: ['', 'points_tracked', '1']\n", - "Equivalence check passed. Path: ['', 'violations', '0', 'col']\n", - "Equivalence check passed. Path: ['', 'violations', '0', 'data']\n", - "Equivalence check passed. Path: ['', 'violations', '0', 'row']\n", - "Equivalence check passed. Path: ['', 'violations', '0', 'shape']\n", - "Equivalence check passed. Path: ['', 'violations', '1', 'col']\n", - "Equivalence check passed. Path: ['', 'violations', '1', 'data']\n", - "Equivalence check passed. Path: ['', 'violations', '1', 'row']\n", - "Equivalence check passed. Path: ['', 'violations', '1', 'shape']\n", - "Equivalence check passed. Path: ['', 'exampleImage']\n", - "Equivalence check passed. Path: ['', 'mask_images', 'mask_0']\n", - "Equivalence check passed. Path: ['', 'mask_images', 'mask_1']\n", - "Equivalence check passed. Path: ['', 'point_positions']\n", - "Equivalence check passed. Path: ['', 'roi_points', 'ROI_0']\n", - "Equivalence check passed. Path: ['', 'roi_points', 'ROI_1']\n", - "Equivalence check passed. Path: ['', 'factors', '0', '(xy points)']\n", - "Equivalence check passed. Path: ['', 'factors', '0', 'frequency']\n", - "Equivalence check passed. Path: ['', 'factors', '0', 'time']\n", - "Equivalence check passed. Path: ['', 'factors', '1', '(xy points)']\n", - "Equivalence check passed. Path: ['', 'factors', '1', 'frequency']\n", - "Equivalence check passed. Path: ['', 'factors', '1', 'time']\n", - "Equivalence check passed. Path: ['', 'factors_rearranged', '0', '(xy points)']\n", - "Equivalence check passed. Path: ['', 'factors_rearranged', '0', 'frequency']\n", - "Equivalence check passed. Path: ['', 'factors_rearranged', '0', 'time']\n", - "Equivalence check passed. Path: ['', 'factors_rearranged', '1', '(xy points)']\n", - "Equivalence check passed. Path: ['', 'factors_rearranged', '1', 'frequency']\n", - "Equivalence check passed. Path: ['', 'factors_rearranged', '1', 'time']\n", - "Equivalence check passed. Path: ['', 'name_dim_dictElements'].\n", - "Equivalence check passed. Path: ['', 'name_dim_dictElements']\n", - "Equivalence check passed. Path: ['', 'name_dim_dictElements_preDecomp'].\n", - "Equivalence check passed. Path: ['', 'name_dim_dictElements_preDecomp']\n", - "Equivalence check passed. Path: ['', 'names_dims_array'].\n", - "Equivalence check passed. Path: ['', 'names_dims_array']\n", - "Equivalence check passed. Path: ['', 'names_dims_array_preDecomp'].\n", - "Equivalence check passed. Path: ['', 'names_dims_array_preDecomp']\n", - "Equivalence check passed. Path: ['', 'VQT', 'filters']\n", - "Equivalence check passed. Path: ['', 'VQT', 'wins']\n", - "Equivalence check passed. Path: ['', 'frequencies']\n", - "Equivalence check passed. Path: ['', 'point_positions']\n", - "Equivalence check passed. Path: ['', 'spectrograms', '0']\n", - "Equivalence check passed. Path: ['', 'spectrograms', '1']\n", - "Equivalence check passed. Path: ['', 'x_axis', '0']\n", - "Equivalence check passed. Path: ['', 'x_axis', '1']\n" - ] - } - ], - "source": [ - "checker = fr.helpers.Equivalence_checker(assert_mode=False, verbose=2)\n", - "for p in paths_data:\n", - " d = fr.h5_handling.simple_load(p, return_dict=True)\n", - " out = checker(test=d, true=d)\n", - "# print(out)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, { "cell_type": "code", "execution_count": 1,