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 May 6, 2024
2 parents 4fea0b2 + 63a42c0 commit bf5e26d
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 25 deletions.
1 change: 0 additions & 1 deletion simba/mixins/plotting_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import seaborn as sns
from matplotlib import cm
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas

from numba import bool_, njit, uint8
from PIL import Image

Expand Down
2 changes: 1 addition & 1 deletion simba/plotting/ROI_feature_visualizer_mp.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import multiprocessing
import os
import platform
from typing import Any, Dict, List, Optional, Union, Tuple
from typing import Any, Dict, List, Optional, Tuple, Union

import cv2
import numpy as np
Expand Down
10 changes: 5 additions & 5 deletions simba/plotting/gantt_creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import io
import os
import shutil
from typing import Dict, List, Union, Optional
from typing import Dict, List, Optional, Union

import cv2
import matplotlib.pyplot as plt
Expand All @@ -12,10 +12,10 @@

from simba.mixins.config_reader import ConfigReader
from simba.mixins.plotting_mixin import PlottingMixin
from simba.utils.checks import (check_all_file_names_are_represented_in_video_log,
check_file_exist_and_readable,
check_valid_lst,
check_if_keys_exist_in_dict)
from simba.utils.checks import (
check_all_file_names_are_represented_in_video_log,
check_file_exist_and_readable, check_if_keys_exist_in_dict,
check_valid_lst)
from simba.utils.data import detect_bouts
from simba.utils.enums import Formats
from simba.utils.errors import NoSpecifiedOutputError
Expand Down
23 changes: 14 additions & 9 deletions simba/plotting/gantt_creator_mp.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,36 @@

warnings.simplefilter(action="ignore", category=FutureWarning)
import functools
import io
import multiprocessing
import os
import io
import PIL
import platform
import shutil
import cv2
import pandas as pd
from typing import Dict, List, Optional, Union
import numpy as np
import matplotlib.pyplot as plt

import cv2
import matplotlib
from matplotlib.figure import Figure
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import PIL
#matplotlib.use('agg')
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
from matplotlib.figure import Figure

from simba.mixins.config_reader import ConfigReader
from simba.mixins.plotting_mixin import PlottingMixin
from simba.utils.checks import (check_all_file_names_are_represented_in_video_log, check_file_exist_and_readable, check_if_keys_exist_in_dict, check_int, check_that_column_exist, check_valid_lst)
from simba.utils.checks import (
check_all_file_names_are_represented_in_video_log,
check_file_exist_and_readable, check_if_keys_exist_in_dict, check_int,
check_that_column_exist, check_valid_lst)
from simba.utils.data import detect_bouts
from simba.utils.enums import Formats
from simba.utils.errors import NoSpecifiedOutputError
from simba.utils.lookups import get_named_colors
from simba.utils.printing import SimbaTimer, stdout_success
from simba.utils.read_write import (concatenate_videos_in_folder, find_core_cnt, get_fn_ext, read_df)
from simba.utils.read_write import (concatenate_videos_in_folder,
find_core_cnt, get_fn_ext, read_df)

HEIGHT = "height"
WIDTH = "width"
Expand Down
9 changes: 6 additions & 3 deletions simba/plotting/heat_mapper_location.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
__author__ = "Simon Nilsson"

import os
from typing import List, Union, Optional, Any, Dict
import shutil
from typing import Any, Dict, List, Optional, Union

import cv2
import numpy as np
import pandas as pd
from numba import jit, prange
import shutil

from simba.mixins.config_reader import ConfigReader
from simba.mixins.geometry_mixin import GeometryMixin
from simba.mixins.plotting_mixin import PlottingMixin
from simba.utils.checks import (
check_all_file_names_are_represented_in_video_log,
check_file_exist_and_readable, check_float, check_if_keys_exist_in_dict,
check_int, check_valid_lst)
from simba.utils.enums import Formats, TagNames
from simba.utils.errors import NoSpecifiedOutputError
from simba.utils.printing import SimbaTimer, log_event, stdout_success
from simba.utils.read_write import get_fn_ext, read_df
from simba.utils.checks import check_file_exist_and_readable, check_valid_lst, check_if_keys_exist_in_dict, check_int, check_all_file_names_are_represented_in_video_log, check_float

STYLE_PALETTE = 'palette'
STYLE_SHADING = 'shading'
Expand Down
12 changes: 8 additions & 4 deletions simba/plotting/heat_mapper_location_mp.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import multiprocessing
import os
import platform
from typing import List, Optional, Union, Any, Dict
from typing import Any, Dict, List, Optional, Union

import cv2
import numpy as np
Expand All @@ -11,12 +11,16 @@
from simba.mixins.config_reader import ConfigReader
from simba.mixins.geometry_mixin import GeometryMixin
from simba.mixins.plotting_mixin import PlottingMixin
from simba.utils.checks import (
check_all_file_names_are_represented_in_video_log,
check_file_exist_and_readable, check_float, check_if_keys_exist_in_dict,
check_int, check_valid_lst)
from simba.utils.enums import Defaults, Formats, TagNames
from simba.utils.errors import NoSpecifiedOutputError
from simba.utils.printing import SimbaTimer, log_event, stdout_success
from simba.utils.read_write import (concatenate_videos_in_folder, find_core_cnt, get_fn_ext, read_df, remove_a_folder)
from simba.utils.checks import check_file_exist_and_readable, check_valid_lst, check_if_keys_exist_in_dict, check_int, check_all_file_names_are_represented_in_video_log, check_float

from simba.utils.read_write import (concatenate_videos_in_folder,
find_core_cnt, get_fn_ext, read_df,
remove_a_folder)

STYLE_PALETTE = 'palette'
STYLE_SHADING = 'shading'
Expand Down
6 changes: 4 additions & 2 deletions simba/plotting/plot_clf_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@
from simba.mixins.config_reader import ConfigReader
from simba.mixins.plotting_mixin import PlottingMixin
from simba.mixins.train_model_mixin import TrainModelMixin
from simba.utils.checks import (check_file_exist_and_readable, check_float, check_int)
from simba.utils.checks import (check_file_exist_and_readable, check_float,
check_int)
from simba.utils.data import create_color_palette
from simba.utils.enums import ConfigKey, Dtypes, Formats, TagNames
from simba.utils.errors import NoSpecifiedOutputError
from simba.utils.printing import log_event, stdout_success
from simba.utils.read_write import (get_fn_ext, get_video_meta_data, read_config_entry, read_df)
from simba.utils.read_write import (get_fn_ext, get_video_meta_data,
read_config_entry, read_df)


class PlotSklearnResultsSingleCore(ConfigReader, TrainModelMixin, PlottingMixin):
Expand Down

0 comments on commit bf5e26d

Please sign in to comment.