yolo weights file

is it possible to use an already trained “yolo.weights” file from the computer?

@aurelio.maica you should just need to load your model using the standard dl4j ModelSerializer. Could you clarify a bit about what you’re trying to do?

Thanks for the answer. I have a project to read car licenses and I’m currently using DL4j, with the method " private static ZooModel<ai.djl.modality.cv.Image, DetectedObjects> loadModel()" …I can detect the car… .and then I submit this car to the OpenAlpr algorithm, but I have some limitations like motorcycles for example, to get around this I trained my own weight on yolo4 to detect the license plates of these vehicles.

would you give me an example?

@aurelio.maica Could you give me code somewhere? Some model link? I more need the code you’re trying to use or the model so I can try to understand what your problem is.

Edit: Are you referencing darknet? I would have to look in to darknet a bit but generally you should be able to load parameters if it’s the same architecture.
I would prefer you look at our model import of tf, keras or onnx models as an alternative though.

in this snippet below, how could I fetch the model from a local file?

private static ZooModel<ai.djl.modality.cv.Image, DetectedObjects> loadModel() throws IOException, ModelException {
Criteria<ai.djl.modality.cv.Image, DetectedObjects> criteria
= Criteria.builder()
.setTypes(ai.djl.modality.cv.Image.class, DetectedObjects.class)
// .optFilter(“backbone”, “darknet53”)
.optFilter(“backbone”, “mobilenet1.0”)
.optFilter(“dataset”, “voc”)
/// .optFilter(“dataset”, “coco”)

                    //   .optFilter("backbone", "mobilenet_v2")
                    // .optFilter("dataset", "voc")

                    .optProgress(new ProgressBar())

    return ModelZoo.loadModel(criteria);