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

test pretrain model with customized data #30

Closed
Anguliachao opened this issue Dec 5, 2018 · 3 comments
Closed

test pretrain model with customized data #30

Anguliachao opened this issue Dec 5, 2018 · 3 comments

Comments

@Anguliachao
Copy link

Hi @Engineering-Course ,
thank you for the great project, I''ve successfully compiled ur caffe version and try to execute run_human.sh, but it prompts the error in image transformer processing.
data_transformer.cpp:474] Check failed: img_channels == data_channels (1 vs. 3)
However I follow your instruction to make a val.txt to construct my testing image list.
the sample in my txt file such as
/images/23454.jpg
/images/3534.jpg
all of them are 3 channel RGB images, but still I got this error , may I ask about the reason? seems like img_channels should also be 3?
Thank you if you can check this for me.

@Anguliachao
Copy link
Author

Anguliachao commented Dec 5, 2018

The full message as follows:
./run_human.sh Testing net human/attention Running /XXX/caffe_ssl/.build_release/tools/caffe.bin test --model=human/config/attention/test_val.prototxt --weights=human/model/attention/test.caffemodel --gpu=0 --iterations=143 F1205 09:28:22.869490 14228 data_transformer.cpp:474] Check failed: img_channels == data_channels (1 vs. 3) *** Check failure stack trace: *** @ 0x7f91ac8895cd google::LogMessage::Fail() @ 0x7f91ac88b433 google::LogMessage::SendToLog() @ 0x7f91ac88915b google::LogMessage::Flush() @ 0x7f91ac88be1e google::LogMessageFatal::~LogMessageFatal() @ 0x7f91acf124fa caffe::DataTransformer<>::TransformImgAndSeg() @ 0x7f91ad0403d0 caffe::ImageSegDataLayer<>::load_batch() @ 0x7f91acff312f caffe::BasePrefetchingDataLayer<>::InternalThreadEntry() @ 0x7f91ad0f2e85 caffe::InternalThread::entry() @ 0x7f91a25cc5d5 (unknown) @ 0x7f91a1e7a6ba start_thread @ 0x7f91ab42441d clone @ (nil) (unknown) Aborted (core dumped)
As for me , during test, we should only read RGB images correct? No need to read Seg Img, How exactly you made the val.txt and val_id.txt

@Engineering-Course
Copy link
Owner

Sorry, but the current code still needs Seg Img during testing.
In another word, the txt file should be like /image/23454.jpg /segmentation/23454.jpg.
You may generate an empty Seg Img for your data to suit the input.
Or you can revise the ImageSegData layer.

@Anguliachao
Copy link
Author

@Engineering-Course Ok sure , will revice the data layer ,thank you.

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

2 participants