This file contains hidden or 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
| # %% | |
| import random | |
| import cv2 | |
| import pandas as pd | |
| import matplotlib.pyplot as plt | |
| import numpy as np | |
| # %% | |
| def read_intensities(video_path: str): | |
| # Open the video file |
This file contains hidden or 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
| import csv | |
| import sys | |
| from pathlib import Path | |
| from typing import List | |
| try: | |
| from tqdm import tqdm | |
| except ImportError: | |
| print("Cannot import tqdm. Progress bar will not be displayed.") | |
| tqdm = lambda x: x |
This file contains hidden or 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
| import logging | |
| import os | |
| from typing import Optional | |
| import sleap | |
| from sleap.gui.app import main as sleap_label | |
| logger = logging.getLogger(__name__) | |
| logger.setLevel(logging.INFO) |
This file contains hidden or 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
| import logging | |
| import sleap | |
| from sleap.io.video import MediaVideo | |
| logger = logging.getLogger(__name__) | |
| def main(path_pkg_slp, paths_to_videos, output_slp_path="slp_from_package.slp"): | |
| """Replace HDF5 backend with MediaVideo backend for videos in package. |
This file contains hidden or 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
| import logging | |
| import subprocess | |
| from pathlib import Path | |
| logger = logging.getLogger(__name__) | |
| file_path = Path(__file__).resolve() | |
| git_dir = Path( | |
| subprocess.check_output( | |
| ["git", "rev-parse", "--git-dir"], cwd=file_path.parent.as_posix() |
This file contains hidden or 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
| from pathlib import Path | |
| import pandas as pd | |
| import sleap | |
| from sleap import Labels | |
| def main( | |
| ds: str, num_instances_expected: int = 8, output_csv: str = "missing_instances.csv" | |
| ) -> None: |
This file contains hidden or 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
| import colorsys | |
| import matplotlib | |
| import matplotlib.colors as mcolors | |
| import matplotlib.patches as mpatches | |
| import matplotlib.pyplot as plt | |
| import numpy as np | |
| from itertools import permutations | |
| from typing import Callable, Dict, Iterator, List, Optional, Tuple, Union |
This file contains hidden or 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
| import logging | |
| import math | |
| import matplotlib.pyplot as plt | |
| import matplotlib.ticker as ticker | |
| import numpy as np | |
| from typing import List, Tuple | |
| # Set up logging | |
| logger = logging.getLogger(__name__) | |
| logger.setLevel(logging.DEBUG) |
This file contains hidden or 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 module defines functions to evaluate metrics on a per video basis.""" | |
| from pathlib import Path | |
| from typing import Optional | |
| import matplotlib.pyplot as plt | |
| import numpy as np | |
| import pandas as pd | |
| import seaborn as sns |
This file contains hidden or 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 module requires having gcloud authenticated and the google-cloud-compute library.""" | |
| from __future__ import annotations | |
| import re | |
| import sys | |
| from typing import Any | |
| import warnings | |
| from google.api_core.extended_operation import ExtendedOperation |
OlderNewer