voxel51 / fiftyone

Refine high-quality datasets and visual AI models
https://fiftyone.ai
Apache License 2.0
8.89k stars 563 forks source link

[BUG] Load model prediction in custom dataset to fiftyone #1435

Closed an99990 closed 3 years ago

an99990 commented 3 years ago

Instructions

This is more of a question than a bug report. But i would like to know how can i export my model prediction/weights to fiftyone. Once i finish training my model, Yolov4, a weight file is generated. Is it possible to load a yolov4 model in fiftyone and predict the classes and display them in fifty one ? If so, how do I proceed ?

Thank you

brimoor commented 3 years ago

FiftyOne doesn't store model weights, but you can certainly update your training loop to add model predictions to a FiftyOne dataset so you can analyze the model with respect to ground truth annotations, per-epoch, etc.

This recipe shows an example of adding model predictions to a FiftyOne dataset.

an99990 commented 2 years ago

what if i have a json file with all the prediction. Is there a way to export the prediciton in fiftyone ? @brimoor thank you

brimoor commented 2 years ago

If the predictions are in a standard format that we support, like COCO format for example, then you can load them into FiftyOne in one line of code by following the patterns shown in these links.

If your predictions are stored in a custom format, then you can write a simple Python loop to load them into FiftyOne, or if you use a particular format often and want a clean way to load predictions in one line (like COCO format above), then you can write a custom importer.

an99990 commented 2 years ago

Tank you. My predictions are stored in a json file with yolov4 format. Could you pleas provide me the link to load predictions, i was not able to find them. The one that you link are the links to load dataset with supported format. Thank you

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Brian Moore @.> Sent: Thursday, November 25, 2021 5:49:30 PM To: voxel51/fiftyone @.> Cc: an99990 @.>; Author @.> Subject: Re: [voxel51/fiftyone] [BUG] Load model prediction in custom dataset to fiftyone (Issue #1435)

If the predictions are in a standard format that we supporthttps://www.google.com/url?q=https://voxel51.com/docs/fiftyone/user_guide/dataset_creation/datasets.html&source=gmail-imap&ust=1638485372000000&usg=AOvVaw2j_uyk1YJNfo47Awui0j48, like COCO formathttps://www.google.com/url?q=https://voxel51.com/docs/fiftyone/user_guide/dataset_creation/datasets.html%23cocodetectiondataset&source=gmail-imap&ust=1638485372000000&usg=AOvVaw2_sATyBHTId8AQTDdsx6fa for example, then you can load them into FiftyOne in one line of code by following the patterns shown in these links.

If your predictions are stored in a custom format, then you can write a simple Python loophttps://www.google.com/url?q=https://voxel51.com/docs/fiftyone/user_guide/dataset_creation/index.html%23custom-formats&source=gmail-imap&ust=1638485372000000&usg=AOvVaw1ahfL34efMuVPu8ilNbplI to load them into FiftyOne, or if you use a particular format often and want a clean way to load predictions in one line (like COCO format above), then you can write a custom importerhttps://www.google.com/url?q=https://voxel51.com/docs/fiftyone/recipes/custom_importer.html&source=gmail-imap&ust=1638485372000000&usg=AOvVaw0-8e-jyQsuihIeIMq4hku5.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://www.google.com/url?q=https://github.com/voxel51/fiftyone/issues/1435%23issuecomment-979504367&source=gmail-imap&ust=1638485372000000&usg=AOvVaw1IfM7VzL8BL-yveW7f7nDf, or unsubscribehttps://www.google.com/url?q=https://github.com/notifications/unsubscribe-auth/AUX7UXPN42HCAWZNF26CSLLUN24PVANCNFSM5IKK6J2Q&source=gmail-imap&ust=1638485372000000&usg=AOvVaw1X2TcEcQpfoq987oMx0co2. Triage notifications on the go with GitHub Mobile for iOShttps://www.google.com/url?q=https://apps.apple.com/app/apple-store/id1477376905?ct%3Dnotification-email%26mt%3D8%26pt%3D524675&source=gmail-imap&ust=1638485372000000&usg=AOvVaw2F9qLFgh6dlEum7QNHCNG3 or Androidhttps://www.google.com/url?q=https://play.google.com/store/apps/details?id%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&source=gmail-imap&ust=1638485372000000&usg=AOvVaw3mhJjcc9RHDJ4o3ceHv66p.

brimoor commented 2 years ago

https://voxel51.com/docs/fiftyone/user_guide/dataset_creation/datasets.html#yolov4dataset