-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
run capsnet with New dataset,Can you help me, please? #23
Comments
@IreneTa - I am attempting to solve a similar problem with image size 256*256. Were you able to find the solution with right parameters? If yes, possible to shred some light on how you approached the solution? |
@IreneTa @koushikkumarl Regards, |
Hi David, I couldn't find a solution with TF2.0 CapsNets code. I instead made use of TF1.15 CapsNets code and implemented it on the dataset. I was able to make change to image, to any required pixel size. Please see if the below link can be of any help to you. I've taken the capsule network source code from https://github.com/XifengGuo/CapsNet-Keras and made required modifications for end to end implementation. Regards, |
Hi Koushik,
Thanks for the response and great work by the way. Did you have to modify
the source code much or was it mainly converting your images to fit the
model ? My images are 600 x 600 x 3
Regards,
David
…On Thu, Jan 7, 2021 at 10:24 AM koushikkumarl ***@***.***> wrote:
@IreneTa <https://github.com/IreneTa> @koushikkumarl
<https://github.com/koushikkumarl>
Hey Guys, I too am having some troble trying to run the diffent image
sizes. did anyone find a soultion ?
Regards,
David
Hi David,
I couldn't find a solution with TF2.0 CapsNets code. I instead made use of
TF1.15 CapsNets code and implemented it on the dataset. I was able to make
change to image, to any required pixel size. Please see if the below link
can be of any help to you.
https://github.com/koushikkumarl/capsuleNetwork_cancerclassification
I've taken the capsule network source code from
https://github.com/XifengGuo/CapsNet-Keras and made required
modifications for end to end implementation.
Regards,
Koushik
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARI4Y4RBBSOAHXBJVZ3LSOTSYWDUVANCNFSM4N7VTSGA>
.
|
Hi David, I've observed only one place where we can provide the input image size to mode - in method '_build_inputs(self)' The input here is reshaped further and provided as input to the model. Though I traced back and tried to make required changes, I always ended up with errors appearing either in conv_caps_layer or routing methods. You can also refer to an implementation from Parth, he worked on capsnets on TF 2.0 or above - link: https://medium.com/@parthdedhia/hi-koushik-i-have-tried-implementing-the-capsule-network-for-cifar-10-dataset-with-32x32x3-input-44df862890a1 Hope this helps. 👍 If you have further queries, please feel free to reach me on [email protected] Regards, |
I ran my dataset on a capsule network. My image size is 224 * 224. I modified caps_ 2_ vec_ Len and upsample3= tf.image.resize_ nearest_ Neighbor (conv2, (224, 224)) and data_ handler, I'm a novice. I don't understand the code very well. Is there anything else in the _build_decoder decoder that needs to be modified?
`fc1 = tf.contrib.layers.fully_connected(capsule_vector, num_outputs=400)
fc1 = tf.reshape(fc1, shape=(batch_size, 5, 5, 16))
upsample1 = tf.image.resize_nearest_neighbor(fc1, (8, 8))
conv1 = tf.layers.conv2d(upsample1, 4, (3,3), padding='same', activation=tf.nn.relu)
`
The text was updated successfully, but these errors were encountered: