dlibml / dnn

Deep Neural Network Architectures with dlib
Boost Software License 1.0
17 stars 1 forks source link

Is it possible to classify vary-size image? #4

Closed newforrestgump001 closed 2 years ago

newforrestgump001 commented 2 years ago

I have vary-size images, it is possible to classify them without resizing them to same size. Thank you a lot!

arrufat commented 2 years ago

Yes, but you need a neural network that does not have some size requirements (e.g. a fully connected layer without some global pooling before it, or an input_rgb_image_sized layer).

If that is the case, then you can infer any size you want (as long as it fits on memory). That being said, if you use varying sized images, you can't infer them by batches, you have to do it one by one. Moreover, the network was probably trained with a particular size in mind (plus some data augmentation) so if your images differ too much from the original training set, you'll experience a drop in performance.

newforrestgump001 commented 2 years ago

@arrufat Sincerely thank for your quick reply. Does dlib dnn module support 3d-cnn, for example, used for video classification?

arrufat commented 2 years ago

No, it doesn't.

newforrestgump001 commented 2 years ago

@arrufat I got it, Thank you ~~

newforrestgump001 commented 2 years ago

@arrufat Sorry to interrupt you again. It is possible to replace svm classifier with one-class svm in self supervised demo (examples/dnn_self_supervised_learning_ex.cpp) in dlib. If possible, I want to try anomaly detection.

arrufat commented 2 years ago

I guess so, right away, I can't see why you couldn't do it.

newforrestgump001 commented 2 years ago

Got it. Thank you!