63772c5cb80b0124b6722f705759ed0e49bb679c,mmdet/core/export/pytorch2onnx.py,,preprocess_example_input,#Any#,88

Before Change


        mean = np.array(normalize_cfg["mean"], dtype=np.float32)
        std = np.array(normalize_cfg["std"], dtype=np.float32)
        one_img = mmcv.imnormalize(one_img, mean, std)
    one_img = mmcv.imresize(one_img, input_shape[2:][::-1]).transpose(2, 0, 1)
    one_img = torch.from_numpy(one_img).unsqueeze(0).float().requires_grad_(
        True)
    (_, C, H, W) = input_shape
    one_meta = {

After Change


    input_shape = input_config["input_shape"]
    one_img = mmcv.imread(input_path)
    one_img = mmcv.imresize(one_img, input_shape[2:][::-1])
    show_img = one_img.copy()
    if "normalize_cfg" in input_config.keys():
        normalize_cfg = input_config["normalize_cfg"]
        mean = np.array(normalize_cfg["mean"], dtype=np.float32)
        std = np.array(normalize_cfg["std"], dtype=np.float32)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: open-mmlab/mmdetection
Commit Name: 63772c5cb80b0124b6722f705759ed0e49bb679c
Time: 2020-11-24
Author: maningsheng@sensetime.com
File Name: mmdet/core/export/pytorch2onnx.py
Class Name:
Method Name: preprocess_example_input


Project Name: analysiscenter/batchflow
Commit Name: a5bfb8dd4a92293ec239b219cb79447ca919a669
Time: 2017-06-22
Author: rhudor@gmail.com
File Name: dataset/batch_image.py
Class Name: ImagesBatch
Method Name: assemble


Project Name: lmcinnes/pynndescent
Commit Name: 42fcef3e6d5c79f0d9772e8b9f63338c3e5f715e
Time: 2019-11-01
Author: leland.mcinnes@gmail.com
File Name: pynndescent/pynndescent_.py
Class Name: NNDescent
Method Name: _init_search_graph