Skip to content
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

Code issues #5

Open
kalpa61 opened this issue Sep 28, 2024 · 0 comments
Open

Code issues #5

kalpa61 opened this issue Sep 28, 2024 · 0 comments

Comments

@kalpa61
Copy link

kalpa61 commented Sep 28, 2024

hi, you did a great job, but I ran into some problems when I tried to reproduce it. First, there was something wrong with the code in casmeii.py, and it wouldn't work without some changes, so I made some changes, as follows:

    if self.phase=='train':
        image_on = cv2.cvtColor(image_on0, cv2.COLOR_BGR2GRAY)
        image_apex = cv2.cvtColor(image_apex0, cv2.COLOR_BGR2GRAY)
        flow_1 = cv2.calcOpticalFlowFarneback(image_on, image_apex, None, 0.5, 3, 15, 3, 5, 1.2, 0)
        label = self.label[idx]
        flow_1 = self.transform_flow(flow_1)
        image_on0 = self.transform_onset(image_on0)
        if self.transform_aug is not None:
            flow_1 = self.transform_aug(flow_1)
            image_on0 = self.transform_aug(image_on0)
        return flow_1, image_on0, label
    else:
        image_on = cv2.cvtColor(image_on0, cv2.COLOR_BGR2GRAY)
        image_apex = cv2.cvtColor(image_apex0, cv2.COLOR_BGR2GRAY)
        flow_1 = cv2.calcOpticalFlowFarneback(image_on, image_apex, None, 0.5, 3, 15, 3, 5, 1.2, 0)
        label = self.label[idx]
        flow_1 = self.transform_flow(flow_1)
        image_on0 = self.transform_onset(image_on0)
        if self.transform_aug is not None:
            #flow_1 = self.transform_aug(flow_1)
            image_on0 = self.transform_aug(image_on0)
            image_apex0 = self.transform_aug(image_apex0)
        return flow_1,image_on0,label

Secondly, the training result is very unsatisfactory. The Acc of casme2 dataset is only 77% when it is trained under the condition of 5 classification. I am very confused about the problem, and my training environment is python3.8 + torch 2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant