Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
sronilsson committed Oct 31, 2024
2 parents 2d282ea + 9ed5c17 commit 1257e3f
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 22 deletions.
1 change: 0 additions & 1 deletion simba/SimBA.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import urllib.request
import webbrowser
from tkinter.filedialog import askdirectory
from tkinter.filedialog import askdirectory
from tkinter.messagebox import askyesno

import PIL.Image
Expand Down
4 changes: 3 additions & 1 deletion simba/data_processors/egocentric_aligner.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
import pandas as pd

from simba.mixins.config_reader import ConfigReader
from simba.utils.checks import (check_all_file_names_are_represented_in_video_log, check_int, check_valid_dataframe, check_if_dir_exists)
from simba.utils.checks import (
check_all_file_names_are_represented_in_video_log, check_if_dir_exists,
check_int, check_valid_dataframe)
from simba.utils.enums import Formats
from simba.utils.printing import SimbaTimer
from simba.utils.read_write import (concatenate_videos_in_folder,
Expand Down
2 changes: 1 addition & 1 deletion simba/mixins/image_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

import cv2
import pandas as pd
from numba import int64, jit, njit, prange, uint8, float64
from numba import float64, int64, jit, njit, prange, uint8
from shapely.geometry import Polygon
from skimage.metrics import structural_similarity

Expand Down
26 changes: 14 additions & 12 deletions simba/mixins/plotting_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,23 @@
except:
from typing_extensions import Literal

from simba.utils.checks import (check_file_exist_and_readable, check_float,
check_if_dir_exists,
check_if_keys_exist_in_dict,
check_if_valid_rgb_tuple, check_instance,
check_int, check_str, check_that_column_exist,
check_valid_array, check_valid_dataframe,
check_valid_lst, check_valid_tuple, check_valid_boolean, check_all_file_names_are_represented_in_video_log)
from simba.mixins.config_reader import ConfigReader
from simba.utils.checks import (
check_all_file_names_are_represented_in_video_log,
check_file_exist_and_readable, check_float, check_if_dir_exists,
check_if_keys_exist_in_dict, check_if_valid_rgb_tuple, check_instance,
check_int, check_str, check_that_column_exist, check_valid_array,
check_valid_boolean, check_valid_dataframe, check_valid_lst,
check_valid_tuple)
from simba.utils.data import create_color_palette, detect_bouts
from simba.utils.enums import Formats, Keys, Options
from simba.utils.errors import InvalidInputError
from simba.utils.lookups import (get_categorical_palettes, get_color_dict,get_named_colors)
from simba.utils.lookups import (get_categorical_palettes, get_color_dict,
get_named_colors)
from simba.utils.printing import SimbaTimer, stdout_success
from simba.utils.read_write import get_video_meta_data, read_frm_of_video, find_files_of_filetypes_in_directory, read_df, get_fn_ext, read_video_info
from simba.utils.data import detect_bouts, create_color_palette
from simba.mixins.config_reader import ConfigReader

from simba.utils.read_write import (find_files_of_filetypes_in_directory,
get_fn_ext, get_video_meta_data, read_df,
read_frm_of_video, read_video_info)


class PlottingMixin(object):
Expand Down
14 changes: 8 additions & 6 deletions simba/third_party_label_appenders/converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,26 @@

import cv2
import numpy as np
import yaml
#from pycocotools import mask
from shapely.geometry import Polygon
import yaml

from simba.mixins.config_reader import ConfigReader
from simba.mixins.geometry_mixin import GeometryMixin
from simba.mixins.image_mixin import ImageMixin
from simba.utils.checks import (check_file_exist_and_readable,
check_if_dir_exists,
check_if_keys_exist_in_dict,
check_if_valid_img, check_valid_boolean, check_int,
check_valid_array, check_valid_tuple, check_valid_dict)
check_if_valid_img, check_int,
check_valid_array, check_valid_boolean,
check_valid_dict, check_valid_tuple)
from simba.utils.enums import Formats
from simba.utils.errors import InvalidInputError, NoFilesFoundError
from simba.utils.printing import SimbaTimer, stdout_success
from simba.utils.read_write import (find_files_of_filetypes_in_directory,
get_fn_ext, get_video_meta_data, read_df,
read_frm_of_video, find_video_of_file, read_roi_data)
from simba.mixins.config_reader import ConfigReader
find_video_of_file, get_fn_ext,
get_video_meta_data, read_df,
read_frm_of_video, read_roi_data)

# def geometry_to_rle(geometry: Union[np.ndarray, Polygon], img_size: Tuple[int, int]):
# """
Expand Down
2 changes: 1 addition & 1 deletion simba/utils/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import re
import subprocess
from pathlib import Path
from typing import Any, Dict, Iterable, List, Optional, Tuple, Union, Type
from typing import Any, Dict, Iterable, List, Optional, Tuple, Type, Union

import cv2
import numpy as np
Expand Down

0 comments on commit 1257e3f

Please sign in to comment.