MoGe-2

MoGe-2는 RGB 이미지 하나에서 조밀한 표면 노멀 필드를 예측하는 단일 순전파 단안 기하 모델입니다. LibreYOLO는 공식 ViT-S, ViT-B, ViT-L 체크포인트를 통해 노멀 추정만 지원합니다.

작업
normal
크기
s, b, l at 518 px
설치
pip install libreyolo
지원 티어
추론 전용, v부터 지원. 예측, 검증, 내보내기만 지원합니다. 학습 기능은 적용되지 않습니다.
업스트림
Microsoft의 MoGe-2, MIT. 논문, 소스
라이선스
코드 MIT, 가중치 MIT. 상업적 사용

설치

MoGe-2에는 선택적 extra가 필요하지 않습니다. 가져오는 모든 항목이 기본 설치에 포함됩니다.

bash
pip install libreyolo

예측

처음 사용할 때 가중치를 자동으로 다운로드합니다. LibreYOLO는 공식 체크포인트에서 일치하는 크기를 직접 가져와 로컬에 캐시합니다.

Python
from libreyolo import LibreYOLO, SAMPLE_IMAGE model = LibreYOLO("LibreMoGe2s-normal.pt")result = model(SAMPLE_IMAGE, save=True) normal = result.normal_mapprint(normal.array.shape)   # (H, W, 3) float32 단위 벡터
CLI
libreyolo predict model=LibreMoGe2s-normal.pt source=https://raw.githubusercontent.com/LibreYOLO/libreyolo/release/libreyolo/assets/parkour.jpg save=True

MoGe-2는 탐지 집합 대신 조밀 필드를 반환하므로 result.boxes는 비어 있고 conf, iou, max_det은 아무 효과가 없습니다. result.normal_map에 결과가 들어 있습니다. OpenCV 카메라 좌표계의 단위 벡터로 이루어진 (H, W, 3) 배열이며 +x는 오른쪽, +y는 아래쪽, +z는 장면 안쪽을 가리킵니다. 카메라를 향하는 표면은 (0, 0, -1)입니다. 이미지 목록을 예측하면 이미지마다 순전파를 한 번 실행합니다. 이 계열에는 스택 배치 고속 경로가 없습니다. 소스, 스트리밍, 결과 처리는 예측을 참조합니다.

변형

ViT-S, ViT-B, ViT-L의 세 인코더 크기가 별도 체크포인트로 제공되며 모두 같은 입력 해상도를 사용합니다. LibreYOLO 벤치마크 도구는 이 계열을 측정하지 않았으므로 크기를 비교할 수 있는 공개 정확도 수치가 없습니다. 연산 예산에 맞춰 크기를 선택합니다.

검증

val()은 페어링된 노멀 맵 데이터셋을 기준으로 각도 오차를 측정합니다. 이미지는 같은 기본 이름의 16비트 노멀 PNG 옆에 놓이며 선택적 유효성 마스크를 사용하면 패딩 픽셀과 유효하지 않은 픽셀을 계산에서 제외할 수 있습니다. 평균 및 중앙 각도 오차를 도 단위로 반환하고 11.25도, 22.5도, 30도 이내인 픽셀 비율도 반환합니다.

Python
from libreyolo import LibreYOLO model = LibreYOLO("LibreMoGe2s-normal.pt")metrics = model.val(data="my-dataset.yaml", imgsz=518) print(metrics["metrics/mean_angular_error"])   # 도print(metrics["metrics/median_angular_error"])print(metrics["metrics/within_11_25"])          # 픽셀 비율
CLI
libreyolo val model=LibreMoGe2s-normal.pt data=my-dataset.yaml imgsz=518

내보내기

작업ONNXTorchScriptExecuTorchTensorRTOpenVINOPaddleMNNRKNNncnnTFLiteCoreMLCore AI
normalnormal to ONNX: 지원함normal to TorchScript: 지원함normal to ExecuTorch: 지원함normal to TensorRT: 지원함normal to OpenVINO: 지원함normal to Paddle: 지원하지 않음normal to MNN: 지원하지 않음normal to RKNN: 지원하지 않음normal to ncnn: 지원함normal to TFLite: 지원하지 않음normal to CoreML: 지원하지 않음normal to Core AI: 지원하지 않음

노멀 내보내기는 고정 해상도, 배치 1 런타임 계약을 사용합니다. dynamic과 1이 아닌 batch는 거부되며 imgsz는 ViT 인코더의 패치 크기로 나누어떨어져야 합니다. LibreYOLO는 실행 전에 이를 검사합니다. 내보낸 아티팩트는 파일 접미사에 따라 LibreYOLO()로 다시 불러오므로 .onnx 파일은 체크포인트처럼 동작하며 동일한 Results를 반환합니다.

Python
from libreyolo import LibreYOLO model = LibreYOLO("LibreMoGe2s-normal.pt")model.export(format="onnx", imgsz=518)model.export(format="tensorrt", imgsz=518, half=True)
CLI
libreyolo export model=LibreMoGe2s-normal.pt format=onnx imgsz=518libreyolo export model=LibreMoGe2s-normal.pt format=tensorrt imgsz=518 half=True
내보낸 파일 사용
from libreyolo import LibreYOLO, SAMPLE_IMAGE model = LibreYOLO("LibreMoGe2s-normal.onnx")result = model(SAMPLE_IMAGE) print(result.normal_map.array.shape)

라이선스

내려받는 특정 가중치의 Hugging Face 저장소에서 라이선스를 확인하십시오. LibreYOLO 조직의 모든 체크포인트에는 라이선스가 있으며 한 계열 안에서도 항상 같지는 않습니다. 해당 저장소가 신뢰할 수 있는 기준입니다. 아래 요약은 이 페이지를 마지막으로 검증했을 때 적용된 내용을 설명합니다.

관련 라이선스에 관한 설명이며 법률 자문이 아닙니다. 상업적으로 중요한 사안이라면 라이선스를 직접 읽고 별도의 법률 자문을 받으십시오.

원작
MoGe-2, Microsoft
업스트림 라이선스
MIT
업스트림 소스
github.com/microsoft/MoGe
LibreYOLO 코드
MIT
가중치
MIT, 저자가 배포합니다. LibreYOLO는 이를 호스팅하거나 미러링하지 않습니다.
해석
MIT is a permissive license: the code and the official ViT-S, ViT-B and ViT-L checkpoints can be used in commercial and closed-source products. It asks that you keep the license text and copyright notice with any copy you redistribute, and it places no obligation on your own application code. LibreYOLO downloads these checkpoints directly from the official Hugging Face repositories at a pinned revision rather than copying them into its own organization, and verifies each file against a recorded SHA-256 checksum before use. The DINOv2 encoder MoGe-2 builds on is separately licensed Apache-2.0 by Meta AI; LibreYOLO reuses the DINOv2 implementation already bundled for its Depth Anything V2 family rather than copying it again here.

LibreYOLO는 이러한 체크포인트를 자체 조직으로 복사하지 않습니다. LibreYOLO("LibreMoGe2s-normal.pt")는 고정된 리비전의 공식 Hugging Face 저장소에서 일치하는 크기를 직접 다운로드하고 사용 전에 기록된 SHA-256 체크섬으로 파일을 검증합니다.

인용

@inproceedings{wang2025moge,
  title={Moge: Unlocking accurate monocular geometry estimation for open-domain images with optimal training supervision},
  author={Wang, Ruicheng and Xu, Sicheng and Dai, Cassie and Xiang, Jianfeng and Deng, Yu and Tong, Xin and Yang, Jiaolong},
  booktitle={Proceedings of the Computer Vision and Pattern Recognition Conference},
  pages={5261--5271},
  year={2025}
}

@misc{wang2025moge2,
      title={MoGe-2: Accurate Monocular Geometry with Metric Scale and Sharp Details}, 
      author={Ruicheng Wang and Sicheng Xu and Yue Dong and Yu Deng and Jianfeng Xiang and Zelong Lv and Guangzhong Sun and Xin Tong and Jiaolong Yang},
      year={2025},
      eprint={2507.02546},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2507.02546}, 
}

github.com/microsoft/MoGe#-citation에 있는 저자의 인용 블록에서 복사했습니다.

LibreYOLO v1.5.0에서 검증되었습니다. 이 페이지의 지원 표, 체크포인트, 벤치마크 수치는 출시된 라이브러리와 공개된 가중치에서 생성되며 수동으로 작성되지 않습니다.