Skip to content

AtelierArith/SegRCDB.jl

Repository files navigation

SegRCDB Build Status Stable Dev

Description

  • This is an unofficial Julia implementation of SegRCDB(SegRCDB: Semantic Segmentation via Formula-Driven Supervised Learning) that is proposed by Shinoda, Risa and Hayamizu, Ryo and Nakashima, Kodai and Inoue, Nakamasa and Yokota, Rio and Kataoka, Hirokatsu.
  • The official implementation uses Python and it assumes that we are supposed to use high performance computer with more than 40 cores. See this line of code. It doesn't provide have a progress bar feature like tqdm, so it's impossible to predict when it will finish and how much storage we need. It seems they are reusing their source code in several projects that are well-known in FDSL/RCDB. Some lines are hard to interpret as the variable names remain unchanged, and from a software quality perspective, this cannot be overlooked.
  • SegRCDB.jl is written in Julia, a high-performance programming language, so it is designed to address performance issues. The generate_dataset.jl script can run using multiple threads and includes a progress bar feature. On my 2019 Intel macOS laptop, it completes in under 5 minutes with 16-threads. Even with a single thread, it should finish within 15 minutes, so there's no need for concern. Currently M1 mode is only supported.

How to use

git clone https://github.com/AtelierArith/SegRCDB.jl.git
cd SegRCDB.jl
julia --project=@. -e 'using Pkg; Pkg.instantiate()'
julia --project=@. generate_params.jl
julia --project=@. --threads auto generate_dataset.jl

This Julia package SegRCDB.jl behaves the same as the official implementation. Namely it will generate a directory named SegRCDB-dataset/param, SegRCDB-dataset/image and SegRCDB-dataset/mask.

⚠️ Note that it consumes 12G of storage.

Results

SegRCDB (generated by the Python-based original implementation.)

image

SegRCDB.jl (this repository)

image image

Appendix

dockerand docker compose commands allow us to setup an environment and generating dataset easily:

git clone https://github.com/AtelierArith/SegRCDB.jl.git
cd SegRCDB.jl
make && make test && make dataset