Package de.swa.fuh.yolo
Class YoloObjectDetection
java.lang.Object
de.swa.fuh.yolo.YoloObjectDetection
- All Implemented Interfaces:
GMAF_Plugin
public class YoloObjectDetection extends java.lang.Object implements GMAF_Plugin
This Class acts as a Plugin to implement object recognition,
using the YOLOv3 convolutional neural network, into the GMAF
Framework.
Prerequisites for the usage of the Plugin (as detailed in installation.pdf) are:
- An installation of the OpenCV 4.52 Library on the using machine
- Inclusion of the OpenCV 4.52 Library into the GMAF Project Buildpath
- Folder /yolo/ containing provided yolo_class.names, yolo.cfg and
yolo.weights files
- de.fuh.fpss21.group4.YoloObjectDetection added to GMAF plugin.config
- Author:
- Christoph Kieloch
-
Constructor Summary
Constructors Constructor Description YoloObjectDetection()
-
Method Summary
Modifier and Type Method Description boolean
canProcess(java.lang.String arg0)
this method returns, if the plugin is able to process files with a given extensionjava.util.Vector<Node>
getDetectedNodes()
this method is called by the GMAF to receive the results of this plugin and to fuse it into the MMFGboolean
isGeneralPlugin()
if this plugin contains overall metadata, e.g.void
process(java.net.URL url, java.io.File f, byte[] bytes, MMFG fv)
An implementation of GMAF_Plugin process method for use with the YOLOv3 CNN.boolean
providesRecoursiveData()
this method should indicate, if it returns recursive data, which are then re-processed within the GMAF framework
-
Constructor Details
-
YoloObjectDetection
public YoloObjectDetection()
-
-
Method Details
-
canProcess
public boolean canProcess(java.lang.String arg0)Description copied from interface:GMAF_Plugin
this method returns, if the plugin is able to process files with a given extension- Specified by:
canProcess
in interfaceGMAF_Plugin
- Returns:
- true or false
-
providesRecoursiveData
public boolean providesRecoursiveData()Description copied from interface:GMAF_Plugin
this method should indicate, if it returns recursive data, which are then re-processed within the GMAF framework- Specified by:
providesRecoursiveData
in interfaceGMAF_Plugin
- Returns:
- true, if recursive data is available
-
isGeneralPlugin
public boolean isGeneralPlugin()Description copied from interface:GMAF_Plugin
if this plugin contains overall metadata, e.g. EXIF data, this method should return true to indicate, that these general data have to be attached to the MMFG's root node- Specified by:
isGeneralPlugin
in interfaceGMAF_Plugin
- Returns:
- true, if it is a general plugin
-
getDetectedNodes
Description copied from interface:GMAF_Plugin
this method is called by the GMAF to receive the results of this plugin and to fuse it into the MMFG- Specified by:
getDetectedNodes
in interfaceGMAF_Plugin
- Returns:
- a vector of MMFG nodes
-
process
An implementation of GMAF_Plugin process method for use with the YOLOv3 CNN.- Specified by:
process
in interfaceGMAF_Plugin
- Parameters:
fv
- Prepared feature vector which is passed from the GMAF Framework. Found child nodes will be attached heref
- Pointer to the image file. Required! Only way to pass an image to the plugin in this implementationurl
- This way of passing an image file is not supported by the implementation and will result in 0 objects foundbytes
- This way of passing an image file is not supported by the implementation and will result in 0 objects found
-