Comments (15)
from synthtext.
@cjnolet how about jaderberg's approach? where to find it ? thank you。。
from synthtext.
from synthtext.
@cjnolet please consider posting synopsis of your steps on github. Would be helpful.
from synthtext.
from synthtext.
Ankush,
I believe I have this network coded up in Keras how you described it in the paper. One thing that would be nice would be to know if I coded up the loss layer properly.
Would you mind providing some quick pseudocode in this ticket for how you determined the final loss and the weighted loss? I believe your final loss was multiplied by 0.01 if c == 0 (and also only the c values were used in the calculation of the loss by that point) where the weighting was increased during each epoch. If c == 1, I believe you calculated the loss as usual. Does this sound right?
Thank you!
from synthtext.
@Jayhello : We are in the process of sharing the FCRN; it might still take a few weeks.
@cjnolet : Your understanding of FCRN and the loss is correct. FCRN is a fully-convolutional network which takes in the whole image, and for each cell regresses a confidence score and bounding box dimensions.
The loss is again as you describe in your second comment: L2 loss on all parameters (confidence + bb-params); No loss on bb-params if c==0. Further, c==0 confidence score losses are weighed down initially (for balancing negatives against the small number of positives) and this weight is gradually increased to 1 during training. L2-loss on both confidence + bb-params for the positive cells.
from synthtext.
thank you very much! if you implement it , can you give us a noice?
from synthtext.
Certainly.
from synthtext.
I got the approval to release my Keras code for my FCRN + Loss Function and I've posted it here:
https://github.com/cjnolet/textbox_proposals_fcrn
I'm hoping maybe some of you that are wanting to use it could let me know if you think the math (given how Theano does the calculation of the gradients behind the scenes) looks correct. Ankush, I don't know if you are familiar with Keras but the loss function is right underneath the imports and it would be nice to get quick feedback from you as well.
If you want to use this, it assumes you have a directory of h5py dbs each with a group called "/data" and where each record's data is the numpy array of the (greyscaled) 512x512 input image and an attribute called "label" has a 16x16x7 tensor representing the training label. (Note it's 16x16x7 just because it was easier for me to create this and transpose it then it was to create the 7x16x16 from the start).
from synthtext.
Hi @cjnolet, thank you for this contribution!
I looked through the loss function; I haven't worked with Keras before, so I can only guess that you are discounting the loss on bounding box coordinates for the negative cells here. Is this correct?
Only the "score" loss on the negatives should be discounted, and the bounding box loss for negatives should be ignored.
Again, thanks for sharing.
from synthtext.
from synthtext.
Thanks @cjnolet. Good to know that it is training with this loss.
Can you please help me understand the code again:
c = y_true[i, 6, :,:].reshape((1, delta, delta)) # The last feature map in the true vals is the 'c' matrix
final_c = (c * loss[i,6,:,:])
c = T.set_subtensor(c[(c<=0.0).nonzero()], d.get_value())
# Element-wise multiply of the c feature map against all feature maps in the loss
final_loss_parts = [(c * loss[i, j, :, :].reshape((1, delta, delta))).reshape((1, delta, delta)) for j in range(0, 6)]
- On line 2 above, you multiply
c
with the final channel of the loss (i.e., score), which zeros out score-loss for the negatives. Shouldn't you multiply with the discount factor (d
in your code) instead ? Note that the negatives inc
are set to the discount factor only later in line 3 above. - On line 4 you multiply the bounding-box losses corresponding to the negatives with
d
. Shouldn't you multiply with 0 (or justc
)?
from synthtext.
from synthtext.
Thank you for the clarification, and again for sharing your code!
from synthtext.
Related Issues (20)
- Changing text render areas HOT 1
- Generator gives bad result HOT 4
- Ground truth file HOT 3
- results/SynthText.h5
- Text database
- Generating just one word HOT 1
- Saving masks in folder HOT 1
- Pizda shaatsan how to get generated picture with text but without border ? HOT 1
- AssertionError and text placement parameters misunderstanding
- Incorrect visualization of bboxes HOT 5
- Negative value of word-level bounding-boxes in gt.mat
- Mask and bounding boxes HOT 4
- Downloading of SynthText Pre-generated Dataset HOT 8
- Undefined functions in predict_depth.m in prep_scripts HOT 3
- Anyone know how to disable mirrored/backwards text? HOT 1
- zero-size array
- Some special characters are not generated HOT 3
- Can you generate a composite image consisting entirely of '+', '-', numbers, and decimal points?
- Do you have a non torrent download address? I would like to obtain the depth and seg of SynthText, as well as the original image file HOT 1
- Incorrect BBoxes
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from synthtext.