Skip to main content
AngleForge re-renders your images from new camera angles using the Qwen Image Edit multi-angle model, so you can turn inconsistent real-world captures into a visually consistent dataset (for example, a cubes dataset normalized to a camera-aligned 45° viewpoint). It ships two ways:
  • A public Hugging Face Space you can use interactively or call as an API (great for robotic-arm capture rigs).
  • An Edge Impulse custom synthetic data block that normalises the images already in your project to a single, consistent angle — the source is public at github.com/edgeimpulse/AngleForge.
This integration is part of the broader Edge Impulse on Hugging Face landing page, which collects impulses running in WebAssembly (WASM) alongside dataset generators like this one.

Why normalise camera angles?

When you collect training images by hand — phones, webcams, a robotic-arm camera, different operators — the same object shows up at wildly different viewpoints. That variation is often noise, not signal: for a fixed inspection station you really want every sample from the same canonical angle so the model learns the object (for example, cube faces), not the camera pose. AngleForge uses Qwen Image Edit to re-photograph each object from a chosen viewpoint. You can:
  • Normalise an existing dataset to one consistent angle (the Edge Impulse block).
  • Expand one capture into many viewpoints to bootstrap perception before you have real data (the Space’s grab_viewpoints API).
This pattern is not just for one demo. It is a practical data-engineering step you can apply before training: normalize viewpoint, reduce capture bias, and align your dataset to the real camera geometry used in production.
AngleForge runs the real Qwen Image Edit model on Hugging Face ZeroGPU, so neither the Space nor the Edge Impulse block needs a local GPU. The model stack is Qwen/Qwen-Image-Edit-2509 with the linoyts/Qwen-Image-Edit-Rapid-AIO transformer and the dx8152/Qwen-Edit-2509-Multiple-angles LoRA.

How the Edge Impulse block works

The AngleForge block is a custom synthetic data block running in standalone mode. For every image already in your project it lists the sample, downloads it, sends it to the AngleForge Space for the target angle, and uploads the re-rendered copy back through the Ingestion API so it previews on the Synthetic data tab. Your original samples are never modified. Normalised copies are added with a generated_by=angleforge metadata tag and a label.angle_<angle>.<id>.png filename so they are easy to find or remove later.

Prerequisites

Part 1 — Try AngleForge in the Space

Before wiring it into Edge Impulse, get a feel for the model in the Space.

Quick cubes example

If you are following the same setup as the blog post, use a conveyor-belt cubes workflow:
  1. Capture a handful of cube photos from mixed viewpoints.
  2. In AngleForge, choose a 45° target (for example rotate_left_45) to match your robotic-arm camera.
  3. Generate normalized views and confirm the cube orientation is consistent.
  4. Upload to Edge Impulse and train with the cleaner 45°-normalized set.
This gives you a direct before/after comparison of “mixed camera angles” vs “normalized 45° cubes”.
  1. Open the 🤖 Grab viewpoints tab.
  2. Upload one source image.
  3. Pick one or more angles (top-down, bird’s-eye, rotations, close-up, …).
  4. Click Grab viewpoints and review the gallery.
Screenshot placeholder: add a capture of the Grab viewpoints tab once assets are finalized.

Part 2 — Add the synthetic data block to Edge Impulse

1. Get the block source

The repository contains everything the block needs:

2. Review the parameters

The block exposes these options on the Synthetic data tab (from parameters.json):
Edge Impulse automatically passes --synthetic-data-job-id to the block. transform.py forwards it as the x-synthetic-data-job-id header on every upload, which is what makes the generated samples preview live on the Synthetic data tab.

3. (Optional) Test the block locally

Synthetic data blocks are not supported by edge-impulse-blocks runner, so build and run the container directly. Use a project that already has a few images and pass the values Edge Impulse would normally inject:
Set the environment variables in your shell instead of pasting keys into commands or source control. Find your keys in Dashboard → Keys in Edge Impulse Studio.
You should see three of your training images (for example, cube samples) re-rendered at 45° and uploaded back to the project.

4. Push the block to Edge Impulse

From the repository folder, initialize and push:
The Hugging Face token is exposed as a secret parameter and can be left blank for the public Space.

5. Run it from the Synthetic data tab

  1. Open your project and go to Data acquisition → Synthetic data.
  2. Select the AngleForge block.
  3. Choose your Angle preset (for example, rotate_left_45 to match a downward-angled robotic arm), the Source and Upload categories, and optionally a label filter or Max images while you test.
  4. Click Generate data and watch the previews appear.
Screenshot placeholder: add a capture of an active Synthetic data run (with live previews).

6. Verify the normalised data

Go to Data acquisition and filter for the new samples (their filenames start with label.angle_<angle>.). Confirm the angle is consistent and the labels carried over, then retrain your impulse on the cleaner, consistent dataset.
Screenshot placeholder: add a capture of the normalized samples in Data acquisition.

Tips and best practices

  • Start small. Use Max images and a label filter to validate the look on a handful of samples before running the whole dataset.
  • Keep originals as a fallback. The block never edits your source samples, so you can compare models trained on raw vs. normalised data.
  • Pick one canonical angle per project. Match the production camera geometry first. If your arm camera sits at ~45° over a conveyor belt, normalize to rotate_left_45/rotate_right_45; use top_down when the real camera is truly overhead.
  • Validate against reality. Synthetic viewpoints are a great bootstrap, but confirm with real captures from your device’s own camera before deploying.
  • Mind the licenses. AngleForge is CC BY 4.0; verify your use of the underlying Qwen models complies with their licenses.

Troubleshooting

“This endpoint requires a project API Key” The Studio read endpoints reject organization keys. The block uses EI_PROJECT_API_KEY for both reading and ingestion — make sure a project key is set. No images processed Check that the Source category actually contains images, and that your label filter matches existing labels. The block only sees image data. Space is slow or busy ZeroGPU is shared. Re-run, lower the Output image size, or duplicate the Space onto your own hardware and point the AngleForge Space parameter at your copy. Private Space copy If you duplicated the Space and made it private, paste a Hugging Face token into the block’s Hugging Face token secret so it can authenticate.

Next steps

With a consistent dataset, build and deploy a model:

Additional resources