Name | whisk-janelia JSON |
Version |
1.1.10
JSON |
| download |
home_page | https://github.com/nclack/whisk/ |
Summary | Fully automated tracking of single rows of whiskers in high-speed video. |
upload_time | 2024-05-30 04:46:56 |
maintainer | clackn, cxrodgers, mitchclough, vncntprvst |
docs_url | None |
author | Nathan Clack |
requires_python | None |
license | LICENSE.txt |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
Janelia Whisker tracking
========================
Fully automated tracking of single rows of whiskers in high-speed video.
The original source code repository is https://github.com/nclack/whisk/.
The [original website](http://openwiki.janelia.org/wiki/display/MyersLab/Whisker+Tracking) for this program is now accessible [here](https://wikis.janelia.org/display/WT/Whisker+Tracking).
A copy of the instructions and the tutorial are available [here](https://github.com/wanglab-neuro/whisk-dockerfile/tree/main/context/wiki).
Downloading
===========
Pre-built binaries are available on [this forked repository](https://github.com/vncntprvst/whisk/tree/master/whisk/bin). Binaries are built against FFmpeg 6.0.
Binary and library file can simply be installed from Pypi, with `pip install whisk-janelia`.
> Note that on Linux, if not root, you may need to make some of the binary files executable, e.g. `chmod +x /path/to/whisk/bin/trace`. You can also use the post-installation script `update_permissions.py` to make all files in the `whisk/bin` directory executable.
Check which version of FFmpeg is installed, just type `ffmpeg` in a terminal.
You can also check which version of required libraries like `libavdevice` are installed with:
`for dir in $(echo $LD_LIBRARY_PATH | tr ":" "\n"); do find $dir -name 'libavdevice.so*' 2>/dev/null; done`.
See also the [README on the whisk-dockerfile repo](https://github.com/wanglab-neuro/whisk-dockerfile), in `whisk-base` section.
Building
========
Updated build files are found [here](https://github.com/vncntprvst/whisk/).
This package uses a [Cmake][] based build system. The basic build steps are similar under Windows, OS X, and Linux.
The build requirements are `cmake` `gcc-12.2+` `FFmpeg`.
**For Unix-y systems:**
1. Install CMake 2.8+, a C++ compiler and other build tools.
```
sudo apt update
sudo apt install cmake pkg-config bison gawk
sudo apt install g++ gdb make ninja-build rsync zip
```
2. Install FFmpeg libraries
```
sudo apt install libavdevice-dev libavfilter-dev libavformat-dev libavcodec-dev libswresample-dev libswscale-dev libavutil-dev
```
* -- **Alternatively** --
Build FFmpeg from source.
First, install the necessary dependencies:
```bash
sudo apt-get install -y autoconf automake build-essential cmake libass-dev libfreetype6-dev libsdl2-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev pkg-config texinfo zlib1g-dev yasm libx264-dev libx265-dev libnuma-dev libvpx-dev libfdk-aac-dev libmp3lame-dev libopus-dev
```
Then, download the FFmpeg source code:
```bash
wget https://FFmpeg.org/releases/ffmpeg-6.0.tar.bz2
tar xjf ffmpeg-6.0.tar.bz2
cd ffmpeg-6.0
```
Configure and compile FFmpeg with shared libraries (note the `--enable-pic`, `--enable-shared`, and `--disable-static` flags):
```bash
CFLAGS="-fPIC" CXXFLAGS="-fPIC" ./configure \
--enable-gpl \
--enable-version3 \
--enable-nonfree \
--enable-small \
--enable-libmp3lame \
--enable-libx264 \
--enable-libx265 \
--enable-libvpx \
--enable-libfdk-aac \
--enable-libopus \
--enable-pic \
--enable-shared \
--disable-static
make -j$(nproc)
```
Finally, install FFmpeg:
```bash
sudo make install
```
If cmake still fails because of it can't find FFmpeg libraries `libavdevice;libavfilter;libavformat;libavcodec;libswresample;libswscale;libavutil`, you need to have them somewhere, and make it find it, e.g. `export PKG_CONFIG_PATH=/home/$USER/ffmpeg_build/lib/pkgconfig`.
If you built FFmpeg from source, you can add `/usr/local/lib` to `LD_LIBRARY_PATH` and update the dynamic linker cache with `sudo ldconfig`:
```bash
echo 'export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH' >> ~/.bashrc
source ~/.bashrc
echo "/usr/local/lib" | sudo tee /etc/ld.so.conf.d/FFmpeg.conf
sudo ldconfig
```
3. Install Qt5 and Qt5Svg
* `sudo apt install qtbase5-dev libqt5svg5-dev`
* Check installation with `qmake -v`.
* Set `Qt5_DIR` and `Qt5Svg_DIR` environment variables if cmake asks for it.
4. Start in the root of the source directory (in a terminal).
5. Type these commands (or use [VSCode's CMake extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools) to configure and build):
```
mkdir build
cd build
cmake ..
make
```
For WSL systems, this page may be helpful:
https://devblogs.microsoft.com/cppblog/build-and-debug-c-with-wsl-2-distributions-and-visual-studio-2022/
**For Windows systems** (ignore VS Code instructions if not using it):
1. Install [Visual Studio Code](https://code.visualstudio.com/download).
2. Install the C/C++ extension for VS Code.
3. Install Mingw-w64 via [MSYS2](https://www.msys2.org/). Prefer installing MSYS2 in a directory without space (e.g., not C:/Program Files/ ...). That will save you a lot of headaches.
4. Launch a MSYS2 terminal for the UCRT64 environment as an administrator and install the following:
* Install gcc as mentioned in [MSYS2 installation page](https://www.msys2.org/): `pacman -S mingw-w64-ucrt-x86_64-gcc`
* Install the Mingw-w64 toolchain: `pacman -S --needed base-devel mingw-w64-x86_64-toolchain`
* Install cmake and generators (ninja ... make is installed with the toolchain above, ): `pacman -S mingw-w64-x86_64-cmake`
* Install the FFmpeg libraries for the 64-bit MinGW toolchain:
To install the most recent version instead, run `pacman -S mingw-w64-x86_64-ffmpeg`.
If using python (see packages `whisk-janelia` and `whiskiwrap`), you need to ensure compatibility between the FFmpeg version used to build whisk (currently, version 6.0) and the FFmpeg library files that python will call with the package `ctypes`. Tarballs are available for download on [MSYS2's package page](https://packages.msys2.org/package/mingw-w64-x86_64-ffmpeg), or run `wget https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-ffmpeg-6.0-7-any.pkg.tar.zst`. Then, install the package with `pacman -U mingw-w64-x86_64-ffmpeg-6.0-7-any.pkg.tar.zst`.
* Update the PKG_CONFIG_PATH environment variable to include the path to the FFmpeg library .pc files. In the MSYS2 terminal, run: `export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/mingw64/lib/pkgconfig`, and add it to `~/.bashrc` as well to make this change permanent.
5. Open a terminal, navigate to the `whisk` repository directory.
6. Run the following commands:
```bash
mkdir build
cd build
cmake ..
ninja
```
CMake works by building the Makefile, or other required project files, in the "build" directory you created. You don't have to use a Makefile; XCode projects,
Eclipse projects, Visual Studio projects, etc ... can be generated. To generate these other project types replace the "cmake .." step with "cmake-gui ..". The
GUI will show available options. See the CMake documentation for more details.
[Cmake]: http://www.cmake.org
File formats
============
### Whiskers
Whiskers can be stored in either a text or binary format. There is a command line utility, `whisker_convert`, provided to convert between different
supported formats. `batch.py` can be used to speed up the process of converting many files.
The most detailed description of each format can be found in the corresponding `whisker_io_*.c` files implimenting the readers/writers for each format.
In general, each whisker segment in a file is comprised of a unique id and a number of data points describing the shape as output from the tracing program.
### Measurements
The measurements file stores the features of traced curves used for classification, such as follicle position, angle and whisker length.
Additionally, after classification, this file records the determined identity of each traced curve.
Graphical interface
===================
See ui/README for instructions on how to use the graphical user interface.
ui2.py --help
Community
=========
[Chat](https://discord.gg/Y7QJerr)
[Issue Tracker](https://github.com/nclack/whisk/issues)
Raw data
{
"_id": null,
"home_page": "https://github.com/nclack/whisk/",
"name": "whisk-janelia",
"maintainer": "clackn, cxrodgers, mitchclough, vncntprvst",
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "Nathan Clack",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/f5/8f/46d8c6902ef24b4296ea38c5d0190e27b3c4227fba0f6ead9322ea728481/whisk_janelia-1.1.10.tar.gz",
"platform": null,
"description": "Janelia Whisker tracking\n========================\nFully automated tracking of single rows of whiskers in high-speed video. \n\nThe original source code repository is https://github.com/nclack/whisk/. \nThe [original website](http://openwiki.janelia.org/wiki/display/MyersLab/Whisker+Tracking) for this program is now accessible [here](https://wikis.janelia.org/display/WT/Whisker+Tracking).\nA copy of the instructions and the tutorial are available [here](https://github.com/wanglab-neuro/whisk-dockerfile/tree/main/context/wiki).\n\nDownloading\n===========\nPre-built binaries are available on [this forked repository](https://github.com/vncntprvst/whisk/tree/master/whisk/bin). Binaries are built against FFmpeg 6.0. \nBinary and library file can simply be installed from Pypi, with `pip install whisk-janelia`. \n> Note that on Linux, if not root, you may need to make some of the binary files executable, e.g. `chmod +x /path/to/whisk/bin/trace`. You can also use the post-installation script `update_permissions.py` to make all files in the `whisk/bin` directory executable. \nCheck which version of FFmpeg is installed, just type `ffmpeg` in a terminal. \nYou can also check which version of required libraries like `libavdevice` are installed with: \n`for dir in $(echo $LD_LIBRARY_PATH | tr \":\" \"\\n\"); do find $dir -name 'libavdevice.so*' 2>/dev/null; done`. \n\nSee also the [README on the whisk-dockerfile repo](https://github.com/wanglab-neuro/whisk-dockerfile), in `whisk-base` section. \n\nBuilding\n========\nUpdated build files are found [here](https://github.com/vncntprvst/whisk/). \nThis package uses a [Cmake][] based build system. The basic build steps are similar under Windows, OS X, and Linux. \nThe build requirements are `cmake` `gcc-12.2+` `FFmpeg`.\n\n**For Unix-y systems:** \n\n1. Install CMake 2.8+, a C++ compiler and other build tools.\n```\nsudo apt update\nsudo apt install cmake pkg-config bison gawk\nsudo apt install g++ gdb make ninja-build rsync zip\n```\n2. Install FFmpeg libraries\n```\nsudo apt install libavdevice-dev libavfilter-dev libavformat-dev libavcodec-dev libswresample-dev libswscale-dev libavutil-dev\n```\n* -- **Alternatively** -- \n Build FFmpeg from source. \n First, install the necessary dependencies: \n ```bash\n sudo apt-get install -y autoconf automake build-essential cmake libass-dev libfreetype6-dev libsdl2-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev pkg-config texinfo zlib1g-dev yasm libx264-dev libx265-dev libnuma-dev libvpx-dev libfdk-aac-dev libmp3lame-dev libopus-dev\n ```\n Then, download the FFmpeg source code: \n ```bash\n wget https://FFmpeg.org/releases/ffmpeg-6.0.tar.bz2\n tar xjf ffmpeg-6.0.tar.bz2\n cd ffmpeg-6.0\n ```\n Configure and compile FFmpeg with shared libraries (note the `--enable-pic`, `--enable-shared`, and `--disable-static` flags):\n ```bash\n CFLAGS=\"-fPIC\" CXXFLAGS=\"-fPIC\" ./configure \\\n --enable-gpl \\\n --enable-version3 \\\n --enable-nonfree \\\n --enable-small \\\n --enable-libmp3lame \\\n --enable-libx264 \\\n --enable-libx265 \\\n --enable-libvpx \\\n --enable-libfdk-aac \\\n --enable-libopus \\\n --enable-pic \\\n --enable-shared \\\n --disable-static\n make -j$(nproc)\n ```\n Finally, install FFmpeg: \n ```bash\n sudo make install\n ```\n\nIf cmake still fails because of it can't find FFmpeg libraries `libavdevice;libavfilter;libavformat;libavcodec;libswresample;libswscale;libavutil`, you need to have them somewhere, and make it find it, e.g. `export PKG_CONFIG_PATH=/home/$USER/ffmpeg_build/lib/pkgconfig`. \nIf you built FFmpeg from source, you can add `/usr/local/lib` to `LD_LIBRARY_PATH` and update the dynamic linker cache with `sudo ldconfig`: \n```bash\necho 'export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH' >> ~/.bashrc\nsource ~/.bashrc\necho \"/usr/local/lib\" | sudo tee /etc/ld.so.conf.d/FFmpeg.conf\nsudo ldconfig\n```\n\n3. Install Qt5 and Qt5Svg\n * `sudo apt install qtbase5-dev libqt5svg5-dev` \n * Check installation with `qmake -v`.\n * Set `Qt5_DIR` and `Qt5Svg_DIR` environment variables if cmake asks for it.\n4. Start in the root of the source directory (in a terminal).\n5. Type these commands (or use [VSCode's CMake extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools) to configure and build):\n```\n mkdir build\n cd build\n cmake ..\n make\n```\n\nFor WSL systems, this page may be helpful: \nhttps://devblogs.microsoft.com/cppblog/build-and-debug-c-with-wsl-2-distributions-and-visual-studio-2022/\n\n**For Windows systems** (ignore VS Code instructions if not using it): \n\n1. Install [Visual Studio Code](https://code.visualstudio.com/download).\n2. Install the C/C++ extension for VS Code. \n3. Install Mingw-w64 via [MSYS2](https://www.msys2.org/). Prefer installing MSYS2 in a directory without space (e.g., not C:/Program Files/ ...). That will save you a lot of headaches.\n4. Launch a MSYS2 terminal for the UCRT64 environment as an administrator and install the following: \n* Install gcc as mentioned in [MSYS2 installation page](https://www.msys2.org/): `pacman -S mingw-w64-ucrt-x86_64-gcc` \n* Install the Mingw-w64 toolchain: `pacman -S --needed base-devel mingw-w64-x86_64-toolchain`\n* Install cmake and generators (ninja ... make is installed with the toolchain above, ): `pacman -S mingw-w64-x86_64-cmake`\n* Install the FFmpeg libraries for the 64-bit MinGW toolchain: \n To install the most recent version instead, run `pacman -S mingw-w64-x86_64-ffmpeg`. \n If using python (see packages `whisk-janelia` and `whiskiwrap`), you need to ensure compatibility between the FFmpeg version used to build whisk (currently, version 6.0) and the FFmpeg library files that python will call with the package `ctypes`. Tarballs are available for download on [MSYS2's package page](https://packages.msys2.org/package/mingw-w64-x86_64-ffmpeg), or run `wget https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-ffmpeg-6.0-7-any.pkg.tar.zst`. Then, install the package with `pacman -U mingw-w64-x86_64-ffmpeg-6.0-7-any.pkg.tar.zst`. \n* Update the PKG_CONFIG_PATH environment variable to include the path to the FFmpeg library .pc files. In the MSYS2 terminal, run: `export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/mingw64/lib/pkgconfig`, and add it to `~/.bashrc` as well to make this change permanent.\n5. Open a terminal, navigate to the `whisk` repository directory.\n6. Run the following commands: \n```bash\n mkdir build\n cd build\n cmake ..\n ninja\n``` \n\nCMake works by building the Makefile, or other required project files, in the \"build\" directory you created. You don't have to use a Makefile; XCode projects,\nEclipse projects, Visual Studio projects, etc ... can be generated. To generate these other project types replace the \"cmake ..\" step with \"cmake-gui ..\". The\nGUI will show available options. See the CMake documentation for more details. \n\n[Cmake]: http://www.cmake.org\n\n\nFile formats\n============\n\n### Whiskers\n\nWhiskers can be stored in either a text or binary format. There is a command line utility, `whisker_convert`, provided to convert between different\nsupported formats. `batch.py` can be used to speed up the process of converting many files.\n\nThe most detailed description of each format can be found in the corresponding `whisker_io_*.c` files implimenting the readers/writers for each format.\n\nIn general, each whisker segment in a file is comprised of a unique id and a number of data points describing the shape as output from the tracing program.\n\n### Measurements \n\nThe measurements file stores the features of traced curves used for classification, such as follicle position, angle and whisker length.\nAdditionally, after classification, this file records the determined identity of each traced curve.\n\nGraphical interface\n===================\n\nSee ui/README for instructions on how to use the graphical user interface.\n\n ui2.py --help\n\nCommunity\n=========\n\n[Chat](https://discord.gg/Y7QJerr)\n\n[Issue Tracker](https://github.com/nclack/whisk/issues)\n\n",
"bugtrack_url": null,
"license": "LICENSE.txt",
"summary": "Fully automated tracking of single rows of whiskers in high-speed video.",
"version": "1.1.10",
"project_urls": {
"Homepage": "https://github.com/nclack/whisk/"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "46accda5282237fc88fb437a602349b90dc376b23f1d9dfe7deee74c317b6671",
"md5": "2fbd11701392ff07f7fce4ccf7fb34a1",
"sha256": "44b86715e4b62a41413c414f719cd18ce78b5257b78760bba8eddab393946134"
},
"downloads": -1,
"filename": "whisk_janelia-1.1.10-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2fbd11701392ff07f7fce4ccf7fb34a1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 21473527,
"upload_time": "2024-05-30T04:46:53",
"upload_time_iso_8601": "2024-05-30T04:46:53.991897Z",
"url": "https://files.pythonhosted.org/packages/46/ac/cda5282237fc88fb437a602349b90dc376b23f1d9dfe7deee74c317b6671/whisk_janelia-1.1.10-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f58f46d8c6902ef24b4296ea38c5d0190e27b3c4227fba0f6ead9322ea728481",
"md5": "45c1218af134233a2394aeae728f1937",
"sha256": "29998614456ee3686a642d0f8436f9e34d7ca904ec5cd8bcb90bfeae7bb4e97e"
},
"downloads": -1,
"filename": "whisk_janelia-1.1.10.tar.gz",
"has_sig": false,
"md5_digest": "45c1218af134233a2394aeae728f1937",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 21261617,
"upload_time": "2024-05-30T04:46:56",
"upload_time_iso_8601": "2024-05-30T04:46:56.922472Z",
"url": "https://files.pythonhosted.org/packages/f5/8f/46d8c6902ef24b4296ea38c5d0190e27b3c4227fba0f6ead9322ea728481/whisk_janelia-1.1.10.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-30 04:46:56",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "nclack",
"github_project": "whisk",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "whisk-janelia"
}