Skip to content

Commit

Permalink
Segmentation Credits to Julian Schilliger for enabling large-scale se…
Browse files Browse the repository at this point in the history
…gmentation of unopened Herculaneum Papyri CT scans.
  • Loading branch information
schillij95 committed Feb 3, 2024
1 parent f367a48 commit f0028ca
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 44 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## Julian Schilliger's fork of the [Volume Cartographer](https://github.com/educelab/volume-cartographer)

This fork has won multiple awards at the [Vesuvius Challenge](https://scrollprize.org/), including the [Vesuvius Challenge Segmentation Tooling Prize](https://scrollprize.substack.com/p/segmentation-tooling-winners-new) and the [Vesuvius Challenge Segmentation Tooling 2 Prize](https://scrollprize.substack.com/p/segmentation-tooling-2-winners).

The Optical Flow Segmentation (OFS) algorithm introduced in this fork is the driving factor behind the successful and to date largest-scale segmentation of the Herculaneum Papyri, which resulted in close to 3,000 cm² of papyri being successfully segmented and virtually unrolled.

Almost all (>99% of the total area) of the [available segmentations](https://scrollprize.org/data_segments) of the Herculaneum Papyri have been created using the OFS algorithm introduced in this fork. Only with these improvements to the Volume Cartographer software was it possible to segment the Herculaneum Papyri at the achieved scale and quality. Giving the Machine Learning community a dataset to detect the ink traces on the papyri and enabling the reading of the unopened Herculaneum Papyri for the first time in 2,000 years.

---

[![Volume Cartographer](docs/images/banner.svg)](https://github.com/educelab/volume-cartographer)

**Volume Cartographer** is a toolkit and set of cross-platform C++ libraries for
Expand Down
88 changes: 44 additions & 44 deletions core/src/Volume.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,50 +232,50 @@ Reslice Volume::reslice(
cv::Mat Volume::load_slice_(int index) const
{
auto slicePath = getSlicePath(index);
// auto slicePathSSD = slicePath;
// std::string pathStr = slicePath.string();
// std::string pathStr2 = slicePath.string();
// std::string pathStr3 = slicePath.string();
// // Replace SSD4TB with HDD8TB if the path does not exist
// // string of the disk name to be replaced
// char* diskName = "SSD4TB2";
// char* diskName2 = "HDD8TB";
// // check if diskname in path, if not: set diskname to diskname2
// auto pos2 = pathStr2.find(diskName);
// if (pos2 == std::string::npos) {
// diskName = diskName2;
// }

// size_t pos = pathStr.find(diskName);
// if (pos != std::string::npos) {
// pathStr.replace(pos, std::strlen(diskName), "SSD4TB");
// slicePathSSD = std::filesystem::path(pathStr);
// }
// // Check if the slice exists
// if (std::filesystem::exists(slicePathSSD)) {
// slicePath = slicePathSSD;
// }
// else {
// pos = pathStr2.find(diskName);
// if (pos != std::string::npos) {
// pathStr2.replace(pos, std::strlen(diskName), "SSD120GB");
// slicePathSSD = std::filesystem::path(pathStr2);
// }
// if (std::filesystem::exists(slicePathSSD)) {
// slicePath = slicePathSSD;
// }
// else {
// pos = pathStr3.find(diskName);
// if (pos != std::string::npos) {
// pathStr3.replace(pos, std::strlen(diskName), "FastSSD");
// slicePathSSD = std::filesystem::path(pathStr3);
// }
// if (std::filesystem::exists(slicePathSSD)) {
// slicePath = slicePathSSD;
// }
// }

// }
auto slicePathSSD = slicePath;
std::string pathStr = slicePath.string();
std::string pathStr2 = slicePath.string();
std::string pathStr3 = slicePath.string();
// Replace SSD4TB with HDD8TB if the path does not exist
// string of the disk name to be replaced
char* diskName = "SSD4TB2";
char* diskName2 = "HDD8TB";
// check if diskname in path, if not: set diskname to diskname2
auto pos2 = pathStr2.find(diskName);
if (pos2 == std::string::npos) {
diskName = diskName2;
}

size_t pos = pathStr.find(diskName);
if (pos != std::string::npos) {
pathStr.replace(pos, std::strlen(diskName), "SSD4TB");
slicePathSSD = std::filesystem::path(pathStr);
}
// Check if the slice exists
if (std::filesystem::exists(slicePathSSD)) {
slicePath = slicePathSSD;
}
else {
pos = pathStr2.find(diskName);
if (pos != std::string::npos) {
pathStr2.replace(pos, std::strlen(diskName), "SSD120GB");
slicePathSSD = std::filesystem::path(pathStr2);
}
if (std::filesystem::exists(slicePathSSD)) {
slicePath = slicePathSSD;
}
else {
pos = pathStr3.find(diskName);
if (pos != std::string::npos) {
pathStr3.replace(pos, std::strlen(diskName), "FastSSD");
slicePathSSD = std::filesystem::path(pathStr3);
}
if (std::filesystem::exists(slicePathSSD)) {
slicePath = slicePathSSD;
}
}

}


{
Expand Down

0 comments on commit f0028ca

Please sign in to comment.