Recommendation
phamleduy04 opened this issue · 4 comments
Hi, I tried to use the bot for different reason: Detect the presence of the TikTok logo
I already have a model. What are your recommendation for this use:
If I check frame by frame and give out the conclusion sometimes I got some false positive.
I tried to calculate the confidence level by total_frame_scanned / frames_positve
but still got some positive false. (Some video actually have tiktok logo but the confidence level too low)
Hi,
This implementation is more or like still work in progress. I didn't have time to tweak variables. What you could is to train your model differently to get more accurate results.
If you used train.py you can try changing parameters of the hog function
train.py:40
or machine learning thing
train.py:58
you could also try different machine learning algorithms like "Support vector machines (SVM)"
As far as I am aware the larger dataset your have the better accuracy you will get
Thank you! Also sometimes when I run the train script I get some errors. Some files can't be processed but I don't know why
OpenCV(4.5.5) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\resize.cpp:4052: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'
C:\Users\phaml\Documents\GitHub\tiktok-video-detector/dataset\80-no.png
Training Image couldn't be read
The image is first turned in to grayscale version after that it passed through canny filter which is a edge detection filter then it is resized based on edges. if the image doesn't have any edges the method will throw an error as it doesn't know how to resize it and therefor the image will be ignored. It usually happens with images that don't have much details in them or have just one solid colour.
train.py:34
I am still not sure how should I handle this error as those images usually don't contain any useful information for AI to work with. Right now they are just ignored
thank you for your response :)