bm3d ¶
This module implements wrappers for BM3D
Classes:
-
BM3D
– -
BM3DCPU
– -
BM3DCuda
– -
BM3DCudaRTC
– -
BM3DMawen
–BM3D implementation by mawen1250.
-
Profile
–BM3D profiles that set default parameters for each of them.
AbstractBM3D ¶
AbstractBM3D(
clip: VideoNode,
sigma: SingleOrArr[float] = 0.5,
tr: SingleOrArr[int] | None = None,
profile: Profile | Config = FAST,
ref: VideoNode | None = None,
refine: int = 1,
matrix: MatrixT | None = None,
range_in: ColorRangeT | None = None,
colorspace: Colorspace | None = None,
fp32: bool = True,
*,
radius: SingleOrArr[int] | MissingT = MISSING
)
Bases: vs_object
Abstract BM3D-based denoiser interface.
Parameters:
-
clip
¶VideoNode
) –Source clip.
-
sigma
¶SingleOrArr[float]
, default:0.5
) –Strength of denoising, valid range is [0, +inf].
-
tr
¶SingleOrArr[int] | None
, default:None
) –Temporal radius, valid range is [1, 16].
-
profile
¶Profile | Config
, default:FAST
) –Preset profile. See :py:attr:
vsdenoise.bm3d.Profile
. Default: Profile.FAST. -
ref
¶VideoNode | None
, default:None
) –Reference clip used in block-matching, replacing the basic estimation. If not specified, the input clip is used instead. Default: None.
-
refine
¶int
, default:1
) –The number of times to refine the estimation. * 1 means basic estimate with one final estimate. * n means basic estimate refined with final estimate applied n times. Default: 1.
-
matrix
¶MatrixT | None
, default:None
) –Enum for the matrix of the input clip. See :py:attr:
vstools.enums.Matrix
for more info. If not specified, gets the matrix from the "_Matrix" prop of the clip unless it's an RGB clip, in which case it stays asNone
. -
range_in
¶ColorRangeT | None
, default:None
) –Enum for the color range of the input clip. See :py:attr:
vstools.enums.ColorRange
for more info. If not specified, gets the color from the "_ColorRange" prop of the clip. This check is not performed if the input clip is float.
Methods:
-
basic
–Retrieve the "basic" clip, typically used as a
ref
clip for :py:attr:final
. -
denoise
– -
final
–Retrieve the "final" clip.
Attributes:
-
basic_args
(KwargsT
) –Custom kwargs passed to bm3d for the :py:attr:
basic
clip. -
cspconfig
(BM3DColorspaceConfig
) – -
final_args
(KwargsT
) –Custom kwargs passed to bm3d for the :py:attr:
final
clip. -
profile
(Config
) – -
ref
(VideoNode | None
) – -
refine
(int
) – -
sigma
(_Sigma
) – -
tr
(_TemporalRadius
) – -
wclip
(VideoNode
) –
Source code
310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 |
|
basic_args instance-attribute
¶
basic_args: KwargsT = {}
Custom kwargs passed to bm3d for the :py:attr:basic
clip.
cspconfig instance-attribute
¶
cspconfig: BM3DColorspaceConfig = BM3DColorspaceConfig(
colorspace, clip, matrix, y == 0, fp32
)
final_args instance-attribute
¶
final_args: KwargsT = {}
Custom kwargs passed to bm3d for the :py:attr:final
clip.
profile instance-attribute
¶
basic abstractmethod
¶
Retrieve the "basic" clip, typically used as a ref
clip for :py:attr:final
.
Parameters:
-
clip
¶VideoNode
) –OPP or GRAY colorspace clip to be processed.
Returns:
-
VideoNode
–Denoised clip to be used as
ref
.
Source code
376 377 378 379 380 381 382 383 384 |
|
denoise classmethod
¶
denoise(
clip: VideoNode,
sigma: SingleOrArr[float] = 0.5,
tr: SingleOrArr[int] | None = None,
refine: int = 1,
profile: Profile | Config = FAST,
ref: VideoNode | None = None,
matrix: MatrixT | None = None,
range_in: ColorRangeT | None = None,
colorspace: Colorspace | None = None,
fp32: bool = True,
planes: PlanesT = None,
**kwargs: Any
) -> VideoNode
Source code
399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 |
|
final abstractmethod
¶
final(
clip: VideoNode | None = None,
ref: VideoNode | None = None,
refine: int | None = None,
) -> VideoNode
Retrieve the "final" clip.
Parameters:
-
clip
¶VideoNode | None
, default:None
) –OPP or GRAY colorspace clip to be processed.
-
ref
¶VideoNode | None
, default:None
) –Reference clip used for weight calculations.
Returns:
-
VideoNode
–Final, refined, denoised clip.
Source code
386 387 388 389 390 391 392 393 394 395 396 397 |
|
AbstractBM3DCuda ¶
AbstractBM3DCuda(
clip: VideoNode,
sigma: SingleOrArr[float] = 0.5,
tr: SingleOrArr[int] | None = None,
profile: Profile | Config = FAST,
ref: VideoNode | None = None,
refine: int = 1,
matrix: MatrixT | None = None,
range_in: ColorRangeT | None = None,
colorspace: Colorspace | None = None,
fp32: bool = True,
*,
radius: SingleOrArr[int] | MissingT = MISSING
)
Bases: AbstractBM3D
BM3D implementation by WolframRhodium.
Parameters:
-
clip
¶VideoNode
) –Source clip.
-
sigma
¶SingleOrArr[float]
, default:0.5
) –Strength of denoising, valid range is [0, +inf].
-
tr
¶SingleOrArr[int] | None
, default:None
) –Temporal radius, valid range is [1, 16].
-
profile
¶Profile | Config
, default:FAST
) –Preset profile. See :py:attr:
vsdenoise.bm3d.Profile
. Default: Profile.FAST. -
ref
¶VideoNode | None
, default:None
) –Reference clip used in block-matching, replacing the basic estimation. If not specified, the input clip is used instead. Default: None.
-
refine
¶int
, default:1
) –The number of times to refine the estimation. * 1 means basic estimate with one final estimate. * n means basic estimate refined with final estimate applied n times. Default: 1.
-
matrix
¶MatrixT | None
, default:None
) –Enum for the matrix of the input clip. See :py:attr:
vstools.enums.Matrix
for more info. If not specified, gets the matrix from the "_Matrix" prop of the clip unless it's an RGB clip, in which case it stays asNone
. -
range_in
¶ColorRangeT | None
, default:None
) –Enum for the color range of the input clip. See :py:attr:
vstools.enums.ColorRange
for more info. If not specified, gets the color from the "_ColorRange" prop of the clip. This check is not performed if the input clip is float.
Methods:
Attributes:
-
basic_args
(KwargsT
) –Custom kwargs passed to bm3d for the :py:attr:
basic
clip. -
cspconfig
(BM3DColorspaceConfig
) – -
final_args
(KwargsT
) –Custom kwargs passed to bm3d for the :py:attr:
final
clip. -
plugin
(_Plugin_bm3dcuda_Core_Bound | _Plugin_bm3dcuda_rtc_Core_Bound | _Plugin_bm3dcpu_Core_Bound
) – -
profile
(Config
) – -
ref
(VideoNode | None
) – -
refine
(int
) – -
sigma
(_Sigma
) – -
tr
(_TemporalRadius
) – -
wclip
(VideoNode
) –
Source code
310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 |
|
basic_args instance-attribute
¶
basic_args: KwargsT = {}
Custom kwargs passed to bm3d for the :py:attr:basic
clip.
cspconfig instance-attribute
¶
cspconfig: BM3DColorspaceConfig = BM3DColorspaceConfig(
colorspace, clip, matrix, y == 0, fp32
)
final_args instance-attribute
¶
final_args: KwargsT = {}
Custom kwargs passed to bm3d for the :py:attr:final
clip.
plugin instance-attribute
¶
plugin: (
_Plugin_bm3dcuda_Core_Bound
| _Plugin_bm3dcuda_rtc_Core_Bound
| _Plugin_bm3dcpu_Core_Bound
)
profile instance-attribute
¶
basic ¶
Source code
505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 |
|
denoise classmethod
¶
denoise(
clip: VideoNode,
sigma: SingleOrArr[float] = 0.5,
tr: SingleOrArr[int] | None = None,
refine: int = 1,
profile: Profile | Config = FAST,
ref: VideoNode | None = None,
matrix: MatrixT | None = None,
range_in: ColorRangeT | None = None,
colorspace: Colorspace | None = None,
fp32: bool = True,
planes: PlanesT = None,
**kwargs: Any
) -> VideoNode
Source code
399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 |
|
final ¶
final(
clip: VideoNode | None = None,
ref: VideoNode | None = None,
refine: int | None = None,
) -> VideoNode
Source code
522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 |
|
BM3D ¶
BM3D(
clip: VideoNode,
sigma: SingleOrArr[float] = 0.5,
tr: SingleOrArr[int] | None = None,
profile: Profile | Config = FAST,
ref: VideoNode | None = None,
refine: int = 1,
matrix: MatrixT | None = None,
range_in: ColorRangeT | None = None,
colorspace: Colorspace | None = None,
fp32: bool = True,
*,
radius: SingleOrArr[int] | MissingT = MISSING
)
Bases: AbstractBM3D
Parameters:
-
clip
¶VideoNode
) –Source clip.
-
sigma
¶SingleOrArr[float]
, default:0.5
) –Strength of denoising, valid range is [0, +inf].
-
tr
¶SingleOrArr[int] | None
, default:None
) –Temporal radius, valid range is [1, 16].
-
profile
¶Profile | Config
, default:FAST
) –Preset profile. See :py:attr:
vsdenoise.bm3d.Profile
. Default: Profile.FAST. -
ref
¶VideoNode | None
, default:None
) –Reference clip used in block-matching, replacing the basic estimation. If not specified, the input clip is used instead. Default: None.
-
refine
¶int
, default:1
) –The number of times to refine the estimation. * 1 means basic estimate with one final estimate. * n means basic estimate refined with final estimate applied n times. Default: 1.
-
matrix
¶MatrixT | None
, default:None
) –Enum for the matrix of the input clip. See :py:attr:
vstools.enums.Matrix
for more info. If not specified, gets the matrix from the "_Matrix" prop of the clip unless it's an RGB clip, in which case it stays asNone
. -
range_in
¶ColorRangeT | None
, default:None
) –Enum for the color range of the input clip. See :py:attr:
vstools.enums.ColorRange
for more info. If not specified, gets the color from the "_ColorRange" prop of the clip. This check is not performed if the input clip is float.
Methods:
-
basic
–Retrieve the "basic" clip, typically used as a
ref
clip for :py:attr:final
. -
denoise
– -
final
–Retrieve the "final" clip.
Attributes:
-
basic_args
(KwargsT
) –Custom kwargs passed to bm3d for the :py:attr:
basic
clip. -
cspconfig
(BM3DColorspaceConfig
) – -
final_args
(KwargsT
) –Custom kwargs passed to bm3d for the :py:attr:
final
clip. -
profile
(Config
) – -
ref
(VideoNode | None
) – -
refine
(int
) – -
sigma
(_Sigma
) – -
tr
(_TemporalRadius
) – -
wclip
(VideoNode
) –
Source code
310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 |
|
basic_args instance-attribute
¶
basic_args: KwargsT = {}
Custom kwargs passed to bm3d for the :py:attr:basic
clip.
cspconfig instance-attribute
¶
cspconfig: BM3DColorspaceConfig = BM3DColorspaceConfig(
colorspace, clip, matrix, y == 0, fp32
)
final_args instance-attribute
¶
final_args: KwargsT = {}
Custom kwargs passed to bm3d for the :py:attr:final
clip.
profile instance-attribute
¶
basic abstractmethod
¶
Retrieve the "basic" clip, typically used as a ref
clip for :py:attr:final
.
Parameters:
-
clip
¶VideoNode
) –OPP or GRAY colorspace clip to be processed.
Returns:
-
VideoNode
–Denoised clip to be used as
ref
.
Source code
376 377 378 379 380 381 382 383 384 |
|
denoise classmethod
¶
denoise(
clip: VideoNode,
sigma: SingleOrArr[float] = 0.5,
tr: SingleOrArr[int] | None = None,
refine: int = 1,
profile: Profile | Config = FAST,
ref: VideoNode | None = None,
matrix: MatrixT | None = None,
range_in: ColorRangeT | None = None,
colorspace: Colorspace | None = None,
fp32: bool = True,
planes: PlanesT = None,
**kwargs: Any
) -> VideoNode
Source code
399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 |
|
final abstractmethod
¶
final(
clip: VideoNode | None = None,
ref: VideoNode | None = None,
refine: int | None = None,
) -> VideoNode
Retrieve the "final" clip.
Parameters:
-
clip
¶VideoNode | None
, default:None
) –OPP or GRAY colorspace clip to be processed.
-
ref
¶VideoNode | None
, default:None
) –Reference clip used for weight calculations.
Returns:
-
VideoNode
–Final, refined, denoised clip.
Source code
386 387 388 389 390 391 392 393 394 395 396 397 |
|
BM3DCPU ¶
BM3DCPU(
clip: VideoNode,
sigma: SingleOrArr[float] = 0.5,
tr: SingleOrArr[int] | None = None,
profile: Profile | Config = FAST,
ref: VideoNode | None = None,
refine: int = 1,
matrix: MatrixT | None = None,
range_in: ColorRangeT | None = None,
colorspace: Colorspace | None = None,
fp32: bool = True,
*,
radius: SingleOrArr[int] | MissingT = MISSING
)
Bases: AbstractBM3DCuda
Parameters:
-
clip
¶VideoNode
) –Source clip.
-
sigma
¶SingleOrArr[float]
, default:0.5
) –Strength of denoising, valid range is [0, +inf].
-
tr
¶SingleOrArr[int] | None
, default:None
) –Temporal radius, valid range is [1, 16].
-
profile
¶Profile | Config
, default:FAST
) –Preset profile. See :py:attr:
vsdenoise.bm3d.Profile
. Default: Profile.FAST. -
ref
¶VideoNode | None
, default:None
) –Reference clip used in block-matching, replacing the basic estimation. If not specified, the input clip is used instead. Default: None.
-
refine
¶int
, default:1
) –The number of times to refine the estimation. * 1 means basic estimate with one final estimate. * n means basic estimate refined with final estimate applied n times. Default: 1.
-
matrix
¶MatrixT | None
, default:None
) –Enum for the matrix of the input clip. See :py:attr:
vstools.enums.Matrix
for more info. If not specified, gets the matrix from the "_Matrix" prop of the clip unless it's an RGB clip, in which case it stays asNone
. -
range_in
¶ColorRangeT | None
, default:None
) –Enum for the color range of the input clip. See :py:attr:
vstools.enums.ColorRange
for more info. If not specified, gets the color from the "_ColorRange" prop of the clip. This check is not performed if the input clip is float.
Methods:
Attributes:
-
basic_args
(KwargsT
) –Custom kwargs passed to bm3d for the :py:attr:
basic
clip. -
cspconfig
(BM3DColorspaceConfig
) – -
final_args
(KwargsT
) –Custom kwargs passed to bm3d for the :py:attr:
final
clip. -
plugin
(_Plugin_bm3dcuda_Core_Bound | _Plugin_bm3dcuda_rtc_Core_Bound | _Plugin_bm3dcpu_Core_Bound
) – -
profile
(Config
) – -
ref
(VideoNode | None
) – -
refine
(int
) – -
sigma
(_Sigma
) – -
tr
(_TemporalRadius
) – -
wclip
(VideoNode
) –
Source code
310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 |
|
basic_args instance-attribute
¶
basic_args: KwargsT = {}
Custom kwargs passed to bm3d for the :py:attr:basic
clip.
cspconfig instance-attribute
¶
cspconfig: BM3DColorspaceConfig = BM3DColorspaceConfig(
colorspace, clip, matrix, y == 0, fp32
)
final_args instance-attribute
¶
final_args: KwargsT = {}
Custom kwargs passed to bm3d for the :py:attr:final
clip.
plugin instance-attribute
¶
plugin: (
_Plugin_bm3dcuda_Core_Bound
| _Plugin_bm3dcuda_rtc_Core_Bound
| _Plugin_bm3dcpu_Core_Bound
)
profile instance-attribute
¶
basic ¶
Source code
505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 |
|
denoise classmethod
¶
denoise(
clip: VideoNode,
sigma: SingleOrArr[float] = 0.5,
tr: SingleOrArr[int] | None = None,
refine: int = 1,
profile: Profile | Config = FAST,
ref: VideoNode | None = None,
matrix: MatrixT | None = None,
range_in: ColorRangeT | None = None,
colorspace: Colorspace | None = None,
fp32: bool = True,
planes: PlanesT = None,
**kwargs: Any
) -> VideoNode
Source code
399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 |
|
final ¶
final(
clip: VideoNode | None = None,
ref: VideoNode | None = None,
refine: int | None = None,
) -> VideoNode
Source code
522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 |
|
BM3DColorspaceConfig dataclass
¶
BM3DColorspaceConfig(
csp: Colorspace,
clip: ConstantFormatVideoNode,
matrix: Matrix | None,
chroma_only: bool,
fp32: bool,
)
Methods:
Attributes:
-
chroma_only
(bool
) – -
clip
(ConstantFormatVideoNode
) – -
csp
(Colorspace
) – -
fp32
(bool
) – -
matrix
(Matrix | None
) –
check_clip ¶
check_clip(
clip: VideoNode,
matrix: MatrixT | None,
range_in: ColorRangeT | None,
func: FuncExceptT,
) -> ConstantFormatVideoNode
check_clip(
clip: None,
matrix: MatrixT | None,
range_in: ColorRangeT | None,
func: FuncExceptT,
) -> None
check_clip(
clip: VideoNode | None,
matrix: MatrixT | None,
range_in: ColorRangeT | None,
func: FuncExceptT,
) -> ConstantFormatVideoNode | None
Source code
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
|
get_clip ¶
get_clip(
base: VideoNode, pre: VideoNode, ref: VideoNode | None = None
) -> VideoNode
Source code
71 72 |
|
post_processing ¶
post_processing(clip: VideoNode) -> VideoNode
Source code
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
|
prepare_clip ¶
prepare_clip(clip: VideoNode) -> VideoNode
prepare_clip(clip: None) -> None
prepare_clip(clip: VideoNode | None) -> VideoNode | None
Source code
82 83 84 85 86 87 88 |
|
BM3DCuda ¶
BM3DCuda(
clip: VideoNode,
sigma: SingleOrArr[float] = 0.5,
tr: SingleOrArr[int] | None = None,
profile: Profile | Config = FAST,
ref: VideoNode | None = None,
refine: int = 1,
matrix: MatrixT | None = None,
range_in: ColorRangeT | None = None,
colorspace: Colorspace | None = None,
fp32: bool = True,
*,
radius: SingleOrArr[int] | MissingT = MISSING
)
Bases: AbstractBM3DCuda
Parameters:
-
clip
¶VideoNode
) –Source clip.
-
sigma
¶SingleOrArr[float]
, default:0.5
) –Strength of denoising, valid range is [0, +inf].
-
tr
¶SingleOrArr[int] | None
, default:None
) –Temporal radius, valid range is [1, 16].
-
profile
¶Profile | Config
, default:FAST
) –Preset profile. See :py:attr:
vsdenoise.bm3d.Profile
. Default: Profile.FAST. -
ref
¶VideoNode | None
, default:None
) –Reference clip used in block-matching, replacing the basic estimation. If not specified, the input clip is used instead. Default: None.
-
refine
¶int
, default:1
) –The number of times to refine the estimation. * 1 means basic estimate with one final estimate. * n means basic estimate refined with final estimate applied n times. Default: 1.
-
matrix
¶MatrixT | None
, default:None
) –Enum for the matrix of the input clip. See :py:attr:
vstools.enums.Matrix
for more info. If not specified, gets the matrix from the "_Matrix" prop of the clip unless it's an RGB clip, in which case it stays asNone
. -
range_in
¶ColorRangeT | None
, default:None
) –Enum for the color range of the input clip. See :py:attr:
vstools.enums.ColorRange
for more info. If not specified, gets the color from the "_ColorRange" prop of the clip. This check is not performed if the input clip is float.
Methods:
Attributes:
-
basic_args
(KwargsT
) –Custom kwargs passed to bm3d for the :py:attr:
basic
clip. -
cspconfig
(BM3DColorspaceConfig
) – -
final_args
(KwargsT
) –Custom kwargs passed to bm3d for the :py:attr:
final
clip. -
plugin
(_Plugin_bm3dcuda_Core_Bound | _Plugin_bm3dcuda_rtc_Core_Bound | _Plugin_bm3dcpu_Core_Bound
) – -
profile
(Config
) – -
ref
(VideoNode | None
) – -
refine
(int
) – -
sigma
(_Sigma
) – -
tr
(_TemporalRadius
) – -
wclip
(VideoNode
) –
Source code
310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 |
|
basic_args instance-attribute
¶
basic_args: KwargsT = {}
Custom kwargs passed to bm3d for the :py:attr:basic
clip.
cspconfig instance-attribute
¶
cspconfig: BM3DColorspaceConfig = BM3DColorspaceConfig(
colorspace, clip, matrix, y == 0, fp32
)
final_args instance-attribute
¶
final_args: KwargsT = {}
Custom kwargs passed to bm3d for the :py:attr:final
clip.
plugin instance-attribute
¶
plugin: (
_Plugin_bm3dcuda_Core_Bound
| _Plugin_bm3dcuda_rtc_Core_Bound
| _Plugin_bm3dcpu_Core_Bound
)
profile instance-attribute
¶
basic ¶
Source code
505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 |
|
denoise classmethod
¶
denoise(
clip: VideoNode,
sigma: SingleOrArr[float] = 0.5,
tr: SingleOrArr[int] | None = None,
refine: int = 1,
profile: Profile | Config = FAST,
ref: VideoNode | None = None,
matrix: MatrixT | None = None,
range_in: ColorRangeT | None = None,
colorspace: Colorspace | None = None,
fp32: bool = True,
planes: PlanesT = None,
**kwargs: Any
) -> VideoNode
Source code
399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 |
|
final ¶
final(
clip: VideoNode | None = None,
ref: VideoNode | None = None,
refine: int | None = None,
) -> VideoNode
Source code
522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 |
|
BM3DCudaRTC ¶
BM3DCudaRTC(
clip: VideoNode,
sigma: SingleOrArr[float] = 0.5,
tr: SingleOrArr[int] | None = None,
profile: Profile | Config = FAST,
ref: VideoNode | None = None,
refine: int = 1,
matrix: MatrixT | None = None,
range_in: ColorRangeT | None = None,
colorspace: Colorspace | None = None,
fp32: bool = True,
*,
radius: SingleOrArr[int] | MissingT = MISSING
)
Bases: AbstractBM3DCuda
Parameters:
-
clip
¶VideoNode
) –Source clip.
-
sigma
¶SingleOrArr[float]
, default:0.5
) –Strength of denoising, valid range is [0, +inf].
-
tr
¶SingleOrArr[int] | None
, default:None
) –Temporal radius, valid range is [1, 16].
-
profile
¶Profile | Config
, default:FAST
) –Preset profile. See :py:attr:
vsdenoise.bm3d.Profile
. Default: Profile.FAST. -
ref
¶VideoNode | None
, default:None
) –Reference clip used in block-matching, replacing the basic estimation. If not specified, the input clip is used instead. Default: None.
-
refine
¶int
, default:1
) –The number of times to refine the estimation. * 1 means basic estimate with one final estimate. * n means basic estimate refined with final estimate applied n times. Default: 1.
-
matrix
¶MatrixT | None
, default:None
) –Enum for the matrix of the input clip. See :py:attr:
vstools.enums.Matrix
for more info. If not specified, gets the matrix from the "_Matrix" prop of the clip unless it's an RGB clip, in which case it stays asNone
. -
range_in
¶ColorRangeT | None
, default:None
) –Enum for the color range of the input clip. See :py:attr:
vstools.enums.ColorRange
for more info. If not specified, gets the color from the "_ColorRange" prop of the clip. This check is not performed if the input clip is float.
Methods:
Attributes:
-
basic_args
(KwargsT
) –Custom kwargs passed to bm3d for the :py:attr:
basic
clip. -
cspconfig
(BM3DColorspaceConfig
) – -
final_args
(KwargsT
) –Custom kwargs passed to bm3d for the :py:attr:
final
clip. -
plugin
(_Plugin_bm3dcuda_Core_Bound | _Plugin_bm3dcuda_rtc_Core_Bound | _Plugin_bm3dcpu_Core_Bound
) – -
profile
(Config
) – -
ref
(VideoNode | None
) – -
refine
(int
) – -
sigma
(_Sigma
) – -
tr
(_TemporalRadius
) – -
wclip
(VideoNode
) –
Source code
310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 |
|
basic_args instance-attribute
¶
basic_args: KwargsT = {}
Custom kwargs passed to bm3d for the :py:attr:basic
clip.
cspconfig instance-attribute
¶
cspconfig: BM3DColorspaceConfig = BM3DColorspaceConfig(
colorspace, clip, matrix, y == 0, fp32
)
final_args instance-attribute
¶
final_args: KwargsT = {}
Custom kwargs passed to bm3d for the :py:attr:final
clip.
plugin instance-attribute
¶
plugin: (
_Plugin_bm3dcuda_Core_Bound
| _Plugin_bm3dcuda_rtc_Core_Bound
| _Plugin_bm3dcpu_Core_Bound
)
profile instance-attribute
¶
basic ¶
Source code
505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 |
|
denoise classmethod
¶
denoise(
clip: VideoNode,
sigma: SingleOrArr[float] = 0.5,
tr: SingleOrArr[int] | None = None,
refine: int = 1,
profile: Profile | Config = FAST,
ref: VideoNode | None = None,
matrix: MatrixT | None = None,
range_in: ColorRangeT | None = None,
colorspace: Colorspace | None = None,
fp32: bool = True,
planes: PlanesT = None,
**kwargs: Any
) -> VideoNode
Source code
399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 |
|
final ¶
final(
clip: VideoNode | None = None,
ref: VideoNode | None = None,
refine: int | None = None,
) -> VideoNode
Source code
522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 |
|
BM3DMawen ¶
BM3DMawen(
clip: VideoNode,
sigma: SingleOrArr[float] = 0.5,
tr: SingleOrArr[int] | None = None,
profile: Profile | Config = FAST,
pre: VideoNode | None = None,
ref: VideoNode | None = None,
refine: int = 1,
matrix: MatrixT | None = None,
range_in: ColorRangeT | None = None,
colorspace: Colorspace | None = None,
fp32: bool = True,
*,
radius: SingleOrArr[int] | MissingT = MISSING
)
Bases: AbstractBM3D
BM3D implementation by mawen1250.
Methods:
Attributes:
-
basic_args
(KwargsT
) –Custom kwargs passed to bm3d for the :py:attr:
basic
clip. -
cspconfig
(BM3DColorspaceConfig
) – -
final_args
(KwargsT
) –Custom kwargs passed to bm3d for the :py:attr:
final
clip. -
pre
– -
profile
(Config
) – -
ref
(VideoNode | None
) – -
refine
(int
) – -
sigma
(_Sigma
) – -
tr
(_TemporalRadius
) – -
wclip
(VideoNode
) –
Source code
439 440 441 442 443 444 445 446 447 448 |
|
basic_args instance-attribute
¶
basic_args: KwargsT = {}
Custom kwargs passed to bm3d for the :py:attr:basic
clip.
cspconfig instance-attribute
¶
cspconfig: BM3DColorspaceConfig = BM3DColorspaceConfig(
colorspace, clip, matrix, y == 0, fp32
)
final_args instance-attribute
¶
final_args: KwargsT = {}
Custom kwargs passed to bm3d for the :py:attr:final
clip.
profile instance-attribute
¶
basic ¶
basic(clip: VideoNode | None = None, opp: bool = False) -> VideoNode
Source code
455 456 457 458 459 460 461 462 463 464 465 466 467 |
|
denoise classmethod
¶
denoise(
clip: VideoNode,
sigma: SingleOrArr[float] = 0.5,
tr: SingleOrArr[int] | None = None,
refine: int = 1,
profile: Profile | Config = FAST,
ref: VideoNode | None = None,
matrix: MatrixT | None = None,
range_in: ColorRangeT | None = None,
colorspace: Colorspace | None = None,
fp32: bool = True,
planes: PlanesT = None,
**kwargs: Any
) -> VideoNode
Source code
399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 |
|
final ¶
final(
clip: VideoNode | None = None,
ref: VideoNode | None = None,
refine: int | None = None,
) -> VideoNode
Source code
469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 |
|
Profile ¶
Bases: ProfileBase
, CustomStrEnum
BM3D profiles that set default parameters for each of them.
See the original documentation for more information:
https://github.com/HomeOfVapourSynthEvolution/VapourSynth-BM3D#profile-default
Classes:
-
Config
–Profile config for arguments passed to the bm3d implementation basic/final calls.
Methods:
-
__call__
–
Attributes:
-
CUSTOM
–Member for your own profile with no defaults.
-
FAST
–Profile aimed at maximizing speed.
-
HIGH
–Profile aimed at high-precision denoising.
-
LOW_COMPLEXITY
–Profile for content with low-complexity noise.
-
NORMAL
–Neutral profile.
-
VERY_NOISY
–Profile for very noisy content.
CUSTOM class-attribute
instance-attribute
¶
CUSTOM = 'custom'
Member for your own profile with no defaults.
LOW_COMPLEXITY class-attribute
instance-attribute
¶
LOW_COMPLEXITY = 'lc'
Profile for content with low-complexity noise.
Config dataclass
¶
Config(
profile: Profile,
kwargs: KwargsT,
basic_kwargs: KwargsT,
final_kwargs: KwargsT,
overrides: KwargsT,
overrides_basic: KwargsT,
overrides_final: KwargsT,
)
Profile config for arguments passed to the bm3d implementation basic/final calls.
Methods:
-
as_dict
–Get kwargs from this Config.
Attributes:
-
basic_kwargs
(KwargsT
) –Kwargs used for basic calls.
-
final_kwargs
(KwargsT
) –Kwargs used for final calls.
-
kwargs
(KwargsT
) –Base kwargs used for basic/final calls.
-
overrides
(KwargsT
) –Overrides for profile defaults and kwargs.
-
overrides_basic
(KwargsT
) –Overrides for profile defaults and kwargs for basic calls.
-
overrides_final
(KwargsT
) –Overrides for profile defaults and kwargs for final calls.
-
profile
(Profile
) –Which preset to use as a base.
basic_kwargs instance-attribute
¶
basic_kwargs: KwargsT
Kwargs used for basic calls.
These can be overridden by overrides
/overrides_basic
or Profile defaults.
final_kwargs instance-attribute
¶
final_kwargs: KwargsT
Kwargs used for final calls.
These can be overridden by overrides
/overrides_final
or Profile defaults.
kwargs instance-attribute
¶
kwargs: KwargsT
Base kwargs used for basic/final calls.
These can be overridden by overrides
or Profile defaults.
overrides_basic instance-attribute
¶
overrides_basic: KwargsT
Overrides for profile defaults and kwargs for basic calls.
overrides_final instance-attribute
¶
overrides_final: KwargsT
Overrides for profile defaults and kwargs for final calls.
as_dict ¶
as_dict(
cuda: Plugin | Literal[False],
basic: bool = False,
aggregate: bool = False,
args: KwargsT | None = None,
**kwargs: Any
) -> KwargsT
Get kwargs from this Config.
Parameters:
-
cuda
¶Plugin | Literal[False]
) –Whether the implementation is cuda or not.
-
basic
¶bool
, default:False
) –Whether the call is basic or final.
-
aggregate
¶bool
, default:False
) –Whether it's an aggregate (refining) call or not.
-
args
¶KwargsT | None
, default:None
) –Custom args that will take priority over everything else.
-
kwargs
¶Any
, default:{}
) –Additional kwargs to add.
Returns:
-
KwargsT
–Dictionary of keyword arguments for the call.
Source code
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 |
|
__call__ ¶
__call__(
block_step: int | None = None,
bm_range: int | None = None,
block_size: int | None = None,
group_size: int | None = None,
bm_step: int | None = None,
th_mse: float | None = None,
hard_thr: float | None = None,
ps_num: int | None = None,
ps_range: int | None = None,
ps_step: int | None = None,
basic_kwargs: KwargsT | None = None,
final_kwargs: KwargsT | None = None,
**kwargs: Any
) -> Config
Source code
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 |
|
ProfileBase ¶
Classes:
-
Config
–Profile config for arguments passed to the bm3d implementation basic/final calls.
Config dataclass
¶
Config(
profile: Profile,
kwargs: KwargsT,
basic_kwargs: KwargsT,
final_kwargs: KwargsT,
overrides: KwargsT,
overrides_basic: KwargsT,
overrides_final: KwargsT,
)
Profile config for arguments passed to the bm3d implementation basic/final calls.
Methods:
-
as_dict
–Get kwargs from this Config.
Attributes:
-
basic_kwargs
(KwargsT
) –Kwargs used for basic calls.
-
final_kwargs
(KwargsT
) –Kwargs used for final calls.
-
kwargs
(KwargsT
) –Base kwargs used for basic/final calls.
-
overrides
(KwargsT
) –Overrides for profile defaults and kwargs.
-
overrides_basic
(KwargsT
) –Overrides for profile defaults and kwargs for basic calls.
-
overrides_final
(KwargsT
) –Overrides for profile defaults and kwargs for final calls.
-
profile
(Profile
) –Which preset to use as a base.
basic_kwargs instance-attribute
¶
basic_kwargs: KwargsT
Kwargs used for basic calls.
These can be overridden by overrides
/overrides_basic
or Profile defaults.
final_kwargs instance-attribute
¶
final_kwargs: KwargsT
Kwargs used for final calls.
These can be overridden by overrides
/overrides_final
or Profile defaults.
kwargs instance-attribute
¶
kwargs: KwargsT
Base kwargs used for basic/final calls.
These can be overridden by overrides
or Profile defaults.
overrides_basic instance-attribute
¶
overrides_basic: KwargsT
Overrides for profile defaults and kwargs for basic calls.
overrides_final instance-attribute
¶
overrides_final: KwargsT
Overrides for profile defaults and kwargs for final calls.
as_dict ¶
as_dict(
cuda: Plugin | Literal[False],
basic: bool = False,
aggregate: bool = False,
args: KwargsT | None = None,
**kwargs: Any
) -> KwargsT
Get kwargs from this Config.
Parameters:
-
cuda
¶Plugin | Literal[False]
) –Whether the implementation is cuda or not.
-
basic
¶bool
, default:False
) –Whether the call is basic or final.
-
aggregate
¶bool
, default:False
) –Whether it's an aggregate (refining) call or not.
-
args
¶KwargsT | None
, default:None
) –Custom args that will take priority over everything else.
-
kwargs
¶Any
, default:{}
) –Additional kwargs to add.
Returns:
-
KwargsT
–Dictionary of keyword arguments for the call.
Source code
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 |
|