GithubHelp home page GithubHelp logo

Comments (4)

NagatoYuki0943 avatar NagatoYuki0943 commented on July 1, 2024

我最近没使用最近的anomalib,你可以给我新版模型导出的onnx和config文件吗,我试试

from anomalib-openvino-cpp.

linhongping98 avatar linhongping98 commented on July 1, 2024

使用 config 训练吗,但是我没有找到相关文档,一直用的是新版本的API训练模式
,方便将您的config配置文件借我参考一下吗。欸好像没有办法上传,大于25mb了,方便留个邮箱吗

from anomalib-openvino-cpp.

NagatoYuki0943 avatar NagatoYuki0943 commented on July 1, 2024

[email protected] , config指的是模型导出onnx或者openvino格式后会保存一个叫 metadata.json 的文件,请把这个文件和onnx模型都发给我

from anomalib-openvino-cpp.

NagatoYuki0943 avatar NagatoYuki0943 commented on July 1, 2024

metadata.json 中的数据原本就是这个样子吗?

{
    "task": "segmentation",
    "image_threshold": 33.50176239013672,
    "pixel_threshold": 30.08641242980957,
    "min": 0.3577805161476135,
    "max": 262.3882751464844
}

之前是这个样子的

{
    "task": "classification",
    "transform": {
        "__version__": "1.4.1",
        "transform": {
            "__class_fullname__": "Compose",
            "p": 1.0,
            "transforms": [
                {
                    "__class_fullname__": "Resize",
                    "always_apply": true,
                    "p": 1,
                    "height": 256,
                    "width": 256,
                    "interpolation": 1
                },
                {
                    "__class_fullname__": "Normalize",
                    "always_apply": false,
                    "p": 1.0,
                    "mean": [
                        0.485,
                        0.456,
                        0.406
                    ],
                    "std": [
                        0.229,
                        0.224,
                        0.225
                    ],
                    "max_pixel_value": 255.0
                },
                {
                    "__class_fullname__": "ToTensorV2",
                    "always_apply": true,
                    "p": 1.0,
                    "transpose_mask": false
                }
            ],
            "bbox_params": null,
            "keypoint_params": null,
            "additional_targets": {
                "image": "image",
                "depth_image": "image"
            },
            "is_check_shapes": true
        }
    },
    "image_threshold": 8.81041431427002,
    "pixel_threshold": 8.81041431427002,
    "min": 1.7750518566117535e-07,
    "max": 76.65238189697266
}

如果就是你发过来的样子,你可以把配置文件添加宽高

{
    "task": "segmentation",
    "image_threshold": 33.50176239013672,
    "pixel_threshold": 30.08641242980957,
    "min": 0.3577805161476135,
    "max": 262.3882751464844,
    "height": 256,
    "width": 256
}

同时将 https://github.com/NagatoYuki0943/anomalib-openvino-cpp/blob/main/utils.cpp#L19 代码改为

    // 分别取出推理高宽
    int infer_height = doc["height"].GetInt();
    int infer_width = doc["width"].GetInt();

这样再试试
我看了官方最新代码,它现在导出的模型是动态shape的,我这个库可能不支持,具体怎么改你可以试试

from anomalib-openvino-cpp.

Related Issues (6)

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.