Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Something went wrong with id: 0 #33

Closed
rahuldey91 opened this issue Mar 4, 2020 · 9 comments
Closed

Something went wrong with id: 0 #33

rahuldey91 opened this issue Mar 4, 2020 · 9 comments

Comments

@rahuldey91
Copy link

When I execute the generator.jar file, I get this ouptut:

$ java -Xmx2g -cp generator.jar faces.apps.ControlledFaces -c data/config_files/example_config_controlled.json
Generating ID:0 Sample:1
Something went wrong with id: 0
None.get
[Ljava.lang.StackTraceElement;@2f1918c6
(

I am trying to run this to visualize the working of the paper "Occlusion-aware 3d morphable models and an illumination prior for face image analysis". Any clues to fix this would be much appreciated.

@BernhardEgger
Copy link
Member

Hi,
I'm sorry this error message is not really helpful. Usually it is just a file missing?did you download all the necessary files mentioned in the readme?

download Basel Face Model 2017
download Basel Illumination Prior 2017
get a dataset with backgrounds, e.g. the Describable Textures Dataset
Regarding the paper you are mentioning, this is probably the wrong tool to understand that work better.If you want to learn about the illumination prior, this would be the ressource:https://gravis.dmi.unibas.ch/PMM/data/bip/
or this one for the occlusion aware model adaptationhttps://gravis.dmi.unibas.ch/PMM/lectures/segmentation/

Best
Bernhard

@rahuldey91
Copy link
Author

Ok. Thanks for pointing me to the more appropriate resources. Regarding this one, I believe I have downloaded all the requirements. I have pointed to the Basel Face Model *.h5 and the background images path in the example_config_controlled.json file and my data/bip folder contains "data", "BIP2017.jar" and "readme.md" which were extracted from the downloaded BIP model. I will recheck everything once again and let you know.

@BernhardEgger
Copy link
Member

For the BIP it is actually the parameters folder that you need. The BIP2017.jar is not needed in the generator

@rahuldey91
Copy link
Author

So, my data folder structure looks like this:

data/bfm2017/
├── model2017-1_face12_nomouth.h5
└── README.md

data/bip/
├── face_49480.rps
├── face_49483.rps
├── face_49484.rps
├── face_49486.rps
...

data/backgrounds/
├── banded_0002.jpg
├── banded_0004.jpg
├── banded_0005.jpg
...

The config files are pointing to the correct paths too. But I am still getting the same error. Is the above folder structure wrong?

@BernhardEgger
Copy link
Member

Can you share your config file?

Or try the original one and just change the paths and nothing else?

Or try to use absolute path to make sure it is not a path related issue?

The BIP folder is the one containing rps files right? And you use jpg for backgrounds in the config?

@rahuldey91
Copy link
Author

Yes, my config file looks like this:

{
"general": {
"random-seed": 1986
},
"output-location": {
"output-directory": "data/output/"
},
"backgrounds": {
"insert-background-image": false,
"background-images-directory": "data/backgrounds/",
"background-image-extension": ".jpg"
},
"rendering-methods": {
"__comment-1" : "You can enable different rendering methods",
"__comment-2" : "render is the default rendering method it creates a realistic image",
"__comment-3" : "render-depth-map renders a depth map",
"__comment-4" : "render-color-correspondnece-image renders the correspondence to the reference mesh as 3d positions as color coded value",
"__comment-5" : "render-normals renders visualization of the vertex normals relative to the camera",
"__comment-6" : "render-albedo renders the albedo of the face instance",
"__comment-7" : "render-illumination renders a visualization of the illumination",
"__comment-8" : "render-region-maps renders a specified texture mapped on each face without illumination",
"render": true,
"render-depth": true,
"render-color-correspondence-image": true,
"render-normals": true,
"render-albedo": true,
"render-illumination": true,
"render-region-maps": true
},
"morphable-model-parameters": {
"number-of-ids-to-create": 1,
"number-of-samples-per-id": 1,
"model-filename": "data/bfm2017/model2017-1_face12_nomouth.h5",
"__comment-1" : "A value of 0 for any dimension will return always the mean for this dimension",
"dimension-of-shape-space": 199,
"dimension-of-color-space": 199,
"dimension-of-expression-space": 100,
"color-distribution": {
"type": "gaussian",
"mean": 0.0,
"variance": 1.0
},
"shape-distribution": {
"type": "gaussian",
"mean": 0.0,
"variance": 1.0
},
"expression-distribution": {
"type": "gaussian",
"mean": 0.0,
"variance": 1.0
},
"add-expressions": false
},
"background-variation": {
"back-range": {
"start": 0,
"end": 0,
"step": 1,
"type": "inclusive"
}
},
"illumination-angle": {
"illu-range": {
"start": 0,
"end": 0,
"step": 11.25,
"type": "inclusive"
}
},
"pose-range": {
"yaw-range": {
"start": -45,
"end": 45,
"step": 45,
"type": "inclusive"
},
"roll-range": {
"start": 0,
"end": 0,
"step": 5.625,
"type": "inclusive"
},
"pitch-range": {
"start": 0,
"end": 0,
"step": 5.625,
"type": "inclusive"
},
"center-faces": "none"
},
"image-dimensions": {
"image-width": 227,
"image-height": 227
},
"default-parameters": {
"color-transform": {
"gain": [1.0, 1.0, 1.0],
"colorContrast": 1.0,
"offset": [0.0, 0.0, 0.0]
},
"pose-transform": {
"scaling": 1.0,
"roll": 0.0,
"pitch": 0.0,
"yaw": 0.0,
"translation": [0.0, 0.0, -1000.0]
},
"view-transform": {
"translation": [0.0, 0.0, 0.0],
"roll": 0.0,
"yaw": 0.0,
"pitch": 0.0
},
"camera": {
"principalPoint": [0.0, 0.0],
"sensorSize": [15.0, 15.0],
"far": 1000000.0,
"orthographic": false,
"near": 10.0,
"focalLength": 50.0
}
},
"__comment-landmark-tags-1" : "The tags specifying which landmarks will be stored in the tlms file.",
"__comment-landmark-tags-2" : "Each landmark tags needs to be stored in the model .h5 file.",
"landmark-tags": ["center.chin.tip", "center.lips.lower.inner", "center.nose.tip", "left.ear.lobule.attachement",
"right.ear.lobule.attachement", "left.eye.corner_outer", "left.eye.corner_inner", "left.eye.pupil.center",
"right.eye.corner_outer", "right.eye.corner_inner", "right.eye.pupil.center", "left.eyebrow.bend.lower",
"left.eyebrow.inner_lower", "right.eyebrow.bend.lower", "right.eyebrow.inner_lower", "left.lips.corner",
"right.lips.corner", "left.nose.wing.tip", "right.nose.wing.tip"],
"region-maps": [
{
"name": "default",
"mapping": "data/regions/bfm.json",
"region-map": "data/regions/default.png"
}
],
"format-version": "V1.0"
}

I will try having absolute paths in the config and post here if it works. Yes, my BIP folder is the one containing the .rps files as shown in the above tree.

@BernhardEgger
Copy link
Member

Can you also check if it works if you replace the model file with this one:
"model-filename": "data/bfm2017/model2017-1_bfm_nomouth.h5",

In that case it would conflict with landmark files not available in the face12 mask (remove all ear landmarks)

"__comment-landmark-tags-1" : "The tags specifying which landmarks will be stored in the tlms file.",
"__comment-landmark-tags-2" : "Each landmark tags needs to be stored in the model .h5 file.",
"landmark-tags": ["center.chin.tip", "center.lips.lower.inner", "center.nose.tip", "left.ear.lobule.attachement",
"right.ear.lobule.attachement", "left.eye.corner_outer", "left.eye.corner_inner", "left.eye.pupil.center",
"right.eye.corner_outer", "right.eye.corner_inner", "right.eye.pupil.center", "left.eyebrow.bend.lower",
"left.eyebrow.inner_lower", "right.eyebrow.bend.lower", "right.eyebrow.inner_lower", "left.lips.corner",
"right.lips.corner", "left.nose.wing.tip", "right.nose.wing.tip"],
"region-maps": [

@rahuldey91
Copy link
Author

rahuldey91 commented Mar 5, 2020

Thanks. That worked. I downloaded the _bfm_nomouth.h5 file and pointed to that in the config file and it worked. Then I removed the ear landmarks and pointed back to the _face12_nomouth.h5 file, and it worked this time.

By the way, what would be a good platform to raise an issue about the occlusion-aware morphable model that you shared: https://gravis.dmi.unibas.ch/PMM/lectures/segmentation/. I am having issues executing that one too.

@BernhardEgger
Copy link
Member

Cool!

The most related thread in our google group would be this one:
https://groups.google.com/forum/#!categories/scalismo-faces/probabilistic-fitting-tutorial
Or just send me an email to egger.bernhard@gmail.com

The tutorial works with Java JVM, > 1.8.0_80 (Oracle and OpenJDK should work) (use 64 bit version if available) but not with Java above 1.9 or Java 9... It has to do with the interactive console, so you might just need to download an old java version

Best
Bernhard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants