Inspiration
Bone is one of nature’s most impressive engineering systems. It is strong, lightweight, porous, and constantly adapting to the body. The spongy inner layer of bone, called trabecular bone, is especially fascinating because it is not random. Its pores, struts, and channels form a carefully balanced micro-architecture that allows cells, nutrients, and blood vessels to move through it while still giving the bone enough strength to carry load.
In bone tissue engineering, recreating this balance is extremely difficult. When a patient loses a section of bone because of trauma, infection, or tumour removal, surgeons need more than a solid implant. They need a scaffold that the body can grow into. That scaffold has to be porous enough for biological regeneration, connected enough for cell migration, and mechanically stable enough to support healing.
The problem is that designing these structures manually is slow and complicated. Biomedical engineers often spend hours in CAD software adjusting porosity, pore size, surface area, and connectivity by trial and error. Even then, the final structure usually cannot match the complexity of natural trabecular bone.
We started with a simple question:
What if an AI system could learn the design rules of bone and generate scaffold structures automatically?
That question became Synapse-Vis.
As we built the project, the question became more specific. We realised that the challenge was not just training a model. It was figuring out what the model should learn from. Raw Micro-CT bone scans gave us real biological information, but they also introduced noise, segmentation artefacts, and jagged surfaces. That pushed us to think more carefully about the relationship between real-world data and usable training data.
The final idea behind Synapse-Vis came from that balance: use real bone data to understand the biological design rules, then use those rules to generate clean, printable scaffold geometries.
What it does
Synapse-Vis is an AI-powered scaffold design platform for biomedical engineers, researchers, and students working in bone tissue engineering. Instead of manually designing porous scaffold geometries in CAD, the user enters a target porosity value, and the system generates a biomimetic 3D scaffold in under two seconds.
The platform produces a high-fidelity, 3D-printable STL file and displays it in an interactive browser-based 3D viewer. Behind the scenes, every generated scaffold is checked against clinically relevant design metrics before it is shown to the user.
Each scaffold is evaluated using:
Porosity percentage, to ensure enough open space for bone cell infiltration.
Pore connectivity, to make sure the pore network is continuous and not made of isolated voids.
Average pore diameter, to check whether the pore size is suitable for vascularisation and tissue growth.
Surface area to volume ratio, to estimate how much surface is available for cell attachment.
Estimated cell infiltration depth, to translate geometric quality into a more biologically meaningful prediction.
If a scaffold fails the required constraints, the system rejects it and generates another one. This means the user does not just get a visually interesting model. They get a structure that has already passed a biological and topological validation pipeline.
How we built it
The core idea: learning bone-like geometry
Our first instinct was to train directly on raw Micro-CT bone data. That seemed like the most biologically honest approach because Micro-CT scans capture real trabecular bone architecture. However, once we started experimenting, we realised that raw clinical-style data is not automatically ideal for generative modelling.
The scans were noisy and often binary-segmented. When used directly, they pushed the model toward jagged, blocky outputs. The generated scaffolds had visible voxel artefacts and rough edges, which made them unsuitable for clean STL generation and 3D printing.
This became one of the most important pivots in the project.
Instead of using the raw Micro-CT data as the final training source, we used it to extract biologically meaningful parameters such as approximate pore size and strut thickness. These values were then used to calibrate a mathematical TPMS-based scaffold generator. In this way, the real data gave us the biological constraints, while the TPMS generator gave us smooth and printable geometry.
We called this our synthetic twin dataset: a dataset that follows the design rules of real trabecular bone, but has the smoothness and consistency needed for high-quality generative modelling.
Soft-continuous field learning
A major issue with early scaffold generation was the “staircase problem.” When the model learned from hard binary voxel grids, it produced blocky surfaces with sharp transitions. These hard voxel edges survived through mesh extraction and made the scaffolds look unnatural.
To solve this, we stopped treating the scaffold as a simple binary object and started representing it as a smooth scalar field. Instead of asking the model to predict whether each voxel is only material or void, we trained it to learn a continuous probability field.
The training data was generated using a sigmoid-transformed TPMS distance field, where the Gyroid function defined the scaffold surface, the threshold controlled porosity, and the transition sharpness controlled how smooth or steep the material boundary was.
This helped the model learn smooth transitions instead of hard edges. The result was a much cleaner scaffold surface after mesh extraction.
The generative model
The core model is a hybrid 3D Variational Autoencoder with a GAN discriminator.
The VAE compresses each scaffold into a latent space and then reconstructs it from that compressed representation. We conditioned the decoder on the target porosity value, which allowed the user to control the density of the generated scaffold.
Tuning the model was not straightforward. If the KL divergence weight was too high, the model ignored the porosity condition. If it was too low, the latent space became unstable and produced very similar outputs. We had to run multiple experiments before finding a setting where the generated structures were both diverse and controllable.
The GAN discriminator acted as a quality filter during training. VAEs alone can sometimes produce smooth but blurry outputs. The discriminator encouraged sharper and more confident scaffold structures, while the VAE preserved controllability.
Together, the VAE and GAN gave us both control and geometric quality.
The geometry pipeline
Once the model generates a soft voxel field, the geometry pipeline converts it into a printable mesh.
The pipeline is:
Soft voxel field → Marching Cubes → raw triangle mesh → Taubin smoothing → watertight STL
We used Marching Cubes to extract the isosurface from the generated field. After that, we applied Taubin smoothing instead of standard Laplacian smoothing. This was important because Laplacian smoothing made the mesh look better but also caused volume shrinkage, which changed the scaffold porosity.
Taubin smoothing helped preserve the overall volume while removing jagged mesh artefacts. This gave us smoother and more organic scaffold surfaces without destroying the target porosity.
The verification engine
We did not want the system to return scaffolds that only looked good visually. Bone scaffolds need to be biologically meaningful, so we added a validation pipeline.
Two of the most important checks were Connected Components Labelling on the void space and Euclidean Distance Transform on the void space.
Connected Components Labelling helped us verify whether the pore network was truly connected. Euclidean Distance Transform helped us estimate pore diameter. Together, these checks caught failures that would be difficult to identify by visual inspection alone.
A scaffold can look porous from the outside while still containing disconnected internal voids. Our validation step prevents those designs from being exported.
Tech stack
Deep Learning: PyTorch, 3D CNNs, VAE, GAN
Geometry Processing: Trimesh, scikit-image, Marching Cubes, Taubin smoothing
Scientific Computing: NumPy, SciPy, Euclidean Distance Transform, Connected Components Labelling
Backend: Python, Flask
Frontend: Three.js, STLLoader, OrbitControls, Vanilla JavaScript
DevOps: Git and GitHub
Challenges we ran into
The real-world data problem
One of the biggest challenges was figuring out how to use real biomedical data without letting its noise ruin the generated geometry. We initially tried working with raw Micro-CT bone scans because they contained real trabecular structure. But the model quickly started learning the wrong things: segmentation noise, jagged voxel boundaries, and blocky surfaces.
That was a major turning point. We realised that real data was valuable, but not necessarily usable in its raw form. Instead of directly training on the scans, we extracted useful biological parameters from them, especially pore size and strut thickness. Then we used those values to calibrate our TPMS generator.
This gave us a cleaner synthetic dataset that still respected the structure of real bone. It was not synthetic just for convenience. It was synthetic because the raw data had to be corrected before it could teach the model properly.
The staircase problem
Our first generated meshes looked voxelated and rough. The surfaces had a staircase-like appearance because the model was learning from hard binary voxel grids. These artefacts made the scaffolds look less like bone and more like stacked cubes.
We tried smoothing the mesh, but standard smoothing methods introduced another problem: they reduced the jaggedness while also shrinking the geometry and changing the scaffold’s porosity. The final solution was to combine soft-field training with Taubin smoothing. The model learned smoother geometry from the beginning, and the mesh processing step refined it without destroying the volume.
Topological validity vs. visual porosity
A scaffold that looks porous is not always usable. Some early outputs had pores that appeared open from the outside but were disconnected internally. In tissue engineering, disconnected pores are a serious issue because cells and nutrients need continuous pathways through the scaffold.
To fix this, we added Connected Components Labelling on the void space. This allowed us to check whether the pore network was truly connected. If it was not, the scaffold was rejected before export.
Conditioning on porosity
Getting the model to obey the target porosity value was harder than expected. During training, small changes in the KL divergence weight had a large effect on output behaviour. With one setting, the model ignored the porosity condition. With another, the latent space collapsed and produced similar-looking scaffolds.
We had to run multiple experiments before finding a stable balance where the generated structures were both diverse and controllable.
Cylindrical boundary artefacts
Real scaffold plugs are usually cylindrical, not cubic. When we applied a cylindrical mask to the generated volume, the boundary introduced sharp transitions. Marching Cubes converted those transitions into rough rings around the scaffold surface.
We solved this by softening the cylinder boundary using a smooth transition profile. This made the final perimeter cleaner and more suitable for printing.
Accomplishments that we’re proud of
We are proud that Synapse-Vis became more than a simple generative demo. It became a full scaffold generation and validation pipeline.
Some of our biggest accomplishments were achieving a best reconstruction MSE of 0.00084, building a system that generates a validated scaffold in under two seconds, and creating a browser-based workflow where users can enter a porosity value, view the scaffold, validate it, and download an STL file.
We are also proud that the system does not rely only on visual inspection. The biomedical metric suite checks whether the scaffold is connected, printable, and biologically reasonable before it reaches the user.
The part we are most proud of is the data pivot. We did not just use a dataset and train a model. We had to diagnose why the original data was failing, extract the parts that mattered, and rebuild the training pipeline around those insights. That made the project feel much closer to a real engineering problem.
What we learned
Good AI starts with good data
The biggest lesson from this project was that data quality matters as much as model architecture. At first, we assumed real Micro-CT scans would automatically be the best training data because they came from real bone. But in practice, the raw scans were too noisy and too binary for the kind of smooth scaffold generation we needed.
We learned that biomedical AI often requires data rectification before training. The useful information in the data has to be separated from the artefacts. For us, that meant using real Micro-CT data to extract biological design parameters, then using those parameters to generate a cleaner synthetic training environment.
Data engineering was central to the project
Before building Synapse-Vis, it was easy to think that the neural network would be the main challenge. But the model only improved after we fixed what it was learning from. Creating a domain-informed synthetic dataset became one of the most important parts of the project.
This taught us that dataset design is not a background task. In many AI systems, especially in healthcare and biomedical engineering, it is the foundation of the entire solution.
Biology is continuous, computers are discrete
A recurring theme in the project was the gap between biological structures and computational representations. Bone does not grow in hard voxel blocks, but our models and meshes often start from grids, thresholds, and binary labels.
Once we shifted to soft scalar fields and smoother geometric representations, the outputs improved significantly. The lesson was not just technical. It changed how we thought about the problem: instead of forcing biology into a rigid digital format, we needed to design a representation that respected its continuity.
A VAE and GAN solve different problems
We also learned why the hybrid architecture mattered. The VAE gave us a structured latent space and allowed us to control porosity. The GAN discriminator improved geometric sharpness and discouraged the model from producing overly smooth or averaged scaffolds.
A VAE alone was more controllable but less visually sharp. A GAN alone would have been harder to control. Together, they gave us a better balance between reliability and realism.
Validation should be part of generation
At first, validation was something we treated as a separate step after generation. Later, we realised it needed to be part of the generation loop itself. If a scaffold does not meet the required biological constraints, the user should not have to manually inspect it and reject it.
By turning validation into a gate, we made the system more useful. The platform does not just generate a scaffold; it generates, checks, rejects if needed, and only returns a design that passes the core criteria.
The hardest part is translating biology into geometry
Biomedical researchers often know the targets they care about: porosity, pore size, connectivity, and surface area. The hard part is translating those numbers into a printable 3D structure. Synapse-Vis taught us that AI can be especially useful in this translation step.
The goal is not to replace the engineer. The goal is to remove the repetitive geometry-building work so the engineer can focus on design decisions and biological outcomes.
What’s next for Synapse-Vis
More TPMS families
Right now, the system is built around Gyroid-style TPMS structures. The next step is to add more TPMS families such as Schwarz Diamond, P-Surface, and Neovius lattices. This would give users a wider design space and allow them to compare different scaffold architectures.
Finite Element Analysis integration
The current platform focuses mainly on biological and topological validation. For clinical translation, mechanical strength is just as important. We want to integrate Finite Element Analysis so users can estimate stress distribution and mechanical performance before printing.
Spatial density gradients
Natural bone is not uniform. It often transitions from porous cancellous bone to denser cortical bone. A future version of Synapse-Vis could generate scaffolds with spatially varying porosity, allowing different regions of the scaffold to serve different mechanical and biological functions.
Curated Micro-CT data expansion
Our current approach uses Micro-CT data to extract biological parameters and calibrate synthetic scaffold generation. In the future, we want to expand this with larger curated Micro-CT datasets from biomedical repositories. The goal would be to capture more variation across bone types, anatomical sites, and patient conditions while still maintaining clean and printable output geometry.
Browser-native mechanical preview
We also want to add a lightweight stress visualisation layer directly inside the Three.js viewer. This would allow users to see potential weak regions or stress concentrations without leaving the browser.
Final note
Synapse-Vis is our attempt to bring AI, geometry, and biology into the same design loop. The project started as a scaffold generator, but it became a lesson in data quality, representation, and validation. We learned that building useful biomedical AI is not just about making a model generate something impressive. It is about making sure the model learns from the right data, produces geometry that can actually be used, and validates the result against the biological problem it is meant to solve.
Log in or sign up for Devpost to join the conversation.