(by Hanan Tanasra)
The plugin’s goal is to collect annotated CAD data and store it in a COCO JSON file.
Support Email

The tool provides one component with the following five input parameters: Layers,ImageFrame, FilePath, ScaleFactor, and CreateCOCO. 

And there is one output in this version, that is found in the provided file path as a COCO JSON file. This plugin is part of a full research and published in the Buildings MDPI journal " Automation in Interior Space Planning: Utilizing Conditional Generative Adversarial Network Models to Create Furniture Layouts" 

The input parameters info: 

“Layers”: This parameter accepts a list of layer names and fills the categories section with it. Using the name and color of each layer minimizes the number of input parameters; hence, the layer’s name must follow the stated naming syntax, “superCategory_category_categoryId”. Users can define their own layers and names. For instance, if users are collecting urban dataset and they want to annotate residential buildings they can name the layer as ‘NewYork_ResidentialBuilding_1432’. 
The plugin contains an error-handling mechanism that notifies if there is duplicated info, wrong format, or a nonexistent layer. COCO JSON files include the metadata of all images, the dataset creator needs to determine the size of the image frame.

“imageFrame”: This parameter enables designers to insert the relevant frames as a list of curves. The plugin workflow aligns the frames and their internal annotations, allowing the annotator to position the floor plan drawing freely, anywhere in the Rhino program. The frame defines the image boundaries that align all the annotation information to be included inside its dimensions. 

“ScaleFactor”: This parameter enables users to define the desired scale for the dataset. The plugin accepts one scale factor for the whole drawings. 

“filePath”: This parameter accepts a text file path, presenting where the user wants to save the exported COCOJSON file. Each Rhino file information is stored in one COCOJSON file. 

“CreateCOCO”: Clicking on this button enables users to receive all tagged data organized in a COCO JSON file, all saved in the file path that they entered.
if you have further information, contact me via 


License Cost:
For instructions on installing Grasshopper Add-Ons, please see FAQ for details.
CAD2COCO plugin
Grasshopper for Rhino 6 for Win
Grasshopper for Rhino 7 for Win