Is there an existing issue for this?
Bug description
DLC seems to drop an underscore in the file path while creating symlinks.
See last line in the log output: /gpfs/projects/acad/behavior/videos/2023-11-13_conspecific_odor_videos/2023-09-15_test videos/cluster_test_vid.mp4 instead of /2023-09-15_test_videos/.
But it was clearly correct before Created the symlink of /gpfs/projects/acad/behavior/videos/2023-11-13_conspecific_odor_videos/2023-09-15_test_videos/temp/cluster_test_vid.mp4
Operating System
Operating System: Red Hat Enterprise Linux 8.6 (Ootpa)
CPE OS Name: cpe:/o:redhat:enterprise_linux:8::baseos
Kernel: Linux 4.18.0-372.26.1.el8_6.x86_64
DeepLabCut version
2.3.8 (pulled from GitHub, so including fixes up to #2475, but also occurs in a standard 2.3.8 install)
DeepLabCut mode
single animal
Device type
gpu
Steps To Reproduce
sbatch --output=res_DLC_extract_testvid.txt DLC_batch_add_and_extract.sh /gpfs/projects/acad/behavior/videos/2023-11-13_conspecific_odor_videos/2023-09-15_test_videos/temp
- Content of
DLC_batch_add_and_extract.sh
#!/bin/bash
#
#SBATCH --job-name=DLC_extract_test
#SBATCH --output=res_DLC_add_extract.txt
#SBATCH --account=behavior
#
#SBATCH --partition=debug-gpu
#SBATCH --time=1:00:00
#SBATCH --gpus=1
#SBATCH --gres=gpu:1
#
#
module load devel/python/Anaconda3-2022.05
conda activate DLC_dev
module load CUDA/11.7.0 TensorFlow/2.11.0-foss-2022a-CUDA-11.7.0
cd /gpfs/projects/acad/behavior/softs/DLC_scripts
python DLC_add_videos.py $1
python DLC_extract_frames.py $1
- Content of
DLC_add_videos.py
import deeplabcut
import os,sys,glob
"""to execute the script, do: python extract.py path_to_folder_with_videos"""
config_file_path = '/gpfs/projects/acad/behavior/DLC_model/primary_DeepLabCut_model/LassanceLab-main-model-2023-09-14/config.yaml'
my_path = sys.argv[1]
video_file_path = glob.glob(os.path.join(my_path, "*.mp4"))
VideoType = 'mp4'
deeplabcut.add_new_videos(
config_file_path,
video_file_path,
copy_videos=False,
coords=None,
extract_frames=False,
)
- Content of
DLC_extract_frames.py
import deeplabcut
import os,sys,glob
"""to execute the script, do: python extract.py path_to_folder_with_videos"""
config_file_path = '/gpfs/projects/acad/behavior/DLC_model/primary_DeepLabCut_model/LassanceLab-main-model-2023-09-14/config.yaml'
my_path = sys.argv[1]
#video_file_path = ["/gpfs/projects/acad/behavior/videos/2023-11-13_conspecific_odor_videos/cohort6/2023-11-06_ID064_POm.mp4"]
video_file_path = glob.glob(os.path.join(my_path, "*.mp4"))
VideoType = 'mp4'
deeplabcut.extract_frames(
config_file_path,
mode='automatic',
algo='kmeans',
userfeedback=False,
crop=False,
cluster_step=50,
videos_list=video_file_path)
Relevant log output
Loading DLC 2.3.8...
DLC loaded in light mode; you cannot use any GUI (labeling, relabeling and standalone GUI)
Attempting to create a symbolic link of the video ...
Created the symlink of /gpfs/projects/acad/behavior/videos/2023-11-13_conspecific_odor_videos/2023-09-15_test_videos/temp/cluster_test_vid.mp4 to /gpfs/projects/acad/behavior/DLC_model/primary_DeepLabCut_model/LassanceLab-main-model-2023-09-14/videos/cluster_test_vid.mp4
New videos were added to the project! Use the function 'extract_frames' to select frames for labeling.
Loading DLC 2.3.8...
DLC loaded in light mode; you cannot use any GUI (labeling, relabeling and standalone GUI)
Attempting to create a symbolic link of the video ...
Video /gpfs/projects/acad/behavior/DLC_model/primary_DeepLabCut_model/LassanceLab-main-model-2023-09-14/videos/cluster_test_vid.mp4 already exists. Skipping...
Traceback (most recent call last):
File "/gpfs/projects/acad/behavior/softs/DLC_scripts/DLC_extract_frames.py", line 9, in <module>
deeplabcut.add_new_videos(
File "/gpfs/home/acad/ulg-neurosci/tsievert/.local/lib/python3.10/site-packages/deeplabcut/create_project/add.py", line 119, in add_new_videos
vid = VideoReader(video_path)
File "/gpfs/home/acad/ulg-neurosci/tsievert/.local/lib/python3.10/site-packages/deeplabcut/utils/auxfun_videos.py", line 40, in __init__
raise ValueError(f'Video path "{video_path}" does not point to a file.')
ValueError: Video path "/gpfs/projects/acad/behavior/videos/2023-11-13_conspecific_odor_videos/2023-09-15_test videos/cluster_test_vid.mp4" does not point to a file.
Anything else?
No response
Code of Conduct
Is there an existing issue for this?
Bug description
DLC seems to drop an underscore in the file path while creating symlinks.
See last line in the log output:
/gpfs/projects/acad/behavior/videos/2023-11-13_conspecific_odor_videos/2023-09-15_test videos/cluster_test_vid.mp4instead of/2023-09-15_test_videos/.But it was clearly correct before
Created the symlink of /gpfs/projects/acad/behavior/videos/2023-11-13_conspecific_odor_videos/2023-09-15_test_videos/temp/cluster_test_vid.mp4Operating System
Operating System: Red Hat Enterprise Linux 8.6 (Ootpa)
CPE OS Name: cpe:/o:redhat:enterprise_linux:8::baseos
Kernel: Linux 4.18.0-372.26.1.el8_6.x86_64
DeepLabCut version
2.3.8 (pulled from GitHub, so including fixes up to #2475, but also occurs in a standard 2.3.8 install)
DeepLabCut mode
single animal
Device type
gpu
Steps To Reproduce
sbatch --output=res_DLC_extract_testvid.txt DLC_batch_add_and_extract.sh /gpfs/projects/acad/behavior/videos/2023-11-13_conspecific_odor_videos/2023-09-15_test_videos/tempDLC_batch_add_and_extract.shDLC_add_videos.pyDLC_extract_frames.pyRelevant log output
Anything else?
No response
Code of Conduct