d7896c80ae2fdfb5f96aec3fe75d14141ade4a5a,deeplabcut/utils/conversioncode.py,,analyze_videos_converth5_to_csv,#Any#Any#,148

Before Change


    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):

After Change


            continue
        vname = Path(video).stem
        for file in h5_files:
            if vname in file:
                scorer = file.split(vname)[1].split(".h5")[0]
                if "DLC" in scorer or "DeepCut" in scorer:
                    print("Found output file for scorer:", scorer)
                    print(f"Converting {file}...")
                    df = pd.read_hdf(file, "df_with_missing")
                    df.to_csv(file.replace(".h5", ".csv"))
    print("All pose files were converted.")


def merge_windowsannotationdataONlinuxsystem(cfg):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 3

Instances


Project Name: AlexEMG/DeepLabCut
Commit Name: d7896c80ae2fdfb5f96aec3fe75d14141ade4a5a
Time: 2021-03-30
Author: 30733203+jeylau@users.noreply.github.com
File Name: deeplabcut/utils/conversioncode.py
Class Name:
Method Name: analyze_videos_converth5_to_csv


Project Name: scipy/scipy
Commit Name: 7151a58d339692c40e1edf3cf9ffe6c052d03001
Time: 2020-02-05
Author: sethtroisi@google.com
File Name: tools/refguide_check.py
Class Name:
Method Name: _run_doctests


Project Name: scikit-image/scikit-image
Commit Name: 5c2b156e65d87dcf7680ae9366b6510438f448c2
Time: 2016-12-21
Author: devel@sciunto.org
File Name: doc/ext/sphinx_gallery/docs_resolv.py
Class Name:
Method Name: _embed_code_links


Project Name: AlexEMG/DeepLabCut
Commit Name: 812f374c34087af0aa90ac3cd2b37158b1ad0372
Time: 2019-07-02
Author: amathis@fas.harvard.edu
File Name: deeplabcut/post_processing/analyze_skeleton.py
Class Name:
Method Name: analyzeskeleton


Project Name: scikit-image/scikit-image
Commit Name: ddfac3e42d2ae2e09751de6638d813c76e30ff94
Time: 2018-12-04
Author: mark.harfouche@gmail.com
File Name: tools/check_sdist.py
Class Name:
Method Name: