Giter Site home page Giter Site logo

Comments (46)

DorianBattivelli avatar DorianBattivelli commented on July 30, 2024 1

Actually, I don't know what happened, but now it is working, the analysis is on going, thank you!

from simba.

DorianBattivelli avatar DorianBattivelli commented on July 30, 2024 1

Yes, they have the same resolution.
Ok, so let's see that later, thank you again,
Best,
Dorian

from simba.

sgoldenlab avatar sgoldenlab commented on July 30, 2024 1

Can share share through a google drive with [email protected] ?

Yes zeros are not good for feature extractions. I don't know when this occurs, but if it happens when animals is not present you can deal with it by clipping that part of the video. If the zero detection happens because the experimenter is present, then crop/clip that part of the video. If all the animal are present, the body-parts are present, and the experimenter is not there (and pose-estimation should pick up the body-part location but you still see zero) then you have to improve the model somehow - train it on additional videos and/or frames is a good start.

from simba.

DorianBattivelli avatar DorianBattivelli commented on July 30, 2024 1

Hi @sgoldenlab , thank you very much for the big help, that works perfectly well!

from simba.

DorianBattivelli avatar DorianBattivelli commented on July 30, 2024

Ok, I found the topic in your FAQ. I'll follow the the Batch pre-process videos in SimBA tutorial.

from simba.

sgoldenlab avatar sgoldenlab commented on July 30, 2024

Hi @DorianBattivelli - yes it's to do with all body-parts falling on the same X/Y co-ordinates. Happy you found it.

There are two types of heatmaps - one that requires features and one that doesn't.

The one that does require features plots heatmaps representing the time/location of animals engaging in classified behaviours and is accessed in the visualization tab.

The one that doesn't require features plots heatmaps representing the time spend in locations and is accessed in ROI tab:

image

from simba.

DorianBattivelli avatar DorianBattivelli commented on July 30, 2024

@sgoldenlab Thank you for the answer. Indeed I tried this function, but it does not work neither.
Here what appear in my terminal:

Schermata 2020-07-24 alle 16 55 06

from simba.

sgoldenlab avatar sgoldenlab commented on July 30, 2024

Ah could be another .avi / .mp4 issue. Let me check.

Nope, it works fine regardless of mp4 / avi.

I think the program has troubles finding the resolution of your video in your logs/video_info.csv file. Does your video_info.csv contain the resolution width and height for all videos like this?

image

from simba.

DorianBattivelli avatar DorianBattivelli commented on July 30, 2024

Yes, here one file for one set of videos:

Schermata 2020-07-24 alle 17 46 06

from simba.

sgoldenlab avatar sgoldenlab commented on July 30, 2024

Ah thanks - I'm not sure why - but the heading seems to have moved one row? It now starts at row two, whereas SimBA expects the heading in row 1. Does it work if you move it up?

from simba.

DorianBattivelli avatar DorianBattivelli commented on July 30, 2024

I think it is because I converted it in xlsx file to make easier the lecture on the screenshot, but the original csv starts from row 1:

Schermata 2020-07-24 alle 17 57 15

from simba.

sgoldenlab avatar sgoldenlab commented on July 30, 2024

Thanks - let me check this again when I get to a computer. Might be that I can replicate it by using the auto argument or playing more with the bin size.

from simba.

sgoldenlab avatar sgoldenlab commented on July 30, 2024

@DorianBattivelli - would you happen to have any files in your outlier_corrected_movement_location folder which is not represented in your video_info.csv file?

from simba.

DorianBattivelli avatar DorianBattivelli commented on July 30, 2024

Not sur to understand what you mean :/

The files in my outlier_corrected_movement_location folder are the same than the ones in my video_info.csv file:

Schermata 2020-07-24 alle 18 59 41

from simba.

sgoldenlab avatar sgoldenlab commented on July 30, 2024

That's what I meant, it looks like it should!

from simba.

sgoldenlab avatar sgoldenlab commented on July 30, 2024

As I can't replicate it here, I wonder if you can help me by inserting a line in your code and tell me what's printed out?

In this file:

image

Could you insert a new line on Line 41 which would read like this?

image

At least of these guys for some reason is going to be zero in your setup and it would help knowing which one it is

from simba.

sgoldenlab avatar sgoldenlab commented on July 30, 2024

Don't worry about the try and except you see at the lower part, you don't have it, I just inserted it now to catch the error you are seeing

from simba.

DorianBattivelli avatar DorianBattivelli commented on July 30, 2024

I'll try that as soon as I'll be back at mine, and I let you know, thanks.

from simba.

DorianBattivelli avatar DorianBattivelli commented on July 30, 2024

@sgoldenlab, I added the line you told me (print(...)), but the line starting by binWidth, etc. was not at line 40 in my document, but at the line 54, so I added the line at line 55.
In yellow you can see the line 41, while in blue next to the cursor is the line I inserted (at line 55) (I don't know how to make the row number visible on wordpad, so I counted it manually).

Schermata 2020-07-24 alle 22 21 33

Now that I saved the file like that, I can't launch SimBA anymore, here what appears:

Schermata 2020-07-24 alle 22 25 29

from simba.

sgoldenlab avatar sgoldenlab commented on July 30, 2024

Ah its common one, it needs to be uniform 4 spaces or uniform tabs, I will send you the file

from simba.

sgoldenlab avatar sgoldenlab commented on July 30, 2024

plot_heatmap_location_new.zip

just replace the one you have with this

from simba.

DorianBattivelli avatar DorianBattivelli commented on July 30, 2024

Thank you, I managed to open SimBA with your file.
Here the error when I try to generate the heat map:

Schermata 2020-07-24 alle 22 35 50

from simba.

sgoldenlab avatar sgoldenlab commented on July 30, 2024

Ah I think I understand. The bin size becomes rounded of to less than a pixel due to a rather low resolution that I did not anticipate sorry. Try this - in the script - change int to float.

image

from simba.

DorianBattivelli avatar DorianBattivelli commented on July 30, 2024

I did the change:

Schermata 2020-07-24 alle 22 47 27

But the error still occurs, even after that I restarted Simba from scratch:

Schermata 2020-07-24 alle 22 49 29

from simba.

sgoldenlab avatar sgoldenlab commented on July 30, 2024

ah

from simba.

sgoldenlab avatar sgoldenlab commented on July 30, 2024

Sorry one more float!

image

from simba.

DorianBattivelli avatar DorianBattivelli commented on July 30, 2024

I did the change:

Schermata 2020-07-24 alle 23 00 58

But now I cannot fill the bin window anymore, I can't write anything:

Schermata 2020-07-24 alle 23 05 36

from simba.

sgoldenlab avatar sgoldenlab commented on July 30, 2024

That seems very strange, does it come with en error msg in the terminal? Does it persist after restarting SimBA?

from simba.

sgoldenlab avatar sgoldenlab commented on July 30, 2024

good news again!

from simba.

DorianBattivelli avatar DorianBattivelli commented on July 30, 2024

I have actually one issue again for heat map generation. I'm able to generate the videos, but when I ask to save the last image only, it just analyses the first video, and stops. It does not analyse the next videos:
Schermata 2020-07-25 alle 01 58 48

Should I modify something in the code?

from simba.

sgoldenlab avatar sgoldenlab commented on July 30, 2024

Hmm, I don't think so - are the videos all the same resolution?

I may have to troubleshoot this tomorrow.

from simba.

DorianBattivelli avatar DorianBattivelli commented on July 30, 2024

@sgoldenlab, to give you further inputs about my issue.

This morning I tried to generate heat map (only the last picture) with another set of videos and I get a strange result. Since I have 2 animals, I first run for "center1", and it generated one picture for all my videos, so I though the problem was solved. But then, when I run for "center2", one picture is missing for my last video.

FYI:
The resolution of the videos for which I failed to obtain a heat map yesterday (the program stopped after having generated the HM of the first video) picture is:
Schermata 2020-07-25 alle 09 47 35

The resolution of the videos I worked with this morning:
Schermata 2020-07-25 alle 09 49 58

I have the feeling that the resolution of my videos is very low, and that can be very problematic. Actually it's because I cropped a subfield of my raw videos, so the remaining portion on which I'm focusing for working ends up with a pretty bad resolution.
Btw, turning back to my original problem that concerned the issue I have to extract de features, I don't think that the pre process tutorial can help me. I already did what is explained there for all my videos: cropping and splitting my files before working on it. So I actually don't know how I will be able to build classifiers from these files.
Let me know if you have some ideas,
Thanks!

from simba.

sgoldenlab avatar sgoldenlab commented on July 30, 2024

Hi @DorianBattivelli. Yes for your first point, I think what is happening is that one animal, for whatever reason - is placed "outside" the heat-map array and it breaks. For this reason I thought I'd just insert a fix saying if the animal (as in your case) is placed in column 16 (and the array only contains 15 columns) then place the animal in column 15.

EDIT: This is because, for example, "Center2" has a coordinate outside the map, but "Center1" does not.

For your second, I am not entire sure I understand - could you be more specific? I know the videos are pretty poor resolution (0.3 pixels per milometer) but this should not matter if you have good tracking and can see yourself what is happening in the cropped videos.

from simba.

sgoldenlab avatar sgoldenlab commented on July 30, 2024

plot_heatmap_location_new.zip

@DorianBattivelli - can you give this file a go?

It should catch and correct the IndexErrors you are seeing.

from simba.

DorianBattivelli avatar DorianBattivelli commented on July 30, 2024

Thank you, actually yes, it works for some video, but for some others, the problem persists:

Schermata 2020-07-25 alle 18 48 56

from simba.

sgoldenlab avatar sgoldenlab commented on July 30, 2024

Thanks it's because your body part is now two columns out of the frame, why I don't know, and I only controlled for one. I don't have a file to troubleshoot with, would you mind sharing a single .csv for me from your outlier_corrected_movdment_location folder?

from simba.

DorianBattivelli avatar DorianBattivelli commented on July 30, 2024

Concerning the second point, I meant that certainly the reason why my feature extraction failed is due to the low resolution / the bad quality of my model. I deduced that from what I read on your FAQ concerning the QHull 6013 error that I have when I click "extract features". There, it is said that this error occurs when one or the two animals are missing (and so the tracking is not good enough, DLC failed to identify the body parts I guess).
What is strange is that when I look at my labeled videos on DLC, I think that the tracking is pretty good. But when I open my csv files, I see a lot of cells with "0", which I suppose means that the label is not detected right?

For all these reasons, I deduce that my impossibility to extract the features is due to the low quality of my tracking model. Maybe I'm wrong.

from simba.

DorianBattivelli avatar DorianBattivelli commented on July 30, 2024

No problem for sharing my csv file, where can I send it to you privately?

from simba.

DorianBattivelli avatar DorianBattivelli commented on July 30, 2024

Shared.

FYI:
cEFp1: I can generate a HM for each video only with Ear_right1. But if I select Center1, it works only for the first video (cEFp1_15), but fails for the other.

cEFp3: it works for video _15, for both Center_1 and Center_2, but for the video _60, Center2 fails.

from simba.

sgoldenlab avatar sgoldenlab commented on July 30, 2024

Thanks! got it, will take a look a little later and get you a fix.

from simba.

DorianBattivelli avatar DorianBattivelli commented on July 30, 2024

Thank you!

from simba.

sgoldenlab avatar sgoldenlab commented on July 30, 2024

One more thing - could you share your video_info.csv also? To make sure I'm working with your settings

from simba.

DorianBattivelli avatar DorianBattivelli commented on July 30, 2024

Done

from simba.

sgoldenlab avatar sgoldenlab commented on July 30, 2024

Hi @DorianBattivelli - I'm sorry I still struggle to re-create this, my heatmaps generate fine for the 60 file using the center of animal 2:

image

What I am thinking is that you sent me the DLC output files, from project-folder/csv/input_csv in SimBA correct? If you send me the outlier corrected files, I may be able to recreate it with those.

from simba.

DorianBattivelli avatar DorianBattivelli commented on July 30, 2024

Since I'm working on multi animal project, I converted the h5 DLC files in csv through SimBA, and they are the files I sent to you.
I just uploaded the outlier_corrected_movements_location folders on drive.

from simba.

sgoldenlab avatar sgoldenlab commented on July 30, 2024

plot_heatmap_location_new.zip

Hi @DorianBattivelli - can you try it using this script? It should catch any error you have in the alignment between the resolution of your video and bin size, and print a warning, and then plows on

from simba.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.