weiliu89 / caffe

Caffe: a fast open framework for deep learning.
http://caffe.berkeleyvision.org/
Other
4.77k stars 1.68k forks source link

inference on large image #886

Open anandkoirala opened 6 years ago

anandkoirala commented 6 years ago

Please use the caffe-users list for usage, installation, or modeling questions, or other requests for help. Do not post such requests to Issues. Doing so interferes with the development of Caffe.

Please read the guidelines for contributing before submitting this issue.

Issue summary

@GloriaLovera @weiliu89 like faster-rcnn we can cahnge the size of images to new size larger than what the model was trained for.. for eg. the faster-rcnn model trained for 600x600 image can be used to detect on 1000x100 images directly by changing the test size settings.. is it possible to do the same with ssd trained on 300x300 to apply on 1000x1000 image increasing the network resolution.. if so which values have to be changed in the files.. thanks Anand

Steps to reproduce

If you are having difficulty building Caffe or training a model, please ask the caffe-users mailing list. If you are reporting a build error that seems to be due to a bug in Caffe, please attach your build configuration (either Makefile.config or CMakeCache.txt) and the output of the make (or cmake) command.

Your system configuration

Operating system: Compiler: CUDA version (if applicable): CUDNN version (if applicable): BLAS: Python or MATLAB version (for pycaffe and matcaffe respectively):

EvergreenHZ commented 6 years ago

Actually, I've come across the same problem. I try to train my own model to recognize small logos, but the result seems not so good. I want some advice.

anandkoirala commented 6 years ago

@EvergreenHZ if your objects are smaller then you can crop the large images AxB into small tiles axb so that the ratio of object to image size increases.. after the model is trained on axb you can directly apply it to your original large images AxB by increasing network resolution.. meaning setting the test time image size in the configuration files to AxB so that the network will look at this size without having to resize to axb. Faster-RCNN and YOLO allows us to do so and i have been doing it several times... However i have not figured out for SSD as there is no effective support from the author personally you get best support from YOLO github site... YOLO have the highest detection speed and the accuracy comparable to SSD and FRCNN.... for my dataset YOLO has the best results... Think yourself... For my dataset the SSD trained with 300 pix image looked better than with 512 pix (actual image size). but with other models this increase in resolution have increased the performance..

EvergreenHZ commented 6 years ago

Thank you for your time, I try it.