Coder Social home page Coder Social logo

cityscapesscripts's Introduction

The Cityscapes Dataset

This repository contains scripts for inspection, preparation, and evaluation of the Cityscapes dataset. This large-scale dataset contains a diverse set of stereo video sequences recorded in street scenes from 50 different cities, with high quality pixel-level annotations of 5 000 frames in addition to a larger set of 20 000 weakly annotated frames.

Details and download are available at: www.cityscapes-dataset.com

Dataset Structure

The folder structure of the Cityscapes dataset is as follows:

{root}/{type}{video}/{split}/{city}/{city}_{seq:0>6}_{frame:0>6}_{type}{ext}

The meaning of the individual elements is:

  • root the root folder of the Cityscapes dataset. Many of our scripts check if an environment variable CITYSCAPES_DATASET pointing to this folder exists and use this as the default choice.
  • type the type/modality of data, e.g. gtFine for fine ground truth, or leftImg8bit for left 8-bit images.
  • split the split, i.e. train/val/test/train_extra/demoVideo. Note that not all kinds of data exist for all splits. Thus, do not be surprised to occasionally find empty folders.
  • city the city in which this part of the dataset was recorded.
  • seq the sequence number using 6 digits.
  • frame the frame number using 6 digits. Note that in some cities very few, albeit very long sequences were recorded, while in some cities many short sequences were recorded, of which only the 19th frame is annotated.
  • ext the extension of the file and optionally a suffix, e.g. _polygons.json for ground truth files

Possible values of type

  • gtFine the fine annotations, 2975 training, 500 validation, and 1525 testing. This type of annotations is used for validation, testing, and optionally for training. Annotations are encoded using json files containing the individual polygons. Additionally, we provide png images, where pixel values encode labels. Please refer to helpers/labels.py and the scripts in preparation for details.
  • gtCoarse the coarse annotations, available for all training and validation images and for another set of 19998 training images (train_extra). These annotations can be used for training, either together with gtFine or alone in a weakly supervised setup.
  • gtBbox3d 3D bounding box annotations of vehicles. Please refer to Cityscapes 3D (Gählert et al., CVPRW '20) for details.
  • gtBboxCityPersons pedestrian bounding box annotations, available for all training and validation images. Please refer to helpers/labels_cityPersons.py as well as CityPersons (Zhang et al., CVPR '17) for more details. The four values of a bounding box are (x, y, w, h), where (x, y) is its top-left corner and (w, h) its width and height.
  • leftImg8bit the left images in 8-bit LDR format. These are the standard annotated images.
  • leftImg8bit_blurred the left images in 8-bit LDR format with faces and license plates blurred. Please compute results on the original images but use the blurred ones for visualization. We thank Mapillary for blurring the images.
  • leftImg16bit the left images in 16-bit HDR format. These images offer 16 bits per pixel of color depth and contain more information, especially in very dark or bright parts of the scene. Warning: The images are stored as 16-bit pngs, which is non-standard and not supported by all libraries.
  • rightImg8bit the right stereo views in 8-bit LDR format.
  • rightImg16bit the right stereo views in 16-bit HDR format.
  • timestamp the time of recording in ns. The first frame of each sequence always has a timestamp of 0.
  • disparity precomputed disparity depth maps. To obtain the disparity values, compute for each pixel p with p > 0: d = ( float(p) - 1. ) / 256., while a value p = 0 is an invalid measurement. Warning: the images are stored as 16-bit pngs, which is non-standard and not supported by all libraries.
  • camera internal and external camera calibration. For details, please refer to csCalibration.pdf
  • vehicle vehicle odometry, GPS coordinates, and outside temperature. For details, please refer to csCalibration.pdf

More types might be added over time and also not all types are initially available. Please let us know if you need any other meta-data to run your approach.

Possible values of split

  • train usually used for training, contains 2975 images with fine and coarse annotations
  • val should be used for validation of hyper-parameters, contains 500 image with fine and coarse annotations. Can also be used for training.
  • test used for testing on our evaluation server. The annotations are not public, but we include annotations of ego-vehicle and rectification border for convenience.
  • train_extra can be optionally used for training, contains 19998 images with coarse annotations
  • demoVideo video sequences that could be used for qualitative evaluation, no annotations are available for these videos

Scripts

Installation

Install cityscapesscripts with pip

python -m pip install cityscapesscripts

Graphical tools (viewer and label tool) are based on Qt5 and can be installed via

python -m pip install cityscapesscripts[gui]

Usage

The installation installs the cityscapes scripts as a python module named cityscapesscripts and exposes the following tools

  • csDownload: Download the cityscapes packages via command line.
  • csViewer: View the images and overlay the annotations.
  • csLabelTool: Tool that we used for labeling.
  • csEvalPixelLevelSemanticLabeling: Evaluate pixel-level semantic labeling results on the validation set. This tool is also used to evaluate the results on the test set.
  • csEvalInstanceLevelSemanticLabeling: Evaluate instance-level semantic labeling results on the validation set. This tool is also used to evaluate the results on the test set.
  • csEvalPanopticSemanticLabeling: Evaluate panoptic segmentation results on the validation set. This tool is also used to evaluate the results on the test set.
  • csEvalObjectDetection3d: Evaluate 3D object detection on the validation set. This tool is also used to evaluate the results on the test set.
  • csCreateTrainIdLabelImgs: Convert annotations in polygonal format to png images with label IDs, where pixels encode "train IDs" that you can define in labels.py.
  • csCreateTrainIdInstanceImgs: Convert annotations in polygonal format to png images with instance IDs, where pixels encode instance IDs composed of "train IDs".
  • csCreatePanopticImgs: Convert annotations in standard png format to COCO panoptic segmentation format.
  • csPlot3dDetectionResults: Visualize 3D object detection evaluation results stored in .json format.

Package Content

The package is structured as follows

  • helpers: helper files that are included by other scripts
  • viewer: view the images and the annotations
  • preparation: convert the ground truth annotations into a format suitable for your approach
  • evaluation: validate your approach
  • annotation: the annotation tool used for labeling the dataset
  • download: downloader for Cityscapes packages

Note that all files have a small documentation at the top. Most important files

  • helpers/labels.py: central file defining the IDs of all semantic classes and providing mapping between various class properties.
  • helpers/labels_cityPersons.py: file defining the IDs of all CityPersons pedestrian classes and providing mapping between various class properties.
  • setup.py: run CYTHONIZE_EVAL= python setup.py build_ext --inplace to enable cython plugin for faster evaluation. Only tested for Ubuntu.

Evaluation

Once you want to test your method on the test set, please run your approach on the provided test images and submit your results: Submission Page

The result format is described at the top of our evaluation scripts:

Note that our evaluation scripts are included in the scripts folder and can be used to test your approach on the validation set. For further details regarding the submission process, please consult our website.

License

The dataset itself is released under custom terms and conditions.

The Cityscapes Scripts are released under MIT license as found in the license file.

Contact

Please feel free to contact us with any questions, suggestions or comments:

cityscapesscripts's People

Contributors

adityassrana avatar adriankoering avatar alexander-kirillov avatar bhomik avatar jmtatsch avatar krosaen avatar lucasb-eyer avatar luofan18 avatar marvinteichmann avatar mcordts avatar ncgaehle avatar nicolasj92 avatar ruicx avatar sr425 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cityscapesscripts's Issues

some questiones about metrics

Dear authors,

When evaluating the result by running evalInstanceLevelSemanticLabeling.py, we could get AP and AP50%. I have a question about AP50%. 50% means the threshold of IoU is set as 0.50. However, I'm not sure what IoU represents, IoU of bounding boxes or IoU of masks ?

Thanks in advance!

question about the dataset

Dear all,

I had downloaded the dataset:
gtFine_trainvaltest
gtCoarse

I could find the annotated images. The orginal rgb images are stored in leftImg8bit_trainvaltest.zip and leftImg8bit_trainextra.zip, right?

Milton

how to download the dataset that need request

I am a Ph.D. candidate of Xiamen University in China. My research is focused on depth estimation and semantic segmentation. Recently I need to use your packages named leftImg8bit_sequence_trainvaltest.zip and camera_trainvaltest.zip of cityscapes dataset. But the website shows "The following packages are available upon request". In order to complete my research, I need your permission to download these two package.

cityscapesLabelTool not open and label images

Hi, i want to label my images like as cityscape, i use cityscapesLabelTool, when I choose the catalog with images, they don't open...how can i fix it?

i load tool
screenshot from 2018-03-26 18-21-45
choose dir
screenshot from 2018-03-26 18-21-54
and images don't open
screenshot from 2018-03-26 18-21-59

i can open it with my python script. In it i specify a way to image and tool works.But without label(color)map and i can't label my images.
open only one picture
screenshot from 2018-03-26 18-24-44
label area
screenshot from 2018-03-26 18-24-55
choose class
screenshot from 2018-03-26 18-25-24
and than don't have results
screenshot from 2018-03-26 18-25-27
similar situation with bbox
screenshot from 2018-03-26 18-25-53
maybe someone can help me.

some problem about training

hello,

    I have some problem when I using this dataset. Should I use trainid for training and use ID for testing?
    It looks a little strange...

Thank you

Problem with evalPixelLevelSemanticLabeling.py

Dear Marius Cordts

I try to evaluate my results, but when I run this script I get the following error:

Found no prediction for ground truth /home/timo/Cityscapes/gtFine/val/frankfurt/frankfurt_000001_065617_gtFine_labelIds.png

My call in the terminal: python evalPixelLevelSemanticLabeling.py

I created a folder "results" in the root directory. Inside is a image, where pixels encode the class IDs as defined in labels.py: frankfurt_000001_011835* .png
The image is from the ground truth values: /home/timo/Cityscapes/gtFine/val/frankfurt
The result should therefore be 100%, but the above error occurred.

If I use the following call: python evalPixelLevelSemanticLabeling.py /path/to/ground_truth/prediction
I get only a lot of "nan" as output.
Could you please give me a hint?

Best,
Timo

Different "*_gtFine_labelTrainIds.png" generation result

Hi, Cityscapes Team

I generated the *_gtFine_labelTrainIds.png files with two different approaches and got different results.

[1] Files are generated with createTrainIdLabelImgs.py supplied in this project.
[2] Files are generated from *_gtFine_labelIds.png supplied in dataset with matlab code below:

infile = 'gtFine/train/aachen/aachen_000000_000019_gtFine_labelIds.png';
outfile = 'gtFine/train/aachen/aachen_000000_000019_gtFine_labelTrainIds_matlab.png';
img = imread(infile);
outimg = uint8(ones(size(img))*255);
mapping = [7, 8, 11, 12, 13, 17, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 31, 32, 33];
for idx = 1:19
    outimg(img == mapping(idx)) = idx-1;
end
imwrite(outimg, outfile);

The *_gtFine_labelTrainIds.png results generated from the 2 methods above are different at the edge pixels of objects & staffs in the images. See diff image below for your reference (white pixels are those with different labels).
aachen_000000_000019_gtfine_labeltrainids_diff

So how to deal with this inconsistency?

Thanks~

Error when trying to run cityscapesLabelTool.py

When I was trying to run python cityscapesLabelTool.py, I got error:

terminating with uncaught exception of type NSException.

The complete error message:

2018-07-13 14:01:27.796 python[36643:563603] -[QNSApplication _setup:]: unrecognized selector sent to instance 0x7fc2b581d650
2018-07-13 14:01:27.796 python[36643:563603] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[QNSApplication _setup:]: unrecognized selector sent to instance 0x7fc2b581d650'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff27ce832b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00007fff4ee46c76 objc_exception_throw + 48
2 CoreFoundation 0x00007fff27d80e04 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x00007fff27c5e870 forwarding + 1456
4 CoreFoundation 0x00007fff27c5e238 _CF_forwarding_prep_0 + 120
5 libtk8.6.dylib 0x000000010d74946f TkpInit + 383
6 libtk8.6.dylib 0x000000010d6a221e Initialize + 2622
7 _tkinter.cpython-35m-darwin.so 0x000000010d4c8a06 _tkinter_create + 1174
8 python 0x000000010aa5c49e PyCFunction_Call + 62
9 python 0x000000010ab231e1 PyEval_EvalFrameEx + 15409
10 python 0x000000010ab1df2f _PyEval_EvalCodeWithName + 335
11 python 0x000000010aa2966a function_call + 106
12 python 0x000000010a9e5b45 PyObject_Call + 69
13 python 0x000000010aa08694 method_call + 148
14 python 0x000000010a9e5b45 PyObject_Call + 69
15 python 0x000000010aa82375 slot_tp_init + 117
16 python 0x000000010aa86a01 type_call + 209
17 python 0x000000010a9e5b45 PyObject_Call + 69
18 python 0x000000010ab234f4 PyEval_EvalFrameEx + 16196
19 python 0x000000010ab1df2f _PyEval_EvalCodeWithName + 335
20 python 0x000000010aa2966a function_call + 106
21 python 0x000000010a9e5b45 PyObject_Call + 69
22 python 0x000000010aa08694 method_call + 148
23 python 0x000000010a9e5b45 PyObject_Call + 69
24 python 0x000000010aa82375 slot_tp_init + 117
25 python 0x000000010aa86a01 type_call + 209
26 python 0x000000010a9e5b45 PyObject_Call + 69
27 python 0x000000010ab234f4 PyEval_EvalFrameEx + 16196
28 python 0x000000010ab232d2 PyEval_EvalFrameEx + 15650
29 python 0x000000010ab1df2f _PyEval_EvalCodeWithName + 335
30 python 0x000000010ab707d8 PyRun_FileExFlags + 248
31 python 0x000000010ab6ff6e PyRun_SimpleFileExFlags + 382
32 python 0x000000010ab94de6 Py_Main + 3622
33 python 0x000000010a9d6891 main + 497
34 libdyld.dylib 0x00007fff4fa60015 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6

SegNet's results

Hi all,

I just use the Cityscapes Dataset to train a SegNet model and make some experiments with it.
And now, I want to evaluate my results on val set, and I also know that we need to have full resolution if I want to submit to the evaluation server.

But, I am confused that why I see the result of SegNet on official benchmark suite was evaluated on subsample with factor 4 at test time?
Is there another official code for the result which is subsample with factor 4 ?
Because I must compare my result with that in the same way.
default

And, I want to ask all that could anybody share the trained model on the Cityscapes dataset if you did?

Thanks all!

Best,
Gary

Camera calibration

Hello,

I am trying to compute the camera projection matrix from the intrinsic and extrinsic parameters following the description in: https://github.com/mcordts/cityscapesScripts/blob/master/docs/csCalibration.pdf
however the matrix I obtain is not correct and I suspect that I am misinterpreting some of the instruction.

Here is the snippet of code (based on opencv) I am using which should correspond exactly to the provided description.

    // assuming all the values are read from the file
    
    // cos/sin for yaw, pitch, roll
    double c_y = cos(yaw);
    double s_y = sin(yaw);

    double c_p = cos(pitch);
    double s_p = sin(pitch);

    double c_r = cos(roll);
    double s_r = sin(roll); 
    
    // camera to vehicle rotation
    cv::Matx33d R(  c_y * c_p,  c_y * s_p * s_r - s_y*c_r,      c_y*s_p*c_r + s_y * s_r,
                    s_y * c_p,  s_y * s_p * s_r + c_y * c_r,    s_y*s_p*c_r - c_y * s_r, 
                    - s_p,      c_p * s_r,                      c_p * c_r);

    // camera rotation
    R = R.t();

    // camera t
    cv::Matx31d t = - ( R * cv::Matx31d(x,y,z) );

    // skipping steps to copy the values in the 3x4 Rt 

    // Intrinsic and final Projection matrix
    K = cv::Matx33d( fx,  0,     u0,
                   0,  fy,     v0,
                   0,  0,      1);

     cv::Matx33d intrinsic_rot(      0,  -1,     0,
                                    0,  0,      -1,
                                    1,  0,      0);

      K = K * intrinsic_rot;
      P = K * Rt

For example, given camera position (1.7, 0.1, 1.22) (in train/aachen) projecting the 3d point (5.4, 0.1, 2.22) gives a 2d point at coordinate (u = 1052, v = -192). This point far in front of the camera (4 meters) should be visible in the image.

Many thanks
Aziz

how to calculate the real depth?

hi,
I am confusing about how can i calculate the real depth, i use the formula d = ( float(p) - 1. ) / 256. to calculate the disparity value , and then i calculate the depth using : depth = baseline * focal length / disparity value , for example: depth = 0.22*2262/0.13=3828. i got a very large depth value, is that correct? how can i get a correct real depth?

How to evaluate trainId(0-18)?

Hi!

First, great dataset, thank you. And one question: apparently evalPixelLevelSemanticLabeling.py is for evaluating the class IDs(0-33). I trained a network using only the standard trainId-s from label.py(0-18). Is there a script I skipped or an easy way to edit evalPixelLevelSemanticLabeling.py for evaluating trainIds?

annotation mistakes

Hi, @mcordts ,

Just find the annotation mistakes in train ground-truth file "aachen_000053_000019_gtFine_labelIds.png", the car at the center is mistakenly annotated as id 16 (tunnel).

How to get other packages of datasets?

Dear Marius Cordts

I want to use 'all_demoVideo.zip' and 'leftImg8bit_sequence_trainvaltest.zip'. How could I get these datasets? I sent an email to '[email protected]', but get no reply.

Thank you very much for your help.

Best wishes,

Ruihao

How to get the camera parameters?

I want to know the camera parameters such as is the distance between two cameras and the focal length of camera. The README file says that csCalibration.pdf contains these parameters but I cannot find it. Can you tell me about this? Thanks very much.

Error when annotating an image from scratch

I am trying to annotate an image from scratch. So, initially I don't have any label files for that image. But I am facing the following error after creating the new object and selecting its label from the dropdown list-

Traceback (most recent call last):
  File "cityscapesLabelTool.py", line 944, in newObject
    self.appendObject( label , self.drawPoly )
  File "cityscapesLabelTool.py", line 2347, in appendObject
    for obj in self.annotation.objects:
AttributeError: 'NoneType' object has no attribute 'objects'

Apparently it seems that self.annotation is of NoneType.

Question about "iIoU = nan", how to interpret this?

Hi again Marius,

everything works so far but another question came up i didnt find an answer for yet:

i trained some nets with data from your dataset. when i calculate IoU and iIoU then with your script evalPixelLevelSemanticLabeling.py i get for example the result like attached:
iou

My question is, why do i get a "nan" for the result of iIoU of almost all classes?

When i take a look in your script there are following classes defined for calculating iIoU:

args.avgClassSize = {
"bicycle" : 4672.3249222261 ,
"caravan" : 36771.8241758242 ,
"motorcycle" : 6298.7200839748 ,
"rider" : 3930.4788056518 ,
"bus" : 35732.1511111111 ,
"train" : 67583.7075812274 ,
"car" : 12794.0202738185 ,
"person" : 3462.4756337644 ,
"truck" : 27855.1264367816 ,
"trailer" : 16926.9763313609 ,
}

So i expect at least for these classes not a "nan" as result?! And why did it work for "car" and "person" in my case? (well, its 0 but at least it does something :-) )

For the IoU, the "nan" for the train class means that there wasnt even one train-class in my training data set, correct?

But i dont understand all the other "nan", please help me out!

Thank you!
Stefan

Evaluation problem

Hi again Marius,

i was able to train my network as discussed in the other topic. I created result pictures and now i want to evaluate them.
I still have a problem with the evalPixelLevelSemanticLabeling.py

First it says that it cant find a prediction file...then i created a folder named "result" in my Cityscapes root directory. Then it says that it find multiple predictions for ground truth in '../../gtFine/val/lindau/lindau_000001_000019_gtFine_labelIds.png'! why? i have only two images in the result-folder...

Why is it always pointing to the gtFine/val...path no matter what i do??? For first experiment issues i only want to evaluate one prediction image. So i have one picture named 'lindau_000001_000019.png' and another picture named 'lindau_000001_000019_gtFine_labelIds.png' in the 'result' folder like described above.
I just want to compare this two pictures with each other and calculate the IoU etc....it took me already hours to step behind this, i was not able to do it...

What am i doing wrong here?

Could you give my like a 'step by step' advice how to handle this? Like i said i would already be happy just to compare (evaluate) these two images before doing this with much more files.

Thank you

Stefan

Is possible to matching two image and available label data for matching image?

Hello CityscapesTeam,

As your available data, you provided two kinds of data right and left images. If I want to match them to make a wide view. Does your script provide code for matching these two images? In additions, if it is available, do you provide labels (gtFine) for the matching image?

I ask the question because I found some papers that use a deep information to enhance accuracy but I do not know how they do if these labels are not available to download.

Thank all.

can't add a new polygonal. locale.Error: unsupported locale setting

hi, I used the cityscapesLabelTool to label new images, but I just draw only one polygonal in image, i can't add a new polygonal, should i change the 'us_us'?


Traceback (most recent call last):
File "cityscapesscripts/annotation/cityscapesLabelTool.py", line 943, in newObject
self.appendObject( label , self.drawPoly )
File "cityscapesscripts/annotation/cityscapesLabelTool.py", line 2364, in appendObject
obj.updateDate()
File "cityscapesscripts/helpers/annotation.py", line 102, in updateDate
locale.setlocale( locale.LC_ALL , 'us_us' )
File "/usr/lib/python2.7/locale.py", line 579, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting

General questions about the dataset

Hi all,

i already trained some nets with your released dataset. everything worded fine so far for the training process. But i have a couple of questions if i understand everything correctly:

  1. On your homepage it says there are 30 classes in 8 categories, so far so good. If i take a look into the labels.py file i count 35 classes (line 63 to 97). For me its not really clear what number to set as the number of output of my last conv layer. acutally after some experementing my suggestion is to set the number of outputs to 34. The problem is, i dont know exactly why... :-).
  2. I saw some net architectures where there is a "ignore label" parameter. Regarding your dataset my understanding is that the void-category should be ignored (better sayed, void is not included for evaluation). How to handle this? on your Homepage void category contains "ground", "dynamic" and "static", so should i set ignore_labesl to 3? in labels.py there are 7 labels within the void-category. This is a little bit confusing for me.
  3. If i have 'class_weighting' by 'weight_by_label_freqs: true' in a "SoftmaxWithLoss"-Layer, how are the weights calculated for the cityscapes labels?
  4. Could you explain the iIoU metric in a little bit more "easy" detailed way than described in your official paper? I still have some understanding issues here.

Thank you very much in advance for your help!

Regards
Stefan

what is the order of the bbox?

in the gtbbox set, there are four numbers. What it is?
left_corner_x, left_corner_y, height, width?
why it is not written in the readme file?

Can not download cityscapes dataset

Hi,Marius Cordts.
Sorry to disturb you.I'm a postgraduate of Southeast University. Our team want to get cityscapes dataset for research learning, I've registered in the dataset website for several days, but I have not gotten the human approval.If you are convenient,please tell us how to get the dataset easily.I am looking forward for your reply.

How to use these scripts?

I am new to this dataset, I met this problem when I run python cityscapesscripts/preparation/createTrainIdLabelImgs.py
Failed to find all Cityscapes modules, I set dataset path in my os environment.(I have install this package, also do the python build)

[critical bug] evalInstanceLevelSemanticLabeling read bw png bug

It's a known bug of PIL: the np.array cannot convert the bw png image.
http://stackoverflow.com/questions/2761645/error-converting-pil-bw-images-to-numpy-arrays

The solution is simple. Change the image to grayscale before being converted by np.array.
In your def assignGt2Preds(gtInstancesOrig, gtImage, predInfo, args):
# Read the mask
predImage = Image.open(predImageFile)
predImage = predImage.convert("L"); <---add this line pls, line 302
predNp = np.array(predImage)

Cityscapes Dataset and Caffe

Hi all,

i want to use the Cityscapes Dataset to train a CNN with Caffe and make some experiments with it, actually i have no idea how to convert the Images and labeling Information of the dataset to the Caffe required levedb or lmdb format.

I successfully created lmdb files with the Caffe internal tool with my own pictures and a corresponding txt-file with the path to the Pictures and the associated labels. But how does this work with the cityscapes dataset?

Did anybody use this dataset with Caffe before? Any help is appreciated.

Thank you in advance!

Best regards
Stefan

instance label in ******_gtFine_instanceIds.png

I use the tool json2instanceImg.py to generate instance labels, but in the png image genereted by json2instancImg.py , different car instances(for example) seem to have the same label.
As well, after i colored the png image, i found that the color of different car instances have the same color.
Also with other classes such as person, different persons have the same instance label.

In json2instancImg.py, different instances are drawed with a unique id combined of class id and instance id, but in result png images, i can't find the defference between labels of instances.
Could you give some advice?
Thx a lot!
mask

can't use cityScapesViewer.py

Hello,

I was trying the cityScapesViewer by python cityScapesViewer.py and was able to start up the UI and select a folder for display. But then no image was shown in the UI. Am I missing something?

Evaluation issue from trainIds to labelIds

My output is in the form of trainIds, but in your github, you say the evaluation is done in labelIds, so I have to convert the trainIds to labelIds first, but in the file helpers/labels.py, I find one trainId is mapped to multiple labelId, so I am confused that which labelId I should convert to, please give me a detail about it, which will help me a lot, thanks

any tutorial to use this tool to annotating image datas ?

any tutorial to use this tool to annotating image data, I just download this repository and run the executable *.py file, there was same error warning like this:
image
then, I try to guess what that means, and do some configurations. But fail, if authors can shows us a simple tutorial. I believe that the most wasting time finding out how to using this tool can be saved for me and people like me.
my great respect to authors!

Report on empty gtFine annotations

Hi,
recently I downloaded gtFine_trainvaltest.zip from the website Cityscapes. However, when I unzipped it and looked into the test folder, I found all annotation images are almost empty without any labels on objects.

Is there something wrong?

FCN trained on cityscapes

Hi Mcordts,

Because I want to make a test on the FCN and I find you have trained the FCN on cityscapes in the page of the official benchmark suite , I want to ask you whether the model still keep.
If yes, can you release the model?

Thank you!

depth matrix problem

when i use this matrix to get the real depth

disparity precomputed disparity depth maps. To obtain the disparity values, compute for each pixel p with p > 0: d = ( float(p) - 1. ) / 256., while a value p = 0 is an invalid measurement. Warning: the images are stored as 16-bit pngs, which is non-standard and not supported by all libraries.

I found the d is wrong. the object that near the camera have a big distance,the object that far away is small

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.