AlexeyAB / darknet

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

Multiple input images #5945

Closed bainro closed 4 years ago

bainro commented 4 years ago

Is there currently a way to load multiple images as inputs for a single inference pass? I have 2 different sized images which would both be useful for bounding box inference.

bainro commented 4 years ago

I suppose another way to get two inputs would be loading one TIFF with 4+ channels, splitting the channels, resizing certain ones, and using [route] layers.

Are either of these scenarios possible? If not, which seems more feasible given the current state of the repo? I can code and this isn't urgent.

stephanecharette commented 4 years ago

Seems to me this would be more work than simply doing 2 inference passes.

If you know how to code (or you're using something like DarkHelp) then you only have to load the network once, and you can then have as many images as you want. That initial network load is the most expensive task.

bainro commented 4 years ago

I would use a pre-existing non-optimal solution (i.e. a performance hit). In other words, I don't want to spend time coding a custom solution if this repo already has a similar solution.

bainro commented 4 years ago

2 inference passes won't help me, unless I want to build an additional network that takes combined yolo prediction layer outputs as inputs and outputs better bounding box predictions. The channels of the image cannot be fed into the same cnn layer because they're different types of information (eg depth and RGB)