Skip to content

Commit 8766e73

Browse files
Merge pull request #40 from Lucs1590/master
Readme and CI/CD
2 parents de0a625 + 26ec8a6 commit 8766e73

File tree

5 files changed

+46
-11
lines changed

5 files changed

+46
-11
lines changed

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
8+
- package-ecosystem: "pip"
9+
directory: "/"
10+
schedule:
11+
interval: "weekly"

.github/workflows/greetings.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Greetings
2+
3+
on: [pull_request, issues]
4+
5+
jobs:
6+
greeting:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
issues: write
10+
pull-requests: write
11+
steps:
12+
- uses: actions/first-interaction@v1
13+
with:
14+
repo-token: ${{ secrets.GITHUB_TOKEN }}
15+
issue-message: 'Thanks for contributing this issue! We will be replying soon.'
16+
pr-message: 'Thanks for contributing this PR! We will validade soon.'

images/logo.png

-16.2 KB
Loading

readme.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,33 @@
33

44
Are you tired to label your images by hand to work with object detection? Have hundreds or thousands of images to label? Then this project will make your life easier, just create some annotations and let the machine do the rest for you!
55

6-
## Requirements
6+
## Contents
7+
- [Requirements](#requirements)
8+
- [How to run](#usage)
9+
- [TensorFlow < 2.x](#minor)
10+
- [TensorFlow >= 2.x](#greater)
11+
- [Any trouble?](#trouble)
12+
13+
14+
## Requirements <a id="requirements"></a>
715
- You will need to [clone the TensorFlow repository](https://github.com/tensorflow/models)
816
- Install the [dependencies](https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/tensorflow-1.14/install.html) for object detection
917

10-
## How to run
18+
## How to run <a id="usage"></a>
1119
- Copy and paste the files **generate_xml.py** and **visualization_utils.py** into the **research/object_detection/utils** in the tensorflow repo.
1220
- Change the xml path in generate_xml.py to put your own local path.
1321
- Add the images you want to label into the images folder
1422

15-
### TensorFlow < 2.x
23+
### TensorFlow < 2.x <a id="minor"></a>
1624
- Add your pre-treined model (as a fronzen inference graph) and label map into the 'graphs' folder.
1725
- Inside the auto_annotate folder run: **python3 scripts/detection_images.py**
18-
### TensorFlow >= 2.x
26+
### TensorFlow >= 2.x <a id="greater"></a>
1927
- If you have TF 2.x, just run the following command:
2028
```
2129
python3 scripts/detection_img_tf2.py --saved_model /path-saved-model --labelmap /path-label-map.pbtxt --imgs /path-of-the-imgs
2230
```
2331

2432
- If it runs correctly, you will see the inference results and the xml in your respective folders!
2533

26-
## Any trouble?
34+
## Any trouble? <a id="trouble"></a>
2735
If you have trouble or doubt check my [tutorial on medium](https://medium.com/@alvaroleandrocavalcante/auto-annotate-images-for-tensorflow-object-detection-19b59f31c4d9?sk=0a189a8af4874462c1977c6f6738d759). You can also open an issue and I'll hep you!

scripts/visualization_utils.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@
4444
matplotlib.use('Agg') # pylint: disable=multiple-statements
4545

4646

47-
_TITLE_LEFT_MARGIN = 10
48-
_TITLE_TOP_MARGIN = 10
4947
STANDARD_COLORS = [
5048
'AliceBlue', 'Chartreuse', 'Aqua', 'Aquamarine', 'Azure', 'Beige', 'Bisque',
5149
'BlanchedAlmond', 'BlueViolet', 'BurlyWood', 'CadetBlue', 'AntiqueWhite',
@@ -821,7 +819,8 @@ def visualize_boxes_and_labels_on_image_array(
821819
if not skip_labels:
822820
if not agnostic_mode:
823821
if classes[i] in six.viewkeys(category_index):
824-
class_name.append(category_index[classes[i]]['name'])
822+
class_name.append(
823+
category_index[classes[i]]['name'])
825824
new_xml = True
826825
else:
827826
class_name.append('N/A')
@@ -894,10 +893,11 @@ def visualize_boxes_and_labels_on_image_array(
894893
color=color,
895894
radius=line_thickness / 2,
896895
use_normalized_coordinates=use_normalized_coordinates)
897-
896+
898897
if new_xml != False:
899-
xml = generate_xml.GenerateXml(array_position, im_width, im_height, class_name, file_name)
900-
xml.gerenate_basic_structure()
898+
xml = generate_xml.GenerateXml(
899+
array_position, im_width, im_height, class_name, file_name)
900+
xml.gerenate_basic_structure()
901901

902902
return image
903903

0 commit comments

Comments
 (0)