azzhu / EasyFlyTracker

MIT License
11 stars 8 forks source link

Analysis Error #6

Open Fli293 opened 1 year ago

Fli293 commented 1 year ago

Hello, I have two inquires regarding using EasyFlyTracker with my own video.

  1. My setup consisted of 64 flies being monitored (4 groups of 16) with a webcam that captures videos with a resolution of 1,280 × 720 and 30 frames per second. However, when I input my video for tracking, only some of my flies were correctly identified and tracked. In the study it says it works well to separate flies from the background with the threshold setting of 120., or make sure there is a difference greater than 70. Being a novice to computer programming, what does this mean and how do I change this? Furthermore, in order to get any flies to track at all I had to input my own background image as it seems the background imaging did not work. How can I fix this?
  2. After tracking the flies it was able to recognize, when I enter the analysis command I get back the error message attached below. What is the cause of this problem?

Here is a drive link to my video: https://drive.google.com/file/d/1fVS5lC6PzsqXWyruotdLOBxP2NYTELPC/view?usp=sharing Can you get it to work on your computer? Maybe the video quality is too poor or I should have lit it from above as well as below? Also, the distance across the well-plate is 266mm, so it is about the size of yours.

Screen Shot 2023-01-04 at 10 04 03 PM
azzhu commented 1 year ago

hello, 1, Two thresholds are used in the segmentation of fruit flies, 120 and 70 respectively, and a certain pixel will be considered as the segmentation result when its value is less than 120 and its difference from the background image is greater than 70, which is the meaning of these two values. This strategy requires that the light in your video should be roughly the same, but your video is dark in the lower left corner and bright in the upper right corner, so there is no uniform threshold to segment the entire image. As for the background image, the program calculates it automatically, no need to set it yourself. 2, This problem requires debugging after downloading the video, but the video continues to fail to download, can you upload the video here? Data upload address: http://123.125.167.210:3557/sharing/YCtXWPIb7 password: QWE123456

thanks.

Fli293 commented 1 year ago

Thank you for your response! Regarding my first question, is there anything that can be done to fix this problem? Regarding the second, I signed in on that link but it says I do not have proper privileges to perform the action of sharing my file. Could you change the settings please?

azzhu commented 1 year ago

1, We will try to fix this problem. Thank you for your valuable advice. 2, Where are you now? Could you please send the error message picture?

Fli293 commented 1 year ago
  1. Are you aware if I could fix this problem within the video I already recorded?
  2. Image attached below: 25306043-10E1-4E7C-846A-04167E71870C
Susuqu commented 1 year ago
  1. Are you aware if I could fix this problem within the video I already recorded?
  2. Image attached below: 25306043-10E1-4E7C-846A-04167E71870C

We used another way to download your video and got it. Next we will try to track and analyze your video. Thanks for your patients.

azzhu commented 1 year ago

The video is now down, and I've successfully processed it on my computer. I guess you may have configured something wrong. Here is my configuration file and the running result. You can refer to it: http://123.125.167.210:3557/sharing/mqifxvvGa

This is the circle configuration information. Did you configure it like this? config

This is the parameter configuration information, you can refer to it.

################### config file of EasyFlyTracker version 1.0 ###################
# Go through the tutorials and give feedback on our website http://easyflytracker.cibr.ac.cn.
# Chinese Institute for Brain Research, Beijing
# 2021-08-13
################### config file of EasyFlyTracker version 1.0 ###################

##### 1. Must change parameters #####
## [MUST CHANGE] Modify the video path, only support absolute path.
video_path: E:\Downloads_Edge\test\clippedvideocontrol.mp4

## [MUST CHANGE] Specify the path and name of the output, only support absolute path.
output_dir: E:\Downloads_Edge\test\clippedvideocontrol

## [MUST CHANGE] Real distance (mm) from 'point A' to 'point B' of your chamber. Default is "252" mm of our diagonal line.
AB_dist_mm: 266

## [MUST CHANGE] Specify the group.file path, only support absolute path.
group_path: E:\Downloads_Edge\test\group.xlsx

##### 2. Optional change parameters #####

## [Optional CHANGE, used in tracking] Skip the configuration of charmber circles because the '.pkl' file already exists and does not need to be reconfigured. Default is "False".
skip_config: False

## [Optional CHANGE, used in tracking] Specify the start time point (minute) of tracking, default is 0.
begin_time: 0

## [Optional CHANGE, used in tracking] Specify the duration time (minute) of tracking, default is None (means all video will be calculated).
duration_time: None

## [Optional CHANGE, used in tracking] Disaplay tracking results each second, default is "True". "False" to close.
show_track_result: False

## [Optional CHANGE, used in analyzing and statistics] Specify the time interval of statistics of the activity plots. Default is "10" mins.
ana_time_duration: 10

## [Optional CHANGE, used in analyzing and statistics] Specify the time interval of statistics of the sleep time plots. Default is "30" mins.
sleep_time_duration: 10

## [Optional CHANGE, used in analyzing and statistics] Specify the time interval of statistics of angle change plots. Default is "30" mins.
angle_time_duration: 10

## [Optional CHANGE, used in analyzing and statistics] If or not to calculate the heatmap after keying out sleep, the default is False.
heatmap_remove_sleep: False

This is the group information in excel: Snipaste_2023-01-28_16-01-23

Thanks! Good luck! If I still haven't solved your problem, further feedback is welcome.