Closed christinazavou closed 1 year ago
Hi @christinazavou, Thank you for your interest in the paper and your kind words.
Please have a look at the following comments which I hope answer your questions:
edf_01_tcp_ar
’s channels. What we mean by “based on an analysis of the duration of the majority of artifacts” is: We decided to consider a signal duration of 10s since by analyzing the duration of each artifact in the dataset, we saw that the majority of them last less than 10s. It’s mainly to justify the signal length decision. So your understanding is correct.As you have described, you need the padding details to proceed. Our implementation is based on the temporal U-Net proposed by Perslev et al. where for the encoder and decoder convolutions they use the TensorFlow padding=“same”. For PyTorch it looks something like this:
class Conv1d_padding_same(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, dilation=1, stride=1):
super().__init__()
self.padding = math.ceil((1 - stride + dilation * (kernel_size - 1)) / 2)
self.cut_last = (kernel_size % 2 == 0 and dilation % 2 == 1)
self.conv = nn.Conv1d(in_channels, out_channels, kernel_size, padding=self.padding, dilation=dilation, stride=stride)
def forward(self, x):
if self.cut_last:
return self.conv(x)[:, :, :-1]
else:
return self.conv(x)
For the encoder/decoder Conv1d_padding_same, kernel_size=4 and stride=1 are used. Instead, for the exit and final output blocks, padding=0 and kernel_size=1 are used. This should hopefully solve the shaping issues.
Hello, thanks for sharing the code and all your great work:)
I'm trying to replicate the work in "High Frequency EEG Artifact Detection with Uncertainty via Early Exit Paradigm" which is using the early-exit paradigm as well, and I run into some questions. Since this code is open sourced I'm asking them here so more people interested in it can follow.
You are using TUH Artifact v2.0.0. In that version the labels are given per bipolar channel (e.g. the tcp_ar_01 montage has 22 channels). Which data have you used? The ones coming from each of the 22 channels from tcp_ar_01? Also, you mention the data are selected "based on an analysis of the duration of the majority of artifacts" ... could you please clarify what do you mean? I would think that you take for example 10 sec segments where artifact appeared for at least 1 sec .. did you do something similar?
Regarding the implementation, in table 2 the exit block shows an Upsample followed by a Conv1D ... but in fig. 2 the exit block is represented by a Conv1d, an Activation and a second Conv1d. Which one is the correct?
Some minor implementation details (please correct me if I'm wrong):
thanks in advance, christina