Git Product home page Git Product logo

Comments (9)

yzou2 avatar yzou2 commented on June 29, 2024

It seems the error is resulted by the different resolutions of GTA5 images. In most cases, the resolution of GTA5 is 1052 x 1914. But there are some images that have different resolution, e.g. 1046 x 1914. So I suggest you to resize all the GTA5 images to the same resolutions 1052 x 1914. That might solve the problem.

from cbst.

JialeTao avatar JialeTao commented on June 29, 2024

I've found it, but still thank you very much.

from cbst.

qiaozhuocheng avatar qiaozhuocheng commented on June 29, 2024

I run the synthia2Cityscapes self-training code,and meet the similar question:
1572960298616
Do you know how to solve it?

from cbst.

JialeTao avatar JialeTao commented on June 29, 2024

I run the synthia2Cityscapes self-training code,and meet the similar question:
1572960298616
Do you know how to solve it?
When loading image of synthia dataset, you have to pay attention to the numbers of channel of the loaded image, only 1 of the 3 channels is useful or what we want. I'm not sure this is the point, but you can check the code to see if this is the reason casued the error.

from cbst.

yzou2 avatar yzou2 commented on June 29, 2024

I run the synthia2Cityscapes self-training code,and meet the similar question:
1572960298616
Do you know how to solve it?
When loading image of synthia dataset, you have to pay attention to the numbers of channel of the loaded image, only 1 of the 3 channels is useful or what we want. I'm not sure this is the point, but you can check the code to see if this is the reason casued the error.

Just as Jiale suggested, check the dimension of your label map to see if they have 1 or 3 channels. I think that's the reason causing this problem and you may consider generating label map with 1 channel.

from cbst.

qiaozhuocheng avatar qiaozhuocheng commented on June 29, 2024

I run the synthia2Cityscapes self-training code,and meet the similar question:
1572960298616
Do you know how to solve it?
When loading image of synthia dataset, you have to pay attention to the numbers of channel of the loaded image, only 1 of the 3 channels is useful or what we want. I'm not sure this is the point, but you can check the code to see if this is the reason casued the error.

Just as Jiale suggested, check the dimension of your label map to see if they have 1 or 3 channels. I think that's the reason causing this problem and you may consider generating label map with 1 channel.
I download tha synthia dataset from the url you provided, so shall I need process the labels from dataset so as to become one channel images?
Following is my input training commond:
python issegm/solve_AO.py --num-round 6 --test-scales 1850 --scale-rate-range 0.7,1.3 --dataset synthia --dataset-tgt cityscapes --split train --split-tgt train --data-root /home/qiu/下载/CBST/data/RAND_CITYSCAPES --data-root-tgt /home/qiu/下载/CBST/data/cityscapes --output syn2city/cbst --model cityscapes_rna-a1_cls16_s8 --weights models/synthia_rna-a1_cls16_s8_ep-0000.params --batch-images 2 --crop-size 500 --origin-size 1280 --origin-size-tgt 2048 --init-tgt-port 0.2 --init-src-port 0.02 --max-src-port 0.06 --seed-int 0 --mine-port 0.8 --mine-id-number 3 --mine-thresh 0.001 --base-lr 1e-4 --to-epoch 2 --source-sample-policy cumulative --self-training-script issegm/solve_ST.py --kc-policy global --prefetch-threads 2 --gpus 0 --with-prior False

from cbst.

qiaozhuocheng avatar qiaozhuocheng commented on June 29, 2024

I run the synthia2Cityscapes self-training code,and meet the similar question:
1572960298616
Do you know how to solve it?
When loading image of synthia dataset, you have to pay attention to the numbers of channel of the loaded image, only 1 of the 3 channels is useful or what we want. I'm not sure this is the point, but you can check the code to see if this is the reason casued the error.

Just as Jiale suggested, check the dimension of your label map to see if they have 1 or 3 channels. I think that's the reason causing this problem and you may consider generating label map with 1 channel.
I download tha synthia dataset from the url you provided, so shall I need process the labels from dataset so as to become one channel images?
Following is my input training commond:
python issegm/solve_AO.py --num-round 6 --test-scales 1850 --scale-rate-range 0.7,1.3 --dataset synthia --dataset-tgt cityscapes --split train --split-tgt train --data-root /home/qiu/下载/CBST/data/RAND_CITYSCAPES --data-root-tgt /home/qiu/下载/CBST/data/cityscapes --output syn2city/cbst --model cityscapes_rna-a1_cls16_s8 --weights models/synthia_rna-a1_cls16_s8_ep-0000.params --batch-images 2 --crop-size 500 --origin-size 1280 --origin-size-tgt 2048 --init-tgt-port 0.2 --init-src-port 0.02 --max-src-port 0.06 --seed-int 0 --mine-port 0.8 --mine-id-number 3 --mine-thresh 0.001 --base-lr 1e-4 --to-epoch 2 --source-sample-policy cumulative --self-training-script issegm/solve_ST.py --kc-policy global --prefetch-threads 2 --gpus 0 --with-prior False

And did you process the labels before training? I didn't change anything else ,or maybe is my input command wrong?

from cbst.

yzou2 avatar yzou2 commented on June 29, 2024

I run the synthia2Cityscapes self-training code,and meet the similar question:
1572960298616
Do you know how to solve it?
When loading image of synthia dataset, you have to pay attention to the numbers of channel of the loaded image, only 1 of the 3 channels is useful or what we want. I'm not sure this is the point, but you can check the code to see if this is the reason casued the error.

Just as Jiale suggested, check the dimension of your label map to see if they have 1 or 3 channels. I think that's the reason causing this problem and you may consider generating label map with 1 channel.
I download tha synthia dataset from the url you provided, so shall I need process the labels from dataset so as to become one channel images?
Following is my input training commond:
python issegm/solve_AO.py --num-round 6 --test-scales 1850 --scale-rate-range 0.7,1.3 --dataset synthia --dataset-tgt cityscapes --split train --split-tgt train --data-root /home/qiu/下载/CBST/data/RAND_CITYSCAPES --data-root-tgt /home/qiu/下载/CBST/data/cityscapes --output syn2city/cbst --model cityscapes_rna-a1_cls16_s8 --weights models/synthia_rna-a1_cls16_s8_ep-0000.params --batch-images 2 --crop-size 500 --origin-size 1280 --origin-size-tgt 2048 --init-tgt-port 0.2 --init-src-port 0.02 --max-src-port 0.06 --seed-int 0 --mine-port 0.8 --mine-id-number 3 --mine-thresh 0.001 --base-lr 1e-4 --to-epoch 2 --source-sample-policy cumulative --self-training-script issegm/solve_ST.py --kc-policy global --prefetch-threads 2 --gpus 0 --with-prior False

And did you process the labels before training? I didn't change anything else ,or maybe is my input command wrong?

I just checked the original dataset, labels have only one channel. The problem may be caused by different version of PIL image loading function. (In my environment it works well). If the image loading function of PIL.Image loads image with 3 channels, just use one of them.

from cbst.

qiaozhuocheng avatar qiaozhuocheng commented on June 29, 2024

I run the synthia2Cityscapes self-training code,and meet the similar question:
1572960298616
Do you know how to solve it?
When loading image of synthia dataset, you have to pay attention to the numbers of channel of the loaded image, only 1 of the 3 channels is useful or what we want. I'm not sure this is the point, but you can check the code to see if this is the reason casued the error.

Just as Jiale suggested, check the dimension of your label map to see if they have 1 or 3 channels. I think that's the reason causing this problem and you may consider generating label map with 1 channel.
I download tha synthia dataset from the url you provided, so shall I need process the labels from dataset so as to become one channel images?
Following is my input training commond:
python issegm/solve_AO.py --num-round 6 --test-scales 1850 --scale-rate-range 0.7,1.3 --dataset synthia --dataset-tgt cityscapes --split train --split-tgt train --data-root /home/qiu/下载/CBST/data/RAND_CITYSCAPES --data-root-tgt /home/qiu/下载/CBST/data/cityscapes --output syn2city/cbst --model cityscapes_rna-a1_cls16_s8 --weights models/synthia_rna-a1_cls16_s8_ep-0000.params --batch-images 2 --crop-size 500 --origin-size 1280 --origin-size-tgt 2048 --init-tgt-port 0.2 --init-src-port 0.02 --max-src-port 0.06 --seed-int 0 --mine-port 0.8 --mine-id-number 3 --mine-thresh 0.001 --base-lr 1e-4 --to-epoch 2 --source-sample-policy cumulative --self-training-script issegm/solve_ST.py --kc-policy global --prefetch-threads 2 --gpus 0 --with-prior False

And did you process the labels before training? I didn't change anything else ,or maybe is my input command wrong?

I just checked the original dataset, labels have only one channel. The problem may be caused by different version of PIL image loading function. (In my environment it works well). If the image loading function of PIL.Image loads image with 3 channels, just use one of them.

Thank you ,it works.

from cbst.

Related Issues (16)

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.