EOGrady21 / vprr

Video Plankton Recorder Data Processing
https://eogrady21.github.io/vprr/
Other
2 stars 1 forks source link

add option to interrupt manual classification #59

Open kevinsorochan opened 10 months ago

kevinsorochan commented 10 months ago

Relevant function:

vpr_manual_classification()

Since "reclassified files" are not created until the end of the manual classification process, it cannot be interrupted until completed formally. It would be convenient if there was an option to interrupt manual classification with all of the proper files written such that they can be appended during a later session.

EOGrady21 commented 10 months ago

thinking about the robustness of this function. This could definitely be improved. I think a long term development project would be to even combine the vpr_manual_classification() and vpr_autoid_create() functions. So that aid files are generated during classification. This would simplify the workflow and reduce some of the file connection/ versioning problems.

In order to write the files during classification to handle interruption in the way you have described... I have a few concerns but I think it would be worth exploring further. I'm not sure how much this would slow down processing, to keep a file connection open in the background, but then it could be pretty simple to write out each reclassification with cat(). I know there are some standard methods of handling interruptions during functions as far as closing file connections ( on.exit(closeAllConnections()) ). The issue would then become, how do you pick it back up in the right place? Do you save an index? or a ROI number? do you output it to the console and put onus on the user to keep track of it (inputting a starting point is something I think we have done before).

This would definitely be a good expansion/development project.