Skip to content

optimize loading and application of AI model for foward HB tracking - #1563

Merged
tongtongcao merged 3 commits into
developmentfrom
iss1558
Nov 6, 2026
Merged

tongtongcao merged 3 commits into
developmentfrom
iss1558

Conversation

@tongtongcao

@tongtongcao tongtongcao commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Originally, two separate models are applied for HB tracking: One for inbending, and the other for outbending.
But actually, a model trained on inbending samples also works well for outbending reconstruction by simply flipping the sign of the predicted Q parameter, and vice versa.
Besides, normalization values for features and output states are previously hard-coded.
With this update, these values are loaded from separate statistics files, which are generated during model training based on the training samples. The files are added through the networks by PR https://code.jlab.org/hallb/clas12/coatjava/networks/-/merge_requests/14
This PR prepares for the integration and application of dedicated models for RGL, and will be convenient for application of future models.

@baltzell

baltzell commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

Note, might as well just have a field scale for the model, instead of "isInbending" and the extra logic.

@tongtongcao

tongtongcao commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator Author

isInbending

isInbendingHBTSEModel points out that the model was trained using training samples from inbending or outbending data. It will tell if predicted sign of Q needs to be flipped, depending on scale factor for magnetic field.

@tongtongcao
tongtongcao merged commit d14e4cf into development Nov 6, 2026
26 checks passed
@tongtongcao
tongtongcao deleted the iss1558 branch November 6, 2026 16:45
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