djl
djl copied to clipboard
BinaryImageClassification
Description
A requests for the Implementation of BinaryImageClassification and a documentation for this feature, it would benefit developers which are trying to detect if a Image is similiar to another one or not. This Feature can then be used for checks like, Image similiarity and filtering Systems. It would also benefit newer developers, like me, which do not completly understand the way of how everything directly works.
Could you be more specific about what binary image classification task you are looking for? You mentioned "detect if a Image is similiar to another one", it sounds a lot like one-class classficiation, or anomaly detection, see paper. But a generic binary image classification deals with the data set that are labelled either positive or negative. So could you be more specific about which one it is?
In terms of image similarity used in filtering system, I think the crucial part is to obtain a vector embedding of pictures. This will be part of transfer learning project, which is currently being worked on.
I mean with Binary image classification a one class classification.
@DxsSucuk You can consider using transfer learning; use pre-trained model to get vector embedding of pictures. Then it can be used for the downstream tasks like one-class classification. We are working on part of this feature now.
Here is an example of binary classification on image, using transfer learning. It should be able to similarly apply to the use case you mentioned. https://github.com/deepjavalibrary/djl/pull/2070
Here is another example: https://github.com/frankfliu/visrec-djl/blob/master/jsr381/src/main/java/ai/djl/jsr381/spi/DjlBinaryClassifierFactory.java#L45
Thanks I will look into it!