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 23, 2024
2 parents acbeaa3 + 01ede56 commit 31414db
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 16 deletions.
9 changes: 5 additions & 4 deletions simba/bounding_box_tools/yolo/model.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import os
from typing import Optional, Tuple, Union, Dict
from typing import Dict, Optional, Tuple, Union

import numpy as np
import pandas as pd
import torch
from ultralytics import YOLO

from simba.utils.printing import stdout_success, SimbaTimer
from simba.utils.checks import check_file_exist_and_readable, check_if_dir_exists, check_int, get_fn_ext
from simba.utils.read_write import (get_video_meta_data)
from simba.utils.checks import (check_file_exist_and_readable,
check_if_dir_exists, check_int, get_fn_ext)
from simba.utils.printing import SimbaTimer, stdout_success
from simba.utils.read_write import get_video_meta_data


def fit_yolo(initial_weights: Union[str, os.PathLike],
Expand Down
9 changes: 7 additions & 2 deletions simba/plotting/pose_plotter_mp.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@

from simba.mixins.config_reader import ConfigReader
from simba.mixins.plotting_mixin import PlottingMixin
from simba.utils.checks import (check_instance, check_int, check_str, check_that_column_exist, check_valid_boolean, check_nvidea_gpu_available)
from simba.utils.checks import (check_instance, check_int,
check_nvidea_gpu_available, check_str,
check_that_column_exist, check_valid_boolean)
from simba.utils.data import create_color_palette
from simba.utils.enums import OS, Formats, Options
from simba.utils.errors import CountError, InvalidFilepathError
from simba.utils.printing import SimbaTimer, stdout_success
from simba.utils.read_write import (concatenate_videos_in_folder, find_core_cnt, find_files_of_filetypes_in_directory, get_fn_ext, get_video_meta_data, read_df)
from simba.utils.read_write import (concatenate_videos_in_folder,
find_core_cnt,
find_files_of_filetypes_in_directory,
get_fn_ext, get_video_meta_data, read_df)
from simba.utils.warnings import FrameRangeWarning


Expand Down
24 changes: 16 additions & 8 deletions simba/third_party_label_appenders/converters.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import base64
import io
import itertools
import json
import os
import itertools
from datetime import datetime
from typing import Any, Dict, Iterable, Optional, Tuple, Union

import pandas as pd
import io
from PIL import Image
import base64
from datetime import datetime
from typing import Dict, Optional, Tuple, Union, Any, Iterable

try:
from typing import Literal
except:
Expand All @@ -20,11 +22,17 @@

from simba.mixins.geometry_mixin import GeometryMixin
from simba.mixins.image_mixin import ImageMixin
from simba.utils.checks import check_instance, check_int, check_valid_array, check_if_dir_exists, check_if_keys_exist_in_dict, check_file_exist_and_readable, check_if_valid_img, check_valid_tuple
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_instance, check_int,
check_valid_array, check_valid_tuple)
from simba.utils.enums import Formats
from simba.utils.read_write import get_video_meta_data, read_df, read_frm_of_video, find_files_of_filetypes_in_directory, get_fn_ext
from simba.utils.errors import NoFilesFoundError, InvalidInputError
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)


# def geometry_to_rle(geometry: Union[np.ndarray, Polygon], img_size: Tuple[int, int]):
Expand Down
6 changes: 4 additions & 2 deletions simba/ui/pop_ups/visualize_pose_in_dir_pop_up.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
from simba.mixins.pop_up_mixin import PopUpMixin
from simba.plotting.pose_plotter import PosePlotter
from simba.plotting.pose_plotter_mp import PosePlotterMultiProcess
from simba.ui.tkinter_functions import (CreateLabelFrameWithIcon, DropDownMenu, FileSelect, FolderSelect)
from simba.utils.checks import (check_file_exist_and_readable, check_if_dir_exists)
from simba.ui.tkinter_functions import (CreateLabelFrameWithIcon, DropDownMenu,
FileSelect, FolderSelect)
from simba.utils.checks import (check_file_exist_and_readable,
check_if_dir_exists)
from simba.utils.enums import Formats, Keys, Links, Options
from simba.utils.read_write import find_core_cnt, str_2_bool

Expand Down

0 comments on commit 31414db

Please sign in to comment.