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

failure in exporting an annotated .ply #6

Open
Coldplayplay opened this issue May 22, 2018 · 2 comments
Open

failure in exporting an annotated .ply #6

Coldplayplay opened this issue May 22, 2018 · 2 comments

Comments

@Coldplayplay
Copy link

open the link http://localhost:8010/scans/segment-annotator-single?condition=manual&userId=username&taskMode=new&modelId=my_data.bunny
image

after annotating the .ply, I failed in exporting the annotated .ply as the instructions say in https://github.com/smartscenes/sstk/wiki/Semantic-Segmentation-Labeler
image

PS. I copied the example nyuv2.json and changed something.
My complete my_data.json is as follows.

{
    "source": "my_data",
    "assetType": "scan",
    "rootPath": "${baseUrl}/data/my_data/my_asset",
    "screenShotPath": "${rootPath}/${id}/${id}.png",
    "hasThumbnail": false,
    "assetFields": ["segment-annotations-manual", "scan-model-alignments"],    
    "formats": [
      { "format": "ply",
        "path": "${rootPath}/${id}/${id}.ply",
        "defaultUp": [ 0, 0, 1 ], "defaultFront": [ -1, 0, 0], "defaultUnit": 1,
        "materialSidedness": "Front",
        "useVertexColors": true,
        "computeNormals": true
      }
    ],
    "surfaces": {
      "format": "segmentGroups",  
      "file":  "${rootPath}/${id}/${id}.segs.json"
    },
    "segment-annotations-manual": {
      "format": "segmentGroups",
      "files": {
        "annIds": "${baseUrl}/scans/segment-annotator-single?condition=manual&userId=username&taskMode=new&modelId=${fullId}",
        "segmentGroups": "${baseUrl}/scans/segment-annotations/aggregated?annId=${annId}",
        "segments": "${rootPath}/${id}/${id}.segs.json",
        "annotatedAssetIds": "${baseUrl}/scans/segment-annotations/list?$columns=itemId&format=json&condition[$in]=manual"
      }
    },
    "scan-model-alignments": {
      "files": {
        "annIds": "${baseUrl}/annotations/list?itemId=${fullId}&$columns=id,workerId,data&format=json&type=scan-model-align&condition[$in]=manual",
        "annotatedAssetIds": "${baseUrl}/annotations/list?$columns=itemId&format=json&type=scan-model-align&condition[$in]=manual"
      }
    }
  }

use ssc/export-annotated-plys.js

NODE_BASE_URL=http://localhost:8010 ./export-annotated-ply.js --id bunny  --source my_data --ann_type raw -n 1 

Errors are here:

Configuration { fileCache: { size: 50 },
  imageCache: { size: 200 },
  imageQueue: { concurrency: 4 },
  base_url: 'http://localhost:8010',
  assets_url: 'file:///home/cbc/DL/sstk-master/ssc/../server/static' }
register ../server/static/data/my_data/my_data.json
Registered asset group: my_data
Got 2 assets
segmentsType is segment-annotations-raw
Proccessing bunny
skip_existing is false
Error processing id bunny No segment info for bunny, segmentsType segment-annotations-raw
DONE
Loaded LightSpecs for 202 models

I just wanna use this tool and really don't know about how to code with nodejs, having no solution, so hope for your suggestions.
Best wishes.
BC Chen

@msavva
Copy link
Contributor

msavva commented May 23, 2018

The problem is most likely due to a mismatch between the --ann_type raw argument and the specified surfaces type in the json file (there is only the segment-annotations-manual type there). Try running with --ann_type segment-annotations-manual instead and let us know if that shows any errors.

@Coldplayplay
Copy link
Author

@msavva I tried running with --ann_type segment-annotations-manual.

NODE_BASE_URL=http://localhost:8010 ./export-annotated-ply.js --id bunny  --source my_data --ann_type segment-annotations-manual -n 1 

Result is as below.

Configuration { fileCache: { size: 50 },
  imageCache: { size: 200 },
  imageQueue: { concurrency: 4 },
  base_url: 'http://localhost:8010',
  assets_url: 'file:///home/cbc/DL/sstk-master/ssc/../server/static' }
register ../server/static/data/my_data/my_data.json
Registered asset group: my_data
Got 2 assets
segmentsType is segment-annotations-manual
Proccessing bunny
skip_existing is false
fetching from http://localhost:8010/scans/segment-annotator-single?condition=manual&userId=username&taskMode=new&modelId=my_data.bunny
Loaded LightSpecs for 202 models
Error processing id bunny { err: 'Invalid json from http://localhost:8010/scans/segment-annotator-single?condition=manual&userId=username&taskMode=new&modelId=my_data.bunny',
  url: 'http://localhost:8010/scans/segment-annotator-single?condition=manual&userId=username&taskMode=new&modelId=my_data.bunny',
  res: null }
DONE

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