scripts/manually_reclassify_frames.py
def manually_reclassify_frames(src_root_dir: pathlib.Path,
                               dst_root_dir: pathlib.Path,
                               config_filepath: pathlib.Path) -> None:
    """
    Manually reclassify assigned classes to frame images using a Tkinter GUI.
    :param src_root_dir: Path to the source root directory to read frame images
    :param dst_root_dir: Path to the destination root directory to save reclassified frame images
    :param config_filepath: Path to configuration file
    """
    logging.info("Reading config file")
    dataset_config = config.load_config(config_filepath=config_filepath)

    classes = [label_config["name"] for label_config in dataset_config["labels"] if label_config["is_target"]]
    classes.append("background")

    logging.info("Found classes %s", classes)

    logging.info("Starting GUI for reclassification")
    frame_dirs = [dir_path for dir_path in src_root_dir.iterdir() if dir_path.is_dir()]
    for frame_dir in tqdm.tqdm(frame_dirs):
        frames_dict = wai_data_tools.io.load_frames(frame_dir=frame_dir)

        manual_labeling.manual_annotation_plot(frame_dict=frames_dict,
                                               frame_dir=frame_dir,
                                               dst_root_dir=dst_root_dir,
                                               classes=classes)

    Manually reclassify assigned classes to frame images using a Tkinter GUI.
    :param src_root_dir: Path to the source root directory to read frame images
    :param dst_root_dir: Path to the destination root directory to save reclassified frame images
    :param config_filepath: Path to configuration file
    
Manually reclassify assigned classes to frame images using a Tkinter GUI.
Manually reclassify assigned classes to frame images using a Tkinter GUI .
def manually_reclassify_frames(src_root_dir: pathlib.Path,
                               dst_root_dir: pathlib.Path,
                               config_filepath: pathlib.Path) -> None:
    logging.info("Reading config file")
    dataset_config = config.load_config(config_filepath=config_filepath)
    classes = [label_config["name"] for label_config in dataset_config["labels"] if label_config["is_target"]]
    classes.append("background")
    logging.info("Found classes %s", classes)
    logging.info("Starting GUI for reclassification")
    frame_dirs = [dir_path for dir_path in src_root_dir.iterdir() if dir_path.is_dir()]
    for frame_dir in tqdm.tqdm(frame_dirs):
        frames_dict = wai_data_tools.io.load_frames(frame_dir=frame_dir)
        manual_labeling.manual_annotation_plot(frame_dict=frames_dict,
                                               frame_dir=frame_dir,
                                               dst_root_dir=dst_root_dir,
                                               classes=classes)
def manually_reclassify_frames ( src_root_dir : pathlib . Path , dst_root_dir : pathlib . Path , config_filepath : pathlib . Path ) -> None : logging . info ( "Reading config file" ) dataset_config = config . load_config ( config_filepath = config_filepath ) classes = [ label_config [ "name" ] for label_config in dataset_config [ "labels" ] if label_config [ "is_target" ] ] classes . append ( "background" ) logging . info ( "Found classes %s" , classes ) logging . info ( "Starting GUI for reclassification" ) frame_dirs = [ dir_path for dir_path in src_root_dir . iterdir ( ) if dir_path . is_dir ( ) ] for frame_dir in tqdm . tqdm ( frame_dirs ) : frames_dict = wai_data_tools . io . load_frames ( frame_dir = frame_dir ) manual_labeling . manual_annotation_plot ( frame_dict = frames_dict , frame_dir = frame_dir , dst_root_dir = dst_root_dir , classes = classes )
Manually reclassify assigned classes to frame images using a Tkinter GUI.
Manually reclassify assigned classes to frame images using a Tkinter GUI .
"""
    Manually reclassify assigned classes to frame images using a Tkinter GUI.
    :param src_root_dir: Path to the source root directory to read frame images
    :param dst_root_dir: Path to the destination root directory to save reclassified frame images
    :param config_filepath: Path to configuration file
    """
src_root_dir
pathlib.Path
Path to the source root directory to read frame images
Path to the source root directory to read frame images
dst_root_dir
pathlib.Path
Path to the destination root directory to save reclassified frame images
Path to the destination root directory to save reclassified frame images
config_filepath
pathlib.Path
Path to configuration file
Path to configuration file