Comments (4)
@Coder-GAN , yes that is possible. You can load in a pre-trained model with the setup_cfg
function and then train based on a local dataset. Could you please share the bugs that are preventing you from doing this?
On another note, I am currently training a model that should be more transferrable than the existing "220723_withParacouUAV.pth" model.
from detectree2.
@PatBall1 - Hi, I just load the pre-trained model locally and try to train it with my dataset, the biggest error seems like the pre-trained model is not available in Model Zoo.
Here is my code:
trained_model = "/home/gan/detectree/detectree2/model_garden/220723_withParacouUAV.pth"
trains = ("GAN1212_train",)
tests = ("GAN1212_val",)
model_out = site_path + "/221212_train_outputs"
cfg = setup_cfg(trained_model , trains , tests , workers = 4, eval_period=25,
max_iter=5000, out_dir=model_out)
RuntimeError: /home/gan/detectree/detectree2/model_garden/220723_withParacouUAV.pth not available in Model Zoo!
from detectree2.
@PatBall1 -Hi, thanks a lot for the comments and guidance. I just realized I made a stupid mistake about the code, it's quite easy to use a pre-trained model to train the local dataset. The reason was I forgot to add the "update_model" to the code.
Here is my modified code:
base_model = "COCO-InstanceSegmentation/mask_rcnn_R_101_FPN_3x.yaml"
trained_model = "/home/gan/detectree/detectree2/model_garden/220723_withParacouUAV.pth"
trains = ("GAN1212_train",)
tests = ("GAN1212_val",)
model_out = site_path + "/221212_train_outputs"
cfg = setup_cfg(base_model, trains , tests , update_model = trained_model ,workers = 4, eval_period=25,
max_iter=5000, out_dir=model_out)
trainer = MyTrainer(cfg, patience = 5)
trainer.resume_or_load(resume=True)
trainer.train()
So far, the model part seems no problem but the dataset occurs some errors, I am continuous try to re-manage my dataset to let it satisfy the model input, seems I didn't register the train data successfully, By the way, if possible, it's much appreciated that if you can publish the latest tutorial for training, evaluation, prediction of detectree2. The existing tutorial is quite a mess and complex for users I think.
from detectree2.
I have uploaded some pre-trained models in the model_garden
. The simplest way to access them is with wget
e.g.
!wget https://github.com/PatBall1/detectree2/raw/master/model_garden/230103_randresize_full.pth
The loading the model directly
trained_model = "./230103_randresize_full.pth"
cfg = setup_cfg(update_model=trained_model)
predict_on_data(tiles_path, DefaultPredictor(cfg))
from detectree2.
Related Issues (20)
- PIL.Image attribute error when importing from detectree2.models.train HOT 3
- Fix small artifactual polygon ouputs
- The worst model is defined as the best one?
- PytorchStreamReader failed reading zip archive: failed finding central directory HOT 2
- Improve conda + pip build instructions in README.md and Sphinx documentation.
- Simplify github workflows
- Detectree2 testing
- Results do not correspond to current coco set HOT 4
- ValueError: invalid literal for int() with base 10: 'None'
- RuntimeWarning: invalid value encountered in cast HOT 7
- Regarding self-made datasets HOT 2
- Multiclass training/prediction example HOT 2
- Jupyter notebook HOT 1
- Register dataset for training HOT 3
- Tiled data not saved to directory HOT 8
- Process time for tilling? HOT 9
- Can you open source the data links used for training? HOT 1
- Update installation instructions
- Failed to build detectron2 HOT 2
- Train/predict on multispectral (4+ band) imagery HOT 1
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 detectree2.