FiftyOne Integration
Export a Pixeltable image column to a Voxel51 FiftyOne dataset, including ViT classifications and DETR detections, then open the FiftyOne App.
Challenge
FiftyOne is a dataset app: browse stills, overlay detections, compare label sets. Pixeltable is the table that stores those stills and runs models as columns. They meet at export. A folder of JPEGs plus a JSON of boxes is what you would otherwise assemble by hand. Pixeltable already has the image, the ViT dict, and the DETR boxes. The integration is pxt.io.export_images_as_fo_dataset, which builds a FiftyOne Dataset from one image expression plus optional classification and detection expressions. It is not a second store and not a replacement for the FiftyOne App.
Solution
pip install pixeltable fiftyone torch transformers timm. Declare an Image column, optional vit_for_image_classification and detr_for_object_detection columns, then map those JSON blobs into the list-of-dicts FiftyOne expects (label plus confidence; detections also need bounding_box as relative x, y, w, h). Call export_images_as_fo_dataset(table, image_expr, classifications=..., detections=...) and fo.launch_app(dataset). Images already on disk export in their stored format; frames that exist only as iterator output are written first. Multiple DETR checkpoints can be named dict keys so you compare them in one App session. Pixeltable vs Voxel51 is the product split: App for interactive curation, table for the production schema.
Integration Steps
Step 1 of 4Keep the file, the classification dict, and the detection dict on one row.
import pixeltable as pxtfrom pixeltable.functions.huggingface import (detr_for_object_detection,vit_for_image_classification,)TableModel = pxt.model_base()class Images(TableModel, name='images'):image: pxt.Imageclassifications = vit_for_image_classification(image, model_id='google/vit-base-patch16-224')detections = detr_for_object_detection(image, model_id='facebook/detr-resnet-50')# pxt schema update app.py fo_demo -f
💡 ViT must be a classification checkpoint, not a feature-extraction-only id. DETR boxes are absolute [x1, y1, x2, y2] in pixels. FiftyOne wants relative [x, y, w, h], so the next step converts them.
Key Benefits
Use Cases
Technical Requirements
Related articles
Ready to Integrate FiftyOne?
Get started with Pixeltable and FiftyOne in minutes.
pip install pixeltable