[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BSATH4PPWR4V8Q0CNGP5FS":3,"skill-same:01M7BSATH4PPWR4V8Q0CNGP5FS":45},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7BSATH4PPWR4V8Q0CNGP5FS","seisbench-model-api",null,"An overview of the core model API of SeisBench, a Python framework for training and applying machine learning algorithms to seismic data. It is useful for annotating waveforms using pretrained SOTA ML models, for tasks like phase picking, earthquake detection, waveform denoising and depth estimation. For any waveform, you can manipulate it into an obspy stream object and it will work seamlessly with seisbench models.","linyouxue\u002Fskill-repair-benchmark","linyouxue","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F216151464?v=4","01M7BJEVCXKD74KH6FG9CBVSQB","林宥学","01M7BJEVE02NP217V93BKZFC0J",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FHumanAnnotated-CrossModel-10Tasks-20261008\u002Fgemini31\u002Ftasks\u002Fseismic-phase-picking\u002Frepaired_skill\u002Fseisbench-model-api\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\r\nname: seisbench-model-api\r\ndescription: An overview of the core model API of SeisBench, a Python framework for training and applying machine learning algorithms to seismic data. It is useful for annotating waveforms using pretrained SOTA ML models, for tasks like phase picking, earthquake detection, waveform denoising and depth estimation. For any waveform, you can manipulate it into an obspy stream object and it will work seamlessly with seisbench models.\r\n---\r\n\r\n# SeisBench Model API\r\n\r\n## Installing SeisBench\r\nThe recommended way is installation through pip. Simply run:\r\n```\r\npip install seisbench\r\n```\r\n\r\n## Overview\r\n\r\nSeisBench offers the abstract class `WaveformModel` that every SeisBench model should subclass. This class offers two core functions, `annotate` and `classify`. Both of the functions are automatically generated based on configurations and submethods implemented in the specific model.\r\n\r\nThe `SeisBenchModel` bridges the gap between the pytorch interface of the models and the obspy interface common in seismology. It automatically assembles obspy streams into pytorch tensors and reassembles the results into streams. It also takes care of batch processing. Computations can be run on GPU by simply moving the model to GPU.\r\n\r\nThe `annotate` function takes an obspy stream object as input and returns annotations as stream again. For example, for picking models the output would be the characteristic functions, i.e., the pick probabilities over time.\r\n\r\n```python\r\nstream = obspy.read(\"my_waveforms.mseed\")\r\nannotations = model.annotate(stream)  # Returns obspy stream object with annotations\r\n```\r\n\r\nThe `classify` function takes an ObsPy stream and returns discrete results. Inspect the installed model's result type: current picking models expose a `ClassifyOutput` with `.picks` and, where supported, `.detections`. Each Pick has a phase, probability peak time (`peak_time`), and a threshold window (`start_time`, `end_time`). Use `peak_time` for the estimated arrival; window boundaries describe the detection interval.\r\n\r\nFor sample-index output, retain each station's original timebase. This example assumes a single station whose components share a start time and sampling interval.\r\n\r\n```python\r\nstream = obspy.read(\"my_waveforms.mseed\")\r\ninput_t0 = stream[0].stats.starttime\r\ninput_dt = stream[0].stats.delta\r\ninput_npts = stream[0].stats.npts\r\noutputs = model.classify(stream)\r\nfor pick in outputs.picks:\r\n    pick_idx = round((pick.peak_time - input_t0) \u002F input_dt)\r\n    if 0 \u003C= pick_idx \u003C input_npts:\r\n        print(pick.phase, pick_idx)\r\n```\r\n\r\nWhen input is resampled or cropped, retain the original input origin and sample interval for output indices. Annotation arrays have their own start time and sample interval: convert an annotation peak to an absolute time with that metadata before mapping it to the original input. Check a returned Pick against its annotation peak on a small public waveform before processing the full collection.\r\n\r\nBoth `annotate` and `classify` can be supplied with waveforms from multiple stations at once and will automatically handle the correct grouping of the traces. For details on how to build your own model with SeisBench, check the documentation of `WaveformModel`. For details on how to apply models, check out the Examples.\r\n\r\n## Loading Pretrained Models\r\n\r\nFor annotating waveforms in a meaningful way, trained model weights are required. SeisBench offers a range of pretrained model weights through a common interface. Model weights are downloaded on the first use and cached locally afterwards. For some model weights, multiple versions are available. For details on accessing these, check the documentation at `from_pretrained`.\r\n\r\n```python\r\nimport seisbench.models as sbm\r\n\r\nsbm.PhaseNet.list_pretrained()                  # Get available models\r\nmodel = sbm.PhaseNet.from_pretrained(\"original\")  # Load the original model weights released by PhaseNet authors\r\n```\r\n\r\nPretrained models can not only be used for annotating data, but also offer a great starting point for transfer learning.\r\n\r\n## Speeding Up Model Application\r\n\r\nWhen applying models to large datasets, run time is often a major concern. Here are a few tips to make your model run faster:\r\n\r\n- **Run on GPU.** Execution on GPU is usually faster, even though exact speed-ups vary between models. However, we note that running on GPU is not necessarily the most economic option. For example, in cloud applications it might be cheaper (and equally fast) to pay for a handful of CPU machines to annotate a large dataset than for a GPU machine.\r\n\r\n- **Use a large `batch_size`.** This parameter can be passed as an optional argument to all models. Especially on GPUs, larger batch sizes lead to faster annotations. As long as the batch fits into (GPU) memory, it might be worth increasing the batch size.\r\n\r\n- **Compile your model (torch 2.0+).** If you are using torch in version 2.0 or newer, compile your model. It's as simple as running `model = torch.compile(model)`. The compilation will take some time but if you are annotating large amounts of waveforms, it should pay off quickly. Note that there are many options for compile that might influence the performance gains considerably.\r\n\r\n- **Use asyncio interface.** Load data in parallel while executing the model using the asyncio interface, i.e., `annotate_asyncio` and `classify_asyncio`. This is usually substantially faster because data loading is IO-bound while the actual annotation is compute-bound.\r\n\r\n- **Manual resampling.** While SeisBench can automatically resample the waveforms, it can be faster to do the resampling manually beforehand. SeisBench uses obspy routines for resampling, which (as of 2023) are not parallelised. Check the required sampling rate with `model.sampling_rate`. Alternative routines are available, e.g., in the Pyrocko library.\r\n\r\n## Models Integrated into SeisBench\r\n\r\nYou don't have to build models from scratch if you don't want to. SeisBench integrates the following notable models from the literature for you to use. Again, as they inherit from the common SeisBench model interface, all these deep learning models are constructed through PyTorch. Where possible, the original trained weights are imported and made available. These can be accessed via the `from_pretrained` method.\r\n\r\n| Integrated Model | Task |\r\n|------------------|------|\r\n| `BasicPhaseAE` | Phase Picking |\r\n| `CRED` | Earthquake Detection |\r\n| `DPP` | Phase Picking |\r\n| `DepthPhaseNet` | Depth estimation from depth phases |\r\n| `DepthPhaseTEAM` | Depth estimation from depth phases |\r\n| `DeepDenoiser` | Denoising |\r\n| `SeisDAE` | Denoising |\r\n| `EQTransformer` | Earthquake Detection\u002FPhase Picking |\r\n| `GPD` | Phase Picking |\r\n| `LFEDetect` | Phase Picking (Low-frequency earthquakes) |\r\n| `OBSTransformer` | Earthquake Detection\u002FPhase Picking |\r\n| `PhaseNet` | Phase Picking |\r\n| `PhaseNetLight` | Phase Picking |\r\n| `PickBlue` | Earthquake Detection\u002FPhase Picking |\r\n| `Skynet` | Phase Picking |\r\n| `VariableLengthPhaseNet` | Phase Picking |\r\n\r\nCurrently integrated models are capable of earthquake detection and phase picking, waveform denoising, depth estimation, and low-frequency earthquake phase picking. Furthermore, with SeisBench you can build ML models to perform general seismic tasks such as magnitude and source parameter estimation, hypocentre determination etc.\r\n\r\n## Best Practices\r\n- If the waveform data happen to be extremely small in scale (`\u003C=1e-10`), there might be risk of numerical instability. It is acceptable to increase the value first (by multiplying a large number like `1e10`) before normalization or passing to the model.\r\n\r\n- Although the seisbench model API will normalize the waveform for you, it is still highly suggested to apply normalization yourself. Since seisbench's normalization scheme uses an epsilon `(waveform - mean(waveform)) \u002F (std(waveform) + epsilon)`, for extremely small values (such as `\u003C=1e-10`), their normalization can destroy the signals in the waveform.\r\n\r\n- The seisbench model API can process a stream of waveform data of arbitrary length. Hence, it is not necessary to segment the data yourself. In addition, you should not assume a stream of waveform can only contain one P-wave and one S-wave. It is the best to treat the stream like what it is: a stream of continuous data.\r\n","# SeisBench Model API\r\n\r\n## Installing SeisBench\r\nThe recommended way is installation through pip. Simply run:\r\n```\r\npip install seisbench\r\n```\r\n\r\n## Overview\r\n\r\nSeisBench offers the abstract class `WaveformModel` that every SeisBench model should subclass. This class offers two core functions, `annotate` and `classify`. Both of the functions are automatically generated based on configurations and submethods implemented in the specific model.\r\n\r\nThe `SeisBenchModel` bridges the gap between the pytorch interface of the models and the obspy interface common in seismology. It automatically assembles obspy streams into pytorch tensors and reassembles the results into streams. It also takes care of batch processing. Computations can be run on GPU by simply moving the model to GPU.\r\n\r\nThe `annotate` function takes an obspy stream object as input and returns annotations as stream again. For example, for picking models the output would be the characteristic functions, i.e., the pick probabilities over time.\r\n\r\n```python\r\nstream = obspy.read(\"my_waveforms.mseed\")\r\nannotations = model.annotate(stream)  # Returns obspy stream object with annotations\r\n```\r\n\r\nThe `classify` function takes an ObsPy stream and returns discrete results. Inspect the installed model's result type: current picking models expose a `ClassifyOutput` with `.picks` and, where supported, `.detections`. Each Pick has a phase, probability peak time (`peak_time`), and a threshold window (`start_time`, `end_time`). Use `peak_time` for the estimated arrival; window boundaries describe the detection interval.\r\n\r\nFor sample-index output, retain each station's original timebase. This example assumes a single station whose components share a start time and sampling interval.\r\n\r\n```python\r\nstream = obspy.read(\"my_waveforms.mseed\")\r\ninput_t0 = stream[0].stats.starttime\r\ninput_dt = stream[0].stats.delta\r\ninput_npts = stream[0].stats.npts\r\noutputs = model.classify(stream)\r\nfor pick in outputs.picks:\r\n    pick_idx = round((pick.peak_time - input_t0) \u002F input_dt)\r\n    if 0 \u003C= pick_idx \u003C input_npts:\r\n        print(pick.phase, pick_idx)\r\n```\r\n\r\nWhen input is resampled or cropped, retain the original input origin and sample interval for output indices. Annotation arrays have their own start time and sample interval: convert an annotation peak to an absolute time with that metadata before mapping it to the original input. Check a returned Pick against its annotation peak on a small public waveform before processing the full collection.\r\n\r\nBoth `annotate` and `classify` can be supplied with waveforms from multiple stations at once and will automatically handle the correct grouping of the traces. For details on how to build your own model with SeisBench, check the documentation of `WaveformModel`. For details on how to apply models, check out the Examples.\r\n\r\n## Loading Pretrained Models\r\n\r\nFor annotating waveforms in a meaningful way, trained model weights are required. SeisBench offers a range of pretrained model weights through a common interface. Model weights are downloaded on the first use and cached locally afterwards. For some model weights, multiple versions are available. For details on accessing these, check the documentation at `from_pretrained`.\r\n\r\n```python\r\nimport seisbench.models as sbm\r\n\r\nsbm.PhaseNet.list_pretrained()                  # Get available models\r\nmodel = sbm.PhaseNet.from_pretrained(\"original\")  # Load the original model weights released by PhaseNet authors\r\n```\r\n\r\nPretrained models can not only be used for annotating data, but also offer a great starting point for transfer learning.\r\n\r\n## Speeding Up Model Application\r\n\r\nWhen applying models to large datasets, run time is often a major concern. Here are a few tips to make your model run faster:\r\n\r\n- **Run on GPU.** Execution on GPU is usually faster, even though exact speed-ups vary between models. However, we note that running on GPU is not necessarily the most economic option. For example, in cloud applications it might be cheaper (and equally fast) to pay for a handful of CPU machines to annotate a large dataset than for a GPU machine.\r\n\r\n- **Use a large `batch_size`.** This parameter can be passed as an optional argument to all models. Especially on GPUs, larger batch sizes lead to faster annotations. As long as the batch fits into (GPU) memory, it might be worth increasing the batch size.\r\n\r\n- **Compile your model (torch 2.0+).** If you are using torch in version 2.0 or newer, compile your model. It's as simple as running `model = torch.compile(model)`. The compilation will take some time but if you are annotating large amounts of waveforms, it should pay off quickly. Note that there are many options for compile that might influence the performance gains considerably.\r\n\r\n- **Use asyncio interface.** Load data in parallel while executing the model using the asyncio interface, i.e., `annotate_asyncio` and `classify_asyncio`. This is usually substantially faster because data loading is IO-bound while the actual annotation is compute-bound.\r\n\r\n- **Manual resampling.** While SeisBench can automatically resample the waveforms, it can be faster to do the resampling manually beforehand. SeisBench uses obspy routines for resampling, which (as of 2023) are not parallelised. Check the required sampling rate with `model.sampling_rate`. Alternative routines are available, e.g., in the Pyrocko library.\r\n\r\n## Models Integrated into SeisBench\r\n\r\nYou don't have to build models from scratch if you don't want to. SeisBench integrates the following notable models from the literature for you to use. Again, as they inherit from the common SeisBench model interface, all these deep learning models are constructed through PyTorch. Where possible, the original trained weights are imported and made available. These can be accessed via the `from_pretrained` method.\r\n\r\n| Integrated Model | Task |\r\n|------------------|------|\r\n| `BasicPhaseAE` | Phase Picking |\r\n| `CRED` | Earthquake Detection |\r\n| `DPP` | Phase Picking |\r\n| `DepthPhaseNet` | Depth estimation from depth phases |\r\n| `DepthPhaseTEAM` | Depth estimation from depth phases |\r\n| `DeepDenoiser` | Denoising |\r\n| `SeisDAE` | Denoising |\r\n| `EQTransformer` | Earthquake Detection\u002FPhase Picking |\r\n| `GPD` | Phase Picking |\r\n| `LFEDetect` | Phase Picking (Low-frequency earthquakes) |\r\n| `OBSTransformer` | Earthquake Detection\u002FPhase Picking |\r\n| `PhaseNet` | Phase Picking |\r\n| `PhaseNetLight` | Phase Picking |\r\n| `PickBlue` | Earthquake Detection\u002FPhase Picking |\r\n| `Skynet` | Phase Picking |\r\n| `VariableLengthPhaseNet` | Phase Picking |\r\n\r\nCurrently integrated models are capable of earthquake detection and phase picking, waveform denoising, depth estimation, and low-frequency earthquake phase picking. Furthermore, with SeisBench you can build ML models to perform general seismic tasks such as magnitude and source parameter estimation, hypocentre determination etc.\r\n\r\n## Best Practices\r\n- If the waveform data happen to be extremely small in scale (`\u003C=1e-10`), there might be risk of numerical instability. It is acceptable to increase the value first (by multiplying a large number like `1e10`) before normalization or passing to the model.\r\n\r\n- Although the seisbench model API will normalize the waveform for you, it is still highly suggested to apply normalization yourself. Since seisbench's normalization scheme uses an epsilon `(waveform - mean(waveform)) \u002F (std(waveform) + epsilon)`, for extremely small values (such as `\u003C=1e-10`), their normalization can destroy the signals in the waveform.\r\n\r\n- The seisbench model API can process a stream of waveform data of arbitrary length. Hence, it is not necessary to segment the data yourself. In addition, you should not assume a stream of waveform can only contain one P-wave and one S-wave. It is the best to treat the stream like what it is: a stream of continuous data.\r\n",{"name":5,"description":7},"main","cdcb6d230f3b15c3c33f8a2bdd16439f43602cbe","evaluation\u002Fresults\u002FHumanAnnotated-CrossModel-10Tasks-20261008\u002Fgemini31\u002Ftasks\u002Fseismic-phase-picking\u002Frepaired_skill\u002Fseisbench-model-api",1,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark","https:\u002F\u002Fgithub.com\u002Flinyouxue","2026-11-14 20:28:35",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add linyouxue\u002Fskill-repair-benchmark --skill seisbench-model-api",{"tool":37,"command":38},"bunx","bunx skills add linyouxue\u002Fskill-repair-benchmark --skill seisbench-model-api",{"tool":40,"command":41},"pnpm","pnpm dlx skills add linyouxue\u002Fskill-repair-benchmark --skill seisbench-model-api","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FHumanAnnotated-CrossModel-10Tasks-20261008\u002Fgemini31\u002Ftasks\u002Fseismic-phase-picking\u002Frepaired_skill\u002Fseisbench-model-api\u002FSKILL.md",true,[],[46,53,60,67,72,77],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":19},"01M7E1HGVRY73NBJ022CJG13X6","video-frame-extraction","Extract frames from video files and save them as images using OpenCV","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fvideo-frame-extraction\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M7E1HAG5R7CJ9C8NYJS771MB","openai-vision","Analyze images and multi-frame sequences using OpenAI GPT vision models","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fopenai-vision\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M7E1H7DADKB6QBWKC2KQ63SZ","image-ocr","Extract text content from images using Tesseract OCR via Python, including structured field extraction from receipts and forms","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fimage-ocr\u002FSKILL.md",[],[],{"skillNo":68,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7E1H0WBNT43TENGQY7AVZHD","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fvideo-frame-extraction\u002FSKILL.md",[],[],{"skillNo":73,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7E1GTC7D4N4Q2EF03875J9E","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fopenai-vision\u002FSKILL.md",[],[],{"skillNo":78,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7E1GQ92CWFMGH53KSSE4WER","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fimage-ocr\u002FSKILL.md",[],[]]