Opencd框架调用的是MMCV的transform包
在opencd/datasets/transforms的路径下, 由一个文件是transforms.py,在这个文件中注册数据扰动的新类型,在__init__.py中加入相应的数据扰动新类型的名字,就可以在standard_256x256_40k_levircd.py文件中调用这个数据扰动新类型,以实现对数据集的预处理。
搜到的相关官方文档
1、数据变换 (Data Transform)
https://mmengine.readthedocs.io/zh-cn/v0.10.4/advanced_tutorials/data_transform.html
2、数据变换
https://mmcv.readthedocs.io/zh-cn/2.x/understand_mmcv/data_transform.html#id8
3、数据处理
https://mmcv.readthedocs.io/zh-cn/2.x/understand_mmcv/data_process.html#id10
4、MMCV图像处理模块深度探索
https://blog.csdn.net/gitblog_00440/article/details/148487599
5、open-mmlab/mmcv/mmcv/transforms/processing.py
https://github.com/open-mmlab/mmcv/blob/main/mmcv/transforms/processing.py
-------------------------------------------------------------------------------------------------------------
钩子的设计
1、实用的钩子
https://mmdetection.readthedocs.io/zh-cn/latest/user_guides/useful_hooks.html
https://github.com/open-mmlab/mmengine/blob/main/docs/en/tutorials/hook.md