-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
44 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import fiftyone as fo | ||
import fiftyone.zoo as foz | ||
import fiftyone.brain as fob | ||
from sympy.core.random import shuffle | ||
|
||
dataset_name = "photo_album" | ||
|
||
if __name__ == "__main__": | ||
print("starting") | ||
dataset = fo.load_dataset(dataset_name) | ||
# A DatasetView is a shallow copy of the original dataset.This means, | ||
# if your dataset is persisted, any data or schema changes to the view will be persisted to the original dataset. | ||
# If you don't want to affect the original dataset you must make the view a clone of the original data. | ||
shuffle_view = dataset.shuffle() | ||
training_view = shuffle_view[0:300].clone() | ||
training_view.save() | ||
|
||
print("finished") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import fiftyone as fo | ||
import fiftyone.zoo as foz | ||
import fiftyone.brain as fob | ||
|
||
from imageio.plugins.ffmpeg import download | ||
|
||
dataset_name = "training_data" | ||
# model = foz.load_zoo_model("faster-rcnn-resnet50-fpn-coco-torch") | ||
# samples.compute_embeddings(model, embeddings_field="embeddings") | ||
|
||
if __name__ == "__main__": | ||
|
||
training_view = fo.load_dataset("training_data") | ||
|
||
model = foz.load_zoo_model('resnet101-imagenet-torch') | ||
fob.compute_visualization(training_view, model=model, embeddings="sresnet101_imagenet", | ||
brain_key="resnet101_imagenet_embed") | ||
|
||
model2 = foz.load_zoo_model("vgg11-bn-imagenet-torch") | ||
fob.compute_visualization(training_view, model=model2, embeddings="fvgg11_bn", brain_key="vgg11_bn_embed") | ||
|
||
session = fo.launch_app(dataset) | ||
session.wait() | ||
|
||
print("done") |
This file was deleted.
Oops, something went wrong.