Deprecation Notice
This project has been deprecated and no longer managed or supported.
Application to detect, track and calculate statistics of objects in video. With the option to view the statistics by using the UI or exporting to CSV.
This application is the result of a bachelor's project done by a group of computer scientists at the Norwegian University of Science and Technology (NTNU). The initial assignment was provided by the Norwegian Institute for Nature Research (NINA) who wanted a more efficient way of gather statistics of video material they had collected at various locations.
- Python >= 3.8
It is recommended to install the application in a virtual environment using for example virtualenv or venv.
Find url to latest whl here for use in the commands below.
You can either install the package globally, as a user, or in a virtual environment.
We recommend using a virtual environment when developing and as a user when installing for production. This has the benefit of not to interfere with the global packages.
Note! Make sure that the python command is versions 3.9 or higher. This can be verifid by running python --version. If python reports back version 2.7, attempt to use python3 instead.
A virtual environment means that the application is confided inside a single directory which is loaded in the current shell and does not interfere with the system in any way.
Create the virtual environment:
$ virtualenv .venv # recommended # or $ python -m venv .venvLoad the virtual environment:
$ . .venv/bin/activateIf you use an other shell than bash, like fish or zsh. Use either activate.fish or activate.zsh instead.
It's also recommended to update the environment before installing the package. After loading the virtual environment, run the following:
$ python -m pip install --upgrade pip setuptools wheelTo install the package inside a virtual environment, use the step for installing globally below.
When installing globally, every user on the system has access to use the application.
Note! This is not the case if the command is executed inside a virtual environment.
$ pip install nina @ <url>After the application is installed by one of the steps above, run the following to start:
$ ninaThen navigate to http://localhost:5000 to access the application interface.
A configuration file(config.ini) is saved to a local path if not found at first start-up. Path it is saved to depend on operation system as specified below:
- linux/unix:
- If
XDG_CONFIG_HOMEenvironment variable is set, it is saved to a folderninain this location. - Else, it is saved to
~/.config/nina/.
- If
- windows: config is saved to
LOCALAPPDATA. - if it should not be able to determine where to save the config, it will be saved to the current working directory, where the solution are started from.
See also our Contribution Guidelines.
The project are using pre-commit. After install activate as below:
$ git clone <url> nina $ cd nina $ pre-commit install $ pre-commit install --hook-type commit-msg # Enable commitlintRunning development environment requires:
- Python (3.9, 3.10)
pip>= 21.1virtualenv(recommended)
# get source code $ git clone <url> nina $ cd nina # make virtual environment $ virtualenv .venv --download # or `python -m venv .venv --upgrade-deps` # activate environment $ . .venv/bin/activate # get dependencies $ pip install -e '.[testing, dev]' # run application with Flask dev-server $ python -m nina --dev # or run a single module $ python -m coreThe project is using tox for testing. Various environments are provided so that tests can be executed separately or all at once.
# to build and run tests for all supported versions: $ tox # or for a specific Python version or target: $ tox -e py39Pass -l to tox to see all targets.
$ tox -l py39 py310 coverageTo build the package for publishing, run the following command inside a virtual environment:
$ python -m buildThe dataset developed and used in this work is published as part of the dataset published here by another group that also worked on a bachelor project for NINA.
If you use the code or dataset in your research, consider citing the Bachelor thesis. Here is the BibTeX entry:
@mastersthesis{nordoelum_artsgjenkjenning_2021, type = {Bachelor's thesis}, title = {Artsgjenkjenning av fisk}, author={Nord{\o}lum, Birger Johan and Lavik, Eirik Osland and Haugen, Kristian Andr{\'e} Dahl and Kvalvaag, Tom-Ruben Traavik}, year = {2021}, school = {Norwegian {U}niversity of {S}cience and {T}echnology ({NTNU})}, address = {Gj{\o}vik, {N}orway}, url = {https://hdl.handle.net/11250/2777966}, } The source code is licensed under GPLv3. License is available here.