zhanglichao / generatedTIR_tracking

Synthetic data generation for end-to-end TIR tracking (TIP2018)
53 stars 12 forks source link

not getting the same results even using opt.txt #4

Closed makslevental closed 4 years ago

makslevental commented 5 years ago

original image: image

chip: image ir: image

code:

    opt = """
    aspect_ratio: 1.0
    batchSize: 1
    checkpoints_dir: ./checkpoints
    dataroot: /home/lichao/tracking/datasets/GOT-10k/train
    dataset_mode: single
    display_id: 1
    display_port: 8097
    display_winsize: 256
    fineSize: 256
    gpu_ids: []
    how_many: 10000000
    init_type: normal
    init_gain: 0.02
    input_nc: 3
    isTrain: False
    loadSize: 256
    max_dataset_size: inf
    model: test
    nThreads: 2
    n_layers_D: 3
    name: thermal_pix2pix_1ch_all_batch4
    ndf: 64
    ngf: 64
    no_dropout: True
    no_flip: False
    norm: batch
    ntest: inf
    output_nc: 1
    phase: test
    preprocess: 
    resize_or_crop: resize_and_crop
    results_dir: /home/lichao/tracking/datasets/GOT-10k_i_/train
    serial_batches: False
    which_direction: BtoA
    which_epoch: 25
    netD: basic
    netG: unet_256
    """
    opt = objectview(yaml.load(opt))
    p = Pix2PixModel(opt)
    load_model_state(p.netG, "/home/maksim/Downloads/net_G_pix2pix.pth")
    image = Image.open("/home/maksim/data/FLIR_ADAS_1_3/train/RGB/FLIR_00006.jpg")
    d = 1024
    x, y = 500, 516

    image = image.crop((x, y, x+d, y+d))
    image_np = np.asarray(image)
    plt.imshow(image_np)
    plt.show()
    image_tensor = ToTensor()(image_np).float().unsqueeze(0)
    ir = p.netG.forward(image_tensor)
    plt.imshow(ir.data.numpy()[0,0], cmap="gray")
    plt.show()
zhanglichao commented 5 years ago

Hi,

Thanks for your interest.

The transferred large-scale training data along with tracking labels is mainly beneficial for fine-tuning pre-trained deep models. With visualization mainly evaluated for generation models, applied on the same isotropic testing set as the training data.

best, Lichao