GithubHelp home page GithubHelp logo

Demo code about blitznet HOT 13 CLOSED

dvornikita avatar dvornikita commented on July 4, 2024
Demo code

from blitznet.

Comments (13)

dvornikita avatar dvornikita commented on July 4, 2024 2

Thanks, @fastlater. It's true that you can modify the loader and also turn off evaluation. But ideally, it should be easier than that.
I guess @bhack has the point there. I probably should provide some demo code to work with arbitrary images. I'm gonna make it and let you know when I push it.

from blitznet.

fastlater avatar fastlater commented on July 4, 2024

@bhack you can check the loader.py and set it to load the images from a different folder (folder created by you with new images from internet) or load a single image.

The minimal demo code should looks like:

def main(argv=None):
  
    net = ResNet(config=net_config, depth=50, training=False)

    loader = HERE YOU SET THE FOLDER OR IMAGE
    
    with tf.Session(config=tf.ConfigProto(allow_soft_placement=True,
                                          log_device_placement=False)) as sess:

        detector = Detector(sess, net, loader, net_config, no_gt=args.no_seg_gt)
        detector.restore_from_ckpt(args.ckpt)

        #HERE, Use methods in detector.py to get the results 



if __name__ == '__main__':
    tf.app.run()

I haven't write an entire script to test a single image but it should not be too complicated if you read the test.py and detector.py

from blitznet.

fastlater avatar fastlater commented on July 4, 2024

@dvornikita We will be happy to see a clean demo code from you in the future. Just for testing, I created a new loader and used the functions from detector.py. It was a little bit dirty the code but at least, I got the desired output.

from blitznet.

dvornikita avatar dvornikita commented on July 4, 2024

@bhack, @fastlater, @AlonTetro, the demo has arrived.
Be careful, there are some minor changes in detector.py, so check them if you don't want to pull the new version.

from blitznet.

bhack avatar bhack commented on July 4, 2024

Thank you. Is the demo working with BlitzNet512?

from blitznet.

fastlater avatar fastlater commented on July 4, 2024

@dvornikita Thank you for letting me know. I will take a look on it.

from blitznet.

dvornikita avatar dvornikita commented on July 4, 2024

@bhack it does. The only difference with testing is that you don't have a dataset linked to the loader. Just specify the right flags for running the demo as you would do for testing.
The only limitation for now is Pascal VOC categories. I'll push the COCO labels later.

from blitznet.

bhack avatar bhack commented on July 4, 2024

@dvornikita I've asked cause with BlitzNet512 I got tensorflow.python.framework.errors_impl.NotFoundError: Key ssd_back/block_rev6/shortcut/weights not found in checkpoint
Edit: I missed to post that the solution was to add --image_size 512 arg for the BlitzNet512 model

from blitznet.

bhack avatar bhack commented on July 4, 2024

@dvornikita Results seems goods. I've noted generally that MSCOCO And PASCAL GT segmentation masks are not so precise. Have you tried to add also Davis dataset masks 2016 and 2017 to the training mix?

from blitznet.

dvornikita avatar dvornikita commented on July 4, 2024

@bhack No we didn't. The strength of the method is to discover some hidden correlations in bounding boxes and segmentation annotations to reduce class confusion for both and make localization of boxes more precise, while still being realtime. I guess the Davis dataset has only segmentations and if you want them more accurate it would make more sense to use a state-of-the art segmentation method.
But we may make good use of this dataset in the future. Thanks.

from blitznet.

bhack avatar bhack commented on July 4, 2024

@dvornikita Yes I understand the original scope. But I still think that Blitznet segmentation quality is quite good. I think is not a problem to derive a bounding box from a segmentation Mask like in the Mscoco API official toolkit.

from blitznet.

dvornikita avatar dvornikita commented on July 4, 2024

@bhack I looked closer at the Davis and I agree with you, it's feasible. For sure it can be used at least as a solid pretraining.
Although there might be a problem of video and still image statistics mismatch, which is considered to be an issue in the community. So it needs to be done carefully.

from blitznet.

bhack avatar bhack commented on July 4, 2024

@dvornikita The interesting thing is to evaluate how the quality of the mask influence the segmentation performance of your model. So probably one of the first interesting approach is just to fine-tune on Davis the models that you have already pretrained.

from blitznet.

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.