Skip to content

Commit

Permalink
cleaned
Browse files Browse the repository at this point in the history
  • Loading branch information
sronilsson committed May 16, 2024
1 parent d0cc657 commit 6af40be
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
12 changes: 8 additions & 4 deletions simba/pose_importers/sleap_h5_importer.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
#### MODIFIED FROM @Toshea111 - https://github.com/Toshea111/sleap/blob/develop/docs/notebooks/Convert_HDF5_to_CSV_updated.ipynb
from typing import Union, List, Dict, Any
import io
import os
from typing import Any, Dict, List, Union

import h5py
import numpy as np
import pandas as pd

from simba.data_processors.interpolation_smoothing import Interpolate, Smooth
from simba.mixins.config_reader import ConfigReader
from simba.mixins.pose_importer_mixin import PoseImporterMixin
from simba.utils.enums import Methods, TagNames, Options
from simba.utils.checks import (check_file_exist_and_readable,
check_if_dir_exists,
check_if_keys_exist_in_dict, check_str)
from simba.utils.enums import Methods, Options, TagNames
from simba.utils.errors import BodypartColumnNotFoundError
from simba.utils.printing import (SimbaTimer, log_event, stdout_success, stdout_warning)
from simba.utils.printing import (SimbaTimer, log_event, stdout_success,
stdout_warning)
from simba.utils.read_write import (clean_sleap_file_name,
find_all_videos_in_project, get_fn_ext,
get_video_meta_data, write_df)
from simba.utils.checks import check_file_exist_and_readable, check_if_dir_exists, check_str, check_if_keys_exist_in_dict


class SLEAPImporterH5(ConfigReader, PoseImporterMixin):
Expand Down
7 changes: 4 additions & 3 deletions simba/video_processors/video_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
import shutil
import subprocess
import time
from copy import deepcopy
from datetime import datetime
from pathlib import Path
from tkinter import *
from typing import List, Optional, Tuple, Union
from copy import deepcopy

import cv2
import numpy as np
Expand All @@ -36,21 +36,22 @@
check_nvidea_gpu_available, check_str,
check_that_hhmmss_start_is_before_end,
check_valid_lst, check_valid_tuple)
from simba.utils.data import find_frame_numbers_from_time_stamp
from simba.utils.enums import OS, ConfigKey, Formats, Options, Paths
from simba.utils.errors import (CountError, DirectoryExistError,
FFMPEGCodecGPUError, FFMPEGNotFoundError,
FileExistError, FrameRangeError,
InvalidFileTypeError, InvalidInputError,
InvalidVideoFileError, NoDataError,
NoFilesFoundError, NotDirectoryError)
from simba.utils.lookups import (get_ffmpeg_crossfade_methods, percent_to_crf_lookup, percent_to_qv_lk)
from simba.utils.lookups import (get_ffmpeg_crossfade_methods,
percent_to_crf_lookup, percent_to_qv_lk)
from simba.utils.printing import SimbaTimer, stdout_success
from simba.utils.read_write import (
check_if_hhmmss_timestamp_is_valid_part_of_video,
find_all_videos_in_directory, find_core_cnt,
find_files_of_filetypes_in_directory, get_fn_ext, get_video_meta_data,
read_config_entry, read_config_file, read_frm_of_video)
from simba.utils.data import find_frame_numbers_from_time_stamp
from simba.utils.warnings import (FileExistWarning, InValidUserInputWarning,
SameInputAndOutputWarning)
from simba.video_processors.extract_frames import video_to_frames
Expand Down

0 comments on commit 6af40be

Please sign in to comment.