Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override automatic matches #198

Open
BryceLong13 opened this issue Apr 19, 2023 · 3 comments
Open

Override automatic matches #198

BryceLong13 opened this issue Apr 19, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@BryceLong13
Copy link

Describe the bug
Hello,

I've attached the specific video showing where Trex wrongly detects luminescence as a fish. As in the video, the fish0 is wrongly assigned, and because there are two dots in this video, when the second one appears, it doesn't get assigned. The solution should be to delete the assignment and reassign it manually, but I hardly find a way to do it in Trex.

For this problem, the Trex help page says "To override automatic matches for an entire segment, please select the individual first, go to the start frame of that segment and click on the small “delete” button in the matching info card on the left". I think I've pull out the matching page as seen in the picture attached, but there's no "delete" button.

Screenshots
matching_info_card

misassigning.mov

Computer (please complete the following information):

  • Operating system: macOS Ventura
@BryceLong13 BryceLong13 added the bug Something isn't working label Apr 19, 2023
@mooch443
Copy link
Owner

Hello,

I understand that you are having trouble with TRex incorrectly detecting luminescence as a fish in your video and not being able to find the "delete" button mentioned in the TRex help page for manually overriding the automatic matches. Since you mentioned that you are using the correct version of TRex (from the provided screenshot), it seems the issue might be related to the fact that you haven't performed visual identification.

The "delete" button you are looking for appears when training has been performed and applied using the "auto correct" button, automatically after the training finishes, or through the application of the network. However, it seems like you are interested in overriding specific instances where tracking is incorrectly assigning individuals, without performing any kind of training. In this case, I recommend trying the following steps:

  1. Start by adjusting relevant parameters, such as enable_absolute_difference and track_threshold, which might help improve the tracking accuracy. You can find more information about these parameters in the TRex documentation: track_absolute_difference and track_threshold.

  2. If adjusting the parameters doesn't solve the issue, you can consider using the categorization feature in TRex. This feature allows you to differentiate between noise and objects of interest, such as fish, by iteratively selecting samples for two categories (e.g., noise and fish) and learning to distinguish between them. To use this feature, you can follow these steps:

    • Retrack your video using the track_only_categories option to filter objects for only "fish" after applying the categorization to the current video.
    • Set categories_min_sample_images to 0 to label all objects, regardless of the length of their trajectories.

You can find more information about these parameters in the TRex documentation: track_only_categories and categories_min_sample_images.

By following these steps, you should be able to improve the tracking accuracy in your video and manually override specific instances where tracking is incorrectly assigning individuals, without performing any kind of training. If you still face issues or need further assistance, feel free to reach out or consult the TRex documentation.

@Brycealong
Copy link

Thank you so much!

But I had no luck changing the enable_absolute_difference and track_threshold.

About the categorization, could you be more clear what I should do? From my understanding, I should do the categorization to make the falsely assigned object named "noise0" and then set track_only_categories to fish. But I didn't find a way to rename it. Also I tried track_only_categories to 1,2,3,4,5 because fish0 is wrongly assigned but it didn't work either.

@mooch443
Copy link
Owner

Hey! Let me provide a clearer explanation of the categorization process in TRex:

  1. To access the categorization panel, click on the menu button in the top-right corner and select "categorize" from the list.
  2. When you open the categorization panel for the first time, you will be prompted with a text field where you can enter a comma-separated list of categories (e.g., 'noise,fish'). Click "OK" to create the categories.
  3. The principle of network training is to teach the model to recognize patterns in the data by providing it with examples of each category. In TRex, this is done by clicking on the small movie clips corresponding to your categories.
  4. If you see a movie of noise, click the "noise" button in the top-left corner of the movie. If you see a movie of fish, click the "fish" button in the top-left corner of the movie.
  5. You will know when the training good enough (typically) when the sample number listed below the movies is greater than 1000 per category, and the accuracy is stated as greater than 80%. Until then, keep clicking. Note that this requires pretty consistent tracking of things, even they are the wrong things - meaning, optimally, long consecutive trajectories. To improve tracking results, also have a look here. Once you're happy with the results, click Apply.
  6. The track_only_categories parameter takes an array of strings (e.g., ['fish']). Set this property to track only the objects belonging to the specified categories. As a bonus, set categories_min_sample_images = 0, open the categorization menu again, and apply again (ensures that all instances of objects are considered, even for short consecutive segments, but slower - otherwise the default is 50). To apply changes of these parameters, retrack the video by scrolling to frame 0/the beginning of the video in the timeline and then clicking the "Re-analyze" button in the top-right menu.

Please note that it is recommended to have an NVIDIA GPU or an M1/M2 processor to use this machine learning feature efficiently.

If you still face issues or need further assistance, don't hesitate to reach out again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants