shkarupa-alex / tfswin Goto Github PK
View Code? Open in Web Editor NEWKeras (TensorFlow v2) reimplementation of Swin Transformer V1 and V2 models
License: MIT License
Keras (TensorFlow v2) reimplementation of Swin Transformer V1 and V2 models
License: MIT License
Hi and thank you for this amazing work. I was wondering if the models are compatible with Colab TPU since the training fails with error " Socket closed".
I am trying to use this repo and tried Evaluation code(https://github.com/shkarupa-alex/tfswin#evaluation), written on readme, for 1st step. However, the result returns accuracy=0.001 as follows.
1250/1250 [==============================] - 172s 127ms/step - loss: nan - accuracy: 0.0010 - sparse_top_k_categorical_accuracy: 0.0000e+00
[nan, 0.0010000000474974513, 0.0]
I read model.py and find "load wights" so I thought that Evaluation code returns around 70% acc., like table attached on Evaluation section. And I found imagenet_v2 download is success, I can see some jpeg img on imagenet_V2 dir, created by Evaluation code.
imagenet2 = tfds.load('imagenet_v2', split='test', shuffle_files=True)
My question is, how to get the result like the table on evaluation section? (and what is the point I was wrong with getting acc=0.001? )
Here is a Dockerfile I created and used for this repo (sry idk how to attach Dockerfile so it change to txt file)
Dockerfile_tfswin.txt
docker run \ --gpus all \ -it -e \ TF_FORCE_GPU_ALLOW_GROWTH=true \ -v $MOUNT_DATA:/root/data \ -v $MOUNT_DIR:/root/scripts \ -v /tmp/.X11-unix:/tmp/.X11-unix \ -p 6060:6060 \ --env="DISPLAY" \ --name tfswin \ --rm tfswin \ bash
and Evaluation code I used (copy&paste from evaluation section on readme, and just change model name) (for same reason with Dockerfile, I change py to txt)
test_tfswin.txt
Thank you!
Hi, does the SwinTransformer v2 do SimMiM pretraining? This is shown in the paper:
https://arxiv.org/pdf/2111.09883.pdf
If not, any plans to add/how difficult would it be to port?
I tried to use different input size such as 256 x 256 x 11 and use the pretrained weights. It did not work. Any help on this.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.