deeplabcut.analyze_videos_converth5_to_csv("/media/alex/experimentaldata/cheetahvideos",".mp4")
start_path = os.getcwd()
os.chdir(videopath)
Videos = [
fn
for fn in os.listdir(os.curdir)
if (videotype in fn) and ("_labeled.mp4" not in fn)
] // exclude labeled-videos!
Allh5files = [
fn for fn in os.listdir(os.curdir) if (".h5" in fn) and ("resnet" in fn)
]
for video in Videos:
vname = Path(video).stem
// Is there a scorer for this?
PutativeOutputFiles = [fn for fn in Allh5files if vname in fn]
for pfn in PutativeOutputFiles:
scorer = pfn.split(vname)[1].split(".h5")[0]
if "DLC" in scorer or "DeepCut" in scorer:
DC = pd.read_hdf(pfn, "df_with_missing")
print("Found output file for scorer:", scorer)
print("Converting to csv...")
DC.to_csv(pfn.split(".h5")[0] + ".csv")
os.chdir(str(start_path))
print("All pose files were converted.")
def merge_windowsannotationdataONlinuxsystem(cfg):