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.
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.
In YOLOv8-with-RGB-D-and-AFFP/ultralytics/yolo/data/base.py Lines 122-135 The depth image path was Specified.
In YOLOv8-with-RGB-D-and-AFFP/ultralytics/nn/modules.py
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
Using our predict code, the segmentation image was get as shown, and it was into a point cloud with dep2point.py
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.