AI And Model-Zoo Agents#
These agents wrap neural inversion, uncertainty, anomaly detection, and pre-trained model access. They may require optional AI dependencies and model checkpoints.
AIInversionAgent#
AIInversionAgent runs end-to-end 1-D AI inversion. It can be
instantiated directly or created from a model-zoo checkpoint when available.
1from pycsamt.agents import AIInversionAgent
2
3agent = AIInversionAgent.from_pretrained("mt1d-resnet-5layer-v1")
4result = agent.execute({
5 "path": "/data/WILLY_EDIs",
6 "output_dir": "/out/willy_ai1d",
7})
8
9print(result.get("rms_global"))
Inv2DAgent#
Inv2DAgent performs 2-D profile inversion using U-Net style models. Use
it when lateral continuity along a profile is important and a compatible model
or training setup is available.
1result = Inv2DAgent().execute({
2 "path": "/data/WILLY_profile",
3 "output_dir": "/out/willy_inv2d",
4})
Inv3DAgent#
Inv3DAgent performs 3-D spatial AI inversion with graph-based models.
Use it when inter-station geometry and spatial relationships are part of the
inversion target.
1result = Inv3DAgent().execute({
2 "path": "/data/WILLY_grid",
3 "output_dir": "/out/willy_inv3d",
4})
EnsembleAgent#
EnsembleAgent runs ensemble inversion workflows and summarizes uncertainty
from multiple predictions. Use it when uncertainty bands or coverage metrics
are required alongside a predicted resistivity model.
1result = EnsembleAgent(n_estimators=5, epochs=50).execute({
2 "path": "/data/WILLY_EDIs",
3 "output_dir": "/out/willy_ensemble",
4})
5
6print(result.get("coverage"))
JointInversionAgent#
JointInversionAgent runs multi-modal inversion, for example MT with TEM or
CSAMT with supporting data. Use it when multiple geophysical modalities
constrain the same subsurface target.
1result = JointInversionAgent(modalities=["mt", "tem"]).execute({
2 "path": "/data/WILLY_MT",
3 "secondary_path": "/data/WILLY_TEM",
4 "output_dir": "/out/willy_joint",
5})
AnomalyDetectionAgent#
AnomalyDetectionAgent flags anomalous data patterns. Use it for
station-frequency anomaly screening, survey triage, or finding regions that
need manual review before inversion.
1anomalies = AnomalyDetectionAgent().execute({
2 "path": "/data/WILLY_EDIs",
3 "output_dir": "/out/willy_anomalies",
4})
ModelZooAgent#
ModelZooAgent lists available pre-trained models, downloads checkpoints,
and runs predictions where supported.
1from pycsamt.agents import ModelZooAgent
2
3zoo = ModelZooAgent()
4
5models = zoo.execute({"action": "list"})
6print(models["models"])
7
8checkpoint = zoo.execute({
9 "action": "download",
10 "model_name": "mt1d-resnet-5layer-v1",
11})
12print(checkpoint.get("checkpoint_path"))
AI Workflow Pattern#
MTLoaderAgent -> DataQCAgent -> DenoisingAgent
-> AIInversionAgent or Inv2DAgent or Inv3DAgent
-> InterpretationAgent -> ReportAgent
Add EnsembleAgent when uncertainty is part of the objective. Add
JointInversionAgent when a secondary modality is available.