-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from ver228/development
Development
- Loading branch information
Showing
97 changed files
with
17,177 additions
and
206 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from tierpsy.gui.SelectApp import tierpsy_gui | ||
import sys | ||
|
||
if __name__ == '__main__': | ||
sys.exit(tierpsy_gui()) |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import sys | ||
|
||
from tierpsy.gui.HDF5VideoPlayer import tierpsy_gui_simple | ||
|
||
if __name__ == '__main__': | ||
sys.exit(tierpsy_gui_simple()) |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
Created on Tue Jun 9 15:12:48 2015 | ||
@author: ajaver | ||
""" | ||
from tierpsy.processing.processMultipleFilesFun import tierpsy_process | ||
|
||
if __name__ == '__main__': | ||
tierpsy_process() |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
Created on Tue Jun 9 15:12:48 2015 | ||
@author: ajaver | ||
""" | ||
from tierpsy.tests.run_tests import tierpsy_tests | ||
|
||
if __name__ == '__main__': | ||
tierpsy_tests() |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,63 +1,52 @@ | ||
*The instructions below are to install Tierpsy Tracker from the source code. I would recommend to do this only if you are using Linux or want to run the development version, otherwise use the double-click executables available for Windows (7 or latest) and OSX (Yosemite or latest) in the [releases page](https://github.com/ver228/tierpsy-tracker/releases).* | ||
# Installation Instructions | ||
|
||
# System Requirements | ||
- Python 3.6 (I would recommend to use [miniconda](https://conda.io/miniconda.html)). | ||
- Optional [ffmpeg](https://ffmpeg.org/download.html): ffprobe must be accessible from the command line to calculate the video timestamps. | ||
- [C compiler compatible with cython](http://cython.readthedocs.io/en/latest/src/quickstart/install.html). In Windows, you can use [Visual C++ 2015 Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/). In OSX, if you install [homebrew](https://brew.sh/) it will setup the C compiler without the need to download XCode from the appstore. | ||
- [Git](https://git-scm.com/). [Here](https://gist.github.com/derhuerst/1b15ff4652a867391f03) are some instructions to install it. | ||
## Installation from precompiled packages | ||
- Download python 3.6>= using [anaconda](https://www.anaconda.com/download/) or [miniconda](https://conda.io/miniconda.html) if you prefer a lighter installation. | ||
- Open a Terminal in OSX or Linux. In Windows you need to open the Anaconda Prompt. | ||
- [Optional] I would recommend to create and activate an [enviroment](https://conda.io/docs/user-guide/tasks/manage-environments.html) as: | ||
|
||
# Installation | ||
|
||
1. Install dependencies: | ||
|
||
Using pip: | ||
```bash | ||
pip install numpy matplotlib tables pandas pyqt5 h5py scipy scikit-learn scikit-image seaborn xlrd cython statsmodels numba keras==2.1.5 tensorflow opencv-python-headless | ||
``` | ||
#Windows | ||
conda create -n tierpsy | ||
conda activate tierpsy | ||
|
||
Using anaconda: | ||
```bash | ||
conda install --channel conda-forge numpy matplotlib pytables pandas gitpython pyqt h5py \ | ||
scipy scikit-learn scikit-image seaborn xlrd cython statsmodels numba keras=2.1.5 opencv tensorflow | ||
#OSX or Linux | ||
source create -n tierpsy | ||
source activate tierpsy | ||
``` | ||
|
||
2. Clone this repository either using the [Github Desktop](https://desktop.github.com/) or from the command line as: | ||
|
||
- Finally, donwload the package from conda-forge | ||
```bash | ||
git clone https://github.com/ver228/tierpsy-tracker | ||
conda install tierpsy -c conda-forge | ||
``` | ||
- After you can start tierpsy tracker by typing: | ||
```bash | ||
tierpsy_gui | ||
``` | ||
On OSX the first time tierpsy is intialized it will create a file in the Desktop called tierpsy_gui.command. By double-cliking on this file tierpsy can be started without having to open a terminal. | ||
|
||
Do not forget to activate the enviroment every time you start a new session. | ||
|
||
3. Install the rest of the modules. Firts move to the tierpsy-tracker root folder (the folder with the cloned repository) as: | ||
```bash | ||
cd tierpsy-tracker | ||
``` | ||
Then install the rest of the modules using the following command according to your operative system. | ||
Note: it seems that there might be some problems with the opencv version available through `conda`. If you have problems reading video files or encounter error related with `import cv2`, then you can try to install opencv using pip as: | ||
```bash | ||
bash installation/installation_script.sh #OSX or Linux | ||
|
||
installation/installation_script.bat #Windows | ||
pip install opencv-python-headless | ||
``` | ||
|
||
## Possible Issues | ||
|
||
|
||
- The most common problem in the installation is OpenCV (error in import cv2). Try a fresh miniconda installation (or a fresh enviroment) and make sure your are using the [conda-forge](https://conda-forge.org/) packages. It this does not work I am afraid you would have to solve the problem by yourself (Google is your friend). | ||
|
||
- You do not need to install manually the [Open Worm Analysis Toolbox](https://github.com/openworm/open-worm-analysis-toolbox). However if you do (and I do not recommend it), be aware that there is a bug with the pip installer: it is missing some dependencies and it will create a corrupt [.egg](https://stackoverflow.com/questions/2051192/what-is-a-python-egg) in your packages folder. Manually delete the .egg (use the error traceback to find the its location) and re-run `installation_script.sh`. The script will download the Open Worm Analysis Toolbox repository and install it using `python setup.py develop`. | ||
|
||
|
||
# Test Data | ||
On Mac OSX or Linux, some test data can be downloaded by running | ||
## Installation from source | ||
- Download python 3.6>= using [anaconda](https://www.anaconda.com/download/)) or [miniconda](https://conda.io/miniconda.html)). | ||
- Install [git](https://git-scm.com/). [Here](https://gist.github.com/derhuerst/1b15ff4652a867391f03) are some instructions to install it. | ||
- Install a [C compiler compatible with cython](http://cython.readthedocs.io/en/latest/src/quickstart/install.html). In Windows, you can use [Visual C++ 2015 Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/). In OSX, if you install [homebrew](https://brew.sh/) it will setup the C compiler without the need to download XCode from the appstore. | ||
|
||
- Open a Terminal or Anaconda prompt and type: | ||
```bash | ||
installation/installation_script.sh --download_examples | ||
git clone https://github.com/ver228/tierpsy-tracker | ||
cd tracker | ||
source create -n tierpsy #[optional] | ||
conda install --file requirements.txt | ||
pip install -e . | ||
``` | ||
|
||
The tests can also be manually downloaded using [this link](https://imperiallondon-my.sharepoint.com/personal/ajaver_ic_ac_uk/_layouts/15/guestaccess.aspx?guestaccesstoken=ldZ18fLY%2bzlu7XuO9mbKVdyiKoH4naiesqiLXWU4vGQ%3d&docid=0cec4e52f4ccf4d5b8bb3a737020fc12f&rev=1). Uncompress the data and save it in the main repository folder `tests/data` . | ||
|
||
You can then run the tests by running: | ||
# Batch processing from the command line. | ||
The script `TierpsyTrackerConsole.py` was deprecated in favor of using the command `tierpsy_process`. Type `tierpsy_process -h` for help. | ||
|
||
```bash | ||
python tests/run_tests.py | ||
``` | ||
# Tests | ||
After installing you can run the testing scripts using the command `tierpsy_tests` on the terminal. Type `tierpsy_tests -h` for help. I would recommed to run one test at the time since there is not currently a way to summarize the results of all the tests. |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
"%PYTHON%" setup.py install --single-version-externally-managed --record=record.txt | ||
if errorlevel 1 exit 1 |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
$PYTHON setup.py install --single-version-externally-managed --record=record.txt # Python command to install the script. |
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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package: | ||
name: tierpsy | ||
version: "1.5.1-beta" | ||
|
||
source: | ||
path: .. | ||
#git_rev: "v1.5.0" | ||
#git_url: "https://github.com/ver228/tierpsy-tracker" | ||
|
||
build: | ||
osx_is_app: True | ||
|
||
requirements: | ||
build: | ||
- python | ||
- numpy >=1.14 | ||
- setuptools | ||
- cython | ||
|
||
run: | ||
- python | ||
- keras=2.1.5 | ||
- opencv | ||
- tensorflow | ||
- numpy >=1.14 | ||
- matplotlib | ||
- pytables | ||
- pandas | ||
- pyqt | ||
- scipy | ||
- scikit-learn | ||
- scikit-image | ||
- statsmodels | ||
- numba | ||
- tqdm | ||
- requests | ||
|
||
app: | ||
entry: tierpsy_gui | ||
summary: Tierpsy Tracker Multi-Worm Tracker | ||
type: desk | ||
|
||
test: | ||
imports: | ||
- tierpsy | ||
- tierpsy.features.tierpsy_features | ||
- tierpsy.features.open_worm_analysis_toolbox | ||
commands: | ||
- tierpsy_process -h | ||
- tierpsy_tests -h | ||
|
||
about: | ||
home: https://github.com/ver228/tierpsy-tracker | ||
license: MIT | ||
license_file: LICENSE | ||
summary: Tierpsy Tracker Multi-Worm Tracker |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
cython | ||
keras=2.1.5 | ||
opencv | ||
tensorflow | ||
numpy >=1.14 | ||
matplotlib | ||
pytables | ||
pandas | ||
pyqt | ||
scipy | ||
scikit-learn | ||
scikit-image | ||
statsmodels | ||
numba | ||
tqdm | ||
requests |
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
Oops, something went wrong.