Skip to content

Commit

Permalink
Miscellaneous QOL (#467)
Browse files Browse the repository at this point in the history
Pre-1.1.0 update features (changelist in #467)
  • Loading branch information
talmo authored Feb 8, 2021
1 parent 6769c89 commit e1b8c62
Show file tree
Hide file tree
Showing 41 changed files with 2,602 additions and 1,376 deletions.
1 change: 1 addition & 0 deletions .conda/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ pip install jsmin
pip install seaborn
pip install pykalman==0.9.5
pip install segmentation-models==1.0.1
pip install rich==9.10.0

rem # Use and update environment.yml call to install pip dependencies. This is slick.
rem # While environment.yml contains the non pip dependencies, the only thing left
Expand Down
1 change: 1 addition & 0 deletions .conda/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ pip install jsmin
pip install seaborn
pip install pykalman==0.9.5
pip install segmentation-models==1.0.1
pip install rich==9.10.0

pip install setuptools-scm

Expand Down
6 changes: 2 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,13 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'
html_theme = "alabaster"

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
html_theme_options = {
'font_size': '15px'
}
html_theme_options = {"font_size": "15px"}

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ qimage2ndarray==1.8
jsmin
seaborn
pykalman==0.9.5
segmentation-models==1.0.1
segmentation-models==1.0.1
rich==9.10.0
10 changes: 6 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Get the sleap version
with open(path.join(here, "sleap/version.py")) as f:
version_file = f.read()
sleap_version = re.search("\d.+(?=['\"])", version_file).group(0)
sleap_version = re.search('__version__ = "([0-9\\.a]+)"', version_file).group(1)


def get_requirements(require_name=None):
Expand All @@ -31,11 +31,13 @@ def get_requirements(require_name=None):
version=sleap_version,
setup_requires=["setuptools_scm"],
install_requires=get_requirements(),
extras_require={"dev": get_requirements("dev"),},
description="SLEAP (Social LEAP Estimates Animal Pose) is a deep learning framework for estimating animal pose.",
extras_require={
"dev": get_requirements("dev"),
},
description="SLEAP (Social LEAP Estimates Animal Poses) is a deep learning framework for animal pose tracking.",
long_description=long_description,
long_description_content_type="text/x-rst",
author="Talmo Pereira, David Turner, Nat Tabris",
author="Talmo Pereira, Arie Matsliah, David Turner, Nat Tabris",
author_email="[email protected]",
project_urls={
"Documentation": "https://sleap.ai/#sleap",
Expand Down
5 changes: 3 additions & 2 deletions sleap/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
logging.basicConfig(stream=sys.stdout, level=logging.INFO)

# Import submodules we want available at top-level
from sleap.version import __version__, versions
from sleap.io.dataset import Labels, load_file
from sleap.io.video import Video
from sleap.io.video import Video, load_video
from sleap.instance import LabeledFrame, Instance, PredictedInstance, Track
from sleap.skeleton import Skeleton
import sleap.nn
Expand All @@ -15,4 +16,4 @@
from sleap.nn.inference import load_model
from sleap.nn.system import use_cpu_only, disable_preallocation
from sleap.nn.system import summary as system_summary
from sleap.version import __version__
from sleap.nn.config import TrainingJobConfig, load_config
22 changes: 11 additions & 11 deletions sleap/config/shortcuts.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
add instance: Ctrl+I
add videos: Ctrl+A
clear selection: Esc
close: QKeySequence.Close
close: Ctrl+Q
color predicted:
delete area: Ctrl+K
delete clip:
Expand All @@ -11,19 +11,19 @@ export clip:
fit: Ctrl+=
goto frame: Ctrl+J
goto marked: Ctrl+Shift+M
goto next suggestion: QKeySequence.FindNext
goto next suggestion: Space
goto next track spawn: Ctrl+E
goto next user: Ctrl+>
goto next labeled: Ctrl+.
goto prev suggestion: QKeySequence.FindPrevious
goto prev labeled:
goto next user: Ctrl+U
goto next labeled: Alt+Right
goto prev suggestion: Shift+Space
goto prev labeled: Alt+Left
learning: Ctrl+L
mark frame: Ctrl+M
new: Ctrl+N
next video: QKeySequence.Forward
open: Ctrl+O
prev video: QKeySequence.Back
save as: QKeySequence.SaveAs
save as: Ctrl+Shift+S
save: Ctrl+S
select next: '`'
select to frame: Ctrl+Shift+J
Expand All @@ -33,7 +33,7 @@ show trails:
transpose: Ctrl+T
frame next: Right
frame prev: Left
frame next medium step: Down
frame prev medium step: Up
frame next large step: Space
frame prev large step: /
frame next medium step: Ctrl+Right
frame prev medium step: Ctrl+Left
frame next large step: Ctrl+Alt+Right
frame prev large step: Ctrl+Alt+Left
18 changes: 7 additions & 11 deletions sleap/config/training_editor_form.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,13 @@ augmentation:
label: Scale Max
name: optimization.augmentation_config.scale_max
type: double
- label: Random flip
default: none
type: list
name: optimization.augmentation_config.random_flip
options: none,horizontal,vertical
default: none
help: 'Randomly reflect images and instances. IMPORTANT: Left/right symmetric nodes must be indicated in the skeleton or this will lead to incorrect results!'
- default: false
help: If True, uniformly distributed noise will be added to the image. This is effectively
adding a different random value to each pixel to simulate shot noise. See `imgaug.augmenters.arithmetic.AddElementwise`.
Expand Down Expand Up @@ -533,17 +540,6 @@ augmentation:
label: Brightness Max Val
name: optimization.augmentation_config.brightness_max_val
type: double
- name: optimization.augmentation_config.random_flip
label: Random flip
help: 'Randomly reflect images and instances. IMPORTANT: Left/right symmetric nodes must be indicated in the skeleton or this will lead to incorrect results!'
type: bool
default: false
- name: optimization.augmentation_config.flip_horizontal
label: Flip left/right
help: Flip images horizontally when randomly reflecting. If unchecked, flipping will
reflect images up/down.
type: bool
default: true

optimization:
- default: 8
Expand Down
Loading

0 comments on commit e1b8c62

Please sign in to comment.