The code for Train & Eval, Predict are in different branches.

YOLO-DCow

This is an official implementation of a paper titled "DEEP LEARNING-BASED COW SEGMENTATION FOR PRECISION LIVESTOCK FRAMING USING DEPTH DATA" All codes have been published in their branches. 嵌套序列 02_5

Train & Eval

For train and val, please refer to the branch "Train&Eval". The train and eval methods of yolov8, please refer to the official. The main code changes we made are predictor.py, stream_loaders.py, base.py, and so on.

Specify the depth image path

In YOLOv8-with-RGB-D-and-AFFP/ultralytics/yolo/data/base.py Lines 122-135 The depth image path was Specified.

AFFP

image In YOLOv8-with-RGB-D-and-AFFP/ultralytics/nn/modules.py

Predict

The main code changes we made are predictor.py, stream_loaders.py, base.py, /ultralytics/yolo/v8/segment /predict.py and so on.

Input/output image path was Specified in /predict.py

Dep2pointcloud

Using our predict code, the segmentation image was get as shown, and it was into a point cloud with dep2point.py image

The paper is still under review.

If the code is help for you, please cite our related paper. Thank you

Yang, G., Li, R., Zhang, S., Wen, Y., Xu, X., & Song, H. (2023). Extracting cow point clouds from multi-view RGB images with an improved YOLACT++ instance segmentation. Expert Systems with Applications, 230, 120730.