Giter VIP home page Giter VIP logo

Comments (4)

PatBall1 avatar PatBall1 commented on September 14, 2024

@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.

Coder-GAN avatar Coder-GAN commented on September 14, 2024

@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.

Coder-GAN avatar Coder-GAN commented on September 14, 2024

@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.

PatBall1 avatar PatBall1 commented on September 14, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.