MTCNN-Tensorflow icon indicating copy to clipboard operation
MTCNN-Tensorflow copied to clipboard

Error generating tfdata_12net

Open vonclites opened this issue 6 years ago • 4 comments

After running gen_shuffle_data.py, I get 644,000 negative samples.

https://github.com/wangbm/MTCNN-Tensorflow/blob/4ae3a720dc08aebb107f9ed0335c7b0b5e3e22c6/prepare_data/gen_tfdata_12net.py#L77

generates an error because I cannot sample 1,000,000 times without replacement from a pool of 644,000.

Is this intended to be sampling 100,000 times? Or was gen_shuffle_data.py supposed to generate over a million samples?

Thanks!

vonclites avatar Aug 03 '18 17:08 vonclites

I found the same error with you

Honourab avatar Dec 10 '18 07:12 Honourab

I think that's because the dataset is not enough 1000000, you can set replace=True, but it cause the dataset will be reselected.

johnny88850tw avatar Jan 18 '19 05:01 johnny88850tw

I changed 'replace=True' to my script and still lead to the error.

kyawthiha31 avatar Aug 15 '19 06:08 kyawthiha31

change line 77 into this: try: neg_keep = npr.choice(len(neg), size=1000000, replace=False) except ValueError: neg_keep = npr.choice(len(neg), size=1000000, replace=True)

galuhputraa avatar Nov 25 '22 01:11 galuhputraa