From a6404c4aa0b7d0ea3e3a5630965c47bd6a2df842 Mon Sep 17 00:00:00 2001 From: JianHe0628 <jl02958@surrey.ac.uk> Date: Thu, 3 Apr 2025 10:55:09 +0100 Subject: [PATCH] adding submit file --- Inject_and_Visualize.py | 3 -- README.md | 4 +- submit_file.sh | 81 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+), 4 deletions(-) create mode 100644 submit_file.sh diff --git a/Inject_and_Visualize.py b/Inject_and_Visualize.py index 404b0c4..34bcdc8 100644 --- a/Inject_and_Visualize.py +++ b/Inject_and_Visualize.py @@ -18,10 +18,7 @@ from hamer.utils.extraction_utils import decompress_from_lzma, get_video_fps, pr LIGHT_BLUE=(0.65098039, 0.74117647, 0.85882353) from vitpose_model import ViTPoseModel -from typing import Dict, Optional -import subprocess import gc -import lmdb, pickle, lzma def main(args, model, device): initial_start_time = time.time() diff --git a/README.md b/README.md index c0dc12a..754f35c 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,10 @@ This Repository is a modified version of the original HaMeR implementation, and The following guide is written based on the modifications made to HaMeR. To refer to the original guide, follow this [link](https://github.com/geopavlakos/hamer). ### Environment +*Note:* There might be some issues with the variables of `DEFAULT_CHECKPOINT` and `CACHE_DIR_HAMER`, as they are currently checkpoints stored in my user space. + #### Container Registry -HaMeR can be problematic to set up. The easy way out is to run it on the Surrey Cluster. To do this, you can simply go to the [container registry](https://container-registry.surrey.ac.uk/harbor/projects/2/repositories) and look in the `shared container` section where all the containers are stored. The container needed for this repository is named `hamer`. +HaMeR can be problematic to set up. The easy way out is to run it on the Surrey Cluster. To do this, you can simply go to the [container registry](https://container-registry.surrey.ac.uk/harbor/projects/2/repositories) and look in the `shared container` section where all the containers are stored. The container needed for this repository is named `hamer`. An example `submit_file.sh` is provided for reference. #### Local The same exact Dockerfile in the registry has been uploaded to the docker folder of this repo. Note that this Dockerfile has been modified from the original, but it seems to work well. diff --git a/submit_file.sh b/submit_file.sh new file mode 100644 index 0000000..7e4a37a --- /dev/null +++ b/submit_file.sh @@ -0,0 +1,81 @@ +JobBatchName = "Run_HaMeR" +# ---------------------------------------------------------------------------------------------------------------------- +executable=/bin/bash +# ---------------------------------------------------------------------------------------------------------------------- +universe=docker +docker_image=container-registry.surrey.ac.uk/shared-containers/hamer:SHA_cb1639dd +should_transfer_files=YES +environment="mount=/vol/research/LF_datasets/mixedmode/BOBSL/bobsl-v1-release" +# ---------------------------------------------------------------------------------------------------------------------- +log = /mnt/fast/nobackup/scratch4weeks/$(cluster).$(process).log +output = /mnt/fast/nobackup/scratch4weeks/$(cluster).$(process).out +error = /mnt/fast/nobackup/scratch4weeks/$(cluster).$(process).err +# ---------------------------------------------------------------------------------------------------------------------- +Requirements = (machine != "elenwe.eps.surrey.ac.uk") && ( HasStornext == true ) +# ---------------------------------------------------------------------------------------------------------------------- +request_CPUs = 1 +request_GPUs = 1 +# ++GPUMem = 10000 +request_memory = 20G +# ---------------------------------------------------------------------------------------------------------------------- ++CanCheckpoint = False ++JobRunTime = 1 +# ---------------------------------------------------------------------------------------------------------------------- +on_exit_hold = ExitCode != 0 +# ---------------------------------------------------------------------------------------------------------------------- +launcher = $ENV(PWD)/launch.sh +# ---------------------------------------------------------------------------------------------------------------------- +repository = https://gitlab.surrey.ac.uk/JianHe/hamer.git +repo_name = Hamer_Repo +# ---------------------------------------------------------------------------------------------------------------------- +branch = HEAD +# ---------------------------------------------------------------------------------------------------------------------- +python = python3 +# ---------------------------------------------------------------------------------------------------------------------- +arguments = $(launcher) $(repo_name) $(repository) $(branch) $(python) $(args) +# ---------------------------------------------------------------------------------------------------------------------- +args = $(script) +# ---------------------------------------------------------------------------------------------------------------------- +script = Extract_HaMeR_Single.py --vid $(Input_Path) --out_folder $(Output_Path) + +# ---------------------------------------------------------------------------------------------------------------------- + +Output_Path = /mnt/fast/nobackup/scratch4weeks/jl02958/BOBSL_HaMeR_Extras/ + +Input_Path = /vol/research/LF_datasets/mixedmode/BOBSL/bobsl-v1-release/MASKED_VIDEOS/6247230507285724422.masked.mp4 +queue 1 +Input_Path = /vol/research/LF_datasets/mixedmode/BOBSL/bobsl-v1-release/MASKED_VIDEOS/5408597340544357103.masked.mp4 +queue 1 +Input_Path = /vol/research/LF_datasets/mixedmode/BOBSL/bobsl-v1-release/MASKED_VIDEOS/6784596629031752949.masked.mp4 +queue 1 +Input_Path = /vol/research/LF_datasets/mixedmode/BOBSL/bobsl-v1-release/MASKED_VIDEOS/6196771943002142813.masked.mp4 +queue 1 +Input_Path = /vol/research/LF_datasets/mixedmode/BOBSL/bobsl-v1-release/MASKED_VIDEOS/5620842599234468139.masked.mp4 +queue 1 +Input_Path = /vol/research/LF_datasets/mixedmode/BOBSL/bobsl-v1-release/MASKED_VIDEOS/5582619536953498553.masked.mp4 +queue 1 +Input_Path = /vol/research/LF_datasets/mixedmode/BOBSL/bobsl-v1-release/MASKED_VIDEOS/5213762162115483713.masked.mp4 +queue 1 +Input_Path = /vol/research/LF_datasets/mixedmode/BOBSL/bobsl-v1-release/MASKED_VIDEOS/5296891683626303285.masked.mp4 +queue 1 +Input_Path = /vol/research/LF_datasets/mixedmode/BOBSL/bobsl-v1-release/MASKED_VIDEOS/6270974804484919888.masked.mp4 +queue 1 +Input_Path = /vol/research/LF_datasets/mixedmode/BOBSL/bobsl-v1-release/MASKED_VIDEOS/6335904402078950920.masked.mp4 +queue 1 +Input_Path = /vol/research/LF_datasets/mixedmode/BOBSL/bobsl-v1-release/MASKED_VIDEOS/6120093891887671821.masked.mp4 +queue 1 +Input_Path = /vol/research/LF_datasets/mixedmode/BOBSL/bobsl-v1-release/MASKED_VIDEOS/6075933467625912531.masked.mp4 +queue 1 +Input_Path = /vol/research/LF_datasets/mixedmode/BOBSL/bobsl-v1-release/MASKED_VIDEOS/5595214528548999641.masked.mp4 +queue 1 +Input_Path = /vol/research/LF_datasets/mixedmode/BOBSL/bobsl-v1-release/MASKED_VIDEOS/5987513405399935912.masked.mp4 +queue 1 +Input_Path = /vol/research/LF_datasets/mixedmode/BOBSL/bobsl-v1-release/MASKED_VIDEOS/5352897198172711984.masked.mp4 +queue 1 +Input_Path = /vol/research/LF_datasets/mixedmode/BOBSL/bobsl-v1-release/MASKED_VIDEOS/6243537694404620461.masked.mp4 +queue 1 +Input_Path = /vol/research/LF_datasets/mixedmode/BOBSL/bobsl-v1-release/MASKED_VIDEOS/5212610251886695418.masked.mp4 +queue 1 +Input_Path = /vol/research/LF_datasets/mixedmode/BOBSL/bobsl-v1-release/MASKED_VIDEOS/5603759795481130757.masked.mp4 +queue 1 \ No newline at end of file -- GitLab