dgbpy framework Documentation
dgbpy is a framework for research and deployment of machine learning models from seismic and well data.
Installation
With pipenv - https://docs.pipenv.org:
pipenv install git+https://github.com/OpendTect/dgbpy.git#egg=dgbpy
With pip - https://pip.pypa.io/en/stable/
pip3 install git+https://github.com/OpendTect/dgbpy.git
After that just import dgbpy:
import dgbpy
To get the developer version, run:
git clone --recursive https://github.com/OpendTect/dgbpy.git
Citing odpy
Please cite dgbpy in your publications if it helps your research.:
Huck A., and Mogg W., Ibrahim O. dgbpy library for seismic interpretation with deep learning. 2019.
@misc{dgbpy_2019,
author = {A. Huck and W. Mogg and O. Ibrahim},
title = {dgbpy library for seismic interpretation with deep learning},
year = 2019
}
Contents:
- API Reference
- dgbpy
- Submodules
- dgbpy.bokehcore
- dgbpy.bokehserver
- dgbpy.deeplearning_apply-client
- Attributes
- Functions
- Module Contents
selparserdatagrpnetgrploggrpargsmodelfnmlocalservscriptfpservercmdserverprocgetApplyTrace()create_request()req_connection()isSupervised()getApplyPars()parsshapenrattribsnrlines_outnrtrcs_outchunk_stepnrlines_innrtrcs_innrz_innrz_outinpdatainpdatainpdatastartapplydictlastidynrrepeatstrcrgnrtrcsevents
- dgbpy.deeplearning_apply-server
- dgbpy.deeplearning_apply_clientlib
- dgbpy.deeplearning_apply_serverlib
- dgbpy.dgb_boto
- Exceptions
- Classes
- Functions
- Module Contents
InvalidS3Exceptionretry()parseS3Uri()handleS3FileSaving()handleS3FileLoading()cleanS3Uri()getLocalDownloadPath()getFilenamesFromPath()createS3PathList()get_s3_object_size()getFilesInS3Folder()checkLocalS3FileValidity()getS3ObjectLastModifiedDateTime()AddS3InfoToHDF5()getHdf5File()upload_to_s3()upload_multiple_to_s3()download_from_s3()download_multiple_from_s3()S3Progress
- dgbpy.dgb_dgbkeras2onnx
- dgbpy.dgb_sklearn2onnx
- dgbpy.dgbkeras
- Attributes
- Classes
- Functions
- Module Contents
hasKeras()withtensorboardplatformcudacoresSaveTypedefsavetypedefstoragetypegetMLPlatform()getUIMLPlatform()defbatchstrkeras_infosdefault_transformskeras_dictcan_use_gpu()get_cpu_preference()get_keras_infos()set_compute_device()use_mixed_precision()getParams()adaptive_schedule()get_data_format()hasValidCubeletShape()getCubeletShape()get_model_shape()getModelDims()getModelsByType()getModelsByInfo()getDefaultModel()hasFastprogress()ProgressBarCallbackProgressNoBarCallbackBokehProgressCallbackLogNrOfSamplesCallbackTransformCallbackepoch0endCB()init_callbacks()train()updateModelShape()save()load()transfer()apply()adaptToModel_img2img()adaptFromModel_img2img()adaptToModel()adaptFromModel()plot()compute_capability_from_device_desc()getDevicesInfo()is_gpu_ready()is_mixed_precision_compatible()need_channels_last()get_validation_data()
- dgbpy.dgbonnx
- dgbpy.dgbscikit
- Attributes
- Classes
- Functions
- Module Contents
tot_cpun_cpuhasScikit()isVersionAtLeast()isClustering()hasXGBoost()platformmse_criterionregmltypesclassmltypeslineartypeslogistictypesclustertypesensembletypesnntypessvmtypesclustermethodssolvertypeslinkernelkerneltypessavetypesdefsavetypexgboostjsondefstoragetypescikit_dictgetMLPlatform()getUIMLPlatform()getUiModelTypes()getUiLinearTypes()getUiLogTypes()getUiClusterTypes()getUiClusterMethods()getUiEnsembleTypes()getUiNNTypes()getUiSVMTypes()getUiSolverTypes()getUiNNKernelTypes()getDefaultSolver()getDefaultNNKernel()getClusterDistances()getClusterParsKMeans()getClusterParsMeanShift()getClusterParsSpectral()getLinearPars()getLogPars()getEnsembleParsXGDT()getEnsembleParsXGRF()getEnsembleParsRF()getEnsembleParsGB()getEnsembleParsAda()getNNPars()getSVMPars()getNewScaler()getNewMinMaxScaler()getNewRangeScaler()getScaler()transform()transformBack()scale()unscale()RangedScalergetDefaultModel()train()assessQuality()onnx_from_sklearn()save()load()apply()
- dgbpy.dgbtorch
- Attributes
- Classes
- Functions
- Module Contents
devicehasTorch()update_slices()DiceLossfda()platformwithtensorboarddefault_transformsdefbatchstrSaveTypedefsavetypedefstoragetypetorch_infostorch_dictgetMLPlatform()cudacoreshasCuda()hasMPS()can_use_gpu()get_device_type()set_compute_device()get_torch_infos()getParams()getDefaultModel()getModelsByType()getModelsByInfo()get_model_shape()getModelDims()get_criterion()load_torchscript_model()load()get_dummy_input()get_model_architecture()save()train()transfer()finetune_faultnet()resume()apply()getDataLoader()ChunkedDataLoadergetDataLoaders()getDatasetPars()DataGenerator()
- dgbpy.hdf5
- Attributes
- Classes
- Functions
- Module Contents
hdf5extdictAddIfNew()getCubeLetNames()getCubeLetNamesByGroup()getCubeLetNamesByGroupByItem()getGroupSize()getNrAttribs()getNrGroupInputs()getNrOutputs()getSeed()get_np_shape()getTrainingConfig()isRegression()isClassification()isSegmentation()isSeisClass()hasUnlabeled()isLogInput()isLogOutput()isImg2Img()isZipModel()isCrossValidation()unscaleOutput()applyGlobalStd()applyLocalStd()applyNormalization()applyMinMaxScaling()applyRangeScaling()applyArrTranspose()StorageTypeScalerisDefaultScaler()updateScaleInfo()getScalerStr()doOutputScaling()isModel()isMultiLabelRegression()hasboto3()isS3Uri()shouldUseS3()rm_tree()getLogDir()getOutdType()getCubeLets_img2img_multitarget()getCubeLets()getDatasets_()getDatasets()validInfo()getInfo()getAttribInfo()getWellInfo()getNrClasses()arroneitemsize()getTotalSize()modeloutstrmodelIdxStr()odsetBoolValue()addInfo()getClassIndices()getClassIndicesFromData()getMainOutputs()getOutputs()getOutputNames()translateFnm()
- dgbpy.keras_classes
- dgbpy.keras_fix
- dgbpy.keystr
- Attributes
- Functions
- Module Contents
arrayorderdictstrclassdictstrclassesdictstrclassnmdictstrcollectdictstrcomponentdictstrconfdictstrcriteriondictstrdatasetdictstrdbkeydictstrdecimkeystrdtypeconfdtypepreddtypeprobestimatedsizedictstrexampledictstrfiledictstrflexshpdictstrfoldstrgeomiddictstriddictstrinfodictstrinpscalingdictstrinpscalingvalsdictstrinpscaleclipstrinpshapedictstrinputdictstrinterpoldictstrlearntypedictstrlocationdictstrlogdictstrmatchdictstrnamedictstrnroutdictstroutputunscaledictstrpathdictstrplfdictstrpreddictstrprobadictstrrangedictstrscaledictstrseeddictstroutshapedictstrsavetypedictstrsegmentdictstrsurveydictstrtargetdictstrtraindictstrtrainconfigdictstrtrainseldicstrvaliddictstrversiondictstrwithunlabeleddictstrxdatadictstrxtraindictstrxvaliddictstrydatadictstrytraindictstryvaliddictstrypreddictstrzstepdictstraveragestrcarrorderstrclassdatavalstrclassesvalstrclassificationvalstrconfvalstrcontentvalstrcontinuousvalstrcrosslinestrdisclaimerstrflexshpstrglobalstdtypestrinlinestrinpshapestrkerasplfnmlocalstdtypestrlogclustertypestrloglogtypestrmatchstrmaxstrminstrminmaxtypestrmlsoftkeymodelnmmodelnmstrnormalizetypestrnumpyvalstronnxcudastronnxcpustronnxplfnmoutshapestrprefercpustrrangestdtypestrreversestrscikitplfnmsegmentstrsegmenttypestrseisclasstypestrseisimgtoimgtypestrseisproptypestrtorchplfnmtypestrvaluestrversionstrzipmodelstrndimstrs3bokehmsggetNames()getNameFromUiName()getNameFromList()getDefaultAugmentation()getDefaultTensorBoard()format_time()listify()
- dgbpy.mlapply
- dgbpy.mlapplyrun
- dgbpy.mlio
- Attributes
- Functions
- Module Contents
nladbdiridmlinpgrpmltrlgrpdgbtrlgetInfo()datasetCount()getDatasetNms()getCrossValidationIndices()getChunks()hasScaler()getDatasetsByGroup()getSomeDatasets()getTrainingData()getTrainingDataByInfo()getClasses()normalize_class_vector()unnormalize_class_vector()saveModel()getModel()getApplyInfoFromFile()getApplyInfo()dblistallmodelNameIsFree()modelNameExists()dbInfoForModel()getModelType()getSaveLoc()announceShowTensorboard()announceTrainingFailure()announceTrainingSuccess()
- dgbpy.mlmodel_keras_dGB
- dgbpy.mlmodel_torch_dGB
- dgbpy.onnx_classes
- dgbpy.servicemgr
- dgbpy.sklearn_classes
- dgbpy.torch_classes
- Exceptions
- Classes
- Functions
- Module Contents
Tensor2Numpy()Numpy2tensor()hasFastprogress()OnnxTorchModelNetdGBLeNetignore_index()flatten()jaccard()accuracy()f1()mae()reformat_str()AdaptiveLRCallbackTrainEvalCallbackAvgStatsAvgStatsCallbackProgressBarCallbackBokehProgressCallbackEarlyStoppingCallbackTensorBoardLogCallbackLogNrOfSamplesCallbackTransformCallbackLRSchedulerCallbackCancelTrainExceptionCancelEpochExceptionCancelBatchExceptionTrainerResidualBlockcreate_resnet_block()autocrop()conv_layer()get_conv_layer()conv_transpose_layer()get_up_layer()maxpool_layer()get_maxpool_layer()get_activation()get_normalization()ConcatenateDownBlockUpBlockdGBUNetUNetUNet_VGG19TrainDatasetClassTestDatasetClassDatasetApplyDataPredTypeOutputTypeDimTypeTorchUserModel
- dgbpy.torch_modelinfo
- dgbpy.transforms
- dgbpy.uibokeh
- Attributes
- Classes
- Functions
- Module Contents
but_widthbut_heightbut_spacergo_lblstop_lblpause_lblresume_lbltimerkeyparent_barchild_barwidget_marginRunStategetButton()getRunStopButton()getPauseResumeButton()TrainStatusUIS3ProgressUIgetPbar()getRunButtonsBar()startStopCB()isAborted()pauseResumeCB()timerCB()isReady()isRunning()setRunning()startBarUpdateCB()endBarUpdateCB()setReady()setPaused()setResumed()setTabFromButton()setActiveTab()integerListContains()getGroup()getAllUiFlds()ProgBarsetProgValue()percentage()getProgMsg()getProgValue()ProgStateTrainStatusset_augment_mthds()augment_ui_map
- dgbpy.uibokeh_well
- dgbpy.uikeras
- dgbpy.uisklearn
- Attributes
- Functions
- Module Contents
infobut_widthbut_heightbut_spacerdefaultbutgetPlatformNm()clusterChgCB()getClusterGrp()getLinearGrp()getLogGrp()getEnsembleGrp()getKMeansGrp()getMeanShiftGrp()getSpectralGrp()getNNGrp()getSVMGrp()kernelChgCB()layer1ChgCB()layer2ChgCB()layer3ChgCB()layer4ChgCB()buttonChgCB()modelChgCB()getXGDTGrp()getXGRFGrp()getRFGrp()getGBGrp()getAdaGrp()ensembleChgCB()getUiClusterPars()getUiPars()getUiParamsClustering()getUiParams()
- dgbpy.uitorch
- Attributes
- Functions
- Module Contents
infogetPlatformNm()getSizeStr()chunkfldCB()decimateCB()getUiModelTypes()getUiPars()setup_scaler_ui()get_scaler_ui_option()createAdvanedUiLeftPane()getSaveTypes()createAdvanedUiRightPane()getAdvancedUiPars()enableAugmentationCB()getUiTransforms()getUiScaler()getUiParams()isSelected()
- dgbpy.zipmodelbase
- Attributes
- Package Contents
- Submodules
- dgbpy