-
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.
- Loading branch information
1 parent
acf6211
commit 30eb871
Showing
10 changed files
with
208 additions
and
64 deletions.
There are no files selected for viewing
Binary file not shown.
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 |
---|---|---|
|
@@ -29,7 +29,7 @@ | |
# Setup configuration | ||
setuptools.setup( | ||
name="simba-uw-tf-dev", | ||
version="2.5.4", | ||
version="2.5.5", | ||
author="Simon Nilsson, Jia Jie Choong, Sophia Hwang", | ||
author_email="[email protected]", | ||
description="Toolkit for computer classification and analysis of behaviors in experimental animals", | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
__author__ = "Simon Nilsson" | ||
__email__ = "[email protected]" | ||
|
||
|
||
|
||
import math | ||
from typing import Dict, Optional, Tuple, Union | ||
|
||
import numpy as np | ||
from scipy.spatial import ConvexHull | ||
from shapely.geometry import Polygon | ||
|
||
from simba.utils.checks import check_int, check_str, check_valid_tuple | ||
from simba.utils.enums import Formats | ||
|
@@ -105,7 +104,9 @@ def get_half_circle_vertices(center: Tuple[int, int], | |
a = np.linspace(np.pi, 2 * np.pi, n_points) | ||
x, y = x_c + radius * np.cos(a), y_c + radius * np.sin(a) | ||
vertices = np.column_stack((x, y)).astype(np.int32) | ||
vertices_dict = {"Center_tag": (center[0], center[1])} | ||
shape_center = np.array(Polygon(vertices).centroid.coords)[0].astype(np.int32) | ||
vertices_dict = {"Center_tag": (shape_center[0], shape_center[1])} | ||
|
||
for tag_id in range(vertices.shape[0]): | ||
vertices_dict[f"Tag_{tag_id}"] = (vertices[tag_id][0], vertices[tag_id][1]) | ||
return (np.array(vertices).astype("int32"), vertices_dict) | ||
|
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
Oops, something went wrong.