kristinbranson / JAABA

Janelia Animal Behavior Detector
Other
75 stars 30 forks source link

Issue on trk.file produced by APT #333

Closed Junes94 closed 4 years ago

Junes94 commented 4 years ago

Hi, I faced some difficulties in generating features using JAABA from .trk file produced by APT. And I got the error window as screenshots. I've done all procedures as manual said, but don't know the reason there is an error in adding expdir. The error windows said that the .trk file has different number of column between first and second column.

Did I do wrong when exporting .trk file from APT project? I used .avi movie file and mdn training(local conda) for tracking just one landmark. And after training, I just tracked all frames and then saved the project to .lbl file and export the tracking results to .trk file. And I used 'MATLAB R2019.a'

Thank you.

JAABA_1 JAABA_2 JAABA_3 JAABA_4 JAABA_5

mkabra commented 4 years ago

Hi,

In the "New JAABA Project" window, the "Tracking Data File Name" refers to a trx file that is different than a trk file. The trx file has animal tracking data such as centroid and orientation typically generated by CTrax or other whole animal trackers. Since this file is essential for JAABA and not all APT projects might have them, when creating projects from APT we give an option to automatically create one. This is the "For JAABA Trx use..." option in APTProject window. In this case, the file name specified in "Tracking Data File Name" in the "New JAABA Project Window" is where this automatically created file is stored. So you should specify something like "tracks.trx" or "fr_1.trx".

Also, note that that JAABA needs a separate directory for each movie and the movie files that you would like to use should have the same name. Eg, if you specify the "Movie File Name" as fr_1.avi, then you won't be able to see fr_2.avi in JAABA unless you move it to a different directory and rename it as fr_1.avi. The same goes for the trk file as well.

Mayank

On Tue, Apr 28, 2020 at 12:23 PM JunesuLee notifications@github.com wrote:

Hi, I faced some difficulties in generating features using JAABA from .trk file produced by APT. And I got the error window as screenshots. I've done all procedures as manual said, but don't know the reason there is an error in adding expdir. The error windows said that the .trk file has different number of column between first and second column.

Did I do wrong when exporting .trk file from APT project? I used .avi movie file and mdn training(local conda) for tracking just one landmark. And after training, I just tracked all frames and then saved the project to .lbl file and export the tracking results to .trk file. And I used 'MATLAB R2019.a'

Thank you.

[image: JAABA_1] https://urldefense.com/v3/__https://user-images.githubusercontent.com/64457340/80451567-22fb1480-895f-11ea-91b5-24c0c3e078ef.png__;!!Eh6p8Q!VcpOuJrocsRMtQQExPQZWtIFrHgIs-kuar8wGOkqx1bVu2aJWKK1Dzqx-fZvvTCBs1o$ [image: JAABA_2] https://urldefense.com/v3/__https://user-images.githubusercontent.com/64457340/80451571-242c4180-895f-11ea-87d9-f268349ed325.png__;!!Eh6p8Q!VcpOuJrocsRMtQQExPQZWtIFrHgIs-kuar8wGOkqx1bVu2aJWKK1Dzqx-fZvMnJFNfs$ [image: JAABA_3] https://urldefense.com/v3/__https://user-images.githubusercontent.com/64457340/80451573-242c4180-895f-11ea-8676-314e7259e07f.png__;!!Eh6p8Q!VcpOuJrocsRMtQQExPQZWtIFrHgIs-kuar8wGOkqx1bVu2aJWKK1Dzqx-fZvrCm9nWU$ [image: JAABA_4] https://urldefense.com/v3/__https://user-images.githubusercontent.com/64457340/80451574-24c4d800-895f-11ea-9ade-393e24c7958c.png__;!!Eh6p8Q!VcpOuJrocsRMtQQExPQZWtIFrHgIs-kuar8wGOkqx1bVu2aJWKK1Dzqx-fZvN4hvQug$ [image: JAABA_5] https://urldefense.com/v3/__https://user-images.githubusercontent.com/64457340/80451575-24c4d800-895f-11ea-831b-cbe0aeea1eda.png__;!!Eh6p8Q!VcpOuJrocsRMtQQExPQZWtIFrHgIs-kuar8wGOkqx1bVu2aJWKK1Dzqx-fZvBkf5OhE$

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/kristinbranson/JAABA/issues/333__;!!Eh6p8Q!VcpOuJrocsRMtQQExPQZWtIFrHgIs-kuar8wGOkqx1bVu2aJWKK1Dzqx-fZv_l93nWE$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AAJNKY2MFU2SG5ABJQC7G6LROZ4NDANCNFSM4MSRTT4Q__;!!Eh6p8Q!VcpOuJrocsRMtQQExPQZWtIFrHgIs-kuar8wGOkqx1bVu2aJWKK1Dzqx-fZvPGGVY-w$ .

Junes94 commented 4 years ago

Dear Mayank Thank you for your reply and kindness. I misunderstood that trk file already has animal tracking data. And your notation also would be helpful.

However, even though the .trx file is made in the directory folder, it still doesn't work and there is a same error as shown 4th, 5th screenshots above.

mkabra commented 4 years ago

Can you load the trk file in matlab using the load command? Eg. load('/path/to/trk_file','-mat'). If yes, can you send the trx and the trk files?

Mayank

On Tue, Apr 28, 2020 at 4:37 PM JuneJuly notifications@github.com wrote:

Dear Mayank Thank you for your reply and kindness. I misunderstood that trk file already has animal tracking data. And your notation also would be helpful.

However, even though the .trx file is made in the directory folder, it still doesn't work and there is a same error as shown 4th, 5th screenshots above.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/kristinbranson/JAABA/issues/333*issuecomment-620538012__;Iw!!Eh6p8Q!XY4jR6anzwsTxl_iPzWpNQ3ec_xHb03jjoOvKEhVuMeqcv6MpCB4cd_eouvRZ1oEk4k$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AAJNKYYYBRE7MNPSTO7HUWLRO22EXANCNFSM4MSRTT4Q__;!!Eh6p8Q!XY4jR6anzwsTxl_iPzWpNQ3ec_xHb03jjoOvKEhVuMeqcv6MpCB4cd_eouvRLvlwOkM$ .

Junes94 commented 4 years ago

I could load it in MATLAB, so I send you files. Thank you

June

fr_pilot.zip

mkabra commented 4 years ago

Yeah, the trk and trx file are fine and I was able to create the JAABA project based on the trk and trx file.

While looking at the screenshots, I see that you defined a custom perframe feature "fr" in APTProject. If you do that, then you need to make sure that there exists a file fr.mat in perframe directory before you add that experiment to JAABA. The custom perframe features are the ones that you want to create using your own code. So as a test, I suggest not giving anything in custom perframe feature list and try again.

Mayank

On Tue, Apr 28, 2020 at 4:59 PM JuneJuly notifications@github.com wrote:

I could load it in MATLAB, so I send you files. Thank you

June

fr_pilot.zip https://urldefense.com/v3/__https://github.com/kristinbranson/JAABA/files/4545365/fr_pilot.zip__;!!Eh6p8Q!RmYr735ymUAMFs0G4_Y1VAqF1YJKlIBnsYBF-lY9zKWLiOE8XXz-pw9KzgjdJZlWUGo$

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/kristinbranson/JAABA/issues/333*issuecomment-620548105__;Iw!!Eh6p8Q!RmYr735ymUAMFs0G4_Y1VAqF1YJKlIBnsYBF-lY9zKWLiOE8XXz-pw9KzgjdhqjFHcA$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AAJNKYYGKEGNCBTAHHH6DQTRO24YVANCNFSM4MSRTT4Q__;!!Eh6p8Q!RmYr735ymUAMFs0G4_Y1VAqF1YJKlIBnsYBF-lY9zKWLiOE8XXz-pw9KzgjdMqsT9Rs$ .

Junes94 commented 4 years ago

Dear Mayank, I just left the custom perframe feature blank, but still have a same error. Could it be the matter of visual studio or something?

mkabra commented 4 years ago

Can you check if it still errors if you use frame center instead of crop center for generating the trx file?

Mayank

On Tue, Apr 28, 2020 at 6:02 PM JuneJuly notifications@github.com wrote:

Dear Mayank, I just left the custom perframe feature blank, but still have a same error.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/kristinbranson/JAABA/issues/333*issuecomment-620575791__;Iw!!Eh6p8Q!QNxp9DzUTh4WE_hQCOMvdRpykM3xTszd18dGjCRUAhe7kBi-TvGJTQcEfc-YaVhUGsg$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AAJNKY7VIM5IQIKL5ADSZFDRO3ED3ANCNFSM4MSRTT4Q__;!!Eh6p8Q!QNxp9DzUTh4WE_hQCOMvdRpykM3xTszd18dGjCRUAhe7kBi-TvGJTQcEfc-Y1LepXXU$ .

Junes94 commented 4 years ago

Yes, the same error windows still pops up.

mkabra commented 4 years ago

Hmm. Did you try restarting Matlab? And if you still see the error, can you send me the APT project file and the video?

Mayank

On Tue, Apr 28, 2020 at 6:21 PM JuneJuly notifications@github.com wrote:

Yes, the same error windows still pops up.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/kristinbranson/JAABA/issues/333*issuecomment-620586067__;Iw!!Eh6p8Q!XOJWvJWCBnbu6krHzUBoaAnZNJxh8n5Cza4NrVw0xdmntQSebQHodqzbYaqqJ2I7dWo$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AAJNKYY3SRTDFMOF7UJENY3RO3GMNANCNFSM4MSRTT4Q__;!!Eh6p8Q!XOJWvJWCBnbu6krHzUBoaAnZNJxh8n5Cza4NrVw0xdmntQSebQHodqzbYaqqDtcUplM$ .

Junes94 commented 4 years ago

Yes, I always restarted Matlab, Here's the link of my files and video for the JAABA project. https://drive.google.com/file/d/1B7Ab8f9ASURmOUZMCzip4PraL6_zqAqn/view?usp=sharing

and here's the one for APT project. I use two video for my training and labeling, and just export tracking result of one movie. https://drive.google.com/open?id=1Fu1IS-GOjU0cNqJheIfby419LcGK0yCW

Thank you.

mkabra commented 4 years ago

Hi,

So yeah there was a bug in JAABA that required the trx file to end with .mat. If you pull the latest version of JAABA, you should be able to create the project in JAABA.

Mayank

On Tue, Apr 28, 2020 at 7:33 PM JuneJuly notifications@github.com wrote:

Yes, I always restarted Matlab, Here's the link of my files and video.

https://drive.google.com/file/d/1B7Ab8f9ASURmOUZMCzip4PraL6_zqAqn/view?usp=sharing https://urldefense.com/v3/__https://drive.google.com/file/d/1B7Ab8f9ASURmOUZMCzip4PraL6_zqAqn/view?usp=sharing__;!!Eh6p8Q!WWgK2A1QkkuJD-XkGjqgcbap6IXdfFEpjqddHp2kKicB1R0PpgE6YCIvPq5_GGt2HhA$

Thank you.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/kristinbranson/JAABA/issues/333*issuecomment-620627716__;Iw!!Eh6p8Q!WWgK2A1QkkuJD-XkGjqgcbap6IXdfFEpjqddHp2kKicB1R0PpgE6YCIvPq5_62vTB48$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AAJNKY4ZGJ6RTTV2VTJFOADRO3O2HANCNFSM4MSRTT4Q__;!!Eh6p8Q!WWgK2A1QkkuJD-XkGjqgcbap6IXdfFEpjqddHp2kKicB1R0PpgE6YCIvPq5_oBW0q8g$ .

Junes94 commented 4 years ago

Hi,

I'm glad it works well now. Thank you very much, have a good one !

June