Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

Commit

Permalink
Merge 1722a53 into c7017a3
Browse files Browse the repository at this point in the history
  • Loading branch information
colah committed Aug 8, 2018
2 parents c7017a3 + 1722a53 commit 7f6c0db
Show file tree
Hide file tree
Showing 9 changed files with 316 additions and 320 deletions.
6 changes: 4 additions & 2 deletions lucid/modelzoo/caffe_models/AlexNet.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ class AlexNet_caffe(Model):
# http://jaina.cs.ucdavis.edu/datasets/adv/imagenet/alexnet_frozen.pb
# but it seems more polite and reliable to host our own.
model_path = 'gs://modelzoo/AlexNet.pb'
labels_path = 'gs://modelzoo/ImageNet_labels_caffe.txt'
labels_path = 'gs://modelzoo/labels/ImageNet_standard.txt'
dataset = 'ImageNet'
image_shape = [227, 227, 3]
is_BGR = True
image_value_range = (-IMAGENET_MEAN_BGR, 255-IMAGENET_MEAN_BGR)
Expand All @@ -60,7 +61,8 @@ class AlexNet_caffe_Places365(Model):
"""

model_path = 'gs://modelzoo/AlexNet_caffe_places365.pb'
labels_path = 'gs://modelzoo/InceptionV1_caffe_places365-labels.txt'
labels_path = 'gs://modelzoo/labels/Places365.txt'
dataset = 'Places365'
image_shape = [227, 227, 3]
is_BGR = True
image_value_range = (-IMAGENET_MEAN_BGR, 255-IMAGENET_MEAN_BGR)
Expand Down
14 changes: 8 additions & 6 deletions lucid/modelzoo/caffe_models/InceptionV1.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class InceptionV1_caffe(Model):
and then ported to TensorFlow using caffe-tensorflow.
"""
model_path = 'gs://modelzoo/InceptionV1_caffe.pb'
labels_path = 'gs://modelzoo/InceptionV1_caffe-labels.txt'
labels_path = 'gs://modelzoo/labels/ImageNet_standard.txt'
dataset = 'ImageNet'
image_shape = [224, 224, 3]
is_BGR = True
image_value_range = (-IMAGENET_MEAN_BGR, 255-IMAGENET_MEAN_BGR)
Expand Down Expand Up @@ -60,10 +61,11 @@ class InceptionV1_caffe_Places205(Model):
and then ported to TensorFlow using caffe-tensorflow.
"""
model_path = 'gs://modelzoo/InceptionV1_caffe_places205.pb'
labels_path = 'gs://modelzoo/InceptionV1_caffe_places205-labels.txt'
labels_path = 'gs://modelzoo/labels/Places205.txt'
dataset = 'Places205'
image_shape = [224, 224, 3]
# range based on emperical testing
image_value_range = (-1,1)
is_BGR = True
image_value_range = (-IMAGENET_MEAN_BGR, 255-IMAGENET_MEAN_BGR)
input_name = 'data'

layers = [
Expand Down Expand Up @@ -93,8 +95,8 @@ class InceptionV1_caffe_Places365(Model):
and then ported to TensorFlow using caffe-tensorflow.
"""
model_path = 'gs://modelzoo/InceptionV1_caffe_places365.pb'
# TODO - check labels match predictions
labels_path = 'gs://modelzoo/InceptionV1_caffe_places365-labels.txt'
labels_path = 'gs://modelzoo/labels/Places365.txt'
dataset = 'Places365'
image_shape = [224, 224, 3]
# What is the correct input range???
is_BGR = True
Expand Down
9 changes: 6 additions & 3 deletions lucid/modelzoo/caffe_models/others.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ class CaffeNet_caffe(Model):
"""

model_path = 'gs://modelzoo/CaffeNet_caffe.pb'
labels_path = 'gs://modelzoo/ImageNet_labels_caffe.txt'
labels_path = 'gs://modelzoo/labels/ImageNet_standard.txt'
dataset = 'ImageNet'
image_shape = [227, 227, 3]
is_BGR = True
image_value_range = (-IMAGENET_MEAN_BGR, 255-IMAGENET_MEAN_BGR)
Expand All @@ -51,7 +52,8 @@ class VGG16_caffe(Model):
and convert it with caffe-tensorflow.
"""
model_path = 'gs://modelzoo/VGG16_caffe.pb'
labels_path = 'gs://modelzoo/InceptionV1_caffe-labels.txt'
labels_path = 'gs://modelzoo/labels/ImageNet_standard.txt'
dataset = 'ImageNet'
image_shape = [224, 224, 3]
is_BGR = True
image_value_range = (-IMAGENET_MEAN_BGR, 255-IMAGENET_MEAN_BGR)
Expand Down Expand Up @@ -89,7 +91,8 @@ class VGG19_caffe(Model):
and convert it with caffe-tensorflow.
"""
model_path = 'gs://modelzoo/VGG19_caffe.pb'
labels_path = 'gs://modelzoo/InceptionV1_caffe-labels.txt'
labels_path = 'gs://modelzoo/labels/ImageNet_standard.txt'
dataset = 'ImageNet'
image_shape = [224, 224, 3]
is_BGR = True
image_value_range = (-IMAGENET_MEAN_BGR, 255-IMAGENET_MEAN_BGR)
Expand Down
3 changes: 2 additions & 1 deletion lucid/modelzoo/other_models/InceptionV1.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ class InceptionV1(Model):
minor implementation differences (such as eliding the heads).
"""
model_path = 'gs://modelzoo/InceptionV1.pb'
labels_path = 'gs://modelzoo/InceptionV1-labels.txt'
labels_path = 'gs://modelzoo/labels/ImageNet_alternate.txt'
dataset = 'ImageNet'
image_shape = [224, 224, 3]
image_value_range = (-117, 255-117)
input_name = 'input:0'
Expand Down
15 changes: 10 additions & 5 deletions lucid/modelzoo/slim_models/Inception.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ class InceptionV1_slim(Model):
"""

model_path = 'gs://modelzoo/InceptionV1_slim.pb'
labels_path = 'gs://modelzoo/InceptionV1-labels.txt' #TODO
labels_path = 'gs://modelzoo/labels/ImageNet_standard_with_dummy.txt'
dataset = 'ImageNet'
image_shape = [224, 224, 3]
# inpute range taken from:
# https://github.com/tensorflow/models/blob/master/research/slim/preprocessing/inception_preprocessing.py#L280
Expand Down Expand Up @@ -63,7 +64,8 @@ class InceptionV2_slim(Model):
"""

model_path = 'gs://modelzoo/InceptionV2_slim.pb'
labels_path = 'gs://modelzoo/InceptionV1-labels.txt' #TODO
labels_path = 'gs://modelzoo/labels/ImageNet_standard_with_dummy.txt'
dataset = 'ImageNet'
image_shape = [224, 224, 3]
# inpute range taken from:
# https://github.com/tensorflow/models/blob/master/research/slim/preprocessing/inception_preprocessing.py#L280
Expand Down Expand Up @@ -99,7 +101,8 @@ class InceptionV3_slim(Model):
"""

model_path = 'gs://modelzoo/InceptionV3_slim.pb'
labels_path = 'gs://modelzoo/InceptionV1-labels.txt'
labels_path = 'gs://modelzoo/labels/ImageNet_standard_with_dummy.txt'
dataset = 'ImageNet'
image_shape = [299, 299, 3]
# inpute range taken from:
# https://github.com/tensorflow/models/blob/master/research/slim/preprocessing/inception_preprocessing.py#L280
Expand Down Expand Up @@ -138,7 +141,8 @@ class InceptionV4_slim(Model):
"""

model_path = 'gs://modelzoo/InceptionV4_slim.pb'
labels_path = 'gs://modelzoo/InceptionV1-labels.txt' #TODO
labels_path = 'gs://modelzoo/labels/ImageNet_standard_with_dummy.txt'
dataset = 'ImageNet'
image_shape = [299, 299, 3]
# inpute range taken from:
# https://github.com/tensorflow/models/blob/master/research/slim/preprocessing/inception_preprocessing.py#L280
Expand Down Expand Up @@ -183,7 +187,8 @@ class InceptionResnetV2_slim(Model):
"""

model_path = 'gs://modelzoo/InceptionResnetV2_slim.pb'
labels_path = 'gs://modelzoo/InceptionV1-labels.txt' #TODO
labels_path = 'gs://modelzoo/labels/ImageNet_standard_with_dummy.txt'
dataset = 'ImageNet'
image_shape = [299, 299, 3]
# inpute range taken from:
# https://github.com/tensorflow/models/blob/master/research/slim/preprocessing/inception_preprocessing.py#L280
Expand Down

0 comments on commit 7f6c0db

Please sign in to comment.