kristinbranson / APT

Animal Part Tracker
GNU General Public License v3.0
72 stars 14 forks source link

Remove movie doesn't work in multiview mode #338

Closed Junes94 closed 4 years ago

Junes94 commented 4 years ago

Hi, everyone.

I have a APT project file(.lbl file) and in this file, there are 8 sets of movies(2 movies for each set). I trained MDN and tracked all videos. Also exporting the tracking results (.trk file) worked well.

However, I need just one video tracking result(.trk) and .lbl file for JAABA project, I decided to remove other movies except one video.

The error came here. It didn't work. The state window just stopped at 'Removing movie.......' here's my log in MATLAB.


Time to compute info statistic dx = 0.004483 Finished loading project. Error using Labeler/movieRm (line 3866) Cannot remove current movie. Error in MovieManagerController/rmLabelerMovie (line 419) tfSucc = lObj.movieRm(row); Error in MovieManagerController/cbkPushButton (line 214) obj.rmLabelerMovie(); Error in MovieManagerController>@(s,e)obj.cbkPushButton(s,e) (line 107) h.Callback = @(s,e)obj.cbkPushButton(s,e); Error while evaluating UIControl Callback.


It would be pleasure if there's any support.

Thank you, June

allenleetc commented 4 years ago

Hey June,

The error is unfriendly, it's in the command-line output -- APT doesn't want you to remove the current movie (the movie that is currently open in the GUI).

You should be able to select another movie in the MovieManager (by clicking the table and highlighting a different row/movieset) and then you should be able to remove that movie. I actually just pushed a fix for a minor (unrelated) bug in this codepath, so before you go on please pull the latest and restart your MATLAB.

Backing up, did you add movies to your APT project in order to track them? And now you are "cleaning up" your project? If so, please note that under the Track> menu the Track>Track multiple videos option will let you track movies without adding them to the project first.

Alternatively, if you are cleaning up your project by removing movies with labels (training data), I would ask if you really want to do that. JAABA probably doesn't care about these training videos, and meanwhile you will lose your labels in those movies. APT may even clear your trackers out!

Junes94 commented 4 years ago

Hi Allen, thanks for your reply. Actually, I could do my job by other way not buy removing them. (By exporting label to trk form and then import it to project just including one video. And then save the project to .lbl file. Then I could use the .lbl and .trk file in JAABA)

Oh, I didn't realize there's an update and the function you suggested is really what I want ! Now I could easily convert APT project to JAABA.

Anyway, Is there any different way using my project, including 8 set of multiview movies (total 16movies), into the JAABA ? When I tried to put .lbl file into the JAABA project, it seemed JAABA couldn't read the multiview or multi videos project.

arobie commented 4 years ago

Hi June I think there's been some misunderstanding. Which movies you load into JAABA to train a behavior classifier is independent of the movies used in the lbl file to train the APT tracker. JAABA uses information from the lbl about what is being tracked by a given APT tracker, and the tracking file (trk) for a given movie to create perframe features for JAABA behavior classification. JAABA is not set up to take in multiview movies or 3D tracking points. Alice

On Thu, Jul 2, 2020 at 10:04 PM June94 notifications@github.com wrote:

Hi Allen, thanks for your reply. Actually, I could do my job by other way not buy removing them. (By exporting label to trk form and then import it to project just including one video. And then save the project to .lbl file. Then I could use the .lbl and .trk file in JAABA)

Oh, I didn't realize there's an update and the function you suggested is really what I want ! Now I could easily convert APT project to JAABA.

Anyway, Is there any different way using my project, including 8 set of multiview movies (total 16movies), into the JAABA ? When I tried to put .lbl file into the JAABA project, it seemed JAABA couldn't read the multiview or multi videos project.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kristinbranson/APT/issues/338#issuecomment-653294417, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAISKEFVRG2DE62DI7II5ADRZU4D5ANCNFSM4OOW2SIA .

mkabra commented 4 years ago

Alice and June, JAABA can actually work with a multiview APT project. But the features are generated for each view separately and we don't generate 3D based features yet. It is in the works.

Mayank

On Fri, Jul 3, 2020 at 8:12 AM arobie notifications@github.com wrote:

Hi June I think there's been some misunderstanding. Which movies you load into JAABA to train a behavior classifier is independent of the movies used in the lbl file to train the APT tracker. JAABA uses information from the lbl about what is being tracked by a given APT tracker, and the tracking file (trk) for a given movie to create perframe features for JAABA behavior classification. JAABA is not set up to take in multiview movies or 3D tracking points. Alice

On Thu, Jul 2, 2020 at 10:04 PM June94 notifications@github.com wrote:

Hi Allen, thanks for your reply. Actually, I could do my job by other way not buy removing them. (By exporting label to trk form and then import it to project just including one video. And then save the project to .lbl file. Then I could use the .lbl and .trk file in JAABA)

Oh, I didn't realize there's an update and the function you suggested is really what I want ! Now I could easily convert APT project to JAABA.

Anyway, Is there any different way using my project, including 8 set of multiview movies (total 16movies), into the JAABA ? When I tried to put .lbl file into the JAABA project, it seemed JAABA couldn't read the multiview or multi videos project.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <https://github.com/kristinbranson/APT/issues/338#issuecomment-653294417 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AAISKEFVRG2DE62DI7II5ADRZU4D5ANCNFSM4OOW2SIA

.

— 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/APT/issues/338*issuecomment-653306579__;Iw!!Eh6p8Q!TZSgCAzKwXlPmg2jsrXMjSlXqIsSEoEfCIOeVPBBrPfFYn7-5_6UEo71m7IhASrS9TY$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AAJNKY5EE4VUS7EAAIM246DRZVARTANCNFSM4OOW2SIA__;!!Eh6p8Q!TZSgCAzKwXlPmg2jsrXMjSlXqIsSEoEfCIOeVPBBrPfFYn7-5_6UEo71m7Ihq_d12u4$ .

Junes94 commented 4 years ago

Hi, Alice Thanks for your explanation. I could do my project more easily.

Mayank, thanks for your support. I'll be grateful if JAABA could deal with 3D based features someday.

p.s. Here's what came up when I tried uploading multiview .lbl file in JAABA, if could be helpful.


StartJAABA Number of threads allocated for computation: 7 Number of threads allocated for display: 1 Starting parallel pool (parpool) using the 'local' profile ... Connected to the parallel pool (number of workers: 7). Untarring project into C:\Temp\tpb5f3b4c9_d1fa_4f79_acd9_a1204f6a211a ... done with untar. Cleared out temp directory C:\Temp\tpb5f3b4c9_d1fa_4f79_acd9_a1204f6a211a Error using cat Dimensions of arrays being concatenated are not consistent. Error in APTProject>initialize (line 261) img = cat(2,img,cur_img); Error in APTProject>APTProject_OpeningFcn (line146) handles = initialize(handles); Error in gui_mainfcn (line 220) feval(gui_State.gui_OpeningFcn, gui_hFigure, [], guidata(gui_hFigure), varargin{:}); Error in APTProject (line 40) [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:}); Error in ProjectSetup>uibuttongroup1_SelectionChangedFcn (line 1052) aptStruct = APTProject('lbl_file',lbl_file); Error in gui_mainfcn (line 95) feval(varargin{:}); Error in ProjectSetup (line 42) gui_mainfcn(gui_State, varargin{:}); Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)ProjectSetup('uibuttongroup1_SelectionChangedFcn',get(hObject,'SelectedObject'),eventdata,guidata(get(hObject,'SelectedObject'))) Error using uiwait (line 81) Error while evaluating ButtonGroup SelectionChangedFcn.


mkabra commented 4 years ago

Yeah, that's sort of expected. Currently, JAABA can only handle a multiview project where both views have the same frame size. What are the dimensions of your views? And any possibility you could pad one of the views so that their sizes match? You can look at ffmpeg to do that: https://ffmpeg.org/ffmpeg-filters.html#pad. When you pad keep the original image at the top left corner so that you don't have to retrack in APT.

Mayank

On Fri, Jul 3, 2020 at 11:22 AM June94 notifications@github.com wrote:

Hi, Alice Thanks for your explanation. I could do my project more easily.

Mayank, thanks for your support. I'll be grateful if JAABA could deal with 3D based features someday.

p.s. Here's what came up when I tried uploading multiview .lbl file in JAABA, if could be helpful.

StartJAABA Number of threads allocated for computation: 7 Number of threads allocated for display: 1 Starting parallel pool (parpool) using the 'local' profile ... Connected to the parallel pool (number of workers: 7). Untarring project into C:\Temp\tpb5f3b4c9_d1fa_4f79_acd9_a1204f6a211a ... done with untar. Cleared out temp directory C:\Temp\tpb5f3b4c9_d1fa_4f79_acd9_a1204f6a211a Error using cat Dimensions of arrays being concatenated are not consistent. Error in APTProject>initialize (line 261) img = cat(2,img,cur_img); Error in APTProject>APTProject_OpeningFcn (line146) handles = initialize(handles); Error in gui_mainfcn (line 220) feval(gui_State.gui_OpeningFcn, gui_hFigure, [], guidata(gui_hFigure), varargin{:}); Error in APTProject (line 40) [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:}); Error in ProjectSetup>uibuttongroup1_SelectionChangedFcn (line 1052) aptStruct = APTProject('lbl_file',lbl_file); Error in gui_mainfcn (line 95) feval(varargin{:}); Error in ProjectSetup (line 42) gui_mainfcn(gui_State, varargin{:}); Error in

matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)ProjectSetup('uibuttongroup1_SelectionChangedFcn',get(hObject,'SelectedObject'),eventdata,guidata(get(hObject,'SelectedObject'))) Error using uiwait (line 81) Error while evaluating ButtonGroup SelectionChangedFcn.


— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/kristinbranson/APT/issues/338*issuecomment-653365460__;Iw!!Eh6p8Q!W8MxJHoeDu0B5lK7RSRQEnKmrfDHKUWY2KzqSCoQwqIVfS6Ix_Ng5qinEbFrtwShsEk$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AAJNKY264PSBOC6GB55VPL3RZVW23ANCNFSM4OOW2SIA__;!!Eh6p8Q!W8MxJHoeDu0B5lK7RSRQEnKmrfDHKUWY2KzqSCoQwqIVfS6Ix_Ng5qinEbFrBv1JoIo$ .

Junes94 commented 4 years ago

Yes, each view in a set has different frame size (I used two cameras, so two views). I don't need multiview movies in JAABA, so I don't need to convert my videos. Thanks for your kindness.

June

allenleetc commented 4 years ago

Hey @Junes94 it sounds like you are good for now so I will close this. Please feel free to re-open or create a new issue if you still need assistance.