Open Sesefad0u opened 6 years ago
I think you should see tutorial (Part 3: detection baseline).
After you run cd ../detection && python3 merge_results.py (and have run all code above it), you will get detection results in detection/products/detections.jsonl.
If I want to use the existing models, are all the images shared(image-test, image-trainval) necessary? If not, should I begin from ### Download trained models? New comer here, thx.
I think you could download only testset but not download trainval. Annotation files must be downloaded. Some files are generated in training steps. If you don't download trainval images, some scripts may fail. If it fails in some images not found, you can fill them with any image of shape 2048x2048x3.
I think you could download only testset but not download trainval. Annotation files must be downloaded. Some files are generated in training steps. If you don't download trainval images, some scripts may fail. If it fails in some images not found, you can fill them with any image of shape 2048x2048x3.
Then how about using our own images? Should still download the image-test or just turn ours into 2048x2048x3(and put them into the correct place)?
@kdzmwl I think it can be done by changing detection/prepare_test_data.py.
When I run prepare_test_data.py
,There are no text come out in detection/products/test/
as you say that this step will output detection/products/test/*.{jpg,txt}
. And when I run eval.py
, It's normal . But when merge_results.py
run , it tells me that there are no file called like "chinese.0.txt" and so on . And I found that the file in products/results is called"chinese.00.txt,chinese.010.txt,...chinese.10.txt, chinese.100.txt....." . What's wrong with it and what should I do? Thanks!
We didn't change your code, just put a picture of a zip file in image/test (a total of seven zip) and changed info.json. The code eval.py runs without error, but runs merge_results.py When he told us that there was no chinese.0.txt, we looked at products/result and found that only Chinese.00.txt was associated with this. And in the end we want to throw our own pictures and run out of the results, then shouldn't this be the case?
I have 4 GPU on my server. What should I change in eval.py can make it run with 4GPU ? (It run at only one GPU now),Thanks!
We decide which GPU to use in https://github.com/yuantailing/ctw-baseline/blob/f7b3467fa5814fac39f2ec68d9df54273537b9f7/detection/eval.py#L48 . Accroding to detection/settings.py, TEST_NUM_GPU = 2, it will use 2 GPUs.
Why your code use only 1 GPU? Did git diff
indicates that there is no change?
And output filename is determined in https://github.com/yuantailing/ctw-baseline/blob/master/detection/eval.py#L30 , the number is formatted to string by '.{}'.format(split_id)
, why your .txt has a leading "0"?
But I print it and it just output" chinese.0.data", and it's correct . I download a new from your github and it's output is chinese.00.txt , too.
And we found there are no cate_id in chinese.xx.txt,what should i do ?Thanks
According to https://github.com/yuantailing/darknet/commit/fe0a91a439894f0f787c27bc7910b9b0179d3a2e#diff-265d49678e2dbc64f1aeb120e056f2bfR176 , cate_id
should be the first number in each line.
Did you clone the right version of darknet? It is defined in https://github.com/yuantailing/ctw-baseline/blob/master/.gitmodules (clone from yuantailing/darknet and switch to branch ctw).
The Eorrr is in https://github.com/yuantailing/ctw-baseline/blob/f7b3467fa5814fac39f2ec68d9df54273537b9f7/detection/merge_results.py#L44 (file_path, cate_id, x, y, w, h, prob = line.split()) and the text is 3045513_2_1_1 0.012630 95.435127 23.111725 150.123352 120.032806
in chinese.xx.txt
It seems you are using a wrong version of darknet.
I use the darknet in your github ...
But, why no cate_id ... Could you run to this line?
https://github.com/yuantailing/darknet/blob/ctw/examples/detector.c#L176
(commit id is 801409731a46b072b8ee11f6f2acfa29cb16f165: https://github.com/yuantailing/darknet/blob/801409731a46b072b8ee11f6f2acfa29cb16f165/examples/detector.c#L176 )
It can't
Thanks for your share,it's good . But there are too many file for a new, and i just want that use it like this :input a picture with some text in it and output the text into a text file via the trained model in your project. Which py file should i use and what should i do ? Thanks !