Git Product home page Git Product logo

Comments (13)

silvercherry avatar silvercherry commented on September 26, 2024

想问一下,您在做这个两个跨集实验的实验的时候,使用到了全集还是train的文件,如果可以的话,可以细致交流吗?我的邮箱[email protected]

from cdcn.

lz28lz28 avatar lz28lz28 commented on September 26, 2024

想问一下,您在做这个两个跨集实验的实验的时候,使用到了全集还是train的文件,如果可以的话,可以细致交流吗?我的邮箱[email protected]

您好,我跨库训练时使用的是train文件,测试用各自的test

from cdcn.

silvercherry avatar silvercherry commented on September 26, 2024

想问一下,您在做这个两个跨集实验的实验的时候,使用到了全集还是train的文件,如果可以的话,可以细致交流吗?我的邮箱[email protected]

您好,我跨库训练时使用的是train文件,测试用各自的test

当我用全集进行训练的时候 使用CDCN其中一个可以达到33,论文是32.6的结果,但是另一个差的很远,您能留个邮箱吗 方便交流

from cdcn.

lz28lz28 avatar lz28lz28 commented on September 26, 2024

想问一下,您在做这个两个跨集实验的实验的时候,使用到了全集还是train的文件,如果可以的话,可以细致交流吗?我的邮箱[email protected]

您好,我跨库训练时使用的是train文件,测试用各自的test

当我用全集进行训练的时候 使用CDCN其中一个可以达到33,论文是32.6的结果,但是另一个差的很远,您能留个邮箱吗 方便交流

您好,[email protected]这是我的邮箱,我也有些想和你交流交流

from cdcn.

punitha-valli avatar punitha-valli commented on September 26, 2024

@lz28lz28
@ZitongYu
@silvercherry

can you please explain to me about the map_dir, and the oulu_npu dataset has video, but as per the source code Train-images, Dev_images, Test_images are required.
Can you please explain it to me?

I am also a student, so it will be greatly helpful for me to do my research work.

can you please communicate with me, I tried a lot of ways to communicate with the author

thanks in advance

from cdcn.

lz28lz28 avatar lz28lz28 commented on September 26, 2024

@lz28lz28
@ZitongYu
@silvercherry

can you please explain to me about the map_dir, and the oulu_npu dataset has video, but as per the source code Train-images, Dev_images, Test_images are required.
Can you please explain it to me?

I am also a student, so it will be greatly helpful for me to do my research work.

can you please communicate with me, I tried a lot of ways to communicate with the author

thanks in advance

map dir就是存放图片的路径吧。oulu数据集是视频,自己要处理成图片的,每个视频进行帧提取

from cdcn.

punitha-valli avatar punitha-valli commented on September 26, 2024

from cdcn.

punitha-valli avatar punitha-valli commented on September 26, 2024

@lz28lz28
@ZitongYu
@silvercherry
can you please explain to me about the map_dir, and the oulu_npu dataset has video, but as per the source code Train-images, Dev_images, Test_images are required.
Can you please explain it to me?
I am also a student, so it will be greatly helpful for me to do my research work.
can you please communicate with me, I tried a lot of ways to communicate with the author
thanks in advance

map dir就是存放图片的路径吧。oulu数据集是视频,自己要处理成图片的,每个视频进行帧提取

Thank you so much, I am really happy about your replay.
So there is no need to pre-process the OULU dataset, can I directly feed
into the code?

train_image_dir = '/wrk/yuzitong/DONOTREMOVE/OULU/Train_images/'
val_image_dir = '/wrk/yuzitong/DONOTREMOVE/OULU/Dev_images/'
test_image_dir = '/wrk/yuzitong/DONOTREMOVE/OULU/Test_images/'
map_dir = '/wrk/yuzitong/DONOTREMOVE/OULU/IJCB_re/OULUtrain_images/'
val_map_dir = '/wrk/yuzitong/DONOTREMOVE/OULU/IJCB_re/OULUdev_images/'
test_map_dir = '/wrk/yuzitong/DONOTREMOVE/OULU/IJCB_re/OULUtest_images/'
train_list =
'/wrk/yuzitong/DONOTREMOVE/OULU/OULU_Protocols/Protocol_1/Train.txt'
val_list =
'/wrk/yuzitong/DONOTREMOVE/OULU/OULU_Protocols/Protocol_1/Dev.txt'
test_list = '/wrk/yuzitong/DONOTREMOVE/OULU/OULU_Protocols/Protocol_1/Test.txt'

Thus, the videos od OULU dataset should be in Train_image_dir,
Test_image_dir, Dev_image_dir and the protocol into Train_list, test_list,
val_list.

from cdcn.

punitha-valli avatar punitha-valli commented on September 26, 2024

@lz28lz28

Traceback (most recent call last):
File "/media/labpc/rename/face_antispoofing/CDCN-master/CVPR2020_paper_codes/train_CDCN.py", line 443, in
train_test()
File "/media/labpc/rename/face_antispoofing/CDCN-master/CVPR2020_paper_codes/train_CDCN.py", line 286, in train_test
for i, sample_batched in enumerate(dataloader_train):
File "/home/hermes/anaconda3/envs/face2/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 819, in next
return self._process_data(data)
File "/home/hermes/anaconda3/envs/face2/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 846, in _process_data
data.reraise()
File "/home/hermes/anaconda3/envs/face2/lib/python3.7/site-packages/torch/_utils.py", line 369, in reraise
raise self.exc_type(msg)
FileNotFoundError: Caught FileNotFoundError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/hermes/anaconda3/envs/face2/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 178, in _worker_loop
data = fetcher.fetch(index)
File "/home/hermes/anaconda3/envs/face2/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/hermes/anaconda3/envs/face2/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/media/labpc/rename/face_antispoofing/CDCN-master/CVPR2020_paper_codes/Load_OULUNPU_train.py", line 231, in getitem
image_x, map_x = self.get_single_image_x(image_path, map_path, videoname)
File "/media/labpc/rename/face_antispoofing/CDCN-master/CVPR2020_paper_codes/Load_OULUNPU_train.py", line 249, in get_single_image_x
frames_total = len([name for name in os.listdir(map_path) if os.path.isfile(os.path.join(map_path, name))])
FileNotFoundError: [Errno 2] No such file or directory: '/media/labpc/rename/face_antispoofing/dataset/data/OULU/Oulutrain_images/3_1_18_2'

I always get this error

from cdcn.

punitha-valli avatar punitha-valli commented on September 26, 2024

@lz28lz28
@ZitongYu
@silvercherry
can you please explain to me about the map_dir, and the oulu_npu dataset has video, but as per the source code Train-images, Dev_images, Test_images are required.
Can you please explain it to me?
I am also a student, so it will be greatly helpful for me to do my research work.
can you please communicate with me, I tried a lot of ways to communicate with the author
thanks in advance

map dir is the path to store pictures. The oulu data set is a video, which must be processed into a picture by itself, and each video is subjected to frame extraction

Traceback (most recent call last):
File "/media/labpc/rename/face_antispoofing/CDCN-master/CVPR2020_paper_codes/train_CDCN.py", line 443, in
train_test()
File "/media/labpc/rename/face_antispoofing/CDCN-master/CVPR2020_paper_codes/train_CDCN.py", line 286, in train_test
for i, sample_batched in enumerate(dataloader_train):
File "/home/hermes/anaconda3/envs/face2/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 819, in next
return self._process_data(data)
File "/home/hermes/anaconda3/envs/face2/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 846, in _process_data
data.reraise()
File "/home/hermes/anaconda3/envs/face2/lib/python3.7/site-packages/torch/_utils.py", line 369, in reraise
raise self.exc_type(msg)
FileNotFoundError: Caught FileNotFoundError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/hermes/anaconda3/envs/face2/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 178, in _worker_loop
data = fetcher.fetch(index)
File "/home/hermes/anaconda3/envs/face2/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/hermes/anaconda3/envs/face2/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/media/labpc/rename/face_antispoofing/CDCN-master/CVPR2020_paper_codes/Load_OULUNPU_train.py", line 231, in getitem
image_x, map_x = self.get_single_image_x(image_path, map_path, videoname)
File "/media/labpc/rename/face_antispoofing/CDCN-master/CVPR2020_paper_codes/Load_OULUNPU_train.py", line 249, in get_single_image_x
frames_total = len([name for name in os.listdir(map_path) if os.path.isfile(os.path.join(map_path, name))])
FileNotFoundError: [Errno 2] No such file or directory: '/media/labpc/rename/face_antispoofing/dataset/data/OULU/Oulutrain_images/3_1_18_2'

I always get this error, Thanks you so much for your reply .

i lkie to communicate forther with you regarding the code [email protected], its my communication box

from cdcn.

punitha-valli avatar punitha-valli commented on September 26, 2024

@lz28lz28
@silvercherry
@ZitongYu

FileNotFoundError: [WinError 3] The system cannot find the path specified: 'D:/face_anti_spoofing/dataset/OULUNPU/Data/demo/Train/Depth_map_1/1_1_01_3'

Even I have images in this folder,...

How about the def single_iamge_x():

I have confusion in it,

Because i have already splitted up the oulu dataset videos 1_1_01_1 into 1_1_01_1_1, 1_1_01_1_2,1_1_01_1_3 like this....,

def get_single_image_x(self, image_path, map_path, videoname):

    for name in os.listdir(map_path):
        print(name)

    print(os.path.isfile(os.path.join(map_path, videoname)))

    frames_total = len([name for name in os.listdir(map_path) if os.path.isfile(os.path.join(map_path, name))])
    #print(frames_total)
    
    # random choose 1 frame
    for temp in range(500):
        image_id = np.random.randint(1, frames_total-1)
        
        s = "_%03d_scene" % image_id
        image_name = videoname + s + '.jpg'
        bbox_name = videoname + s + '.dat'
        bbox_path = os.path.join(image_path, bbox_name)
        s = "_%03d_depth1D" % image_id
        map_name = videoname + s + '.jpg'
        map_path2 = os.path.join(map_path, map_name)
    
        # some .dat & map files have been missing  
        if os.path.exists(bbox_path) & os.path.exists(map_path2):
            map_x_temp2 = cv2.imread(map_path2, 0)
            if map_x_temp2 is not None:
                break
    
    about this one, 

here the error occurs, FileNotFoundError: [WinError 3] The system cannot find the path specified: 'D:/face_anti_spoofing/dataset/OULUNPU/Data/demo/Train/Depth_map_1/1_1_01_3',..

any to please, explain to me about it,.

Thanks in advance

from cdcn.

maywander avatar maywander commented on September 26, 2024

您好,感谢您开源工作代码,我使用CDCN这个模型进行跨库实验,得到如下的结果(casia的real人脸大部分都判定为fake), TP: 7 TN: 196 FP: 74 FN: 83 Accuracy: 0.5638888888888889 FAR: 0.2740740740740741 FRR: 0.9222222222222223 HTER: 0.5981481481481482 HTER与论文差距较大,想问下您当时有遇到这种问题吗,如果有的话是如何解决的。第二个问题是请问您训练模型时,是在loss最小时保存模型,还是在什么时候保存模型?十分感谢,期待您的回复!

请问在训练完能生成map_x后,如何将模型放在casia数据集上测试呢?从map_score如何判断是真人脸还是假人脸呢?

from cdcn.

jamesdongdong avatar jamesdongdong commented on September 26, 2024

您好,感谢您开源工作代码,我使用CDCN这个模型进行跨库实验,得到如下的结果(casia的real人脸大部分都判定为fake), TP: 7 TN: 196 FP: 74 FN: 83 Accuracy: 0.5638888888888889 FAR: 0.2740740740740741 FRR: 0.9222222222222223 HTER: 0.5981481481481482 HTER与论文差距较大,想问下您当时有遇到这种问题吗,如果有的话是如何解决的。第二个问题是请问您训练模型时,是在loss最小时保存模型,还是在什么时候保存模型?十分感谢,期待您的回复!

老哥问题解决了吗?我在casia上train然后replay上检测的话性能还可以,但是反过来的话和你那个差不多,real大部分判断为fake

from cdcn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.