This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
__author__ = 'ZFTurbo: https://github.com/ZFTurbo/' | |
import os | |
import glob | |
import cv2 | |
import pydicom | |
import argparse | |
def convert_dataset(args): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
__author__ = 'ZFTurbo: https://github.com/ZFTurbo/' | |
if __name__ == '__main__': | |
import os | |
gpu_use = "0" | |
print('GPU use: {}'.format(gpu_use)) | |
os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" | |
os.environ["CUDA_VISIBLE_DEVICES"] = "{}".format(gpu_use) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import soundfile as sf | |
import numpy as np | |
from tqdm import tqdm | |
import glob | |
import operator | |
def combine_audio_files(files: list[str], prefered_length: int) -> tuple[np.ndarray, int]: | |
""" |