Giter VIP home page Giter VIP logo

weaklysupervisedcrackseg's People

Contributors

jacobkoenig avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

weaklysupervisedcrackseg's Issues

Where can I find [weights_to_classifier.h5 ]

My error is
segmentation.py: error: the following arguments are required: --img_path, --prediction_path, --classifier_type, --classifier_weight_path

I have set
python segmentation.py --img_path=data/images_to_pseudo_label --prediction_path=data/pseudo_labels --classifier_type=R50 --classifier_weight_path=weights_to_classifier.h5

Please help me Thank you

when detailed_output=True

when i set detailed_output=True,
there is a problem:

**cv2.error: OpenCV(4.7.0) 👎 error: (-5:Bad argument) in function 'imwrite'

Overload resolution failed:

  • img is not a numerical tuple
  • Expected Ptrcv::UMat for argument 'img'**

how can i solve this issue?

the prediction is all black

First I generated the .h5 file using the following code:

train_dir = 'D:/thesisSupport/code/dataSets/train'

train_generator = train_datagen.flow_from_directory(
    train_dir,
    target_size=(512, 512),
    batch_size=16,
    class_mode='categorical'
)

model = model_factory(classifier_type="R50")
model.compile(optimizer=Adam(lr=0.001), loss='categorical_crossentropy', metrics=['accuracy'])

model.fit(
    train_generator,
    steps_per_epoch=train_generator.samples // 16,
    epochs=3
)

model.save_weights('my_custom_model_weights.h5')

And i set detailed_output = true,modified parameters in return

        if detailed_output:
            # return (
            #     segmentation,
            #     grad_cam_plus,
            #     merged_classifier_pred,
            #     merge_cam_class,
            #     thresholded,
            # )
            return merged_classifier_pred

Finally run the command you providedpython segmentation.py --img_path=D:/thesisSupport/code/dataSets/validation/crack --prediction_path=data/pseudo_labels --classifier_type=R50 --classifier_weight_path=my_custom_model_weights.h5pervisedCrackSeg-master\WeaklySupervisedCrackSeg-master>

Thank you for your dedication, it helped me a lot. But i got the prediciton all black,I don't know which step went wrong.
It would be greatly appreciated if you could reply to this message!!!!
Thanks a lot!!

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.