본문 바로가기
studies/Back-end

텐서플로우의 mobilenet 모델은 라쿤이란 단어를 모른다

by mjkcool 2021. 4. 17.
728x90
반응형

랫서팬더와 라쿤은 다르다구요😂 사실 같다면 슬퍼..

조금 더 자연 속의 라쿤 사진을 가져왔으나...  "북극여우"

Please add raccoon...

 

 

  • 모델 소스 위치

github.com/tensorflow/tfjs-models/tree/master/mobilenet

 

tensorflow/tfjs-models

Pretrained models for TensorFlow.js. Contribute to tensorflow/tfjs-models development by creating an account on GitHub.

github.com

 

  • 모델 코드
<!-- Load TensorFlow.js. This is required to use MobileNet. -->
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@1.0.1"> </script>
<!-- Load the MobileNet model. -->
<script src="https://cdn.jsdelivr.net/npm/@tensorflow-models/mobilenet@1.0.0"> </script>

<!-- Replace this with your image. Make sure CORS settings allow reading the image! -->
<img id="img" src="raccoon.jpg" width="300px"></img>

<!-- Place your code in the script tag below. You can also use an external .js file -->
<script>
// Notice there is no 'import' statement. 'mobilenet' and 'tf' is
// available on the index-page because of the script tag above.

const img = document.getElementById('img');

// Load the model.
mobilenet.load().then(model => {
// Classify the image.
model.classify(img).then(predictions => {
  console.log('Predictions: ');
  console.log(predictions);
});
});
</script>

 

 

계속해서 업데이트해 나갈 예정. with RACCOONS🤎

 

 

  • 참고

opentutorials.org/course/4628/29770

728x90
반응형