AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.68k stars 7.96k forks source link

Custom data loader #5588

Open zrion opened 4 years ago

zrion commented 4 years ago

Hello,

I'm trying to customize the data loader for YOLO to be able to process specific data from non-image source e.g. loading directly from binary file, and also to support multi-dimensional data (channels >3). I was looking at detector.c and see that darknet detector seems to mainly use load_data() and load_data_in_thread() functions for loading data. However looking further I couldn't see the detailed info of how those functions actually get the data e.g. handle the path, IO, communication with GPU, etc, but only info about thread handling. Am I missing anything here?

Please share some pointers for this if possible, I would appreciate them. Thank you.

AlexeyAB commented 4 years ago

https://github.com/AlexeyAB/darknet/blob/bef28445e57cd560fa3d0a24af98a562d289135b/src/data.c#L996-L1548