Skip to content

Commit

Permalink
compatible with DLC3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Mojackhak committed Oct 12, 2024
1 parent cb9df8c commit 1483500
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions anipose/pose_videos.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ def rename_dlc_files(folder, base):
files = glob(os.path.join(folder, base+'*'))
for fname in files:
basename = os.path.basename(fname)
# compatibility with DLC 3.0
_, ext = os.path.splitext(basename)
if ext != '.h5' and ext != '.csv':
_, ext = basename.rsplit('_', 1)
ext = '_' + ext
os.rename(os.path.join(folder, basename),
os.path.join(folder, base + ext))

Expand Down

0 comments on commit 1483500

Please sign in to comment.