Comments (4)
The latest master branch is support ImageNet's pre-trained model with multi-channel(>3). @geoexploring
Assuming the number of input channels/bands is 7, the first three channels is filled by ImageNet pre-trained model parameters (RGB channel). The 4, 5, 6 channel is also filled by ImageNet pre-trained RGB channel parameters. And the latest channel is filled by ImageNet pre-trained R channel parameters.
Simply speaking, torchsat copies the ImageNet parameters in order.
New Input Channels(7 Channel) | ImageNet Pre-trained Prameters |
---|---|
1,2,3 | R,G,B |
4,5,6 | R,G,B |
7 | R |
Examples:
In [1]: from torchsat.models.classification import resnet18
In [2]: num_class = 10
In [3]: model = resnet18(num_class, in_channels=7, pretrained=True)
In [4]: model.conv1
Out[4]: Conv2d(7, 64, kernel_size=(7, 7), stride=(2, 2), padding=(3, 3), bias=False)
In [7]: model.conv1.weight[0,0,0,0]
Out[7]: tensor(-0.0104, grad_fn=<SelectBackward>)
In [8]: model.conv1.weight[0,6,0,0]
Out[8]: tensor(-0.0104, grad_fn=<SelectBackward>)
from torchsat.
The pre-trained models for segmentation and detection is not a high priority.
You can use the ImageNet's pre-trained model for feature extraction, it also very useful.
from torchsat.
The ImageNet's pre-trained model only has 3 channels, Is this suitable for multi-channel(>3)
training of remote sensing images? @sshuair
Thanks!
from torchsat.
This solution is interesting and may be a compromise to train multi-channel satellite images using ImageNet pre-trained models.
Thanks for this excellent work , @sshuair
from torchsat.
Related Issues (10)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from torchsat.