Skip to content

Conversation

@KonradDanielewski
Copy link
Contributor

@KonradDanielewski KonradDanielewski commented Jan 20, 2023

I'm currently testing the GUI and trying to fix reported issues. One is more design improvement, i.e. being able to change the working dir also via textbox, not only by clicking the Location text (I think maybe it should stand out somehow - it doesn't indicate in any way that it's a button unless you hover over it)

Another thing I noticed was that label removal wasn't working in the tracklet toolbox, so also fixed that. Seems to work now.

Some other reported things that I didn't know if should be changed:

  • Labelling GUI button disabled by defualt in Extract Outlier Frames tab - what if you extracted before and are going back to refining?
  • Manual extraction of frames still points to old GUI when called via deeplabcut.extract_frames()

@jeylau
Copy link
Contributor

jeylau commented Jan 25, 2023

Thanks @KonradDanielewski! I agree that the Labeling GUI button should be enabled.
Do you want to address the deeplabcut.extract_trames() in this PR?

@KonradDanielewski
Copy link
Contributor Author

Sure, I'll enable the button and pointing to napari in frame extraction today

@KonradDanielewski
Copy link
Contributor Author

@jeylau So another reported issue is QObject::startTimer: Timers can only be used with threads started with QThread when using the player feature of the tracklet toolbox. If I understand correctly, the BackgroundPlayer class has to be made into a QObject and TrackletVisualizer class converted to work with a QThread that will run that QObject - I can also be entirely incorrect since it's my first time working with Qt

@MMathisLab MMathisLab requested a review from jeylau January 27, 2023 10:23
@jeylau
Copy link
Contributor

jeylau commented Jan 27, 2023

Awesome, thanks @KonradDanielewski! Does the Timer issue prevent the tracklet GUI from running though?

@KonradDanielewski
Copy link
Contributor Author

KonradDanielewski commented Jan 27, 2023

The tracklet GUI is running and the player even starts and stops albeit with some delay, but when you try to skip forward or backward with alt+->/alt+<- it does nothing and if tried a couple of times throws Assertion fctx->async_lock failed at libavcodec/pthread_frame.c:167 which ultimately crashes the whole GUI (tracklet and general one).

@KonradDanielewski
Copy link
Contributor Author

I just noticed that the way I implemented the Location directory change is easily broken when the path isn't pasted first (every input into the Location textbox updates from all the textboxes). I'll see if I can fix this but if not it should be discarded from the pull request.

@KonradDanielewski
Copy link
Contributor Author

Partially adresses #2161 - still haven't found out why the data from refinement isn't extracted and saved

@KonradDanielewski
Copy link
Contributor Author

About the Assertion fctx->async_lock failed at libavcodec/pthread_frame.c:167 it's also happening in the older GUI when you try to move forward during the playback. I read a little more to try and understand this and I might have an idea.

The alt + left/right works in an intended way, just producing a lot of warnings. If I understand correctly, all the things happening in the tracklet_toolbox are run multithreaded and somehow if this skip by one frame by just pressing an arrow key without alt happens during the video playback, the video read goes out of sync. So I guess it's more of an unexpected user input not being handled rather than anything else.

@KonradDanielewski
Copy link
Contributor Author

I removed the textbox based location change since it wasn't working properly

@jeylau
Copy link
Contributor

jeylau commented Mar 29, 2023

@KonradDanielewski, I'm looking at #2152 separately. Is your PR ready otherwise?

@KonradDanielewski
Copy link
Contributor Author

The rest works as intended - though one issue is not resolved completely - the refinement not extracting data and creating machinelabels file - but I'm not sure I can fix this one - to my eyes it all looks correct but for some reason doesn't work.

@KonradDanielewski
Copy link
Contributor Author

OK, honest mistake. It doesn't export data cause there is no export in the refine_tracklets.py, only merge which doesn't do anything without the export.

@KonradDanielewski
Copy link
Contributor Author

Fixed the refined tracklets data export and mutliindex creation. Also added handling for two pandas deprecation warnings

Because analysis was forwarded to a separate thread the dependent functions were being run before the analysis was finished. Now signal from analysis finish runs functions that were checked.

Also fixes small mistake with calling self.logger instead of self.root.logger and filterpredictions having videos attribute instead of video
@KonradDanielewski
Copy link
Contributor Author

Also fixed the analyze_videos tab since it wasn't working properly. I guess now the most obvious GUI bugs are fixed

@jeylau
Copy link
Contributor

jeylau commented Mar 30, 2023

Sweet! I fixed the tracklet refinement GUI in #2191, so should be good to merge!

@jeylau jeylau merged commit cd5b685 into DeepLabCut:main Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants