Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.1%) to scientific vocabulary
Last synced: 10 months ago · JSON representation ·

Repository

Basic Info
  • Host: GitHub
  • Owner: P-Hansson
  • License: gpl-3.0
  • Language: Jupyter Notebook
  • Default Branch: main
  • Size: 232 KB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created almost 2 years ago · Last pushed over 1 year ago
Metadata Files
Readme License Citation

README.md

Description of the setup:

This set of codes was designed for a project where juvenile eels were filmed during a five minute period. There were up to four eels in each video, all kept in separate boxes. The videos were analysed using Python (Jupyter Notebook via Anaconda) and R.
The following packages are required: * opencv (python) * shapely (python) * Geomorph (R)

Description of the file structure to be:

The following diagram shows the file structure. Note that the codes do not create this folder structure if it does not exist, so the necessary folders must be present before running the codes.
NOTE: the R code is not included in the diagram since it can be placed in any folder as the working directory is instead specified in the code

Training the model:

The training uses YOLOv3 and was done following the instructions and accompanying code of pysource.com Eels in the images used to train the model were labelled using Labelimg.

Description of the different codes:

shorteningframenrs (Jupyter Notebook)
This code is used to decrease the number of frames in the video, going through every video in the "allframes" folder. In the example code, every fifth frame is saved. The shortened videos are saved in the folder "missingboundaries", and the original videos are moved to "allframesdone".

boundaryimageextract (Jupyter Notebook)
This code extracts the first image for each video in the folder "missingboundaries" and saves them to "createboundaries/images", for later use in selecting the boundaries of the container housing the eels. The video is moved to the folder "to_analyse".

select_boundaries (R)
Note that although the package and code used in this section was designed for morphometric analyses, the code included here has retrofitted it for the purpose of extracting a csv file with coordinates for the boxes. If coordinates are produced through other means, be aware that the following python codes invert the y-axis due to the different treatments of the position of the origo (in R it is in the bottom left, in python it is in the top left). This code shows one image from the folder "createboundaries/images" at a time, allowing you to select the boundaries for the containers. The setup is for four square containers, where you select 16 points in total. The order of selection is shown in the image below <img width="650" src="./readmeimages/Box_order.jpg">

After each selection, you decide whether to accept the point or not. To accept the point, select "y", to reposition it, select "n". There "a" alternative exists but is not useful for this code. The positions are saved as a .tps file. This code also contains another section that transforms the .tps file into a .csv file that can then be used by the other codes. This .csv file is saved as "Box_boundaries.csv".

eeldetection3_versions (Jupyter Notebook)
This code includes three versions of the tracking code. The three codes are different variants on the same code, i.e. detecting and tracking the eels, but are used for different things, and are explained below. 1. Tracking and saving without showing the video. This code goes through the videos in the "toanalyse" folder. If the video lacks data for the boundaries of the boxes, the video will be skipped and placed in the "missingboundaries" folder. If there is boundary data for the video, the eels will be tracked, the data saved as "Eelcoordinates.csv", and the video moved to the "analysed" folder. Any duplicate detections in a box, indivating at least one false detection, is saved as "Dupesinboxes.csv". This code does not show the video as it is being processed. 2. Tracking and saving showing video. This code does the same as the previous code, saving the data and moving the videos to the "analysed" folder. However, it also shows the video as the eels are being tracked and can therefore be used if you suspect wrongful detection and want to see what the programme identifies as an eel. 3. Tracking with video without saving. This code goes through the videos in the "toanalyse" folder in the same way as the previous two codes, skipping videos without boundary data. However, while the eels are tracked, the data is not saved. This code shows the videos as the eels are being tracked and can therefore be used if you suspect wrongful detection but do not wish to save the data. This can be practical if you already have the data saved and simply want to rewatch a badly detected video.

Owner

  • Login: P-Hansson
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Hansson"
  given-names: "Pernilla"
  orcid: "https://orcid.org/0000-0001-8476-2122"
- family-names: "Aygür"
  given-names: "Ege"
title: "Eel tracking"
version: 1.0.0
date-released: 2024-08-21
url: "https://github.com/P-Hansson/eel-tracking"

GitHub Events

Total
  • Watch event: 1
  • Push event: 1
Last Year
  • Watch event: 1
  • Push event: 1