Skip to content

Commit

Permalink
Merge pull request #2090 from alicevision/build/semanticSegmentationM…
Browse files Browse the repository at this point in the history
…odel

Set `ALICEVISION_SEMANTIC_SEGMENTATION_MODEL` variable during the initialisation
  • Loading branch information
mugulmd committed Jul 11, 2023
2 parents 4f6cd11 + b5e7872 commit 5a1d94f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,15 @@ Provided in AliceVision source tree: {ALICEVISION_REPOSITORY}/src/aliceVision/se
It can be downloaded [here](https://gitlab.com/alicevision/trainedVocabularyTreeData/raw/master/vlfeat_K80L3.SIFT.tree).
* sphere detection model (optional): for the automated sphere detection in stereo photometry.
It can be downloaded [here](https://gitlab.com/alicevision/SphereDetectionModel/-/raw/main/sphereDetection_Mask-RCNN.onnx).
* semantic segmentation model (optional): for the semantic segmentation of objects.
It can be downloaded [here](https://gitlab.com/alicevision/semanticSegmentationModel/-/raw/main/fcn_resnet50.onnx).

Environment variables must be set for Meshroom to find those files:
```
ALICEVISION_SENSOR_DB=/path/to/database
ALICEVISION_VOCTREE=/path/to/voctree
ALICEVISION_SPHERE_DETECTION_MODEL=/path/to/detection/model
ALICEVISION_SEMANTIC_SEGMENTATION_MODEL=/path/to/segmentation/model
ALICEVISION_ROOT=/path/to/AliceVision/install/directory
```

Expand Down
4 changes: 3 additions & 1 deletion meshroom/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ def addToEnvPath(var, val, index=-1):
sensorDBPath = os.path.join(aliceVisionShareDir, "cameraSensors.db")
voctreePath = os.path.join(aliceVisionShareDir, "vlfeat_K80L3.SIFT.tree")
sphereDetectionModel = os.path.join(aliceVisionShareDir, "sphereDetection_Mask-RCNN.onnx")
semanticSegmentationModel = os.path.join(aliceVisionShareDir, "fcn_resnet50.onnx")

env = {
'PATH': aliceVisionBinDir,
Expand All @@ -136,7 +137,8 @@ def addToEnvPath(var, val, index=-1):
"ALICEVISION_ROOT": aliceVisionDir,
"ALICEVISION_SENSOR_DB": sensorDBPath,
"ALICEVISION_VOCTREE": voctreePath,
"ALICEVISION_SPHERE_DETECTION_MODEL": sphereDetectionModel
"ALICEVISION_SPHERE_DETECTION_MODEL": sphereDetectionModel,
"ALICEVISION_SEMANTIC_SEGMENTATION_MODEL": semanticSegmentationModel
}

for key, value in variables.items():
Expand Down

0 comments on commit 5a1d94f

Please sign in to comment.