-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master'
# Conflicts: # simba/data_processors/cuda/angle_3pt.py # simba/data_processors/cuda/convex_hull.py # simba/data_processors/cuda/count_values_in_range.py # simba/data_processors/cuda/create_average_cupy.py # simba/data_processors/cuda/create_average_frame_cuda.py # simba/data_processors/cuda/direction_two_bps.py # simba/data_processors/cuda/euclidan_distance.py # simba/data_processors/cuda/is_inside_circle.py # simba/data_processors/cuda/sliding_circular_mean.py # simba/data_processors/cuda/sliding_resultant_vector_length.py # simba/data_processors/cuda/sliding_spearmans_rank.py # simba/plotting/blob_plotter.py
- Loading branch information
Showing
20 changed files
with
102 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,24 +2,33 @@ | |
__email__ = "[email protected]" | ||
|
||
import os | ||
from typing import Union, Optional | ||
import numpy as np | ||
from copy import deepcopy | ||
from typing import Optional, Union | ||
|
||
import numpy as np | ||
|
||
try: | ||
from typing import Literal | ||
except: | ||
from typing_extensions import Literal | ||
from simba.utils.read_write import find_all_videos_in_directory, get_fn_ext, remove_files, get_video_meta_data | ||
from simba.video_processors.video_processing import video_bg_subtraction, video_bg_substraction_mp | ||
from simba.mixins.image_mixin import ImageMixin | ||
from simba.utils.checks import check_if_dir_exists, check_valid_boolean, check_int, check_nvidea_gpu_available, check_str | ||
from simba.utils.enums import Formats, Options, Methods | ||
from simba.utils.printing import stdout_success, SimbaTimer | ||
from simba.utils.read_write import write_df | ||
from simba.utils.errors import InvalidInputError, FFMPEGCodecGPUError | ||
from simba.utils.data import savgol_smoother, df_smoother | ||
|
||
import pandas as pd | ||
|
||
from simba.mixins.image_mixin import ImageMixin | ||
from simba.utils.checks import (check_if_dir_exists, check_int, | ||
check_nvidea_gpu_available, check_str, | ||
check_valid_boolean) | ||
from simba.utils.data import df_smoother, savgol_smoother | ||
from simba.utils.enums import Formats, Methods, Options | ||
from simba.utils.errors import FFMPEGCodecGPUError, InvalidInputError | ||
from simba.utils.printing import SimbaTimer, stdout_success | ||
from simba.utils.read_write import (find_all_videos_in_directory, get_fn_ext, | ||
get_video_meta_data, remove_files, | ||
write_df) | ||
from simba.video_processors.video_processing import (video_bg_substraction_mp, | ||
video_bg_subtraction) | ||
|
||
|
||
class BlobLocationComputer(object): | ||
|
||
""" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,19 +2,23 @@ | |
__email__ = "[email protected]" | ||
|
||
import os | ||
import shap | ||
from typing import List, Optional, Tuple, Union | ||
|
||
import numpy as np | ||
from simba.utils.read_write import read_df, write_df | ||
from simba.mixins.train_model_mixin import TrainModelMixin | ||
from simba.utils.checks import check_instance, check_valid_lst, check_str, check_int, check_valid_array, \ | ||
check_valid_dataframe, check_if_dir_exists, check_nvidea_gpu_available | ||
from typing import Union, Optional, List, Tuple | ||
from sklearn.ensemble import RandomForestClassifier | ||
import pandas as pd | ||
import shap | ||
from sklearn.ensemble import RandomForestClassifier | ||
|
||
from simba.mixins.train_model_mixin import TrainModelMixin | ||
from simba.utils.checks import (check_if_dir_exists, check_instance, check_int, | ||
check_nvidea_gpu_available, check_str, | ||
check_valid_array, check_valid_dataframe, | ||
check_valid_lst) | ||
from simba.utils.enums import Formats | ||
from simba.utils.warnings import NotEnoughDataWarning | ||
from simba.utils.printing import SimbaTimer, stdout_success | ||
from simba.utils.errors import FFMPEGCodecGPUError | ||
from simba.utils.printing import SimbaTimer, stdout_success | ||
from simba.utils.read_write import read_df, write_df | ||
from simba.utils.warnings import NotEnoughDataWarning | ||
|
||
|
||
def create_shap_log(rf_clf: Union[str, os.PathLike, RandomForestClassifier], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,13 @@ | |
__email__ = "[email protected]" | ||
|
||
from typing import Optional | ||
|
||
import cupy as cp | ||
import numpy as np | ||
|
||
from simba.utils.read_write import read_img_batch_from_video_gpu | ||
from simba.utils.checks import check_if_valid_img, check_instance | ||
from simba.utils.read_write import read_img_batch_from_video_gpu | ||
|
||
|
||
def img_stack_to_grayscale_cupy(imgs: np.ndarray, | ||
batch_size: Optional[int] = 250) -> np.ndarray: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,13 +2,16 @@ | |
__email__ = "[email protected]" | ||
|
||
from typing import Optional | ||
|
||
try: | ||
from typing import Literal | ||
except: | ||
from typing_extensions import Literal | ||
|
||
import cupy as cp | ||
import numpy as np | ||
|
||
|
||
def sliding_circular_hotspots(x: np.ndarray, | ||
time_window: float, | ||
sample_rate: float, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,13 +2,16 @@ | |
__email__ = "[email protected]" | ||
|
||
from typing import Optional | ||
|
||
try: | ||
from typing import Literal | ||
except: | ||
from typing_extensions import Literal | ||
|
||
import cupy as cp | ||
import numpy as np | ||
|
||
|
||
def sliding_circular_hotspots(x: np.ndarray, | ||
time_window: float, | ||
sample_rate: float, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,13 +2,16 @@ | |
__email__ = "[email protected]" | ||
|
||
from typing import Optional | ||
|
||
try: | ||
from typing import Literal | ||
except: | ||
from typing_extensions import Literal | ||
|
||
import cupy as cp | ||
import numpy as np | ||
|
||
|
||
def sliding_circular_std(x: np.ndarray, | ||
time_window: float, | ||
sample_rate: float, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,15 +2,16 @@ | |
__email__ = "[email protected]" | ||
|
||
from typing import Optional, Tuple | ||
|
||
try: | ||
from typing import Literal | ||
except: | ||
from typing_extensions import Literal | ||
|
||
import cupy as cp | ||
import numpy as np | ||
|
||
|
||
|
||
def sliding_rayleigh_z(x: np.ndarray, | ||
time_window: float, | ||
sample_rate: float, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters