基于区块链的毕业设计Solving Occlusion – 解决遮挡
本文提供基于区块链的毕业设计国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,基于区块链的毕业设计Solving Occlusion – 解决遮挡 是一篇很好的国外资料
Solving Occlusion
Instructions
1. Prerequisites
This framework requires Python 3.9.1. The generation of synthetic datasets requires an Ubuntu environment.
Note: To use efficient neural network training, Cuda 10.2 needs to be installed and available.
It is recommended to use a package manager like Conda (https://docs.conda.io/en/latest/) to manage the Python version and all required Python packages.
2. Initialisation of git submodule
After setting the environment variable $WORKSPACE
to a folder you want to work in, you should clone this repo:
git clone https://github.com/mstoelzle/solving occlusion $WORKSPACE/solving-occlusion && cd $WORKSPACE/solving-occlusion
All git submodules need to be initialized and updated:
git submodule update --init --recursive
3. Installation:
3.1 Install all required PIP packages
The required Python packages can be installed as follows (within the Conda environment) in the root directory:
pip install -r ${WORKSPACE}/solving-occlusion/requirements.txt --user
3.2 Build OpenCV from source:
- Install the pkg-config package for macOS:
brew install pkg-config
for Ubuntu:sudo apt-get install pkg-config
. - Manual build of OpenCV for macOS and Linux. Run this command (while adjusting the paths):
cmake -D CMAKE_BUILD_TYPE=Release -D OPENCV_EXTRA_MODULES_PATH="${WORKSPACE}/opencv_contrib/modules" PYTHON3_EXECUTABLE=~/miniconda3/envs/rsl_solving_occlusion/bin/python PYTHON_INCLUDE_DIR=~/miniconda3/envs/rsl_solving_occlusion/include/python3.8 PYTHON3_LIBRARY=~/miniconda3/envs/rsl_solving_occlusion/lib/libpython3.so PYTHON3_NUMPY_INCLUDE_DIRS=~/rock/install/pip/lib/python3.8/site-packages/numpy/core/include PYTHON3_PACKAGES_PATH=~/rock/install/pip/lib/python3.8/site-packages -DOPENCV_GENERATE_PKGCONFIG=ON -S "${WORKSPACE}/opencv" -B "${WORKSPACE}/opencv_build"
and then make & install the build:
cd ${WORKSPACE}/opencv_build && make -j7 && sudo make install
- Set the environmental variable
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
3.3 Install the TerrainDataGenerator
System requirements: Ubuntu >= 16.04, g++ / gcc >= 6, CMake >= 3.10, CPU with support for avx2 instructions (produced within last 6 years)
As the generation of a synthetic dataset relies on the TerrainDataGenerator by Takahiro Miki and different raisim plugins, the following installation instruction need to be followed recursively after the src/dataset_generation/synthetic_terrain_data_generator
git submodule is initialised: https://bitbucket.org/tamiki/terrain_data_generator
Initialise the raisim build directory: export LOCAL_BUILD=$WORKSPACE/raisim_build && mkdir $LOCAL_BUILD
After following the installation instructions, the build directory needs to be added to the CMAKE_PREFIX_PATH:
export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:$LOCAL_BUILD
Additionally, the terrain_data_generator
submodule has a requirement on OpenCV:
sudo apt-get install libopencv-dev
Finally, install the terrain_data_generator
package:
pip install --user -e "${WORKSPACE}/solving-occlusion/src/dataset_generation/synthetic_terrain_data_generator"
3.4 Install PyPatchMatch
We use the PatchMatch [1] algorithm as a (traditional) baseline for in-painting of the occluded elevation maps.
If this baseline is specified for use in the config, the following installation steps to use the dependency PyPatchMatch need to be taken:
cd "${WORKSPACE}/solving-occlusion/src/learning/models/baseline/py_patch_match" && make
4. Generating a dataset
We use JSON config files to specify all settings and parameters of our experiments. All config files need to be placed in a subdirectory of {DIR_TO_REPO}/configs
. Subsequently, a dataset generation can be started by stating the path relative to the {DIR_TO_REPO}
directory:
python dataset_generation.py configs/{CONFIG_NAME}.json
5. Learning
We use JSON config files to specify all settings and parameters of our experiments. All config files need to be placed in a subdirectory of {DIR_TO_REPO}/configs
. The absolute or relative path to the dataset needs to be specified in the JSON config. Subsequently, a learning experiment can be started by stating the path relative to the {DIR_TO_REPO}
directory:
python learning.py configs/{CONFIG_NAME}.json
Important components
Task Path
The main ingredient to path learning are what we call task paths. They consist of different “training regimes” applied sequentially to a machine learning model. In our implementation they create tasks from their configs and are used as iterators to yield these tasks.
Task
A task consists of a set of dataloaders, which are created from a base dataset (i.e. MNIST) and transformers applied to it. Moreover it also specifies a loss function, loss aggregator and the batch size for the dataloader. In our implementation tasks measure their own runtime by using the “with” keyword.
Controller
The controller is a member of the learning classes. It is implemented as an iterator that yields epochs until convergence or a maximum number of epochs is reached.
Experiment
The experiment contains all other objects introduced above. It manages device placement and logdir creation.
Citations
[1] Barnes, Connelly, et al. “PatchMatch: A randomized correspondence algorithm for structural image editing.” ACM Trans. Graph. 28.3 (2009): 24.
解决遮挡
说明
1。先决条件
这个框架需要python3.9.1。合成数据集的生成需要一个Ubuntu环境。
注意:要使用有效的神经网络培训,需要安装并提供Cuda 10.2。
建议使用像Conda这样的包管理器(https://docs.conda.io/en/latest/)管理Python版本和所有必需的Python包。
2。git子模块的初始化
在将环境变量$WORKSPACE设置为要在其中工作的文件夹后,应克隆此存储库:
git clone https://github.com/mstoelzle/solving occlusion $WORKSPACE/solving-occlusion && cd $WORKSPACE/solving-occlusion
所有git子模块都需要初始化和更新:
git submodule update --init --recursive
3。安装:
3.1安装所有必需的PIP包
所需的Python包可以按如下方式(在Conda环境中)安装在根目录中:
pip install -r ${WORKSPACE}/solving-occlusion/requirements.txt --user
3.2从源代码构建OpenCV:
- 安装macOS的pkg config包:brew Install pkg config for Ubuntu:sudo apt get Install pkg config。
- 为macOS和Linux手动构建OpenCV。运行此命令(同时调整路径):
cmake -D CMAKE_BUILD_TYPE=Release -D OPENCV_EXTRA_MODULES_PATH="${WORKSPACE}/opencv_contrib/modules" PYTHON3_EXECUTABLE=~/miniconda3/envs/rsl_solving_occlusion/bin/python PYTHON_INCLUDE_DIR=~/miniconda3/envs/rsl_solving_occlusion/include/python3.8 PYTHON3_LIBRARY=~/miniconda3/envs/rsl_solving_occlusion/lib/libpython3.so PYTHON3_NUMPY_INCLUDE_DIRS=~/rock/install/pip/lib/python3.8/site-packages/numpy/core/include PYTHON3_PACKAGES_PATH=~/rock/install/pip/lib/python3.8/site-packages -DOPENCV_GENERATE_PKGCONFIG=ON -S "${WORKSPACE}/opencv" -B "${WORKSPACE}/opencv_build"
,然后制作并安装构建:
cd ${WORKSPACE}/opencv_build && make -j7 && sudo make install
- 设置环境变量export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
3.3安装TerrainDataGenerator
系统要求:Ubuntu>;=16.04,g++/gcc>;=6,CMake>;=3.10,支持avx2指令的CPU(在过去6年内生产)
因为合成数据集的生成依赖于Takahiro Miki的TerrainDataGenerator和不同的raisim插件,src/dataset_generation/synthetic_terrain_data_generator git子模块初始化后,需要递归遵循以下安装说明:https://bitbucket.org/tamiki/terrain_数据发生器
初始化raisim build目录:export LOCAL_build=$WORKSPACE/raisimu build&;mkdir$LOCAL_BUILD
遵循安装说明后,需要将构建目录添加到CMAKE_PREFIX_PATH:
export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:$LOCAL_BUILD
此外,地形数据生成器子模块对OpenCV有要求:
sudo apt-get install libopencv-dev
,安装地形数据生成器包:
pip install --user -e "${WORKSPACE}/solving-occlusion/src/dataset_generation/synthetic_terrain_data_generator"
3.4安装PyPatchMatch
我们使用PatchMatch[1]算法作为绘制遮挡高程图的(传统)基线。
如果指定在配置中使用此基线,则需要执行以下安装步骤来使用依赖项PyPatchMatch:
cd "${WORKSPACE}/solving-occlusion/src/learning/models/baseline/py_patch_match" && make
4。生成数据集
我们使用JSON配置文件来指定实验的所有设置和参数。所有配置文件都需要放在{DIR_to_REPO}/configs的子目录中。随后,可以通过声明{DIR_to_REPO}目录的路径来启动数据集生成:
python dataset_generation.py configs/{CONFIG_NAME}.json
5。学习
我们使用JSON配置文件来指定实验的所有设置和参数。所有配置文件都需要放在{DIR_to_REPO}/configs的子目录中。数据集的绝对或相对路径需要在JSON配置中指定。随后,一个学习实验可以通过说明相对于{DIR_to_REPO}目录的路径开始:
python learning.py configs/{CONFIG_NAME}.json
重要组件
任务路径
路径学习的主要成分是我们所说的任务路径。它们由不同的“训练机制”组成,依次应用于机器学习模型。在我们的实现中,它们根据配置创建任务,并用作迭代器来生成这些任务。
任务
任务由一组数据加载器组成,这些数据加载器是从基本数据集(即MNIST)和应用于它的转换器创建的。此外,它还为数据加载器指定了丢失函数、丢失聚合器和批处理大小。在我们的实现中,任务通过使用“with”关键字来衡量自己的运行时。
控制器
管制员是学习班的成员。它被实现为一个迭代器,在收敛或达到最大数量的epoch之前生成epoch。
实验
这个实验包含了上面介绍的所有其他对象。它管理设备放置和logdir创建。
引文
[1]Barnes,Connelly,et al.“PatchMatch:结构图像编辑的随机对应算法”,ACM Trans。图表。28.3(2009年):24。
部分转自网络,侵权联系删除区块链源码网
区块链知识分享网, 以太坊dapp资源网, 区块链教程, fabric教程下载, 区块链书籍下载, 区块链资料下载, 区块链视频教程下载, 区块链基础教程, 区块链入门教程, 区块链资源 » 基于区块链的毕业设计Solving Occlusion – 解决遮挡