-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add: DETR: End-to-End Object Detection with Transformers #832
Conversation
Thanks for the update. The example is now very long (4,300 lines) and the code remains very frameworkey (lots of config related logic). We should aim at a ~300 lines example, e.g. ~50 lines for data loading / preprocessing, ~50 lines of utilities, 150 lines of model definition, 50 lines for fine-tuning / inference. Does that sound realistic for this model, or is that not possible? |
Thanks for your time and attention. To reduce the lines of code, I must clone the repo or get some of the .py files using wget. Is one of these solutions convenient? |
Are you able to recreate a very simple re-implementation of the model from scratch in a small amount of code? |
This example uses a pre-trained model. If I build a new one, I must train it from scratch. I guess that takes a long time. I'm going to try to do that but I'm not sure it's possible or not. By the way, I've prepared an EEG Signal Classification example, could you please take a look at it? I've accidentally included it in this PR. Thank you so much! |
You could simply download a weights file and load it into the model.
Nice! I've taken a look. One important point is that we should focus the example on techniques that are specific to EEG signals, so we shouldn't just apply a Dense network to the raw signal. We should do signal processing. The key characteristic of EEG signals is that they vary from person to person, so you need to do domain adaption (from one person to the next) to classify effectively. How about you find a recent paper on the subject and you try to reimplement it? |
Thank you so much for your reply! (And I'm so sorry for my late reply, I'm an undergrad student who has lots of quizzes and assignments) I'm working on them. |
Ok, sounds good! Please let me know when you have something you'd like me to review. |
I've reduced lines of code to almost 1100 lines (this is my best), tutobooks.py script increased it to 1935 lines. Thank you so much!
I've reduced lines of code to almost 1100 lines (this is my best), tutobooks.py script increased it to 1935 lines. Thank you so much! |
The script will simply apply To count the actual number of lines of code, you can use In the meantime, we've published this example: https://keras.io/examples/vision/object_detection_using_vision_transformer/ -- did you check it out? |
Oh, I am so sorry. I didn’t see that. |
I've accidentally deleted the PR, so sorry about that.
I've prepared a new one from scratch that shows how to load a custom dataset and fine-tune the pre-trained model. Codes are copied from the repo with some modifications. I don't clone the repo, have copied the necessary python modules and edited them to run them on jupyter notebook. Could you please let me know whether this one is suitable or not?
Thank you so much!