How to use mobilenet as feature-extractor for high resolution images?

Viewed 126

How can i use a mobilenet model as a feature-extractor for images with way higher resolution than 224x224? I guess i need to change a certain layer after it's loaded to increase the input size? My current code is this:

const featureExtractor = await tf.loadGraphModel('http://localhost:3000/mobilenet_v3_large_100_224/model.json');

I know that i could resample my images down to 224x224, but i fear important information will be lost.

1 Answers

MobileNet v2 technically starts with a fully convolutional layer with 32 filters. So, yes you can train the model with larger images, however you'd be starting from scratch. The feature-extracted models that seem to be available are mostly trained on datasets of 224x224.

If you believe this will remove important information, you might be right! However, I'd definitely give it a go before I'd call it quits. I'm amazed at how proficient 28x28 datasets are, and this is substantially more data.

You can adjust the depth multiplier to 1.4 and get a substantially larger set of features from your images. If you're concerned about quality, do that. Maybe you can even use a larger model like Inception? Those images are 299x299.

Regardless, it depends on how much time and energy you have to retrain.

Related